@zimbra/api-client 73.0.0 → 76.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 +77 -7
- package/dist/src/batch-client/index.d.ts +6 -4
- package/dist/src/batch-client/types.d.ts +6 -0
- package/dist/src/normalize/entities.d.ts +1 -0
- package/dist/src/request/types.d.ts +2 -0
- package/dist/src/schema/generated-schema-types.d.ts +83 -5
- package/dist/src/utils/normalize-otherAttribute-contact.d.ts +1 -1
- package/dist/zm-api-js-client.esm.js +249 -178
- 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 +1 -1
- package/package.json +1 -1
- package/src/batch-client/index.ts +44 -20
- package/src/batch-client/types.ts +7 -0
- package/src/normalize/entities.ts +42 -5
- package/src/request/types.ts +2 -0
- package/src/schema/generated-schema-types.ts +99 -5
- package/src/schema/schema.graphql +77 -7
- package/src/schema/schema.ts +10 -3
- package/src/utils/normalize-otherAttribute-contact.ts +2 -4
package/src/schema/schema.ts
CHANGED
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
PreferencesInput,
|
|
31
31
|
PropertiesInput,
|
|
32
32
|
RevokeRightsInput,
|
|
33
|
+
SaveSMimeCertInputUpload,
|
|
33
34
|
SearchFolderInput,
|
|
34
35
|
SendMessageInput,
|
|
35
36
|
ShareNotificationInput,
|
|
@@ -54,6 +55,7 @@ import {
|
|
|
54
55
|
ClientInfoInput,
|
|
55
56
|
CreateFolderOptions,
|
|
56
57
|
CreateSearchFolderOptions,
|
|
58
|
+
DiscoverRightOptions,
|
|
57
59
|
ExternalAccountDeleteInput,
|
|
58
60
|
ExternalAccountModifyInput,
|
|
59
61
|
FreeBusyOptions,
|
|
@@ -103,7 +105,7 @@ export function createZimbraSchema(options: ZimbraSchemaOptions): {
|
|
|
103
105
|
autoComplete: (_, variables) => client.autoComplete(variables as AutoCompleteOptions),
|
|
104
106
|
autoCompleteGAL: (_, variables) =>
|
|
105
107
|
client.autoCompleteGAL(variables as AutoCompleteGALOptions),
|
|
106
|
-
discoverRights: client.discoverRights,
|
|
108
|
+
discoverRights: (_, variables) => client.discoverRights(variables as DiscoverRightOptions),
|
|
107
109
|
downloadAttachment: (_, variables) => client.downloadAttachment(variables),
|
|
108
110
|
downloadDocument: (_, variables) => client.downloadDocument(variables),
|
|
109
111
|
downloadMessage: (_, variables, context = {}) => {
|
|
@@ -169,6 +171,7 @@ export function createZimbraSchema(options: ZimbraSchemaOptions): {
|
|
|
169
171
|
getSearchFolder: client.getSearchFolder,
|
|
170
172
|
getSMimePublicCerts: (_, variables) =>
|
|
171
173
|
client.getSMimePublicCerts(variables as GetSMimePublicCertsOptions),
|
|
174
|
+
getSMimeCertInfo: client.getSMimeCertInfo,
|
|
172
175
|
getTrustedDevices: client.getTrustedDevices,
|
|
173
176
|
getDeviceStatus: client.getDeviceStatus,
|
|
174
177
|
getWorkingHours: (_, variables) => client.getWorkingHours(variables as WorkingHoursOptions),
|
|
@@ -368,11 +371,15 @@ export function createZimbraSchema(options: ZimbraSchemaOptions): {
|
|
|
368
371
|
message as SendMessageInput,
|
|
369
372
|
accountName as string
|
|
370
373
|
),
|
|
371
|
-
sendMessage: (_, { message, accountName }, context = {}) =>
|
|
374
|
+
sendMessage: (_, { message, accountName, sign = false, encrypt = false }, context = {}) =>
|
|
372
375
|
(context.local ? localStoreClient : client).sendMessage(
|
|
373
376
|
message as SendMessageInput,
|
|
374
|
-
accountName as string
|
|
377
|
+
accountName as string,
|
|
378
|
+
sign as Boolean,
|
|
379
|
+
encrypt as Boolean
|
|
375
380
|
),
|
|
381
|
+
saveSMimeCert: (_, { upload, password }) =>
|
|
382
|
+
client.saveSMimeCert(upload as SaveSMimeCertInputUpload, password as string),
|
|
376
383
|
sendDeliveryReport: (_, { messageId }) => client.sendDeliveryReport(messageId),
|
|
377
384
|
uploadMessage: (_, { value }) => client.uploadMessage(value),
|
|
378
385
|
createTask: (_, { task }) => client.createTask(task as CalendarItemInput),
|
|
@@ -20,8 +20,6 @@ const supportedContactAttributes = [
|
|
|
20
20
|
'workEmail2',
|
|
21
21
|
'homeEmail',
|
|
22
22
|
'homeEmail2',
|
|
23
|
-
'phone',
|
|
24
|
-
'phone2',
|
|
25
23
|
'companyPhone',
|
|
26
24
|
'companyPhone2',
|
|
27
25
|
'otherPhone',
|
|
@@ -99,7 +97,7 @@ const ignoreAttributes = [
|
|
|
99
97
|
'vcardXProps',
|
|
100
98
|
'imagepart'
|
|
101
99
|
];
|
|
102
|
-
export function createContactBody(data: any) {
|
|
100
|
+
export function createContactBody(data: any, isDesktop: Boolean) {
|
|
103
101
|
const { attributes, ...rest } = data;
|
|
104
102
|
const contactAttrs = <Object[]>[];
|
|
105
103
|
|
|
@@ -107,7 +105,7 @@ export function createContactBody(data: any) {
|
|
|
107
105
|
key !== 'other'
|
|
108
106
|
? contactAttrs.push({
|
|
109
107
|
name: key,
|
|
110
|
-
[key === 'image' ? 'aid' : 'content']: val
|
|
108
|
+
[key === 'image' || (!isDesktop && key === 'userCertificate') ? 'aid' : 'content']: val
|
|
111
109
|
})
|
|
112
110
|
: forEach(val, otherValue =>
|
|
113
111
|
contactAttrs.push({
|