@zimbra/api-client 81.0.0 → 83.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 +11 -4
- package/dist/src/batch-client/index.d.ts +1 -0
- package/dist/src/schema/generated-schema-types.d.ts +10 -2
- package/dist/zm-api-js-client.esm.js +41 -6
- 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 +563 -252
- package/package.json +1 -1
- package/src/batch-client/index.ts +30 -2
- package/src/schema/generated-schema-types.ts +10 -2
- package/src/schema/schema.graphql +11 -4
- package/src/schema/schema.ts +3 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zimbra/api-client",
|
|
3
3
|
"amdName": "zmApiJsClient",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "83.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",
|
|
@@ -159,6 +159,16 @@ function normalizeMessage(
|
|
|
159
159
|
message: { [key: string]: any },
|
|
160
160
|
{ origin, jwtToken, isDesktop }: { isDesktop?: string; jwtToken?: string; origin?: string }
|
|
161
161
|
) {
|
|
162
|
+
if (message?.meta) {
|
|
163
|
+
message.meta = message.meta.map((entry: any) => {
|
|
164
|
+
if (!entry._attrs) {
|
|
165
|
+
entry._attrs = {};
|
|
166
|
+
}
|
|
167
|
+
entry = normalizeCustomMetaDataAttrs(entry);
|
|
168
|
+
return entry;
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
162
172
|
let normalizedMessage = normalize(MessageInfo)(message);
|
|
163
173
|
normalizedMessage = normalizedMessage && mapValuesDeep(normalizedMessage, coerceStringToBoolean);
|
|
164
174
|
|
|
@@ -239,7 +249,7 @@ function updateAbsoluteFolderPath(originalName: any, parentFolderAbsPath: string
|
|
|
239
249
|
}
|
|
240
250
|
|
|
241
251
|
if (folder.folders) {
|
|
242
|
-
folder.folders = updateAbsoluteFolderPath(
|
|
252
|
+
folder.folders = updateAbsoluteFolderPath(folder.oname, folder.absFolderPath, folder.folders);
|
|
243
253
|
}
|
|
244
254
|
return folder;
|
|
245
255
|
});
|
|
@@ -984,7 +994,8 @@ export class ZimbraBatchClient {
|
|
|
984
994
|
c: mapValues(options, coerceBooleanToInt)
|
|
985
995
|
}
|
|
986
996
|
}).then(res => {
|
|
987
|
-
const
|
|
997
|
+
const conversation = this.normalizeConversation(res.c[0]);
|
|
998
|
+
const c = normalize(Conversation)(conversation);
|
|
988
999
|
c.messages = c.messages.map(this.normalizeMessage);
|
|
989
1000
|
return c;
|
|
990
1001
|
});
|
|
@@ -1746,6 +1757,9 @@ export class ZimbraBatchClient {
|
|
|
1746
1757
|
res.cn = normalizeOtherAttr(res.cn);
|
|
1747
1758
|
}
|
|
1748
1759
|
const normalized = normalize(SearchResponse)(res);
|
|
1760
|
+
if (normalized.conversations) {
|
|
1761
|
+
normalized.conversations = normalized.conversations.map(this.normalizeConversation);
|
|
1762
|
+
}
|
|
1749
1763
|
if (normalized.messages) {
|
|
1750
1764
|
normalized.messages = normalized.messages.map(this.normalizeMessage);
|
|
1751
1765
|
}
|
|
@@ -2023,6 +2037,20 @@ export class ZimbraBatchClient {
|
|
|
2023
2037
|
})
|
|
2024
2038
|
});
|
|
2025
2039
|
|
|
2040
|
+
private normalizeConversation = (conversation: { [key: string]: any }) => {
|
|
2041
|
+
if (conversation?.meta) {
|
|
2042
|
+
conversation.meta = conversation.meta.map((entry: any) => {
|
|
2043
|
+
if (!entry._attrs) {
|
|
2044
|
+
entry._attrs = {};
|
|
2045
|
+
}
|
|
2046
|
+
entry = normalizeCustomMetaDataAttrs(entry);
|
|
2047
|
+
return entry;
|
|
2048
|
+
});
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
return conversation;
|
|
2052
|
+
};
|
|
2053
|
+
|
|
2026
2054
|
private normalizeMessage = (message: any) =>
|
|
2027
2055
|
normalizeMessage(message, {
|
|
2028
2056
|
origin: this.origin,
|
|
@@ -58,6 +58,7 @@ export type AccountCos = {
|
|
|
58
58
|
|
|
59
59
|
export type AccountInfo = {
|
|
60
60
|
__typename?: 'AccountInfo';
|
|
61
|
+
adminDelegated?: Maybe<Scalars['Boolean']>;
|
|
61
62
|
attrs?: Maybe<AccountInfoAttrs>;
|
|
62
63
|
changePasswordURL?: Maybe<Scalars['String']>;
|
|
63
64
|
cos?: Maybe<AccountCos>;
|
|
@@ -79,6 +80,7 @@ export type AccountInfo = {
|
|
|
79
80
|
export type AccountInfoAttrs = {
|
|
80
81
|
__typename?: 'AccountInfoAttrs';
|
|
81
82
|
displayName?: Maybe<Scalars['String']>;
|
|
83
|
+
zimbraBlockEmailSendFromImapPop?: Maybe<Scalars['Boolean']>;
|
|
82
84
|
zimbraBrandingFolderName?: Maybe<Scalars['String']>;
|
|
83
85
|
zimbraDomainTrialConvertAtExpiration?: Maybe<Scalars['Boolean']>;
|
|
84
86
|
zimbraDomainTrialExpirationDate?: Maybe<Scalars['String']>;
|
|
@@ -90,12 +92,14 @@ export type AccountInfoAttrs = {
|
|
|
90
92
|
zimbraFeatureCalendarEnabled?: Maybe<Scalars['Boolean']>;
|
|
91
93
|
zimbraFeatureChangePasswordEnabled?: Maybe<Scalars['Boolean']>;
|
|
92
94
|
zimbraFeatureConversationsEnabled?: Maybe<Scalars['Boolean']>;
|
|
95
|
+
zimbraFeatureDiscardInFiltersEnabled?: Maybe<Scalars['Boolean']>;
|
|
93
96
|
zimbraFeatureDocumentEditingEnabled?: Maybe<Scalars['Boolean']>;
|
|
94
97
|
zimbraFeatureFiltersEnabled?: Maybe<Scalars['Boolean']>;
|
|
95
98
|
zimbraFeatureGalAutoCompleteEnabled?: Maybe<Scalars['Boolean']>;
|
|
96
99
|
zimbraFeatureGalEnabled?: Maybe<Scalars['Boolean']>;
|
|
97
100
|
zimbraFeatureIdentitiesEnabled?: Maybe<Scalars['Boolean']>;
|
|
98
101
|
zimbraFeatureImapDataSourceEnabled?: Maybe<Scalars['Boolean']>;
|
|
102
|
+
zimbraFeatureInstantNotify?: Maybe<Scalars['Boolean']>;
|
|
99
103
|
zimbraFeatureMailEnabled?: Maybe<Scalars['Boolean']>;
|
|
100
104
|
zimbraFeatureMailForwardingInFiltersEnabled?: Maybe<Scalars['Boolean']>;
|
|
101
105
|
zimbraFeatureMailPriorityEnabled?: Maybe<Scalars['Boolean']>;
|
|
@@ -793,6 +797,7 @@ export type CancelRuleInfo = {
|
|
|
793
797
|
export type ClientInfoAttributes = {
|
|
794
798
|
__typename?: 'ClientInfoAttributes';
|
|
795
799
|
zimbraFeatureResetPasswordStatus?: Maybe<ResetPasswordStatus>;
|
|
800
|
+
zimbraHelpModernURL?: Maybe<Scalars['String']>;
|
|
796
801
|
zimbraWebClientLoginURL?: Maybe<Scalars['String']>;
|
|
797
802
|
zimbraWebClientLogoutURL?: Maybe<Scalars['String']>;
|
|
798
803
|
zimbraWebClientSkipLogoff?: Maybe<Scalars['Boolean']>;
|
|
@@ -1053,6 +1058,7 @@ export type Conversation = MailItem & {
|
|
|
1053
1058
|
invitations?: Maybe<Array<Maybe<InviteInfo>>>;
|
|
1054
1059
|
messages?: Maybe<Array<Maybe<MessageInfo>>>;
|
|
1055
1060
|
messagesMetaData?: Maybe<Array<Maybe<MessageInfo>>>;
|
|
1061
|
+
meta?: Maybe<Array<Maybe<CustomMetadataMeta>>>;
|
|
1056
1062
|
modifiedSequence?: Maybe<Scalars['Float']>;
|
|
1057
1063
|
numMessages?: Maybe<Scalars['Float']>;
|
|
1058
1064
|
replyType?: Maybe<Scalars['String']>;
|
|
@@ -1161,7 +1167,7 @@ export type CustomMetadataInput = {
|
|
|
1161
1167
|
export type CustomMetadataMeta = {
|
|
1162
1168
|
__typename?: 'CustomMetadataMeta';
|
|
1163
1169
|
_attrs?: Maybe<Array<Maybe<CustomMetadataAttrs>>>;
|
|
1164
|
-
section
|
|
1170
|
+
section?: Maybe<Scalars['String']>;
|
|
1165
1171
|
};
|
|
1166
1172
|
|
|
1167
1173
|
export type DataSource = {
|
|
@@ -2251,6 +2257,7 @@ export type MessageInfo = MailItem & {
|
|
|
2251
2257
|
isEncrypted?: Maybe<Scalars['Boolean']>;
|
|
2252
2258
|
isSigned?: Maybe<Scalars['Boolean']>;
|
|
2253
2259
|
local?: Maybe<Scalars['Boolean']>;
|
|
2260
|
+
meta?: Maybe<Array<Maybe<CustomMetadataMeta>>>;
|
|
2254
2261
|
mimeParts?: Maybe<Array<Maybe<MimePart>>>;
|
|
2255
2262
|
modifiedSequence?: Maybe<Scalars['Float']>;
|
|
2256
2263
|
origId?: Maybe<Scalars['ID']>;
|
|
@@ -2607,6 +2614,7 @@ export type MutationCreateAppointmentExceptionArgs = {
|
|
|
2607
2614
|
export type MutationCreateCalendarArgs = {
|
|
2608
2615
|
color: Scalars['Int'];
|
|
2609
2616
|
name: Scalars['String'];
|
|
2617
|
+
parentFolderId?: InputMaybe<Scalars['ID']>;
|
|
2610
2618
|
url?: InputMaybe<Scalars['String']>;
|
|
2611
2619
|
};
|
|
2612
2620
|
|
|
@@ -4002,7 +4010,7 @@ export type SignatureContentInput = {
|
|
|
4002
4010
|
};
|
|
4003
4011
|
|
|
4004
4012
|
export type SignatureInput = {
|
|
4005
|
-
content?: InputMaybe<SignatureContentInput
|
|
4013
|
+
content?: InputMaybe<Array<InputMaybe<SignatureContentInput>>>;
|
|
4006
4014
|
contentId?: InputMaybe<Scalars['String']>;
|
|
4007
4015
|
id?: InputMaybe<Scalars['ID']>;
|
|
4008
4016
|
name?: InputMaybe<Scalars['String']>;
|
|
@@ -487,6 +487,7 @@ type ClientInfoAttributes {
|
|
|
487
487
|
zimbraWebClientLogoutURL: String
|
|
488
488
|
zimbraWebClientSkipLogoff: Boolean
|
|
489
489
|
zimbraFeatureResetPasswordStatus: ResetPasswordStatus
|
|
490
|
+
zimbraHelpModernURL: String
|
|
490
491
|
}
|
|
491
492
|
|
|
492
493
|
type ClientInfoType {
|
|
@@ -535,6 +536,7 @@ type MessageInfo implements MailItem {
|
|
|
535
536
|
autoSendTime: Float
|
|
536
537
|
local: Boolean
|
|
537
538
|
part: String
|
|
539
|
+
meta: [CustomMetadataMeta]
|
|
538
540
|
}
|
|
539
541
|
|
|
540
542
|
type Conversation implements MailItem {
|
|
@@ -561,6 +563,7 @@ type Conversation implements MailItem {
|
|
|
561
563
|
unread: Float # u
|
|
562
564
|
share: [ShareNotification] # shr
|
|
563
565
|
replyType: String #rt
|
|
566
|
+
meta: [CustomMetadataMeta]
|
|
564
567
|
}
|
|
565
568
|
|
|
566
569
|
type MsgWithGroupInfo implements MailItem {
|
|
@@ -1229,6 +1232,7 @@ type AccountInfo {
|
|
|
1229
1232
|
zimlets: AccountZimlet
|
|
1230
1233
|
cos: AccountCos
|
|
1231
1234
|
pasteitcleanedEnabled: Boolean
|
|
1235
|
+
adminDelegated: Boolean
|
|
1232
1236
|
}
|
|
1233
1237
|
|
|
1234
1238
|
type OnlyEmailAddress {
|
|
@@ -1369,6 +1373,9 @@ type AccountInfoAttrs {
|
|
|
1369
1373
|
zimbraTrialExpirationDate: String
|
|
1370
1374
|
zimbraTrialConvertAtExpiration: Boolean
|
|
1371
1375
|
zimbraHierarchicalAddressBookRoot: String
|
|
1376
|
+
zimbraBlockEmailSendFromImapPop: Boolean
|
|
1377
|
+
zimbraFeatureInstantNotify: Boolean
|
|
1378
|
+
zimbraFeatureDiscardInFiltersEnabled: Boolean
|
|
1372
1379
|
}
|
|
1373
1380
|
|
|
1374
1381
|
type AccountCos {
|
|
@@ -1631,7 +1638,7 @@ type CustomMetadataAttrs {
|
|
|
1631
1638
|
}
|
|
1632
1639
|
|
|
1633
1640
|
type CustomMetadataMeta {
|
|
1634
|
-
section: String
|
|
1641
|
+
section: String
|
|
1635
1642
|
_attrs: [CustomMetadataAttrs]
|
|
1636
1643
|
}
|
|
1637
1644
|
|
|
@@ -2457,7 +2464,7 @@ input InviteReplyInput {
|
|
|
2457
2464
|
}
|
|
2458
2465
|
|
|
2459
2466
|
input PurgetRevisionInput {
|
|
2460
|
-
id: ID!
|
|
2467
|
+
id: ID!
|
|
2461
2468
|
ver: Int!
|
|
2462
2469
|
includeOlderRevisions: Int
|
|
2463
2470
|
}
|
|
@@ -2899,7 +2906,7 @@ input DeleteAppointmentInput {
|
|
|
2899
2906
|
input SignatureInput {
|
|
2900
2907
|
id: ID
|
|
2901
2908
|
name: String
|
|
2902
|
-
content: SignatureContentInput
|
|
2909
|
+
content: [SignatureContentInput]
|
|
2903
2910
|
contentId: String
|
|
2904
2911
|
}
|
|
2905
2912
|
|
|
@@ -3415,7 +3422,7 @@ type Mutation {
|
|
|
3415
3422
|
appointment: CalendarItemInput!
|
|
3416
3423
|
): Boolean
|
|
3417
3424
|
createAppSpecificPassword(appName: String!): CreateAppSpecificPasswordResponse
|
|
3418
|
-
createCalendar(name: String!, color: Int!, url: String): Folder
|
|
3425
|
+
createCalendar(name: String!, color: Int!, url: String, parentFolderId:ID): Folder
|
|
3419
3426
|
createContact(contact: CreateContactInput!): Contact
|
|
3420
3427
|
createContactList(contact: CreateContactInput!): Contact
|
|
3421
3428
|
modifyContact(contact: ModifyContactInput!): Contact
|
package/src/schema/schema.ts
CHANGED
|
@@ -278,13 +278,14 @@ export function createZimbraSchema(options: ZimbraSchemaOptions): {
|
|
|
278
278
|
client.checkCalendar(variables as FolderActionCheckCalendarInput),
|
|
279
279
|
counterAppointment: (_, { counterAppointmentInvite }) =>
|
|
280
280
|
client.counterAppointment(counterAppointmentInvite as CounterAppointmentInput),
|
|
281
|
-
createCalendar: (_, { name, color, url }) =>
|
|
281
|
+
createCalendar: (_, { name, color, url, parentFolderId }) =>
|
|
282
282
|
client.createFolder({
|
|
283
283
|
name,
|
|
284
284
|
color,
|
|
285
285
|
url,
|
|
286
286
|
view: 'appointment',
|
|
287
|
-
flags: '#'
|
|
287
|
+
flags: '#',
|
|
288
|
+
parentFolderId
|
|
288
289
|
} as CreateFolderOptions),
|
|
289
290
|
createSharedCalendar: (_, { link }) =>
|
|
290
291
|
client.createMountpoint({
|