@zimbra/api-client 100.1.0 → 100.1.1-PREAPPS-9149.3419da8.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.
Files changed (37) hide show
  1. package/dist/schema.graphql +9 -2
  2. package/dist/src/apollo/local-batch-link.d.ts +1 -1
  3. package/dist/src/apollo/offline-queue-link/index.d.ts +2 -2
  4. package/dist/src/apollo/offline-queue-link/types.d.ts +3 -3
  5. package/dist/src/batch-client/index.d.ts +17 -17
  6. package/dist/src/batch-client/types.d.ts +11 -11
  7. package/dist/src/request/types.d.ts +2 -2
  8. package/dist/src/schema/generated-schema-types.d.ts +9 -4
  9. package/dist/src/utils/normalize-attrs-custommetadata.d.ts +1 -1
  10. package/dist/src/utils/normalize-otherAttribute-contact.d.ts +1 -1
  11. package/dist/zm-api-js-client.esm.js +3862 -3808
  12. package/dist/zm-api-js-client.esm.js.map +1 -1
  13. package/dist/zm-api-js-client.js +14 -10
  14. package/dist/zm-api-js-client.js.map +1 -1
  15. package/dist/zm-api-js-client.umd.js +14 -10
  16. package/dist/zm-api-js-client.umd.js.map +1 -1
  17. package/eslint.config.mjs +10 -0
  18. package/package.json +17 -18
  19. package/rollup.config.js +4 -1
  20. package/src/apollo/local-batch-link.ts +2 -2
  21. package/src/apollo/offline-queue-link/index.ts +3 -10
  22. package/src/apollo/offline-queue-link/types.ts +3 -3
  23. package/src/apollo/zimbra-error-link.ts +11 -7
  24. package/src/batch-client/index.ts +57 -64
  25. package/src/batch-client/types.ts +11 -11
  26. package/src/normalize/index.ts +1 -1
  27. package/src/request/index.ts +20 -8
  28. package/src/request/types.ts +2 -2
  29. package/src/schema/generated-schema-types.ts +10 -4
  30. package/src/schema/schema.graphql +9 -2
  31. package/src/schema/schema.ts +6 -4
  32. package/src/utils/normalize-attrs-custommetadata.ts +1 -1
  33. package/src/utils/normalize-mime-parts.ts +10 -6
  34. package/src/utils/normalize-otherAttribute-contact.ts +2 -2
  35. package/.prettierrc +0 -6
  36. package/package-lock.json +0 -10036
  37. package/tslint.json +0 -20
@@ -181,6 +181,11 @@ enum AddressType {
181
181
  rf # resent-from
182
182
  }
183
183
 
184
+ enum ConversationOrderBy {
185
+ dateAsc
186
+ dateDesc
187
+ }
188
+
184
189
  # https://github.com/Zimbra/zm-mailbox/blob/develop/store/docs/acl.md
