@zextras/carbonio-admin-ui
Version:
The Zextras Carbonio web admin
87 lines (75 loc) • 1.64 kB
TypeScript
/*
* SPDX-FileCopyrightText: 2021 Zextras <https://www.zextras.com>
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
export type ZimletProp = {
name: string;
zimlet: string;
_content: string;
};
export type SoapFetch = <Request, Response>(
api: string,
body: Request,
account?: string
) => Promise<Response>;
export type SoapFetchRequest = <Request, Response>(
api: string,
body?: Request,
account?: string
) => Promise<Response>;
export type SoapFetchPost = <Request, Response>(
apiURL: string,
body: Request,
api?: string,
otherAccount?: string
) => Promise<Response>;
export type SoapFetchExternal = <Request, Response>(
apiURL: string,
body: Request,
api?: string,
method?: string
) => Promise<Response>;
export type AccountState = {
account?: Account;
settings: AccountSettings;
zimbraVersion: string;
usedQuota: number;
};
export type Account = {
// apps: Array<AppPkgDescription>;
id: string;
name: string;
displayName: string;
// settings: AccountSettings;
signatures: { signature: Array<unknown> };
identities: any;
rights: AccountRights;
};
export type DelegateProps = {
email: string;
right: string;
};
export type AccountSettings = {
attrs: Record<string, string | number>;
prefs: Record<string, string | number>;
props: Array<ZimletProp>;
};
export type AccountRightTarget = {
d: string;
id: string;
name: string;
type: string;
};
export type AccountRightName =
| 'sendAs'
| 'sendAsDistList'
| 'viewFreeBusy'
| 'sendOnBehalfOf'
| 'sendOnBehalfOfDistList';
export type AccountRights = {
targets: Array<{
right: AccountRightName;
target: Array<AccountRightTarget>;
}>;
};