@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.
@@ -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({