@zextras/carbonio-shell-ui
Version:
The Zextras Carbonio web client
111 lines (110 loc) • 3.92 kB
TypeScript
import type { AccountSettingsPrefs } from '@zextras/carbonio-ui-soap-lib';
export interface ZimletProp {
name: string;
zimlet: string;
_content: string;
}
export type AccountSettings = {
attrs: AccountSettingsAttrs;
prefs: AccountSettingsPrefs;
props: Array<ZimletProp>;
};
export type AccountState = {
authenticated: boolean;
account?: Account;
settings: AccountSettings;
zimbraVersion?: string;
usedQuota: number;
};
export interface Identity {
/** Identity name */
name?: string;
/** Identity ID */
id: string;
/** Attributes */
_attrs: IdentityAttrs;
}
export type Signature = {
name: string;
id: string;
content?: [
{
type: 'text/plain' | 'text/html';
_content: string;
}
];
};
export type Account = {
id: string;
name: string;
displayName: string;
signatures: {
signature: Array<Signature>;
};
identities: {
identity: Array<Identity>;
};
rights: AccountRights;
};
export type BooleanString = 'TRUE' | 'FALSE';
export type DurationUnit = 'd' | 'h' | 'm' | 's' | 'ms';
export type Duration = `${number}${DurationUnit | ''}`;
export type AccountSettingsAttrs = {
zimbraFeatureOptionsEnabled?: BooleanString;
zimbraIdentityMaxNumEntries?: number;
zimbraMailAlias?: string | Array<string>;
zimbraAllowFromAddress?: string | Array<string>;
zimbraMailIdleSessionTimeout?: Duration;
[key: string]: string | number | Array<string | number> | undefined;
};
export interface IdentityAttrs {
/** default mail signature for account/identity/dataSource */
zimbraPrefDefaultSignatureId?: string;
zimbraPrefForwardReplyFormat?: `'text' | 'html' | 'same'`;
/** forward/reply signature id for account/identity/dataSource */
zimbraPrefForwardReplySignatureId?: string;
/** email address to put in from header. Deprecated on data source as of bug 67068. */
zimbraPrefFromAddress?: string;
/** Type of the email address from header. (sendAs or sendOnBehalfOf) */
zimbraPrefFromAddressType?: 'sendAs' | 'sendOnBehalfOf';
/** personal part of email address put in from header */
zimbraPrefFromDisplay?: string;
zimbraPrefIdentityId?: string;
/** name of the identity */
zimbraPrefIdentityName?: string;
zimbraPrefMailSignatureStyle?: 'outlook' | 'internet';
/** address to put in reply-to header */
zimbraPrefReplyToAddress?: string;
/** personal part of email address put in reply-to header */
zimbraPrefReplyToDisplay?: string;
/** TRUE if we should set a reply-to header */
zimbraPrefReplyToEnabled?: BooleanString;
/** name of folder to save sent mail in (deprecatedSince 5.0 in identity) */
zimbraPrefSentMailFolder?: string;
zimbraPrefWhenInFolderIds?: Array<string | null>;
/** TRUE if we should look at zimbraPrefWhenInFolderIds (deprecatedSince 5.0 in account) */
zimbraPrefWhenInFoldersEnabled?: BooleanString;
/** addresses that we will look at to see if we should use an identity (deprecatedSince 5.0 in account) */
zimbraPrefWhenSentToAddresses?: Array<string | null>;
/** TRUE if we should look at zimbraPrefWhenSentToAddresses (deprecatedSince 5.0 in account) */
zimbraPrefWhenSentToEnabled?: BooleanString;
/** whether or not to save outgoing mail (deprecatedSince 5.0 in identity) */
zimbraPrefSaveToSent?: BooleanString;
}
export type AccountRightTargetEmail = {
addr: string;
};
export type AccountRightTarget = {
d: string;
id: string;
name: string;
type: string;
email: Array<AccountRightTargetEmail>;
};
export type AccountRightName = 'sendAs' | 'sendAsDistList' | 'viewFreeBusy' | 'sendOnBehalfOf' | 'sendOnBehalfOfDistList';
export type AccountRights = {
targets: Array<{
right: AccountRightName;
target: Array<AccountRightTarget>;
}>;
};