@zimbra/api-client 79.0.0 → 80.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/dist/schema.graphql +11 -0
- package/dist/src/batch-client/index.d.ts +2 -0
- package/dist/src/normalize/entities.d.ts +1 -0
- package/dist/src/schema/generated-schema-types.d.ts +20 -0
- package/dist/zm-api-js-client.esm.js +120 -55
- package/dist/zm-api-js-client.esm.js.map +1 -1
- package/dist/zm-api-js-client.js +1 -1
- package/dist/zm-api-js-client.js.map +1 -1
- package/dist/zm-api-js-client.umd.js +1 -1
- package/dist/zm-api-js-client.umd.js.map +1 -1
- package/package-lock.json +72 -72
- package/package.json +1 -1
- package/src/apollo/zimbra-in-memory-cache.ts +2 -0
- package/src/batch-client/index.ts +42 -0
- package/src/normalize/entities.ts +6 -1
- package/src/schema/generated-schema-types.ts +25 -0
- package/src/schema/schema.graphql +11 -0
- package/src/schema/schema.ts +3 -0
|
@@ -524,6 +524,10 @@ export const Document = new Entity({
|
|
|
524
524
|
f: 'flags'
|
|
525
525
|
});
|
|
526
526
|
|
|
527
|
+
export const ListDocumentRevisions = new Entity({
|
|
528
|
+
doc: ['documents', Document]
|
|
529
|
+
});
|
|
530
|
+
|
|
527
531
|
export const MessagePartInputForDocuments = new Entity({
|
|
528
532
|
id: 'messageId',
|
|
529
533
|
part: 'attachmentPart'
|
|
@@ -535,7 +539,8 @@ export const SaveDocument = new Entity({
|
|
|
535
539
|
ver: 'version', //same item may have different versions (i.e same names) will need to implement ListDocumentRevisionsRequest
|
|
536
540
|
ct: 'contentType',
|
|
537
541
|
descEnabled: 'descriptionEnabled',
|
|
538
|
-
m: ['messageData', MessagePartInputForDocuments]
|
|
542
|
+
m: ['messageData', MessagePartInputForDocuments],
|
|
543
|
+
doc: ['document', Document]
|
|
539
544
|
});
|
|
540
545
|
|
|
541
546
|
export const SearchResponse = new Entity({
|
|
@@ -127,6 +127,7 @@ export type AccountInfoAttrs = {
|
|
|
127
127
|
zimbraMailAttachmentMaxSize?: Maybe<Scalars['Float']>;
|
|
128
128
|
zimbraMailBlacklistMaxNumEntries?: Maybe<Scalars['Int']>;
|
|
129
129
|
zimbraMailQuota?: Maybe<Scalars['String']>;
|
|
130
|
+
zimbraMailSignatureMaxLength?: Maybe<Scalars['Float']>;
|
|
130
131
|
zimbraMtaMaxMessageSize?: Maybe<Scalars['Float']>;
|
|
131
132
|
zimbraPasswordAllowUsername?: Maybe<Scalars['Boolean']>;
|
|
132
133
|
zimbraPasswordAllowedChars?: Maybe<Scalars['String']>;
|
|
@@ -1272,6 +1273,7 @@ export type Document = {
|
|
|
1272
1273
|
contentType?: Maybe<Scalars['String']>;
|
|
1273
1274
|
date?: Maybe<Scalars['Float']>;
|
|
1274
1275
|
descriptionEnabled?: Maybe<Scalars['Boolean']>;
|
|
1276
|
+
docs?: Maybe<Array<Maybe<Document>>>;
|
|
1275
1277
|
flags?: Maybe<Scalars['String']>;
|
|
1276
1278
|
folderId?: Maybe<Scalars['ID']>;
|
|
1277
1279
|
folderUuid?: Maybe<Scalars['String']>;
|
|
@@ -2453,6 +2455,7 @@ export type Mutation = {
|
|
|
2453
2455
|
prefOutOfOfficeFromDate?: Maybe<Scalars['String']>;
|
|
2454
2456
|
prefOutOfOfficeReply?: Maybe<Scalars['String']>;
|
|
2455
2457
|
prefOutOfOfficeUntilDate?: Maybe<Scalars['String']>;
|
|
2458
|
+
purgeRevision?: Maybe<Scalars['Boolean']>;
|
|
2456
2459
|
quarantineDeviceSync?: Maybe<Device>;
|
|
2457
2460
|
recoverAccount?: Maybe<RecoverAccount>;
|
|
2458
2461
|
remoteWipeSync?: Maybe<Device>;
|
|
@@ -2875,6 +2878,13 @@ export type MutationPrefOutOfOfficeUntilDateArgs = {
|
|
|
2875
2878
|
};
|
|
2876
2879
|
|
|
2877
2880
|
|
|
2881
|
+
export type MutationPurgeRevisionArgs = {
|
|
2882
|
+
id: Scalars['ID'];
|
|
2883
|
+
includeOlderRevisions?: InputMaybe<Scalars['Int']>;
|
|
2884
|
+
ver: Scalars['Int'];
|
|
2885
|
+
};
|
|
2886
|
+
|
|
2887
|
+
|
|
2878
2888
|
export type MutationQuarantineDeviceSyncArgs = {
|
|
2879
2889
|
deviceId?: InputMaybe<Scalars['String']>;
|
|
2880
2890
|
};
|
|
@@ -3274,6 +3284,12 @@ export type PropertiesInput = {
|
|
|
3274
3284
|
zimlet: Scalars['String'];
|
|
3275
3285
|
};
|
|
3276
3286
|
|
|
3287
|
+
export type PurgetRevisionInput = {
|
|
3288
|
+
id: Scalars['ID'];
|
|
3289
|
+
includeOlderRevisions?: InputMaybe<Scalars['Int']>;
|
|
3290
|
+
ver: Scalars['Int'];
|
|
3291
|
+
};
|
|
3292
|
+
|
|
3277
3293
|
export type Query = {
|
|
3278
3294
|
__typename?: 'Query';
|
|
3279
3295
|
accountInfo?: Maybe<AccountInfo>;
|
|
@@ -3318,6 +3334,7 @@ export type Query = {
|
|
|
3318
3334
|
getTrustedDevices?: Maybe<GetTrustedDevicesResponse>;
|
|
3319
3335
|
getWhiteBlackList?: Maybe<WhiteBlackList>;
|
|
3320
3336
|
getWorkingHours?: Maybe<Array<Maybe<WorkingHours>>>;
|
|
3337
|
+
listDocumentRevisions?: Maybe<Document>;
|
|
3321
3338
|
noop?: Maybe<NoOpResponse>;
|
|
3322
3339
|
recoverAccount?: Maybe<RecoverAccount>;
|
|
3323
3340
|
relatedContacts?: Maybe<Array<Maybe<RelatedContact>>>;
|
|
@@ -3530,6 +3547,13 @@ export type QueryGetWorkingHoursArgs = {
|
|
|
3530
3547
|
};
|
|
3531
3548
|
|
|
3532
3549
|
|
|
3550
|
+
export type QueryListDocumentRevisionsArgs = {
|
|
3551
|
+
count: Scalars['Int'];
|
|
3552
|
+
id: Scalars['ID'];
|
|
3553
|
+
version: Scalars['Int'];
|
|
3554
|
+
};
|
|
3555
|
+
|
|
3556
|
+
|
|
3533
3557
|
export type QueryNoopArgs = {
|
|
3534
3558
|
limitToOneBlocked?: InputMaybe<Scalars['Int']>;
|
|
3535
3559
|
wait?: InputMaybe<Scalars['Int']>;
|
|
@@ -3771,6 +3795,7 @@ export type SaveDocumentInput = {
|
|
|
3771
3795
|
action?: InputMaybe<SaveDocumentAction>;
|
|
3772
3796
|
contentType?: InputMaybe<Scalars['String']>;
|
|
3773
3797
|
descriptionEnabled?: InputMaybe<Scalars['Boolean']>;
|
|
3798
|
+
document?: InputMaybe<SaveDocumentInput>;
|
|
3774
3799
|
folderId?: InputMaybe<Scalars['ID']>;
|
|
3775
3800
|
id?: InputMaybe<Scalars['ID']>;
|
|
3776
3801
|
messageData?: InputMaybe<Array<InputMaybe<MessagePartForDocument>>>;
|
|
@@ -1354,6 +1354,7 @@ type AccountInfoAttrs {
|
|
|
1354
1354
|
zimbraMailAttachmentMaxSize: Float
|
|
1355
1355
|
zimbraMtaMaxMessageSize: Float
|
|
1356
1356
|
zimbraMailAlias: [String]
|
|
1357
|
+
zimbraMailSignatureMaxLength: Float
|
|
1357
1358
|
zimbraFeatureTaggingEnabled: Boolean
|
|
1358
1359
|
zimbraIdentityMaxNumEntries: Int
|
|
1359
1360
|
zimbraFeatureIdentitiesEnabled: Boolean
|
|
@@ -1553,6 +1554,7 @@ type Document {
|
|
|
1553
1554
|
revisedCreationDate: Float #cd
|
|
1554
1555
|
lockOwnerId: ID #loid
|
|
1555
1556
|
flags: String #f
|
|
1557
|
+
docs: [Document]
|
|
1556
1558
|
}
|
|
1557
1559
|
|
|
1558
1560
|
type SearchResponse {
|
|
@@ -2453,6 +2455,12 @@ input InviteReplyInput {
|
|
|
2453
2455
|
exceptId: InstanceDate
|
|
2454
2456
|
}
|
|
2455
2457
|
|
|
2458
|
+
input PurgetRevisionInput {
|
|
2459
|
+
id: ID!
|
|
2460
|
+
ver: Int!
|
|
2461
|
+
includeOlderRevisions: Int
|
|
2462
|
+
}
|
|
2463
|
+
|
|
2456
2464
|
input PropertiesInput {
|
|
2457
2465
|
zimlet: String!
|
|
2458
2466
|
name: String!
|
|
@@ -2973,6 +2981,7 @@ input SaveDocumentInput {
|
|
|
2973
2981
|
descriptionEnabled: Boolean #descEnabled
|
|
2974
2982
|
action: SaveDocumentAction
|
|
2975
2983
|
type: SaveDocumentType
|
|
2984
|
+
document: SaveDocumentInput
|
|
2976
2985
|
}
|
|
2977
2986
|
|
|
2978
2987
|
type SaveDocument {
|
|
@@ -3189,6 +3198,7 @@ type Query {
|
|
|
3189
3198
|
downloadMessage(id: ID!, isSecure: Boolean, isLocal: Boolean): SMimeMessage
|
|
3190
3199
|
downloadAttachment(id: ID!, part: ID!): Attachment
|
|
3191
3200
|
downloadDocument(id: ID!, url: String!): Attachment
|
|
3201
|
+
listDocumentRevisions(id: ID!, version: Int!, count: Int!): Document
|
|
3192
3202
|
discoverRights(right: [DiscoverRightInput!]!): DiscoverRights
|
|
3193
3203
|
freeBusy(names: [String!]!, start: Float, end: Float): [FreeBusy]
|
|
3194
3204
|
getContact(
|
|
@@ -3492,6 +3502,7 @@ type Mutation {
|
|
|
3492
3502
|
modifyTask(task: CalendarItemInput!): Boolean
|
|
3493
3503
|
modifyWhiteBlackList(whiteBlackList: WhiteBlackListInput!): Boolean
|
|
3494
3504
|
moveTask(inviteId: ID!, destFolderId: ID!): String
|
|
3505
|
+
purgeRevision(id: ID!, ver: Int!, includeOlderRevisions: Int): Boolean
|
|
3495
3506
|
prefEnableOutOfOfficeAlertOnLogin(value: Boolean!): Boolean
|
|
3496
3507
|
prefEnableOutOfOfficeReply(value: Boolean!): Boolean
|
|
3497
3508
|
prefOutOfOfficeFromDate(value: String!): String
|
package/src/schema/schema.ts
CHANGED
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
NameIdInput,
|
|
30
30
|
PreferencesInput,
|
|
31
31
|
PropertiesInput,
|
|
32
|
+
PurgetRevisionInput,
|
|
32
33
|
RevokeRightsInput,
|
|
33
34
|
SaveSMimeCertInputUpload,
|
|
34
35
|
SearchFolderInput,
|
|
@@ -108,6 +109,7 @@ export function createZimbraSchema(options: ZimbraSchemaOptions): {
|
|
|
108
109
|
discoverRights: (_, variables) => client.discoverRights(variables as DiscoverRightOptions),
|
|
109
110
|
downloadAttachment: (_, variables) => client.downloadAttachment(variables),
|
|
110
111
|
downloadDocument: (_, variables) => client.downloadDocument(variables),
|
|
112
|
+
listDocumentRevisions: (_, variables) => client.listDocumentRevisions(variables),
|
|
111
113
|
downloadMessage: (_, variables, context = {}) => {
|
|
112
114
|
const { local } = context;
|
|
113
115
|
|
|
@@ -320,6 +322,7 @@ export function createZimbraSchema(options: ZimbraSchemaOptions): {
|
|
|
320
322
|
client.deleteExternalAccount(variables as ExternalAccountDeleteInput),
|
|
321
323
|
importExternalAccount: (_, { externalAccount }) =>
|
|
322
324
|
client.importExternalAccount(externalAccount as ExternalAccountImportInput),
|
|
325
|
+
purgeRevision: (_, variables) => client.purgeRevision(variables as PurgetRevisionInput),
|
|
323
326
|
prefEnableOutOfOfficeAlertOnLogin: (_, { value }) =>
|
|
324
327
|
client
|
|
325
328
|
.modifyPrefs({
|