refactor: service address
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
+15
-3
@@ -1,6 +1,7 @@
|
||||
/**
|
||||
* Service type definitions
|
||||
*/
|
||||
import type { ServiceAddressObject } from '@/models/address';
|
||||
import type { Identity } from '@/models/identity';
|
||||
import type { Location } from '@/models/location';
|
||||
import type {
|
||||
@@ -40,6 +41,15 @@ export interface ServiceCapabilitiesInterface {
|
||||
[key: string]: boolean | object | string | string[] | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Service sender address (primary or secondary/alias)
|
||||
* Mirrors the shared Mail AddressInterface JSON shape
|
||||
*/
|
||||
export interface ServiceAddressInterface {
|
||||
address: string;
|
||||
label?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Service information
|
||||
*/
|
||||
@@ -53,16 +63,18 @@ export interface ServiceInterface {
|
||||
capabilities?: ServiceCapabilitiesInterface;
|
||||
location?: ServiceLocation | null;
|
||||
identity?: ServiceIdentity | null;
|
||||
primaryAddress?: string | null;
|
||||
secondaryAddresses?: string[] | null;
|
||||
primaryAddress?: ServiceAddressInterface | null;
|
||||
secondaryAddresses?: ServiceAddressInterface[] | null;
|
||||
auxiliary?: Record<string, any>; // Provider-specific extension data
|
||||
}
|
||||
|
||||
export interface ServiceModelInterface extends Omit<{
|
||||
[K in keyof ServiceInterface]-?: Exclude<ServiceInterface[K], undefined>;
|
||||
}, '@type' | 'version' | 'location' | 'identity'> {
|
||||
}, '@type' | 'version' | 'location' | 'identity' | 'primaryAddress' | 'secondaryAddresses'> {
|
||||
location: Location | null;
|
||||
identity: Identity | null;
|
||||
primaryAddress: ServiceAddressObject | null;
|
||||
secondaryAddresses: ServiceAddressObject[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user