@zimbra/api-client 95.0.0 → 97.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 +13 -1
- package/dist/src/batch-client/types.d.ts +2 -1
- package/dist/src/schema/generated-schema-types.d.ts +11 -0
- package/dist/zm-api-js-client.esm.js +10 -4
- 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/types.ts +2 -0
- package/src/schema/generated-schema-types.ts +12 -0
- package/src/schema/schema.graphql +13 -1
- package/src/utils/normalize-mime-parts.ts +13 -4
package/package-lock.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zimbra/api-client",
|
|
3
3
|
"amdName": "zmApiJsClient",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "97.0.0",
|
|
5
5
|
"description": "Zimbra JS API Client and GraphQL client for making requests against the Zimbra SOAP API.",
|
|
6
6
|
"main": "dist/zm-api-js-client.js",
|
|
7
7
|
"source": "index.ts",
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
Owner,
|
|
8
8
|
SearchType,
|
|
9
9
|
SortBy,
|
|
10
|
+
Timezone,
|
|
10
11
|
UploadDocument
|
|
11
12
|
} from '../schema/generated-schema-types';
|
|
12
13
|
|
|
@@ -204,6 +205,7 @@ export interface SearchOptions {
|
|
|
204
205
|
sortBy?: SortBy;
|
|
205
206
|
type?: GalSearchType;
|
|
206
207
|
types?: SearchType;
|
|
208
|
+
tz?: Timezone;
|
|
207
209
|
}
|
|
208
210
|
|
|
209
211
|
export interface SearchCalendarResourcesCondition {
|
|
@@ -100,6 +100,7 @@ export type AccountInfoAttrs = {
|
|
|
100
100
|
zimbraFeatureCalendarEnabled?: Maybe<Scalars['Boolean']['output']>;
|
|
101
101
|
zimbraFeatureChangePasswordEnabled?: Maybe<Scalars['Boolean']['output']>;
|
|
102
102
|
zimbraFeatureConversationsEnabled?: Maybe<Scalars['Boolean']['output']>;
|
|
103
|
+
zimbraFeatureDeliveryStatusNotificationEnabled?: Maybe<Scalars['Boolean']['output']>;
|
|
103
104
|
zimbraFeatureDiscardInFiltersEnabled?: Maybe<Scalars['Boolean']['output']>;
|
|
104
105
|
zimbraFeatureDistributionListExpandMembersEnabled?: Maybe<Scalars['Boolean']['output']>;
|
|
105
106
|
zimbraFeatureDistributionListFolderEnabled?: Maybe<Scalars['Boolean']['output']>;
|
|
@@ -145,9 +146,11 @@ export type AccountInfoAttrs = {
|
|
|
145
146
|
zimbraIdentityMaxNumEntries?: Maybe<Scalars['Int']['output']>;
|
|
146
147
|
zimbraIsAdminAccount?: Maybe<Scalars['Boolean']['output']>;
|
|
147
148
|
zimbraIsDelegatedAdminAccount?: Maybe<Scalars['Boolean']['output']>;
|
|
149
|
+
zimbraIsExternalVirtualAccount?: Maybe<Scalars['Boolean']['output']>;
|
|
148
150
|
zimbraMailAlias?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
|
|
149
151
|
zimbraMailAttachmentMaxSize?: Maybe<Scalars['Float']['output']>;
|
|
150
152
|
zimbraMailBlacklistMaxNumEntries?: Maybe<Scalars['Int']['output']>;
|
|
153
|
+
zimbraMailIdleSessionTimeout?: Maybe<Scalars['String']['output']>;
|
|
151
154
|
zimbraMailQuota?: Maybe<Scalars['String']['output']>;
|
|
152
155
|
zimbraMailSignatureMaxLength?: Maybe<Scalars['Float']['output']>;
|
|
153
156
|
zimbraMailWhitelistMaxNumEntries?: Maybe<Scalars['Int']['output']>;
|
|
@@ -2477,6 +2480,7 @@ export type MessageInfo = MailItem & {
|
|
|
2477
2480
|
conversationId?: Maybe<Scalars['ID']['output']>;
|
|
2478
2481
|
date?: Maybe<Scalars['Float']['output']>;
|
|
2479
2482
|
decryptionErrorCode?: Maybe<Scalars['String']['output']>;
|
|
2483
|
+
deliveryReport?: Maybe<Scalars['Boolean']['output']>;
|
|
2480
2484
|
emailAddresses?: Maybe<Array<Maybe<EmailAddress>>>;
|
|
2481
2485
|
excerpt?: Maybe<Scalars['String']['output']>;
|
|
2482
2486
|
flags?: Maybe<Scalars['String']['output']>;
|
|
@@ -3472,6 +3476,7 @@ export type Preferences = {
|
|
|
3472
3476
|
zimbraPrefHtmlEditorDefaultFontFamily?: Maybe<Scalars['String']['output']>;
|
|
3473
3477
|
zimbraPrefHtmlEditorDefaultFontSize?: Maybe<Scalars['String']['output']>;
|
|
3474
3478
|
zimbraPrefLocale?: Maybe<Scalars['String']['output']>;
|
|
3479
|
+
zimbraPrefMailDeliveryStatusNotification?: Maybe<Scalars['Boolean']['output']>;
|
|
3475
3480
|
zimbraPrefMailForwardingAddress?: Maybe<Scalars['String']['output']>;
|
|
3476
3481
|
zimbraPrefMailLocalDeliveryDisabled?: Maybe<Scalars['Boolean']['output']>;
|
|
3477
3482
|
zimbraPrefMailPollingInterval?: Maybe<Scalars['String']['output']>;
|
|
@@ -3537,6 +3542,7 @@ export type PreferencesInput = {
|
|
|
3537
3542
|
zimbraPrefHtmlEditorDefaultFontFamily?: InputMaybe<Scalars['String']['input']>;
|
|
3538
3543
|
zimbraPrefHtmlEditorDefaultFontSize?: InputMaybe<Scalars['String']['input']>;
|
|
3539
3544
|
zimbraPrefLocale?: InputMaybe<Scalars['String']['input']>;
|
|
3545
|
+
zimbraPrefMailDeliveryStatusNotification?: InputMaybe<Scalars['Boolean']['input']>;
|
|
3540
3546
|
zimbraPrefMailForwardingAddress?: InputMaybe<Scalars['String']['input']>;
|
|
3541
3547
|
zimbraPrefMailLocalDeliveryDisabled?: InputMaybe<Scalars['Boolean']['input']>;
|
|
3542
3548
|
zimbraPrefMailPollingInterval?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -3915,6 +3921,7 @@ export type QuerySearchArgs = {
|
|
|
3915
3921
|
resultMode?: InputMaybe<Scalars['String']['input']>;
|
|
3916
3922
|
sortBy?: InputMaybe<SortBy>;
|
|
3917
3923
|
types?: InputMaybe<SearchType>;
|
|
3924
|
+
tz?: InputMaybe<Timezone>;
|
|
3918
3925
|
};
|
|
3919
3926
|
|
|
3920
3927
|
|
|
@@ -4245,6 +4252,7 @@ export type SendMessageInput = {
|
|
|
4245
4252
|
attachmentId?: InputMaybe<Scalars['ID']['input']>;
|
|
4246
4253
|
attachments?: InputMaybe<Array<InputMaybe<AttachmentInput>>>;
|
|
4247
4254
|
autoSendTime?: InputMaybe<Scalars['Float']['input']>;
|
|
4255
|
+
deliveryReport?: InputMaybe<Scalars['Boolean']['input']>;
|
|
4248
4256
|
draftId?: InputMaybe<Scalars['ID']['input']>;
|
|
4249
4257
|
emailAddresses?: InputMaybe<Array<InputMaybe<MailItemEmailAddressInput>>>;
|
|
4250
4258
|
entityId?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -4542,6 +4550,10 @@ export type Targets = {
|
|
|
4542
4550
|
target?: Maybe<Array<Maybe<Target>>>;
|
|
4543
4551
|
};
|
|
4544
4552
|
|
|
4553
|
+
export type Timezone = {
|
|
4554
|
+
id: Scalars['ID']['input'];
|
|
4555
|
+
};
|
|
4556
|
+
|
|
4545
4557
|
export type TrustedDevicesEnabled = {
|
|
4546
4558
|
__typename?: 'TrustedDevicesEnabled';
|
|
4547
4559
|
_content?: Maybe<Scalars['Boolean']['output']>;
|
|
@@ -576,6 +576,7 @@ type MessageInfo implements MailItem {
|
|
|
576
576
|
part: String
|
|
577
577
|
meta: [CustomMetadataMeta]
|
|
578
578
|
_attrs: [CustomHeader]
|
|
579
|
+
deliveryReport: Boolean
|
|
579
580
|
}
|
|
580
581
|
|
|
581
582
|
type Conversation implements MailItem {
|
|
@@ -1460,6 +1461,7 @@ type AccountInfoAttrs {
|
|
|
1460
1461
|
zimbraDumpsterEnabled: Boolean
|
|
1461
1462
|
zimbraIsAdminAccount: Boolean
|
|
1462
1463
|
zimbraIsDelegatedAdminAccount: Boolean
|
|
1464
|
+
zimbraIsExternalVirtualAccount: Boolean
|
|
1463
1465
|
zimbraFeatureMailEnabled: Boolean
|
|
1464
1466
|
zimbraFeatureCalendarEnabled: Boolean
|
|
1465
1467
|
zimbraFeatureBriefcasesEnabled: Boolean
|
|
@@ -1545,6 +1547,8 @@ type AccountInfoAttrs {
|
|
|
1545
1547
|
zimbraFeatureDistributionListFolderEnabled: Boolean
|
|
1546
1548
|
zimbraFeatureBasicOneToOneChatEnabled: Boolean
|
|
1547
1549
|
zimbraFeatureAdvancedChatEnabled: Boolean
|
|
1550
|
+
zimbraMailIdleSessionTimeout: String
|
|
1551
|
+
zimbraFeatureDeliveryStatusNotificationEnabled: Boolean
|
|
1548
1552
|
}
|
|
1549
1553
|
|
|
1550
1554
|
type AccountCos {
|
|
@@ -1695,6 +1699,7 @@ type Preferences {
|
|
|
1695
1699
|
zimbraPrefPowerPasteEnabled: Boolean
|
|
1696
1700
|
zimbraPrefDisplayTimeInMailList: Boolean
|
|
1697
1701
|
zimbraPrefPrimaryTwoFactorAuthMethod: String
|
|
1702
|
+
zimbraPrefMailDeliveryStatusNotification: Boolean
|
|
1698
1703
|
}
|
|
1699
1704
|
|
|
1700
1705
|
type GetAppointmentResponse {
|
|
@@ -2342,6 +2347,7 @@ input SendMessageInput {
|
|
|
2342
2347
|
attachments: [AttachmentInput] #attach
|
|
2343
2348
|
inlineAttachments: [MimePartInput] #attach
|
|
2344
2349
|
header: [HeaderInput] #header
|
|
2350
|
+
deliveryReport: Boolean #deliveryReport
|
|
2345
2351
|
}
|
|
2346
2352
|
|
|
2347
2353
|
input HeaderInput {
|
|
@@ -2770,6 +2776,7 @@ input PreferencesInput {
|
|
|
2770
2776
|
zimbraPrefDisplayTimeInMailList: Boolean
|
|
2771
2777
|
zimbraPrefPrimaryTwoFactorAuthMethod: String
|
|
2772
2778
|
zimbraPrefDeleteInviteOnReply: Boolean
|
|
2779
|
+
zimbraPrefMailDeliveryStatusNotification: Boolean
|
|
2773
2780
|
}
|
|
2774
2781
|
|
|
2775
2782
|
input ModifyIdentityInput {
|
|
@@ -3222,6 +3229,10 @@ input uploadDocument {
|
|
|
3222
3229
|
id: ID! #id
|
|
3223
3230
|
}
|
|
3224
3231
|
|
|
3232
|
+
input Timezone {
|
|
3233
|
+
id: ID! #id
|
|
3234
|
+
}
|
|
3235
|
+
|
|
3225
3236
|
input messagePartForDocument {
|
|
3226
3237
|
messageId: ID! #id
|
|
3227
3238
|
attachmentPart: String! #part
|
|
@@ -3637,7 +3648,8 @@ type Query {
|
|
|
3637
3648
|
types: SearchType
|
|
3638
3649
|
resultMode: String
|
|
3639
3650
|
inDumpster: Boolean,
|
|
3640
|
-
header: [MailItemHeaderInput]
|
|
3651
|
+
header: [MailItemHeaderInput],
|
|
3652
|
+
tz: Timezone
|
|
3641
3653
|
): SearchResponse
|
|
3642
3654
|
|
|
3643
3655
|
searchCalendarResources(
|
|
@@ -76,6 +76,9 @@ export function normalizeMimeParts(
|
|
|
76
76
|
message: { [key: string]: any },
|
|
77
77
|
{ origin, jwtToken, isDesktop }: { isDesktop?: string; jwtToken?: string; origin?: string }
|
|
78
78
|
) {
|
|
79
|
+
let isMultipartWithInlineImage = false;
|
|
80
|
+
let iosMsgWithImage = '';
|
|
81
|
+
|
|
79
82
|
const processAttachment = ({ ...attachment }, forcedContentDisposition?: string) => {
|
|
80
83
|
attachment.messageId = attachment.messageId || message.id;
|
|
81
84
|
attachment.url = getAttachmentUrl(attachment, { origin, jwtToken });
|
|
@@ -158,12 +161,11 @@ export function normalizeMimeParts(
|
|
|
158
161
|
|
|
159
162
|
// Use `text` content, because iOS client always yield `text` part (no `html` part) when multiple attachments are present along with text content.
|
|
160
163
|
// In cases of forwarded msg from iOS client, there wouldn't be `text` part, instead `html` parts.
|
|
161
|
-
//
|
|
162
|
-
|
|
164
|
+
// To make sure to include inline image in html content store it in a variable and process later.
|
|
165
|
+
isMultipartWithInlineImage = true;
|
|
166
|
+
iosMsgWithImage = iosMsgWithImage.concat(
|
|
163
167
|
`<br /><div><img src="cid:${attachment.contentId}" /></div><br />`
|
|
164
168
|
);
|
|
165
|
-
|
|
166
|
-
acc['html'] = acc['text']; // And then update `html` part so that we render `html` in `viewer`.
|
|
167
169
|
} else {
|
|
168
170
|
const isTextType = MORE_TEXT_TYPES.includes(type);
|
|
169
171
|
let bodyType =
|
|
@@ -175,6 +177,7 @@ export function normalizeMimeParts(
|
|
|
175
177
|
isBody = true;
|
|
176
178
|
}
|
|
177
179
|
acc[bodyType] = (acc[bodyType] || '').concat(content);
|
|
180
|
+
iosMsgWithImage = iosMsgWithImage.concat(content);
|
|
178
181
|
}
|
|
179
182
|
}
|
|
180
183
|
}
|
|
@@ -203,6 +206,12 @@ export function normalizeMimeParts(
|
|
|
203
206
|
// Default to null if not exist to unset the key if this is an update.
|
|
204
207
|
message.autoSendTime = message.autoSendTime || null;
|
|
205
208
|
|
|
209
|
+
// For email sent from ios client or any other email client which may not provide html content and includes inline images,
|
|
210
|
+
// Convert the text part along with inline images into html so that it will be previewed as html content.
|
|
211
|
+
if (isMultipartWithInlineImage) {
|
|
212
|
+
message.html = iosMsgWithImage.replace(/\r\n/g, '<br />');
|
|
213
|
+
}
|
|
214
|
+
|
|
206
215
|
// Some mail clients add contentId and contentLocation to attachment data even though it's not inline attachments
|
|
207
216
|
// we are fixing it here
|
|
208
217
|
// @TODO we should extend this to check if we have any placeholder in body for inline attachments then only consider it as inline attachment
|