185
190
  enum GranteeType {
186
191
  usr # Zimbra User
@@ -1719,6 +1724,7 @@ type Preferences {
1719
1724
  zimbraPrefPop3DownloadSince: String
1720
1725
  zimbraPrefPop3IncludeSpam: Boolean
1721
1726
  zimbraPrefPop3DeleteOption: Pop3DeleteOption
1727
+ zimbraPrefConversationOrder: ConversationOrderBy
1722
1728
  }
1723
1729
 
1724
1730
  type GetAppointmentResponse {
@@ -2673,7 +2679,7 @@ input FolderActionChangeColorInput {
2673
2679
  color: Int!
2674
2680
  }
2675
2681
 
2676
- # Special case of FolderAction for `checkCalendar` resolver
2682
+ # Special case of FolderAction for `checkCalendars` resolver
2677
2683
  input FolderActionCheckCalendarInput {
2678
2684
  id: ID!
2679
2685
  value: Boolean
@@ -2809,6 +2815,7 @@ input PreferencesInput {
2809
2815
  zimbraPrefPop3DownloadSince: String
2810
2816
  zimbraPrefPop3IncludeSpam: Boolean
2811
2817
  zimbraPrefPop3DeleteOption: Pop3DeleteOption
2818
+ zimbraPrefConversationOrder: ConversationOrderBy
2812
2819
  }
2813
2820
 
2814
2821
  input ModifyIdentityInput {
@@ -3750,7 +3757,7 @@ type Mutation {
3750
3757
  content: String
3751
3758
  contentType: String
3752
3759
  ): ProfileImageChangeResponse
3753
- checkCalendar(id: ID!, value: Boolean!): ActionOpResponse
3760
+ checkCalendars(actions: [FolderActionCheckCalendarInput!]): [ActionOpResponse]
3754
3761
  contactAction(
3755
3762
  id: ID
3756
3763
  ids: [ID!]
@@ -283,8 +283,10 @@ export function createZimbraSchema(options: ZimbraSchemaOptions): {
283
283
  client.createMountpoint(variables as CreateMountpointInput),
284
284
  deleteAppointment: (_, { appointment }) =>
285
285
  client.deleteAppointment(appointment as DeleteAppointmentInput),
286
- checkCalendar: (_, variables): Promise<ActionOpResponse> =>
287
- client.checkCalendar(variables as FolderActionCheckCalendarInput),
286
+ checkCalendars: (
287
+ _,
288
+ variables: { actions: FolderActionCheckCalendarInput[] }
289
+ ): Promise<ActionOpResponse[]> => client.checkCalendars(variables.actions),
288
290
  counterAppointment: (_, { counterAppointmentInvite }) =>
289
291
  client.counterAppointment(counterAppointmentInvite as CounterAppointmentInput),
290
292
  createCalendar: (_, { name, color, url, parentFolderId }) =>
@@ -389,8 +391,8 @@ export function createZimbraSchema(options: ZimbraSchemaOptions): {
389
391
  (context.local ? localStoreClient : client).sendMessage(
390
392
  message as SendMessageInput,
391
393
  accountName as string,
392
- sign as Boolean,
393
- encrypt as Boolean
394
+ sign as boolean,
395
+ encrypt as boolean
394
396
  ),
395
397
  saveSMimeCert: (_, { upload, password }) =>
396
398
  client.saveSMimeCert(upload as SaveSMimeCertInputUpload, password as string),
@@ -1,6 +1,6 @@
1
1
  export function setCustomMetaDataBody(data: any) {
2
2
  const { attrs, id, section } = data;
3
- const customMetaAttrs: Object[] = [];
3
+ const customMetaAttrs: object[] = [];
4
4
 
5
5
  for (const { key, value } of attrs) {
6
6
  customMetaAttrs.push({
@@ -1,7 +1,5 @@
1
1
  /** List of content type not show as attachment */
2
2
  const ignoreContentTypeToShowAsAttachment = [
3
- 'application/pkcs7-signature',
4
- 'application/x-pkcs7-signature',
5
3
  'message/delivery-status', // present in Undelivered mail
6
4
  'message/disposition-notification', // present in read-receipt response
7
5
  'xml/x-zimbra-share' // present in folder share message
@@ -87,16 +85,16 @@ export function normalizeMimeParts(
87
85
  if (forcedContentDisposition === 'attachments') {
88
86
  attachment.contentDisposition = 'attachment';
89
87
  } else if (forcedContentDisposition === 'inlineAttachments') {
90
- attachment.contentDisposition === 'inline';
88
+ attachment.contentDisposition = 'inline';
91
89
  }
92
90
  }
93
91
 
94
92
  attachment.contentId = attachment.contentId
95
93
  ? normalizeCid(attachment.contentId)
96
94
  : ~normalizeType(attachment.contentType).indexOf('image/') &&
97
- attachment.contentDisposition === 'inline'
98
- ? `AUTO-GEN-CID-${attachment.messageId}-${attachment.part}-${attachment.size}`
99
- : undefined;
95
+ attachment.contentDisposition === 'inline'
96
+ ? `AUTO-GEN-CID-${attachment.messageId}-${attachment.part}-${attachment.size}`
97
+ : undefined;
100
98
 
101
99
  return attachment;
102
100
  };
@@ -186,6 +184,12 @@ export function normalizeMimeParts(
186
184
  if (!isBody && type.split('/')[0] !== 'multipart') {
187
185
  let mode = isInline ? 'inlineAttachments' : 'attachments';
188
186
 
187
+ // If inline but NOT an image, treat as regular attachment
188
+ if (isInline && !type.startsWith('image/')) {
189
+ mode = 'attachments';
190
+ part.contentDisposition = 'attachment';
191
+ }
192
+
189
193
  !ignoreContentTypeToShowAsAttachment.includes(part.contentType) &&
190
194
  (acc[mode] || (acc[mode] = [])).push(processAttachment(part, mode));
191
195
 
@@ -96,9 +96,9 @@ const ignoreAttributes = [
96
96
  'vcardXProps',
97
97
  'imagepart'
98
98
  ];
99
- export function createContactBody(data: any, isDesktop: Boolean) {
99
+ export function createContactBody(data: any, isDesktop: boolean) {
100
100
  const { attributes, ...rest } = data;
101
- const contactAttrs = <Object[]>[];
101
+ const contactAttrs = <object[]>[];
102
102
 
103
103
  for (const [key, val] of Object.entries(attributes)) {
104
104
  if (key !== 'other') {
package/.prettierrc DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "singleQuote": true,
3
- "printWidth": 100,
4
- "trailingComma": "none",
5
- "arrowParens": "avoid"
6
- }