refactor: service address
Build Test / test (pull_request) Successful in 37s
JS Unit Tests / test (pull_request) Failing after 37s
PHP Unit Tests / test (pull_request) Successful in 59s

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-06-16 13:31:23 -04:00
parent 0e4bd905a2
commit bea7c1d0fb
10 changed files with 168 additions and 44 deletions
+15 -3
View File
@@ -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[];
}
/**