@zimbra/api-client 75.0.0 → 78.0.0-beta

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.
@@ -1344,6 +1344,7 @@ type AccountInfoAttrs {
1344
1344
  zimbraFeatureDocumentEditingEnabled: Boolean
1345
1345
  zimbraTwoFactorAuthEnabled: Boolean
1346
1346
  zimbraFeatureTrustedDevicesEnabled: Boolean
1347
+ zimbraFeatureAntispamEnabled: Boolean
1347
1348
  zimbraFeatureAppSpecificPasswordsEnabled: Boolean
1348
1349
  zimbraFeatureMailPriorityEnabled: Boolean
1349
1350
  zimbraFileUploadMaxSize: Float
@@ -1361,6 +1362,7 @@ type AccountInfoAttrs {
1361
1362
  zimbraFeaturePop3DataSourceEnabled: Boolean
1362
1363
  zimbraSignupAffiliate: String
1363
1364
  zimbraSignupRecoveryEmail: String
1365
+ zimbraFeatureTasksEnabled: Boolean
1364
1366
  zimbraTrialExpirationDate: String
1365
1367
  zimbraTrialConvertAtExpiration: Boolean
1366
1368
  zimbraHierarchicalAddressBookRoot: String
@@ -1655,6 +1657,7 @@ type OtherContactAttribute {
1655
1657
  type ContactAttributes {
1656
1658
  firstName: String
1657
1659
  phoneticFirstName: String
1660
+ phoneticCompany: String
1658
1661
  middleName: String
1659
1662
  lastName: String
1660
1663
  phoneticLastName: String
@@ -1759,6 +1762,7 @@ input OtherContactAttributeInput {
1759
1762
  input ContactAttrsInput {
1760
1763
  firstName: String
1761
1764
  phoneticFirstName: String
1765
+ phoneticCompany: String
1762
1766
  middleName: String
1763
1767
  lastName: String
1764
1768
  phoneticLastName: String
@@ -2834,6 +2838,7 @@ input EnableTwoFactorAuthInput {
2834
2838
  twoFactorCode: String
2835
2839
  authToken: String
2836
2840
  csrfTokenSecured: Boolean!
2841
+ ignoreSameSite: Boolean
2837
2842
  }
2838
2843
 
2839
2844
  input ExternalAccountImportInput {
@@ -2857,7 +2862,7 @@ input GetDocumentShareURLItemInput {
2857
2862
 
2858
2863
  input Cursor {
2859
2864
  id: ID
2860
- sortField: String
2865
+ sortVal: String
2861
2866
  endSortVal: String
2862
2867
  includeOffset: Boolean
2863
2868
  }
@@ -3457,6 +3462,7 @@ type Mutation {
3457
3462
  twoFactorCode: String
3458
3463
  deviceTrusted: Boolean
3459
3464
  csrfTokenSecured: Boolean!
3465
+ ignoreSameSite: Boolean
3460
3466
  ): AuthResponse
3461
3467
  enableTwoFactorAuth(
3462
3468
  options: EnableTwoFactorAuthInput!
@@ -7,6 +7,8 @@ const ignoreContentTypeToShowAsAttachment = [
7
7
  'xml/x-zimbra-share' // present in folder share message
8
8
  ];
9
9
 
10
+ const MORE_TEXT_TYPES = ['text/rfc822-headers'];
11
+
10
12
  function normalizeCid(cid: string) {
11
13
  return cid.replace(/[<>]/g, '');
12
14
  }
@@ -107,11 +109,11 @@ export function normalizeMimeParts(
107
109
  // obey scapi's isBody flag:
108
110
  if (isBody) acc.body = content;
109
111
 
112
+ const isInline = disposition === 'inline';
113
+
110
114
  // if not explicitly an attachment, discover html/text body:
111
115
  if (disposition !== 'attachment') {
112
- let bodyType = type === 'text/html' ? 'html' : type === 'text/plain' && 'text';
113
-
114
- if (~type.indexOf('image/') && disposition === 'inline' && !part.contentId) {
116
+ if (isInline && ~type.indexOf('image/') && !part.contentId) {
115
117
  /**
116
118
  * Different email clients work in different ways.
117
119
  * E.g. iOS email client doesn't put `contentId` for image inline attachments when there are other type (normal) of attachments as well in email body.
@@ -129,29 +131,24 @@ export function normalizeMimeParts(
129
131
  );
130
132
 
131
133
  acc['html'] = acc['text']; // And then update `html` part so that we render `html` in `viewer`.
132
- } else if (
133
- //bodyType can be either 'text/html' or 'text/plain' so to handle such inline attachments the below condition is added
134
- part.filename &&
135
- bodyType &&
136
- disposition === 'inline'
137
- ) {
138
- (acc['inlineAttachments'] || (acc['inlineAttachments'] = [])).concat(
139
- processAttachment(part)
140
- );
141
- } else if (bodyType && (!acc[bodyType] || disposition !== 'inline')) {
142
- if ((bodyType === 'html' || bodyType === 'text') && acc[bodyType]) {
143
- acc[bodyType] = acc[bodyType].concat(content);
144
- } else {
145
- acc[bodyType] = content;
134
+ } else {
135
+ const isTextType = MORE_TEXT_TYPES.includes(type);
136
+ let bodyType =
137
+ type === 'text/html' ? 'html' : (type === 'text/plain' || isTextType) && 'text';
138
+
139
+ if (bodyType) {
140
+ //bodyType can be either 'text/html' or 'text/plain' so to handle such inline attachments the below condition is added
141
+ if (!(part.filename && isTextType && isInline)) {
142
+ isBody = true;
143
+ }
144
+ acc[bodyType] = (acc[bodyType] || '').concat(content);
146
145
  }
147
-
148
- isBody = true;
149
146
  }
150
147
  }
151
148
 
152
149
  // remaining non-body, non-enclosure parts are attachments:
153
150
  if (!isBody && type.split('/')[0] !== 'multipart') {
154
- let mode = disposition === 'inline' ? 'inlineAttachments' : 'attachments';
151
+ let mode = isInline ? 'inlineAttachments' : 'attachments';
155
152
 
156
153
  !ignoreContentTypeToShowAsAttachment.includes(part.contentType) &&
157
154
  (acc[mode] || (acc[mode] = [])).push(processAttachment(part, mode));
@@ -7,6 +7,7 @@ import { ContactInputRequest } from '../normalize/entities';
7
7
  const supportedContactAttributes = [
8
8
  'firstName',
9
9
  'phoneticFirstName',
10
+ 'phoneticCompany',
10
11
  'middleName',
11
12
  'lastName',
12
13
  'phoneticLastName',