@zimbra/api-client 99.0.0 → 100.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc.json +1 -2
- package/dist/schema.graphql +10 -2
- package/dist/src/apollo/local-batch-link.d.ts +0 -1
- package/dist/src/apollo/offline-queue-link/index.d.ts +1 -4
- package/dist/src/batch-client/index.d.ts +4 -1
- package/dist/src/batch-client/types.d.ts +1 -1
- package/dist/src/normalize/entities.d.ts +1 -0
- package/dist/src/normalize/index.d.ts +1 -1
- package/dist/src/request/types.d.ts +0 -1
- package/dist/src/schema/generated-schema-types.d.ts +13 -2
- package/dist/src/utils/map-values-deep.d.ts +1 -0
- package/dist/zm-api-js-client.esm.js +201 -153
- package/dist/zm-api-js-client.esm.js.map +1 -1
- package/dist/zm-api-js-client.js +8 -8
- package/dist/zm-api-js-client.js.map +1 -1
- package/dist/zm-api-js-client.umd.js +8 -8
- package/dist/zm-api-js-client.umd.js.map +1 -1
- package/package-lock.json +339 -178
- package/package.json +3 -3
- package/rollup.config.js +1 -1
- package/src/apollo/offline-queue-link/util.ts +1 -2
- package/src/apollo/zimbra-error-link.ts +4 -3
- package/src/apollo/zimbra-in-memory-cache.ts +3 -3
- package/src/batch-client/index.ts +72 -42
- package/src/batch-client/types.ts +1 -1
- package/src/normalize/entities.ts +6 -1
- package/src/normalize/index.ts +42 -39
- package/src/request/index.ts +36 -48
- package/src/request/types.ts +0 -1
- package/src/schema/generated-schema-types.ts +15 -2
- package/src/schema/schema.graphql +10 -2
- package/src/schema/schema.ts +3 -2
- package/src/schema/session-handler.ts +1 -2
- package/src/utils/map-values-deep.ts +10 -2
- package/src/utils/normalize-attrs-custommetadata.ts +5 -6
- package/src/utils/normalize-otherAttribute-contact.ts +29 -19
package/.babelrc.json
CHANGED
package/dist/schema.graphql
CHANGED
|
@@ -1078,7 +1078,7 @@ type SizeCondition {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
|
|
1080
1080
|
type FilterCondition {
|
|
1081
|
-
allOrAny: FilterMatchCondition
|
|
1081
|
+
allOrAny: FilterMatchCondition # condition
|
|
1082
1082
|
addressBook: [HeaderCheckCondition] # addressBookTest
|
|
1083
1083
|
address: [AddressCondition] # addressTest
|
|
1084
1084
|
attachment: [BasicCondition] # attachmentTest
|
|
@@ -1561,6 +1561,7 @@ type AccountInfoAttrs {
|
|
|
1561
1561
|
zimbraFeatureDeliveryStatusNotificationEnabled: Boolean
|
|
1562
1562
|
zimbraPop3Enabled: Boolean
|
|
1563
1563
|
zimbraFeatureOptionsEnabled: Boolean
|
|
1564
|
+
zimbraFeatureContactsEnabled: Boolean
|
|
1564
1565
|
}
|
|
1565
1566
|
|
|
1566
1567
|
type AccountCos {
|
|
@@ -1707,6 +1708,7 @@ type Preferences {
|
|
|
1707
1708
|
zimbraPrefUseTimeZoneListInCalendar: Boolean
|
|
1708
1709
|
zimbraPrefMailForwardingAddress: String
|
|
1709
1710
|
zimbraPrefMailLocalDeliveryDisabled: Boolean
|
|
1711
|
+
zimbraPrefFolderTreeOpen: Boolean
|
|
1710
1712
|
zimbraPrefTagTreeOpen: Boolean
|
|
1711
1713
|
zimbraPrefPowerPasteEnabled: Boolean
|
|
1712
1714
|
zimbraPrefDisplayTimeInMailList: Boolean
|
|
@@ -2151,6 +2153,7 @@ type MailboxMetadataAttrs {
|
|
|
2151
2153
|
zimbraPrefContactSourceFolderID: String
|
|
2152
2154
|
zimbraPrefHideMuteConvModal: Boolean
|
|
2153
2155
|
zimbraPrefColorMode: String
|
|
2156
|
+
zimbraPrefSidebarCollapsed: Boolean
|
|
2154
2157
|
}
|
|
2155
2158
|
|
|
2156
2159
|
type MailboxMetadataMeta {
|
|
@@ -2187,6 +2190,7 @@ input MailboxMetadataSectionAttrsInput {
|
|
|
2187
2190
|
zimbraPrefContactSourceFolderID: String
|
|
2188
2191
|
zimbraPrefHideMuteConvModal: Boolean
|
|
2189
2192
|
zimbraPrefColorMode: String
|
|
2193
|
+
zimbraPrefSidebarCollapsed: Boolean
|
|
2190
2194
|
}
|
|
2191
2195
|
|
|
2192
2196
|
type MimePart {
|
|
@@ -2639,6 +2643,7 @@ input FolderActionInput {
|
|
|
2639
2643
|
folderId: ID
|
|
2640
2644
|
zimbraId: ID
|
|
2641
2645
|
color: Int,
|
|
2646
|
+
rgb: String,
|
|
2642
2647
|
retentionPolicy: [RetentionPolicyInput]
|
|
2643
2648
|
}
|
|
2644
2649
|
|
|
@@ -2659,6 +2664,7 @@ input PolicyAttrsInput {
|
|
|
2659
2664
|
input CreateTagInput {
|
|
2660
2665
|
name: String!
|
|
2661
2666
|
color: Int
|
|
2667
|
+
rgb: String
|
|
2662
2668
|
}
|
|
2663
2669
|
|
|
2664
2670
|
# Special case of FolderAction for `changeFolderColor` resolver
|
|
@@ -2791,6 +2797,7 @@ input PreferencesInput {
|
|
|
2791
2797
|
zimbraPrefUseTimeZoneListInCalendar: Boolean
|
|
2792
2798
|
zimbraPrefMailForwardingAddress: String
|
|
2793
2799
|
zimbraPrefMailLocalDeliveryDisabled: Boolean
|
|
2800
|
+
zimbraPrefFolderTreeOpen: Boolean
|
|
2794
2801
|
zimbraPrefTagTreeOpen: Boolean
|
|
2795
2802
|
zimbraPrefPowerPasteEnabled: Boolean
|
|
2796
2803
|
zimbraPrefDisplayTimeInMailList: Boolean
|
|
@@ -3270,6 +3277,7 @@ input SaveDocumentInput {
|
|
|
3270
3277
|
name: String #name
|
|
3271
3278
|
version: Float #ver # Note :same item may have different versions (i.e same names) will need to implement ListDocumentRevisionsRequest
|
|
3272
3279
|
contentType: String #ct
|
|
3280
|
+
content: String
|
|
3273
3281
|
upload: uploadDocument #upload with a id
|
|
3274
3282
|
messageData: [messagePartForDocument] #m
|
|
3275
3283
|
descriptionEnabled: Boolean #descEnabled
|
|
@@ -3533,6 +3541,7 @@ type Query {
|
|
|
3533
3541
|
downloadAttachment(id: ID!, part: ID!): Attachment
|
|
3534
3542
|
downloadDocument(id: ID!, url: String!): Attachment
|
|
3535
3543
|
listDocumentRevisions(id: ID!, version: Int!, count: Int!): Document
|
|
3544
|
+
getItem(id: ID!): Document
|
|
3536
3545
|
discoverRights(right: [DiscoverRightInput!]!): DiscoverRights
|
|
3537
3546
|
freeBusy(names: [String!]!, start: Float, end: Float, excludeUid: String): [FreeBusy]
|
|
3538
3547
|
getContact(
|
|
@@ -3736,7 +3745,6 @@ type Mutation {
|
|
|
3736
3745
|
password: String!
|
|
3737
3746
|
username: String!
|
|
3738
3747
|
authToken: String
|
|
3739
|
-
csrfToken: String
|
|
3740
3748
|
): AuthResponse
|
|
3741
3749
|
modifyProfileImage(
|
|
3742
3750
|
content: String
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="zen-observable" />
|
|
2
1
|
import { ApolloLink, FetchResult, NextLink, Observable, Operation } from '@apollo/client/core';
|
|
3
2
|
import { OfflineQueueLinkOptions, OperationEntry, StorageProvider } from './types';
|
|
4
3
|
export declare class OfflineQueueLink extends ApolloLink {
|
|
@@ -17,9 +16,7 @@ export declare class OfflineQueueLink extends ApolloLink {
|
|
|
17
16
|
}) => Promise<void> | undefined;
|
|
18
17
|
persist: () => Promise<any>;
|
|
19
18
|
purge: () => Promise<any>;
|
|
20
|
-
request(operation: Operation, forward: NextLink): Observable<FetchResult
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
}, Record<string, any>, Record<string, any>>>;
|
|
19
|
+
request(operation: Operation, forward: NextLink): Observable<FetchResult>;
|
|
23
20
|
retry: () => Promise<void>;
|
|
24
21
|
sync: ({ apolloClient }: {
|
|
25
22
|
apolloClient?: any;
|
|
@@ -32,7 +32,7 @@ export declare class ZimbraBatchClient {
|
|
|
32
32
|
cancelPendingRemoteWipeSync: (deviceId: String) => Promise<any>;
|
|
33
33
|
cancelTask: ({ inviteId }: any) => Promise<boolean>;
|
|
34
34
|
changeFolderColor: ({ id, color }: FolderActionChangeColorInput) => Promise<boolean>;
|
|
35
|
-
changePassword: ({ loginNewPassword, password, username, dryRun, authToken
|
|
35
|
+
changePassword: ({ loginNewPassword, password, username, dryRun, authToken }: ChangePasswordOptions) => Promise<any>;
|
|
36
36
|
checkCalendar: ({ id, value }: FolderActionCheckCalendarInput) => Promise<ActionOpResponse>;
|
|
37
37
|
clientInfo: ({ by, domain }: any) => Promise<any>;
|
|
38
38
|
contactAction: (options: ActionOptions) => Promise<boolean>;
|
|
@@ -102,6 +102,9 @@ export declare class ZimbraBatchClient {
|
|
|
102
102
|
getHAB: (habRootGroupId: string) => Promise<any>;
|
|
103
103
|
getIdentities: () => Promise<{}>;
|
|
104
104
|
getImportStatus: () => Promise<any>;
|
|
105
|
+
getItem: ({ id }: any) => Promise<{
|
|
106
|
+
docs: any;
|
|
107
|
+
}>;
|
|
105
108
|
getMailboxMetadata: ({ section }: GetMailboxMetadataOptions) => Promise<{}>;
|
|
106
109
|
getMessage: ({ id, html, raw, header, read, max, ridZ, part }: GetMessageOptions) => Promise<{
|
|
107
110
|
[key: string]: any;
|
|
@@ -141,6 +141,7 @@ export interface AppointmentOptions {
|
|
|
141
141
|
id?: string;
|
|
142
142
|
}
|
|
143
143
|
export interface SaveDocumentInput {
|
|
144
|
+
content: string;
|
|
144
145
|
ct: string;
|
|
145
146
|
descEnabled: Boolean;
|
|
146
147
|
id: string;
|
|
@@ -193,7 +194,6 @@ export interface ShareInfoOptions {
|
|
|
193
194
|
}
|
|
194
195
|
export interface ChangePasswordOptions {
|
|
195
196
|
authToken: string;
|
|
196
|
-
csrfToken: string;
|
|
197
197
|
dryRun: boolean;
|
|
198
198
|
loginNewPassword: string;
|
|
199
199
|
password: string;
|
|
@@ -32,6 +32,7 @@ export declare const AutoCompleteGALResponse: Entity;
|
|
|
32
32
|
export declare const Appointment: Entity;
|
|
33
33
|
export declare const Document: Entity;
|
|
34
34
|
export declare const ListDocumentRevisions: Entity;
|
|
35
|
+
export declare const GetItem: Entity;
|
|
35
36
|
export declare const MessagePartInputForDocuments: Entity;
|
|
36
37
|
export declare const SaveDocument: Entity;
|
|
37
38
|
export declare const SearchResponse: Entity;
|
|
@@ -4,7 +4,7 @@ export declare class Entity {
|
|
|
4
4
|
private mapping;
|
|
5
5
|
constructor(mapping: EntityMapping);
|
|
6
6
|
addMapping(mapping: EntityMapping): void;
|
|
7
|
-
initInverseMapping(mapping: EntityMapping, accumulator?:
|
|
7
|
+
initInverseMapping(mapping: EntityMapping, accumulator?: EntityMapping): EntityMapping;
|
|
8
8
|
inverseKey(k: string): EntityMappingValue;
|
|
9
9
|
key(k: string): EntityMappingValue;
|
|
10
10
|
}
|
|
@@ -122,6 +122,7 @@ export type AccountInfoAttrs = {
|
|
|
122
122
|
zimbraFeatureBriefcasesEnabled?: Maybe<Scalars['Boolean']['output']>;
|
|
123
123
|
zimbraFeatureCalendarEnabled?: Maybe<Scalars['Boolean']['output']>;
|
|
124
124
|
zimbraFeatureChangePasswordEnabled?: Maybe<Scalars['Boolean']['output']>;
|
|
125
|
+
zimbraFeatureContactsEnabled?: Maybe<Scalars['Boolean']['output']>;
|
|
125
126
|
zimbraFeatureConversationsEnabled?: Maybe<Scalars['Boolean']['output']>;
|
|
126
127
|
zimbraFeatureDeliveryStatusNotificationEnabled?: Maybe<Scalars['Boolean']['output']>;
|
|
127
128
|
zimbraFeatureDiscardInFiltersEnabled?: Maybe<Scalars['Boolean']['output']>;
|
|
@@ -1101,6 +1102,7 @@ export type CreateMountpointInput = {
|
|
|
1101
1102
|
export type CreateTagInput = {
|
|
1102
1103
|
color?: InputMaybe<Scalars['Int']['input']>;
|
|
1103
1104
|
name: Scalars['String']['input'];
|
|
1105
|
+
rgb?: InputMaybe<Scalars['String']['input']>;
|
|
1104
1106
|
};
|
|
1105
1107
|
export type CsrfToken = {
|
|
1106
1108
|
__typename?: 'CsrfToken';
|
|
@@ -1560,7 +1562,7 @@ export type FilterCondition = {
|
|
|
1560
1562
|
__typename?: 'FilterCondition';
|
|
1561
1563
|
address?: Maybe<Array<Maybe<AddressCondition>>>;
|
|
1562
1564
|
addressBook?: Maybe<Array<Maybe<HeaderCheckCondition>>>;
|
|
1563
|
-
allOrAny
|
|
1565
|
+
allOrAny?: Maybe<FilterMatchCondition>;
|
|
1564
1566
|
attachment?: Maybe<Array<Maybe<BasicCondition>>>;
|
|
1565
1567
|
body?: Maybe<Array<Maybe<BodyCondition>>>;
|
|
1566
1568
|
bulk?: Maybe<Array<Maybe<BasicCondition>>>;
|
|
@@ -1692,6 +1694,7 @@ export type FolderActionInput = {
|
|
|
1692
1694
|
name?: InputMaybe<Scalars['String']['input']>;
|
|
1693
1695
|
op: Scalars['String']['input'];
|
|
1694
1696
|
retentionPolicy?: InputMaybe<Array<InputMaybe<RetentionPolicyInput>>>;
|
|
1697
|
+
rgb?: InputMaybe<Scalars['String']['input']>;
|
|
1695
1698
|
zimbraId?: InputMaybe<Scalars['ID']['input']>;
|
|
1696
1699
|
};
|
|
1697
1700
|
export type FolderQueryInput = {
|
|
@@ -2195,6 +2198,7 @@ export type MailboxMetadataAttrs = {
|
|
|
2195
2198
|
zimbraPrefSMIMEDefaultSetting?: Maybe<Scalars['String']['output']>;
|
|
2196
2199
|
zimbraPrefSMIMELastOperation?: Maybe<Scalars['String']['output']>;
|
|
2197
2200
|
zimbraPrefSharedFolderTreeOpen?: Maybe<Scalars['Boolean']['output']>;
|
|
2201
|
+
zimbraPrefSidebarCollapsed?: Maybe<Scalars['Boolean']['output']>;
|
|
2198
2202
|
zimbraPrefSmartFolderTreeOpen?: Maybe<Scalars['Boolean']['output']>;
|
|
2199
2203
|
zimbraPrefTimeFormat?: Maybe<Scalars['String']['output']>;
|
|
2200
2204
|
zimbraPrefUndoSendEnabled?: Maybe<Scalars['Boolean']['output']>;
|
|
@@ -2226,6 +2230,7 @@ export type MailboxMetadataSectionAttrsInput = {
|
|
|
2226
2230
|
zimbraPrefSMIMEDefaultSetting?: InputMaybe<Scalars['String']['input']>;
|
|
2227
2231
|
zimbraPrefSMIMELastOperation?: InputMaybe<Scalars['String']['input']>;
|
|
2228
2232
|
zimbraPrefSharedFolderTreeOpen?: InputMaybe<Scalars['Boolean']['input']>;
|
|
2233
|
+
zimbraPrefSidebarCollapsed?: InputMaybe<Scalars['Boolean']['input']>;
|
|
2229
2234
|
zimbraPrefSmartFolderTreeOpen?: InputMaybe<Scalars['Boolean']['input']>;
|
|
2230
2235
|
zimbraPrefTimeFormat?: InputMaybe<Scalars['String']['input']>;
|
|
2231
2236
|
zimbraPrefUndoSendEnabled?: InputMaybe<Scalars['Boolean']['input']>;
|
|
@@ -2552,7 +2557,6 @@ export type MutationChangeFolderColorArgs = {
|
|
|
2552
2557
|
};
|
|
2553
2558
|
export type MutationChangePasswordArgs = {
|
|
2554
2559
|
authToken?: InputMaybe<Scalars['String']['input']>;
|
|
2555
|
-
csrfToken?: InputMaybe<Scalars['String']['input']>;
|
|
2556
2560
|
dryRun?: InputMaybe<Scalars['Boolean']['input']>;
|
|
2557
2561
|
loginNewPassword: Scalars['String']['input'];
|
|
2558
2562
|
password: Scalars['String']['input'];
|
|
@@ -3028,6 +3032,7 @@ export type Preferences = {
|
|
|
3028
3032
|
zimbraPrefDisplayExternalImages?: Maybe<Scalars['Boolean']['output']>;
|
|
3029
3033
|
zimbraPrefDisplayTimeInMailList?: Maybe<Scalars['Boolean']['output']>;
|
|
3030
3034
|
zimbraPrefExternalSendersType?: Maybe<ExternalSendersType>;
|
|
3035
|
+
zimbraPrefFolderTreeOpen?: Maybe<Scalars['Boolean']['output']>;
|
|
3031
3036
|
zimbraPrefForwardReplyInOriginalFormat?: Maybe<Scalars['Boolean']['output']>;
|
|
3032
3037
|
zimbraPrefGroupMailBy?: Maybe<Scalars['String']['output']>;
|
|
3033
3038
|
zimbraPrefHtmlEditorDefaultFontColor?: Maybe<Scalars['String']['output']>;
|
|
@@ -3098,6 +3103,7 @@ export type PreferencesInput = {
|
|
|
3098
3103
|
zimbraPrefDisplayExternalImages?: InputMaybe<Scalars['Boolean']['input']>;
|
|
3099
3104
|
zimbraPrefDisplayTimeInMailList?: InputMaybe<Scalars['Boolean']['input']>;
|
|
3100
3105
|
zimbraPrefExternalSendersType?: InputMaybe<ExternalSendersType>;
|
|
3106
|
+
zimbraPrefFolderTreeOpen?: InputMaybe<Scalars['Boolean']['input']>;
|
|
3101
3107
|
zimbraPrefForwardReplyInOriginalFormat?: InputMaybe<Scalars['Boolean']['input']>;
|
|
3102
3108
|
zimbraPrefGroupMailBy?: InputMaybe<Scalars['String']['input']>;
|
|
3103
3109
|
zimbraPrefHtmlEditorDefaultFontColor?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -3197,6 +3203,7 @@ export type Query = {
|
|
|
3197
3203
|
getHAB?: Maybe<HabGroup>;
|
|
3198
3204
|
getIdentities?: Maybe<Identities>;
|
|
3199
3205
|
getImportStatus?: Maybe<ImportStatusResponse>;
|
|
3206
|
+
getItem?: Maybe<Document>;
|
|
3200
3207
|
getMailboxMetadata?: Maybe<MailboxMetadata>;
|
|
3201
3208
|
getMessage?: Maybe<MessageInfo>;
|
|
3202
3209
|
getMessagesMetadata?: Maybe<Array<Maybe<MessageInfo>>>;
|
|
@@ -3327,6 +3334,9 @@ export type QueryGetFolderArgs = {
|
|
|
3327
3334
|
export type QueryGetHabArgs = {
|
|
3328
3335
|
habRootGroupId?: InputMaybe<Scalars['ID']['input']>;
|
|
3329
3336
|
};
|
|
3337
|
+
export type QueryGetItemArgs = {
|
|
3338
|
+
id: Scalars['ID']['input'];
|
|
3339
|
+
};
|
|
3330
3340
|
export type QueryGetMailboxMetadataArgs = {
|
|
3331
3341
|
section?: InputMaybe<Scalars['String']['input']>;
|
|
3332
3342
|
};
|
|
@@ -3602,6 +3612,7 @@ export declare enum SaveDocumentAction {
|
|
|
3602
3612
|
}
|
|
3603
3613
|
export type SaveDocumentInput = {
|
|
3604
3614
|
action?: InputMaybe<SaveDocumentAction>;
|
|
3615
|
+
content?: InputMaybe<Scalars['String']['input']>;
|
|
3605
3616
|
contentType?: InputMaybe<Scalars['String']['input']>;
|
|
3606
3617
|
descriptionEnabled?: InputMaybe<Scalars['Boolean']['input']>;
|
|
3607
3618
|
document?: InputMaybe<SaveDocumentInput>;
|