@zimbra/api-client 101.0.1-master.3393cf5.0 → 101.0.1-master.50ef899.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 +9 -3
- package/dist/src/batch-client/index.d.ts +3 -2
- package/dist/src/batch-client/types.d.ts +1 -1
- package/dist/src/normalize/entities.d.ts +1 -0
- package/dist/src/schema/generated-schema-types.d.ts +11 -3
- package/dist/zm-api-js-client.esm.js +79 -49
- package/dist/zm-api-js-client.esm.js.map +1 -1
- package/dist/zm-api-js-client.js +2 -2
- package/dist/zm-api-js-client.js.map +1 -1
- package/dist/zm-api-js-client.umd.js +8 -8
- package/dist/zm-api-js-client.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/apollo/zimbra-in-memory-cache.ts +8 -0
- package/src/batch-client/index.ts +18 -5
- package/src/batch-client/types.ts +1 -1
- package/src/normalize/entities.ts +9 -0
- package/src/schema/generated-schema-types.ts +14 -3
- package/src/schema/schema.graphql +9 -3
- package/src/schema/schema.ts +2 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zimbra/api-client",
|
|
3
3
|
"amdName": "zmApiJsClient",
|
|
4
|
-
"version": "101.0.1-master.
|
|
4
|
+
"version": "101.0.1-master.50ef899.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",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"chai": "^4.5.0",
|
|
79
79
|
"copyfiles": "^2.4.1",
|
|
80
80
|
"cross-var": "^1.1.0",
|
|
81
|
-
"eslint": "^9.
|
|
81
|
+
"eslint": "^9.39.4",
|
|
82
82
|
"husky": "^9.1.7",
|
|
83
83
|
"lint-staged": "15.2.8",
|
|
84
84
|
"mocha": "^10.8.2",
|
|
@@ -135,6 +135,14 @@ const typePolicies = {
|
|
|
135
135
|
// but as our app is already handling at caller level
|
|
136
136
|
// we are just overwriting cache data here
|
|
137
137
|
merge: false
|
|
138
|
+
},
|
|
139
|
+
sortField: {
|
|
140
|
+
merge(existing: string, incoming: string) {
|
|
141
|
+
if (incoming !== null && incoming !== undefined) {
|
|
142
|
+
return incoming;
|
|
143
|
+
}
|
|
144
|
+
return existing;
|
|
145
|
+
}
|
|
138
146
|
}
|
|
139
147
|
}
|
|
140
148
|
},
|
|
@@ -38,6 +38,7 @@ import {
|
|
|
38
38
|
InviteReply,
|
|
39
39
|
ListDocumentRevisions,
|
|
40
40
|
MessageInfo,
|
|
41
|
+
RedirectMessage,
|
|
41
42
|
SaveDocument,
|
|
42
43
|
SaveDocuments,
|
|
43
44
|
SearchCalendarResourcesResponse,
|
|
@@ -85,6 +86,7 @@ import {
|
|
|
85
86
|
ModifyContactInput,
|
|
86
87
|
ModifyIdentityInput,
|
|
87
88
|
PreferencesInput,
|
|
89
|
+
RedirectMessgeInput,
|
|
88
90
|
RevokeRightsInput,
|
|
89
91
|
SaveSMimeCertInputUpload,
|
|
90
92
|
SearchFolderInput,
|
|
@@ -487,6 +489,14 @@ export class ZimbraBatchClient {
|
|
|
487
489
|
}
|
|
488
490
|
});
|
|
489
491
|
|
|
492
|
+
public bounceMsg = (options: RedirectMessgeInput) =>
|
|
493
|
+
this.jsonRequest({
|
|
494
|
+
name: 'BounceMsg',
|
|
495
|
+
namespace: Namespace.Mail,
|
|
496
|
+
body: denormalize(RedirectMessage)(options),
|
|
497
|
+
singleRequest: true
|
|
498
|
+
}).then(Boolean);
|
|
499
|
+
|
|
490
500
|
public cancelPendingAccountOnlyRemoteWipeSync = (deviceId: string) =>
|
|
491
501
|
this.jsonRequest({
|
|
492
502
|
name: 'CancelPendingAccountOnlyRemoteWipe',
|
|
@@ -1423,16 +1433,19 @@ export class ZimbraBatchClient {
|
|
|
1423
1433
|
namespace: Namespace.Account
|
|
1424
1434
|
}).then(certificate => normalize(SmimeCertInfoResponse)(certificate || {}));
|
|
1425
1435
|
|
|
1426
|
-
public getSMimePublicCerts = (
|
|
1436
|
+
public getSMimePublicCerts = ({ contactAddr, store }: GetSMimePublicCertsOptions) =>
|
|
1427
1437
|
this.jsonRequest({
|
|
1428
1438
|
name: 'GetSMIMEPublicCerts',
|
|
1429
1439
|
body: {
|
|
1430
1440
|
store: {
|
|
1431
|
-
_content:
|
|
1441
|
+
_content: store
|
|
1432
1442
|
},
|
|
1433
|
-
email:
|
|
1434
|
-
|
|
1435
|
-
|
|
1443
|
+
email:
|
|
1444
|
+
typeof contactAddr === 'string'
|
|
1445
|
+
? {
|
|
1446
|
+
_content: contactAddr
|
|
1447
|
+
}
|
|
1448
|
+
: contactAddr.map(add => ({ _content: add }))
|
|
1436
1449
|
},
|
|
1437
1450
|
namespace: Namespace.Account
|
|
1438
1451
|
});
|
|
@@ -605,6 +605,15 @@ const DateCondition = new Entity({
|
|
|
605
605
|
d: 'date'
|
|
606
606
|
});
|
|
607
607
|
|
|
608
|
+
const RedirectMessageAttribute = new Entity({
|
|
609
|
+
id: 'id',
|
|
610
|
+
e: ['emailAddresses', MailItemEmailAddress]
|
|
611
|
+
});
|
|
612
|
+
|
|
613
|
+
export const RedirectMessage = new Entity({
|
|
614
|
+
m: ['message', RedirectMessageAttribute]
|
|
615
|
+
});
|
|
616
|
+
|
|
608
617
|
const ImportanceCondition = new Entity({
|
|
609
618
|
imp: 'importance'
|
|
610
619
|
});
|
|
@@ -2424,7 +2424,7 @@ export type MailboxMetadataAttrs = {
|
|
|
2424
2424
|
zimbraPrefFolderTreeSash?: Maybe<Scalars['Int']['output']>;
|
|
2425
2425
|
zimbraPrefFoldersExpanded?: Maybe<Scalars['String']['output']>;
|
|
2426
2426
|
zimbraPrefGenerateLinkPreviews?: Maybe<Scalars['Boolean']['output']>;
|
|
2427
|
-
|
|
2427
|
+
zimbraPrefGroupByListModern?: Maybe<Scalars['String']['output']>;
|
|
2428
2428
|
zimbraPrefHideMuteConvModal?: Maybe<Scalars['Boolean']['output']>;
|
|
2429
2429
|
zimbraPrefMessageListDensity?: Maybe<Scalars['String']['output']>;
|
|
2430
2430
|
zimbraPrefMultitasking?: Maybe<Scalars['String']['output']>;
|
|
@@ -2458,7 +2458,7 @@ export type MailboxMetadataSectionAttrsInput = {
|
|
|
2458
2458
|
zimbraPrefFolderTreeSash?: InputMaybe<Scalars['Int']['input']>;
|
|
2459
2459
|
zimbraPrefFoldersExpanded?: InputMaybe<Scalars['String']['input']>;
|
|
2460
2460
|
zimbraPrefGenerateLinkPreviews?: InputMaybe<Scalars['Boolean']['input']>;
|
|
2461
|
-
|
|
2461
|
+
zimbraPrefGroupByListModern?: InputMaybe<Scalars['String']['input']>;
|
|
2462
2462
|
zimbraPrefHideMuteConvModal?: InputMaybe<Scalars['Boolean']['input']>;
|
|
2463
2463
|
zimbraPrefMessageListDensity?: InputMaybe<Scalars['String']['input']>;
|
|
2464
2464
|
zimbraPrefMultitasking?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -2669,6 +2669,7 @@ export type Mutation = {
|
|
|
2669
2669
|
allowDeviceSync?: Maybe<Device>;
|
|
2670
2670
|
applyFilterRules?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
|
|
2671
2671
|
blockDeviceSync?: Maybe<Device>;
|
|
2672
|
+
bounceMessage?: Maybe<Scalars['Boolean']['output']>;
|
|
2672
2673
|
cancelPendingAccountOnlyRemoteWipeSync?: Maybe<Device>;
|
|
2673
2674
|
cancelPendingRemoteWipeSync?: Maybe<Device>;
|
|
2674
2675
|
cancelTask?: Maybe<Scalars['Boolean']['output']>;
|
|
@@ -2811,6 +2812,11 @@ export type MutationBlockDeviceSyncArgs = {
|
|
|
2811
2812
|
};
|
|
2812
2813
|
|
|
2813
2814
|
|
|
2815
|
+
export type MutationBounceMessageArgs = {
|
|
2816
|
+
message?: InputMaybe<RedirectMessgeInput>;
|
|
2817
|
+
};
|
|
2818
|
+
|
|
2819
|
+
|
|
2814
2820
|
export type MutationCancelPendingAccountOnlyRemoteWipeSyncArgs = {
|
|
2815
2821
|
deviceId?: InputMaybe<Scalars['String']['input']>;
|
|
2816
2822
|
};
|
|
@@ -3901,7 +3907,7 @@ export type QueryGetSMimeCertInfoArgs = {
|
|
|
3901
3907
|
|
|
3902
3908
|
|
|
3903
3909
|
export type QueryGetSMimePublicCertsArgs = {
|
|
3904
|
-
contactAddr: Scalars['String']['input']
|
|
3910
|
+
contactAddr: Array<InputMaybe<Scalars['String']['input']>>;
|
|
3905
3911
|
store: Scalars['String']['input'];
|
|
3906
3912
|
};
|
|
3907
3913
|
|
|
@@ -4039,6 +4045,11 @@ export type RedirectActionInput = {
|
|
|
4039
4045
|
index?: InputMaybe<Scalars['Int']['input']>;
|
|
4040
4046
|
};
|
|
4041
4047
|
|
|
4048
|
+
export type RedirectMessgeInput = {
|
|
4049
|
+
emailAddresses?: InputMaybe<Array<InputMaybe<MailItemEmailAddressInput>>>;
|
|
4050
|
+
id: Scalars['ID']['input'];
|
|
4051
|
+
};
|
|
4052
|
+
|
|
4042
4053
|
export type RelatedContact = {
|
|
4043
4054
|
__typename?: 'RelatedContact';
|
|
4044
4055
|
email?: Maybe<Scalars['String']['output']>;
|
|
@@ -2141,7 +2141,7 @@ type MailboxMetadataAttrs {
|
|
|
2141
2141
|
zimbraPrefFoldersExpanded: String
|
|
2142
2142
|
zimbraPrefFolderTreeSash: Int
|
|
2143
2143
|
zimbraPrefGenerateLinkPreviews: Boolean
|
|
2144
|
-
|
|
2144
|
+
zimbraPrefGroupByListModern: String
|
|
2145
2145
|
zimbraPrefMessageListDensity: String
|
|
2146
2146
|
zimbraPrefMultitasking: String
|
|
2147
2147
|
zimbraPrefReadingPaneSashHorizontal: Int
|
|
@@ -2178,7 +2178,7 @@ input MailboxMetadataSectionAttrsInput {
|
|
|
2178
2178
|
zimbraPrefFoldersExpanded: String
|
|
2179
2179
|
zimbraPrefFolderTreeSash: Int
|
|
2180
2180
|
zimbraPrefGenerateLinkPreviews: Boolean
|
|
2181
|
-
|
|
2181
|
+
zimbraPrefGroupByListModern: String
|
|
2182
2182
|
zimbraPrefMessageListDensity: String
|
|
2183
2183
|
zimbraPrefMultitasking: String
|
|
2184
2184
|
zimbraPrefReadingPaneSashHorizontal: Int
|
|
@@ -3047,6 +3047,11 @@ input ForwardMessageInput {
|
|
|
3047
3047
|
emailAddresses: [MailItemEmailAddressInput] #e
|
|
3048
3048
|
}
|
|
3049
3049
|
|
|
3050
|
+
input RedirectMessgeInput {
|
|
3051
|
+
id: ID!
|
|
3052
|
+
emailAddresses: [MailItemEmailAddressInput]
|
|
3053
|
+
}
|
|
3054
|
+
|
|
3050
3055
|
input ShareNotificationInput {
|
|
3051
3056
|
action: ShareInputAction
|
|
3052
3057
|
item: ShareNotificationItemInput!
|
|
@@ -3643,7 +3648,7 @@ type Query {
|
|
|
3643
3648
|
getMessagesMetadata(ids: [ID!]!, isLocal: Boolean): [MessageInfo]
|
|
3644
3649
|
getRights(input: GetRightsInput!): RightsResponse
|
|
3645
3650
|
getSMimePublicCerts(
|
|
3646
|
-
contactAddr: String!
|
|
3651
|
+
contactAddr: [String]!
|
|
3647
3652
|
store: String!
|
|
3648
3653
|
): SMimePublicCertsResponse
|
|
3649
3654
|
getSMimeCertInfo(certId: String): SmimeCertInfoResponse
|
|
@@ -3928,6 +3933,7 @@ type Mutation {
|
|
|
3928
3933
|
cancelPendingRemoteWipeSync(deviceId: String): Device
|
|
3929
3934
|
subscribeDistributionList(op: String!, by: String, dl: String!): String
|
|
3930
3935
|
distributionListAction(dlActions: DistributionListActionInput!): Boolean
|
|
3936
|
+
bounceMessage(message: RedirectMessgeInput): Boolean
|
|
3931
3937
|
}
|
|
3932
3938
|
|
|
3933
3939
|
schema {
|
package/src/schema/schema.ts
CHANGED
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
PreferencesInput,
|
|
33
33
|
PropertiesInput,
|
|
34
34
|
PurgetRevisionInput,
|
|
35
|
+
RedirectMessgeInput,
|
|
35
36
|
RevokeRightsInput,
|
|
36
37
|
SaveSMimeCertInputUpload,
|
|
37
38
|
SearchFolderInput,
|
|
@@ -440,6 +441,7 @@ export function createZimbraSchema(options: ZimbraSchemaOptions): {
|
|
|
440
441
|
blockDeviceSync: (_, { deviceId }) => {
|
|
441
442
|
client.blockDeviceSync(deviceId);
|
|
442
443
|
},
|
|
444
|
+
bounceMessage: (_, variables) => client.bounceMsg(variables as RedirectMessgeInput),
|
|
443
445
|
accountOnlyRemoteWipeSync: (_, { deviceId }) => {
|
|
444
446
|
client.accountOnlyRemoteWipeSync(deviceId);
|
|
445
447
|
},
|