@zimbra/api-client 73.0.0 → 76.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 +77 -7
- package/dist/src/batch-client/index.d.ts +6 -4
- package/dist/src/batch-client/types.d.ts +6 -0
- package/dist/src/normalize/entities.d.ts +1 -0
- package/dist/src/request/types.d.ts +2 -0
- package/dist/src/schema/generated-schema-types.d.ts +83 -5
- package/dist/src/utils/normalize-otherAttribute-contact.d.ts +1 -1
- package/dist/zm-api-js-client.esm.js +249 -178
- 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/index.ts +44 -20
- package/src/batch-client/types.ts +7 -0
- package/src/normalize/entities.ts +42 -5
- package/src/request/types.ts +2 -0
- package/src/schema/generated-schema-types.ts +99 -5
- package/src/schema/schema.graphql +77 -7
- package/src/schema/schema.ts +10 -3
- package/src/utils/normalize-otherAttribute-contact.ts +2 -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": "76.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",
|
|
@@ -44,6 +44,7 @@ import {
|
|
|
44
44
|
SearchResponse,
|
|
45
45
|
SendMessageInfo,
|
|
46
46
|
ShareNotification,
|
|
47
|
+
SmimeCertInfoResponse,
|
|
47
48
|
Tag,
|
|
48
49
|
ZimletConfigEntity
|
|
49
50
|
} from '../normalize/entities';
|
|
@@ -82,6 +83,7 @@ import {
|
|
|
82
83
|
ModifyIdentityInput,
|
|
83
84
|
PreferencesInput,
|
|
84
85
|
RevokeRightsInput,
|
|
86
|
+
SaveSMimeCertInputUpload,
|
|
85
87
|
SearchFolderInput,
|
|
86
88
|
SendMessageInput,
|
|
87
89
|
ShareNotificationInput,
|
|
@@ -118,6 +120,7 @@ import {
|
|
|
118
120
|
ChangePasswordOptions,
|
|
119
121
|
CreateFolderOptions,
|
|
120
122
|
CreateSearchFolderOptions,
|
|
123
|
+
DiscoverRightOptions,
|
|
121
124
|
ExternalAccountDeleteInput,
|
|
122
125
|
ExternalAccountModifyInput,
|
|
123
126
|
FreeBusyOptions,
|
|
@@ -155,10 +158,8 @@ function normalizeMessage(
|
|
|
155
158
|
message: { [key: string]: any },
|
|
156
159
|
{ origin, jwtToken, isDesktop }: { isDesktop?: string; jwtToken?: string; origin?: string }
|
|
157
160
|
) {
|
|
158
|
-
|
|
159
|
-
normalizedMessage
|
|
160
|
-
normalizedMessage.attributes &&
|
|
161
|
-
mapValuesDeep(normalizedMessage.attributes, coerceStringToBoolean);
|
|
161
|
+
let normalizedMessage = normalize(MessageInfo)(message);
|
|
162
|
+
normalizedMessage = normalizedMessage && mapValuesDeep(normalizedMessage, coerceStringToBoolean);
|
|
162
163
|
|
|
163
164
|
return normalizeEmailAddresses(
|
|
164
165
|
normalizeMimeParts(normalizedMessage, { origin, jwtToken, isDesktop })
|
|
@@ -589,7 +590,7 @@ export class ZimbraBatchClient {
|
|
|
589
590
|
public createContact = (data: CreateContactInput) =>
|
|
590
591
|
this.jsonRequest({
|
|
591
592
|
name: 'CreateContact',
|
|
592
|
-
body: createContactBody(data),
|
|
593
|
+
body: createContactBody(data, this.localStoreClient !== undefined),
|
|
593
594
|
singleRequest: true
|
|
594
595
|
}).then(res => normalize(Contact)(normalizeOtherAttr(res.cn)[0]));
|
|
595
596
|
|
|
@@ -753,19 +754,12 @@ export class ZimbraBatchClient {
|
|
|
753
754
|
singleRequest: true
|
|
754
755
|
}).then(Boolean);
|
|
755
756
|
|
|
756
|
-
public discoverRights = () =>
|
|
757
|
+
public discoverRights = ({ right }: DiscoverRightOptions) =>
|
|
757
758
|
this.jsonRequest({
|
|
758
759
|
name: 'DiscoverRights',
|
|
759
760
|
namespace: Namespace.Account,
|
|
760
761
|
body: {
|
|
761
|
-
right
|
|
762
|
-
{
|
|
763
|
-
_content: 'sendAs'
|
|
764
|
-
},
|
|
765
|
-
{
|
|
766
|
-
_content: 'sendOnBehalfOf'
|
|
767
|
-
}
|
|
768
|
-
]
|
|
762
|
+
right
|
|
769
763
|
}
|
|
770
764
|
}).then(res => normalize(DiscoverRightsResponse)(res));
|
|
771
765
|
|
|
@@ -1156,7 +1150,7 @@ export class ZimbraBatchClient {
|
|
|
1156
1150
|
needExp: 1,
|
|
1157
1151
|
neuter: 0,
|
|
1158
1152
|
// max body length (look for mp.truncated=1)
|
|
1159
|
-
max: max
|
|
1153
|
+
...(max && { max: max }),
|
|
1160
1154
|
raw: raw ? 1 : 0,
|
|
1161
1155
|
...(ridZ && { ridZ: ridZ }),
|
|
1162
1156
|
...(part && { part: part })
|
|
@@ -1233,6 +1227,12 @@ export class ZimbraBatchClient {
|
|
|
1233
1227
|
namespace: Namespace.Account
|
|
1234
1228
|
}).then(res => mapValuesDeep(res, coerceStringToBoolean));
|
|
1235
1229
|
|
|
1230
|
+
public getSMimeCertInfo = () =>
|
|
1231
|
+
this.jsonRequest({
|
|
1232
|
+
name: 'GetSmimeCertificateInfo',
|
|
1233
|
+
namespace: Namespace.Account
|
|
1234
|
+
}).then(certificate => normalize(SmimeCertInfoResponse)(certificate || {}));
|
|
1235
|
+
|
|
1236
1236
|
public getSMimePublicCerts = (options: GetSMimePublicCertsOptions) =>
|
|
1237
1237
|
this.jsonRequest({
|
|
1238
1238
|
name: 'GetSMIMEPublicCerts',
|
|
@@ -1374,7 +1374,7 @@ export class ZimbraBatchClient {
|
|
|
1374
1374
|
public modifyContact = (data: ModifyContactInput) =>
|
|
1375
1375
|
this.jsonRequest({
|
|
1376
1376
|
name: 'ModifyContact',
|
|
1377
|
-
body: createContactBody(data),
|
|
1377
|
+
body: createContactBody(data, this.localStoreClient !== undefined),
|
|
1378
1378
|
singleRequest: true
|
|
1379
1379
|
}).then(res => normalize(Contact)(normalizeOtherAttr(res.cn)[0]));
|
|
1380
1380
|
|
|
@@ -1645,6 +1645,16 @@ export class ZimbraBatchClient {
|
|
|
1645
1645
|
message: messages && messages.map(this.normalizeMessage)
|
|
1646
1646
|
}));
|
|
1647
1647
|
|
|
1648
|
+
public saveSMimeCert = (upload: SaveSMimeCertInputUpload, password: string) =>
|
|
1649
|
+
this.jsonRequest({
|
|
1650
|
+
name: 'SaveSmimeCertificate',
|
|
1651
|
+
body: {
|
|
1652
|
+
upload,
|
|
1653
|
+
password
|
|
1654
|
+
},
|
|
1655
|
+
namespace: Namespace.Account
|
|
1656
|
+
}).then(certificate => normalize(SmimeCertInfoResponse)(certificate || {}));
|
|
1657
|
+
|
|
1648
1658
|
public search = (options: SearchOptions) =>
|
|
1649
1659
|
this.jsonRequest({
|
|
1650
1660
|
name: 'Search',
|
|
@@ -1674,7 +1684,12 @@ export class ZimbraBatchClient {
|
|
|
1674
1684
|
name: 'SearchGal',
|
|
1675
1685
|
body: options,
|
|
1676
1686
|
namespace: Namespace.Account
|
|
1677
|
-
}).then(
|
|
1687
|
+
}).then(res => {
|
|
1688
|
+
if (res.cn) {
|
|
1689
|
+
res.cn = normalizeOtherAttr(res.cn);
|
|
1690
|
+
}
|
|
1691
|
+
return normalize(SearchResponse)(res);
|
|
1692
|
+
});
|
|
1678
1693
|
|
|
1679
1694
|
public sendDeliveryReport = (messageId: string) =>
|
|
1680
1695
|
this.jsonRequest({
|
|
@@ -1694,10 +1709,19 @@ export class ZimbraBatchClient {
|
|
|
1694
1709
|
singleRequest: true
|
|
1695
1710
|
}).then(res => normalize(CalendarItemHitInfo)(res));
|
|
1696
1711
|
|
|
1697
|
-
public sendMessage = (
|
|
1712
|
+
public sendMessage = (
|
|
1713
|
+
message: SendMessageInput,
|
|
1714
|
+
accountName: string,
|
|
1715
|
+
sign: Boolean,
|
|
1716
|
+
encrypt: Boolean
|
|
1717
|
+
) =>
|
|
1698
1718
|
this.jsonRequest({
|
|
1699
|
-
name: 'SendMsg',
|
|
1700
|
-
body:
|
|
1719
|
+
name: !(sign || encrypt) ? 'SendMsg' : 'SendSecureMsg',
|
|
1720
|
+
body: {
|
|
1721
|
+
...denormalize(SendMessageInfo)({ message }),
|
|
1722
|
+
...(sign && { sign: true }),
|
|
1723
|
+
...(encrypt && { encrypt: true })
|
|
1724
|
+
},
|
|
1701
1725
|
singleRequest: true,
|
|
1702
1726
|
accountName: accountName
|
|
1703
1727
|
}).then(normalize(SendMessageInfo));
|
|
@@ -13,9 +13,7 @@ const MimePart = new Entity({
|
|
|
13
13
|
cl: 'contentLocation',
|
|
14
14
|
ct: 'contentType',
|
|
15
15
|
s: 'size',
|
|
16
|
-
|
|
17
|
-
mid: 'messageId',
|
|
18
|
-
content: 'content'
|
|
16
|
+
mid: 'messageId'
|
|
19
17
|
});
|
|
20
18
|
|
|
21
19
|
const CalendarItemAlarmTriggerRelative = new Entity({
|
|
@@ -201,6 +199,43 @@ MimePart.addMapping({
|
|
|
201
199
|
attach: ['attachments', AttachmentsInfo]
|
|
202
200
|
});
|
|
203
201
|
|
|
202
|
+
const SmimeCertsSubjectRfc822Name = new Entity({
|
|
203
|
+
_content: 'content'
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
const SmimeCertsSubjectAltName = new Entity({
|
|
207
|
+
rfc822Name: ['rfc822Name', SmimeCertsSubjectRfc822Name]
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
const commonSmimeCertsFields = {
|
|
211
|
+
c: 'country',
|
|
212
|
+
cn: 'commonName',
|
|
213
|
+
o: 'organizationName',
|
|
214
|
+
st: 'state'
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
const SmimeCertsIssuedBy = new Entity({
|
|
218
|
+
...commonSmimeCertsFields,
|
|
219
|
+
l: 'locality'
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
const SmimeCertsIssuedTo = new Entity({
|
|
223
|
+
...commonSmimeCertsFields,
|
|
224
|
+
ou: 'organizationUnit'
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
const SmimeCert = new Entity({
|
|
228
|
+
issuedBy: ['issuedBy', SmimeCertsIssuedBy],
|
|
229
|
+
issuedTo: ['issuedTo', SmimeCertsIssuedTo],
|
|
230
|
+
pubCertId: 'publicCertificateId',
|
|
231
|
+
pvtKeyId: 'privateKeyId',
|
|
232
|
+
subjectAltName: ['subjectAltName', SmimeCertsSubjectAltName]
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
export const SmimeCertInfoResponse = new Entity({
|
|
236
|
+
certificate: ['certificates', SmimeCert]
|
|
237
|
+
});
|
|
238
|
+
|
|
204
239
|
const commonMailItemFields = {
|
|
205
240
|
...commonMessageFields,
|
|
206
241
|
e: ['emailAddresses', MailItemEmailAddress],
|
|
@@ -210,7 +245,8 @@ const commonMailItemFields = {
|
|
|
210
245
|
su: 'subject',
|
|
211
246
|
origid: 'origId',
|
|
212
247
|
attach: ['attachments', AttachmentsInfo],
|
|
213
|
-
rt: 'replyType'
|
|
248
|
+
rt: 'replyType',
|
|
249
|
+
certificate: ['certificate', SmimeCert]
|
|
214
250
|
};
|
|
215
251
|
|
|
216
252
|
const SendMessageFields = new Entity({
|
|
@@ -446,7 +482,8 @@ const contactFields = {
|
|
|
446
482
|
sf: 'sortField',
|
|
447
483
|
t: 'tags',
|
|
448
484
|
tn: 'tagNames',
|
|
449
|
-
_attrs: ['attributes', ContactAttributes]
|
|
485
|
+
_attrs: ['attributes', ContactAttributes],
|
|
486
|
+
certificate: ['certificate', SmimeCert]
|
|
450
487
|
};
|
|
451
488
|
|
|
452
489
|
const contactListMembers = new Entity({
|
package/src/request/types.ts
CHANGED
|
@@ -19,12 +19,14 @@ export interface BaseRequestOptions {
|
|
|
19
19
|
authToken?: string;
|
|
20
20
|
credentials?: RequestCredentials;
|
|
21
21
|
csrfToken?: string | null;
|
|
22
|
+
encrypt?: Boolean;
|
|
22
23
|
fetchOptions?: any;
|
|
23
24
|
headers?: any;
|
|
24
25
|
jwtToken?: string | null;
|
|
25
26
|
origin?: string;
|
|
26
27
|
sessionId?: SessionId;
|
|
27
28
|
sessionSeq?: SessionSeq;
|
|
29
|
+
sign?: Boolean;
|
|
28
30
|
singleRequest?: boolean;
|
|
29
31
|
soapPathname?: string;
|
|
30
32
|
userAgent?: UserAgent;
|
|
@@ -83,6 +83,7 @@ export type AccountInfoAttrs = {
|
|
|
83
83
|
zimbraDomainTrialExpirationDate?: Maybe<Scalars['String']>;
|
|
84
84
|
zimbraDumpsterEnabled?: Maybe<Scalars['Boolean']>;
|
|
85
85
|
zimbraExternalSharingEnabled?: Maybe<Scalars['Boolean']>;
|
|
86
|
+
zimbraFeatureAntispamEnabled?: Maybe<Scalars['Boolean']>;
|
|
86
87
|
zimbraFeatureAppSpecificPasswordsEnabled?: Maybe<Scalars['Boolean']>;
|
|
87
88
|
zimbraFeatureBriefcasesEnabled?: Maybe<Scalars['Boolean']>;
|
|
88
89
|
zimbraFeatureCalendarEnabled?: Maybe<Scalars['Boolean']>;
|
|
@@ -108,6 +109,7 @@ export type AccountInfoAttrs = {
|
|
|
108
109
|
zimbraFeatureResetPasswordStatus?: Maybe<ResetPasswordStatus>;
|
|
109
110
|
zimbraFeatureSharingEnabled?: Maybe<Scalars['Boolean']>;
|
|
110
111
|
zimbraFeatureTaggingEnabled?: Maybe<Scalars['Boolean']>;
|
|
112
|
+
zimbraFeatureTasksEnabled?: Maybe<Scalars['Boolean']>;
|
|
111
113
|
zimbraFeatureTrustedDevicesEnabled?: Maybe<Scalars['Boolean']>;
|
|
112
114
|
zimbraFeatureTwoFactorAuthAvailable?: Maybe<Scalars['Boolean']>;
|
|
113
115
|
zimbraFeatureTwoFactorAuthRequired?: Maybe<Scalars['Boolean']>;
|
|
@@ -817,6 +819,7 @@ export enum ConnectionType {
|
|
|
817
819
|
export type Contact = {
|
|
818
820
|
__typename?: 'Contact';
|
|
819
821
|
attributes?: Maybe<ContactAttributes>;
|
|
822
|
+
certificate?: Maybe<Array<Maybe<SmimeCert>>>;
|
|
820
823
|
date?: Maybe<Scalars['Float']>;
|
|
821
824
|
fileAsStr?: Maybe<Scalars['String']>;
|
|
822
825
|
folderId?: Maybe<Scalars['ID']>;
|
|
@@ -886,8 +889,6 @@ export type ContactAttributes = {
|
|
|
886
889
|
otherURL?: Maybe<Scalars['String']>;
|
|
887
890
|
pager?: Maybe<Scalars['String']>;
|
|
888
891
|
pager2?: Maybe<Scalars['String']>;
|
|
889
|
-
phone?: Maybe<Scalars['String']>;
|
|
890
|
-
phone2?: Maybe<Scalars['String']>;
|
|
891
892
|
phoneticFirstName?: Maybe<Scalars['String']>;
|
|
892
893
|
phoneticLastName?: Maybe<Scalars['String']>;
|
|
893
894
|
thumbnailPhoto?: Maybe<Scalars['String']>;
|
|
@@ -965,8 +966,6 @@ export type ContactAttrsInput = {
|
|
|
965
966
|
otherURL?: Maybe<Scalars['String']>;
|
|
966
967
|
pager?: Maybe<Scalars['String']>;
|
|
967
968
|
pager2?: Maybe<Scalars['String']>;
|
|
968
|
-
phone?: Maybe<Scalars['String']>;
|
|
969
|
-
phone2?: Maybe<Scalars['String']>;
|
|
970
969
|
phoneticFirstName?: Maybe<Scalars['String']>;
|
|
971
970
|
phoneticLastName?: Maybe<Scalars['String']>;
|
|
972
971
|
type?: Maybe<Scalars['String']>;
|
|
@@ -1128,7 +1127,7 @@ export type Cursor = {
|
|
|
1128
1127
|
endSortVal?: Maybe<Scalars['String']>;
|
|
1129
1128
|
id?: Maybe<Scalars['ID']>;
|
|
1130
1129
|
includeOffset?: Maybe<Scalars['Boolean']>;
|
|
1131
|
-
|
|
1130
|
+
sortVal?: Maybe<Scalars['String']>;
|
|
1132
1131
|
};
|
|
1133
1132
|
|
|
1134
1133
|
export type CustomMetadata = {
|
|
@@ -1234,6 +1233,10 @@ export type Device = {
|
|
|
1234
1233
|
ua?: Maybe<Scalars['String']>;
|
|
1235
1234
|
};
|
|
1236
1235
|
|
|
1236
|
+
export type DiscoverRightInput = {
|
|
1237
|
+
_content?: Maybe<Scalars['String']>;
|
|
1238
|
+
};
|
|
1239
|
+
|
|
1237
1240
|
export type DiscoverRights = {
|
|
1238
1241
|
__typename?: 'DiscoverRights';
|
|
1239
1242
|
targets?: Maybe<Array<Maybe<Targets>>>;
|
|
@@ -2222,9 +2225,11 @@ export type MessageInfo = MailItem & {
|
|
|
2222
2225
|
autoSendTime?: Maybe<Scalars['Float']>;
|
|
2223
2226
|
bcc?: Maybe<Array<Maybe<EmailAddress>>>;
|
|
2224
2227
|
cc?: Maybe<Array<Maybe<EmailAddress>>>;
|
|
2228
|
+
certificate?: Maybe<Array<Maybe<SmimeCert>>>;
|
|
2225
2229
|
changeDate?: Maybe<Scalars['Float']>;
|
|
2226
2230
|
conversationId?: Maybe<Scalars['ID']>;
|
|
2227
2231
|
date?: Maybe<Scalars['Float']>;
|
|
2232
|
+
decryptionErrorCode?: Maybe<Scalars['String']>;
|
|
2228
2233
|
emailAddresses?: Maybe<Array<Maybe<EmailAddress>>>;
|
|
2229
2234
|
excerpt?: Maybe<Scalars['String']>;
|
|
2230
2235
|
flags?: Maybe<Scalars['String']>;
|
|
@@ -2234,6 +2239,8 @@ export type MessageInfo = MailItem & {
|
|
|
2234
2239
|
id?: Maybe<Scalars['ID']>;
|
|
2235
2240
|
inlineAttachments?: Maybe<Array<Maybe<MimePart>>>;
|
|
2236
2241
|
invitations?: Maybe<Array<Maybe<InviteInfo>>>;
|
|
2242
|
+
isEncrypted?: Maybe<Scalars['Boolean']>;
|
|
2243
|
+
isSigned?: Maybe<Scalars['Boolean']>;
|
|
2237
2244
|
local?: Maybe<Scalars['Boolean']>;
|
|
2238
2245
|
mimeParts?: Maybe<Array<Maybe<MimePart>>>;
|
|
2239
2246
|
modifiedSequence?: Maybe<Scalars['Float']>;
|
|
@@ -2287,6 +2294,7 @@ export type MimePart = {
|
|
|
2287
2294
|
mimeParts?: Maybe<Array<Maybe<MimePart>>>;
|
|
2288
2295
|
part?: Maybe<Scalars['ID']>;
|
|
2289
2296
|
size?: Maybe<Scalars['Float']>;
|
|
2297
|
+
truncated?: Maybe<Scalars['Boolean']>;
|
|
2290
2298
|
url?: Maybe<Scalars['String']>;
|
|
2291
2299
|
};
|
|
2292
2300
|
|
|
@@ -2303,6 +2311,7 @@ export type MimePartInput = {
|
|
|
2303
2311
|
mimeParts?: Maybe<Array<Maybe<MimePartInput>>>;
|
|
2304
2312
|
part?: Maybe<Scalars['ID']>;
|
|
2305
2313
|
size?: Maybe<Scalars['Float']>;
|
|
2314
|
+
truncated?: Maybe<Scalars['Boolean']>;
|
|
2306
2315
|
url?: Maybe<Scalars['String']>;
|
|
2307
2316
|
};
|
|
2308
2317
|
|
|
@@ -2449,6 +2458,7 @@ export type Mutation = {
|
|
|
2449
2458
|
revokeTrustedDevice?: Maybe<Scalars['Boolean']>;
|
|
2450
2459
|
saveDocument?: Maybe<SaveDocumentResponse>;
|
|
2451
2460
|
saveDraft?: Maybe<SaveDraftResponse>;
|
|
2461
|
+
saveSMimeCert?: Maybe<SmimeCertInfoResponse>;
|
|
2452
2462
|
sendDeliveryReport?: Maybe<Scalars['Boolean']>;
|
|
2453
2463
|
sendInviteReply?: Maybe<InviteReplyResponse>;
|
|
2454
2464
|
sendMessage?: Maybe<SendMessageResponse>;
|
|
@@ -2909,6 +2919,12 @@ export type MutationSaveDraftArgs = {
|
|
|
2909
2919
|
};
|
|
2910
2920
|
|
|
2911
2921
|
|
|
2922
|
+
export type MutationSaveSMimeCertArgs = {
|
|
2923
|
+
password?: Maybe<Scalars['String']>;
|
|
2924
|
+
upload: SaveSMimeCertInputUpload;
|
|
2925
|
+
};
|
|
2926
|
+
|
|
2927
|
+
|
|
2912
2928
|
export type MutationSendDeliveryReportArgs = {
|
|
2913
2929
|
messageId: Scalars['ID'];
|
|
2914
2930
|
};
|
|
@@ -2921,7 +2937,9 @@ export type MutationSendInviteReplyArgs = {
|
|
|
2921
2937
|
|
|
2922
2938
|
export type MutationSendMessageArgs = {
|
|
2923
2939
|
accountName?: Maybe<Scalars['String']>;
|
|
2940
|
+
encrypt?: Maybe<Scalars['Boolean']>;
|
|
2924
2941
|
message: SendMessageInput;
|
|
2942
|
+
sign?: Maybe<Scalars['Boolean']>;
|
|
2925
2943
|
};
|
|
2926
2944
|
|
|
2927
2945
|
|
|
@@ -3283,6 +3301,7 @@ export type Query = {
|
|
|
3283
3301
|
getPreferences?: Maybe<Preferences>;
|
|
3284
3302
|
getReminders?: Maybe<RemindersResponse>;
|
|
3285
3303
|
getRights?: Maybe<RightsResponse>;
|
|
3304
|
+
getSMimeCertInfo?: Maybe<SmimeCertInfoResponse>;
|
|
3286
3305
|
getSMimePublicCerts?: Maybe<SMimePublicCertsResponse>;
|
|
3287
3306
|
getScratchCodes?: Maybe<ScratchCodes>;
|
|
3288
3307
|
getSearchFolder?: Maybe<Folder>;
|
|
@@ -3326,6 +3345,11 @@ export type QueryClientInfoArgs = {
|
|
|
3326
3345
|
};
|
|
3327
3346
|
|
|
3328
3347
|
|
|
3348
|
+
export type QueryDiscoverRightsArgs = {
|
|
3349
|
+
right: Array<DiscoverRightInput>;
|
|
3350
|
+
};
|
|
3351
|
+
|
|
3352
|
+
|
|
3329
3353
|
export type QueryDownloadAttachmentArgs = {
|
|
3330
3354
|
id: Scalars['ID'];
|
|
3331
3355
|
part: Scalars['ID'];
|
|
@@ -3468,6 +3492,11 @@ export type QueryGetRightsArgs = {
|
|
|
3468
3492
|
};
|
|
3469
3493
|
|
|
3470
3494
|
|
|
3495
|
+
export type QueryGetSMimeCertInfoArgs = {
|
|
3496
|
+
certId?: Maybe<Scalars['String']>;
|
|
3497
|
+
};
|
|
3498
|
+
|
|
3499
|
+
|
|
3471
3500
|
export type QueryGetSMimePublicCertsArgs = {
|
|
3472
3501
|
contactAddr: Scalars['String'];
|
|
3473
3502
|
store: Scalars['String'];
|
|
@@ -3766,6 +3795,10 @@ export type SaveMessageDataInput = {
|
|
|
3766
3795
|
meta: Scalars['String'];
|
|
3767
3796
|
};
|
|
3768
3797
|
|
|
3798
|
+
export type SaveSMimeCertInputUpload = {
|
|
3799
|
+
id?: Maybe<Scalars['String']>;
|
|
3800
|
+
};
|
|
3801
|
+
|
|
3769
3802
|
export type ScratchCode = {
|
|
3770
3803
|
__typename?: 'ScratchCode';
|
|
3771
3804
|
scratchCode?: Maybe<Array<Maybe<ScratchCodeType>>>;
|
|
@@ -3984,6 +4017,67 @@ export type Skin = {
|
|
|
3984
4017
|
_content?: Maybe<Scalars['String']>;
|
|
3985
4018
|
};
|
|
3986
4019
|
|
|
4020
|
+
export type SmimeCert = {
|
|
4021
|
+
__typename?: 'SmimeCert';
|
|
4022
|
+
default?: Maybe<Scalars['Boolean']>;
|
|
4023
|
+
emailAddress?: Maybe<Scalars['String']>;
|
|
4024
|
+
errorCode?: Maybe<Scalars['String']>;
|
|
4025
|
+
issuedBy?: Maybe<SmimeCertIssuedBy>;
|
|
4026
|
+
issuedTo?: Maybe<SmimeCertIssuedTo>;
|
|
4027
|
+
privateKeyId?: Maybe<Scalars['String']>;
|
|
4028
|
+
publicCertificateId?: Maybe<Scalars['String']>;
|
|
4029
|
+
signature?: Maybe<SmimeCertSignature>;
|
|
4030
|
+
subjectAltName?: Maybe<SmimeCertSubjectAltName>;
|
|
4031
|
+
validity?: Maybe<SmimeCertValidity>;
|
|
4032
|
+
};
|
|
4033
|
+
|
|
4034
|
+
export type SmimeCertInfoResponse = {
|
|
4035
|
+
__typename?: 'SmimeCertInfoResponse';
|
|
4036
|
+
certificates?: Maybe<Array<Maybe<SmimeCert>>>;
|
|
4037
|
+
};
|
|
4038
|
+
|
|
4039
|
+
export type SmimeCertIssuedBy = {
|
|
4040
|
+
__typename?: 'SmimeCertIssuedBy';
|
|
4041
|
+
commonName?: Maybe<Scalars['String']>;
|
|
4042
|
+
country?: Maybe<Scalars['String']>;
|
|
4043
|
+
emailAddress?: Maybe<Scalars['String']>;
|
|
4044
|
+
locality?: Maybe<Scalars['String']>;
|
|
4045
|
+
organizationName?: Maybe<Scalars['String']>;
|
|
4046
|
+
state?: Maybe<Scalars['String']>;
|
|
4047
|
+
};
|
|
4048
|
+
|
|
4049
|
+
export type SmimeCertIssuedTo = {
|
|
4050
|
+
__typename?: 'SmimeCertIssuedTo';
|
|
4051
|
+
commonName?: Maybe<Scalars['String']>;
|
|
4052
|
+
country?: Maybe<Scalars['String']>;
|
|
4053
|
+
emailAddress?: Maybe<Scalars['String']>;
|
|
4054
|
+
organizationName?: Maybe<Scalars['String']>;
|
|
4055
|
+
organizationUnit?: Maybe<Scalars['String']>;
|
|
4056
|
+
state?: Maybe<Scalars['String']>;
|
|
4057
|
+
};
|
|
4058
|
+
|
|
4059
|
+
export type SmimeCertSignature = {
|
|
4060
|
+
__typename?: 'SmimeCertSignature';
|
|
4061
|
+
algorithm?: Maybe<Scalars['String']>;
|
|
4062
|
+
serialNo?: Maybe<Scalars['String']>;
|
|
4063
|
+
};
|
|
4064
|
+
|
|
4065
|
+
export type SmimeCertSubjectAltName = {
|
|
4066
|
+
__typename?: 'SmimeCertSubjectAltName';
|
|
4067
|
+
rfc822Name?: Maybe<Array<Maybe<SmimeCertSubjectRfc822Name>>>;
|
|
4068
|
+
};
|
|
4069
|
+
|
|
4070
|
+
export type SmimeCertSubjectRfc822Name = {
|
|
4071
|
+
__typename?: 'SmimeCertSubjectRfc822Name';
|
|
4072
|
+
content?: Maybe<Scalars['String']>;
|
|
4073
|
+
};
|
|
4074
|
+
|
|
4075
|
+
export type SmimeCertValidity = {
|
|
4076
|
+
__typename?: 'SmimeCertValidity';
|
|
4077
|
+
endDate?: Maybe<Scalars['Float']>;
|
|
4078
|
+
startDate?: Maybe<Scalars['Float']>;
|
|
4079
|
+
};
|
|
4080
|
+
|
|
3987
4081
|
export type SnoozeInput = {
|
|
3988
4082
|
id: Scalars['ID'];
|
|
3989
4083
|
until: Scalars['Float'];
|
|
@@ -513,6 +513,8 @@ type MessageInfo implements MailItem {
|
|
|
513
513
|
modifiedSequence: Float # ms
|
|
514
514
|
invitations: [InviteInfo] # inv
|
|
515
515
|
sortField: String # sf, Sort field used for cursor-based pagination
|
|
516
|
+
decryptionErrorCode: String
|
|
517
|
+
certificate: [SmimeCert]
|
|
516
518
|
mimeParts: [MimePart]
|
|
517
519
|
to: [EmailAddress]
|
|
518
520
|
from: [EmailAddress]
|
|
@@ -527,6 +529,8 @@ type MessageInfo implements MailItem {
|
|
|
527
529
|
share: [ShareNotification] # shr
|
|
528
530
|
replyType: String #rt
|
|
529
531
|
attributes: MessageAttributes
|
|
532
|
+
isEncrypted: Boolean
|
|
533
|
+
isSigned: Boolean
|
|
530
534
|
autoSendTime: Float
|
|
531
535
|
local: Boolean
|
|
532
536
|
part: String
|
|
@@ -1340,6 +1344,7 @@ type AccountInfoAttrs {
|
|
|
1340
1344
|
zimbraFeatureDocumentEditingEnabled: Boolean
|
|
1341
1345
|
zimbraTwoFactorAuthEnabled: Boolean
|
|
1342
1346
|
zimbraFeatureTrustedDevicesEnabled: Boolean
|
|
1347
|
+
zimbraFeatureAntispamEnabled: Boolean
|
|
1343
1348
|
zimbraFeatureAppSpecificPasswordsEnabled: Boolean
|
|
1344
1349
|
zimbraFeatureMailPriorityEnabled: Boolean
|
|
1345
1350
|
zimbraFileUploadMaxSize: Float
|
|
@@ -1357,6 +1362,7 @@ type AccountInfoAttrs {
|
|
|
1357
1362
|
zimbraFeaturePop3DataSourceEnabled: Boolean
|
|
1358
1363
|
zimbraSignupAffiliate: String
|
|
1359
1364
|
zimbraSignupRecoveryEmail: String
|
|
1365
|
+
zimbraFeatureTasksEnabled: Boolean
|
|
1360
1366
|
zimbraTrialExpirationDate: String
|
|
1361
1367
|
zimbraTrialConvertAtExpiration: Boolean
|
|
1362
1368
|
zimbraHierarchicalAddressBookRoot: String
|
|
@@ -1640,6 +1646,7 @@ type Contact {
|
|
|
1640
1646
|
tagNames: String # tn
|
|
1641
1647
|
attributes: ContactAttributes
|
|
1642
1648
|
members: [ContactListMember]
|
|
1649
|
+
certificate: [SmimeCert]
|
|
1643
1650
|
}
|
|
1644
1651
|
|
|
1645
1652
|
type OtherContactAttribute {
|
|
@@ -1663,8 +1670,6 @@ type ContactAttributes {
|
|
|
1663
1670
|
workEmail2: String
|
|
1664
1671
|
homeEmail: String
|
|
1665
1672
|
homeEmail2: String
|
|
1666
|
-
phone: String
|
|
1667
|
-
phone2: String
|
|
1668
1673
|
companyPhone: String
|
|
1669
1674
|
companyPhone2: String
|
|
1670
1675
|
otherPhone: String
|
|
@@ -1769,8 +1774,6 @@ input ContactAttrsInput {
|
|
|
1769
1774
|
workEmail2: String
|
|
1770
1775
|
homeEmail: String
|
|
1771
1776
|
homeEmail2: String
|
|
1772
|
-
phone: String
|
|
1773
|
-
phone2: String
|
|
1774
1777
|
companyPhone: String
|
|
1775
1778
|
companyPhone2: String
|
|
1776
1779
|
otherPhone: String
|
|
@@ -1976,6 +1979,7 @@ type MimePart {
|
|
|
1976
1979
|
url: String
|
|
1977
1980
|
messageId: ID
|
|
1978
1981
|
base64: String
|
|
1982
|
+
truncated: Boolean
|
|
1979
1983
|
}
|
|
1980
1984
|
|
|
1981
1985
|
type ActionData {
|
|
@@ -2002,7 +2006,8 @@ input MimePartInput {
|
|
|
2002
2006
|
url: String
|
|
2003
2007
|
messageId: ID
|
|
2004
2008
|
attachments: [AttachmentInput]
|
|
2005
|
-
base64: String
|
|
2009
|
+
base64: String,
|
|
2010
|
+
truncated: Boolean
|
|
2006
2011
|
}
|
|
2007
2012
|
|
|
2008
2013
|
input ExistingAttachmentInput {
|
|
@@ -2112,6 +2117,10 @@ input SendMessageInput {
|
|
|
2112
2117
|
inlineAttachments: [MimePartInput] #attach
|
|
2113
2118
|
}
|
|
2114
2119
|
|
|
2120
|
+
input SaveSMimeCertInputUpload {
|
|
2121
|
+
id: String
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2115
2124
|
input CalendarItemInviteInput {
|
|
2116
2125
|
components: [CalendarItemInviteComponentInput]!
|
|
2117
2126
|
}
|
|
@@ -2850,7 +2859,7 @@ input GetDocumentShareURLItemInput {
|
|
|
2850
2859
|
|
|
2851
2860
|
input Cursor {
|
|
2852
2861
|
id: ID
|
|
2853
|
-
|
|
2862
|
+
sortVal: String
|
|
2854
2863
|
endSortVal: String
|
|
2855
2864
|
includeOffset: Boolean
|
|
2856
2865
|
}
|
|
@@ -2988,6 +2997,59 @@ type SMimePublicCertsResponse {
|
|
|
2988
2997
|
certs: [SMimePublicCerts]
|
|
2989
2998
|
}
|
|
2990
2999
|
|
|
3000
|
+
type SmimeCertIssuedBy {
|
|
3001
|
+
country: String
|
|
3002
|
+
commonName: String
|
|
3003
|
+
emailAddress: String
|
|
3004
|
+
locality: String
|
|
3005
|
+
organizationName: String
|
|
3006
|
+
state: String
|
|
3007
|
+
}
|
|
3008
|
+
|
|
3009
|
+
type SmimeCertIssuedTo {
|
|
3010
|
+
country: String
|
|
3011
|
+
commonName: String
|
|
3012
|
+
emailAddress: String
|
|
3013
|
+
organizationName: String
|
|
3014
|
+
organizationUnit: String
|
|
3015
|
+
state: String
|
|
3016
|
+
}
|
|
3017
|
+
|
|
3018
|
+
type SmimeCertSignature {
|
|
3019
|
+
algorithm: String
|
|
3020
|
+
serialNo: String
|
|
3021
|
+
}
|
|
3022
|
+
|
|
3023
|
+
type SmimeCertSubjectRfc822Name {
|
|
3024
|
+
content: String
|
|
3025
|
+
}
|
|
3026
|
+
|
|
3027
|
+
type SmimeCertSubjectAltName {
|
|
3028
|
+
rfc822Name: [SmimeCertSubjectRfc822Name]
|
|
3029
|
+
}
|
|
3030
|
+
|
|
3031
|
+
type SmimeCertValidity {
|
|
3032
|
+
endDate: Float
|
|
3033
|
+
startDate: Float
|
|
3034
|
+
}
|
|
3035
|
+
|
|
3036
|
+
type SmimeCert {
|
|
3037
|
+
default: Boolean
|
|
3038
|
+
emailAddress: String
|
|
3039
|
+
issuedBy: SmimeCertIssuedBy
|
|
3040
|
+
issuedTo: SmimeCertIssuedTo
|
|
3041
|
+
publicCertificateId: String
|
|
3042
|
+
privateKeyId: String
|
|
3043
|
+
signature: SmimeCertSignature
|
|
3044
|
+
subjectAltName: SmimeCertSubjectAltName
|
|
3045
|
+
validity: SmimeCertValidity
|
|
3046
|
+
errorCode: String
|
|
3047
|
+
}
|
|
3048
|
+
|
|
3049
|
+
type SmimeCertInfoResponse {
|
|
3050
|
+
certificates: [SmimeCert]
|
|
3051
|
+
}
|
|
3052
|
+
|
|
2991
3053
|
type SMimeMessage {
|
|
2992
3054
|
id: ID
|
|
2993
3055
|
content: String
|
|
@@ -3095,6 +3157,10 @@ input SearchConditionsInput {
|
|
|
3095
3157
|
conds: ConditionsInput
|
|
3096
3158
|
}
|
|
3097
3159
|
|
|
3160
|
+
input DiscoverRightInput {
|
|
3161
|
+
_content: String
|
|
3162
|
+
}
|
|
3163
|
+
|
|
3098
3164
|
# Zimbra GraphQL Queries
|
|
3099
3165
|
# - [[SOAP API Reference]](https://files.zimbra.com/docs/soap_api/8.7.11/api-reference/index.html)
|
|
3100
3166
|
# - [[SOAP Documentation]](https://github.com/Zimbra/zm-mailbox/blob/develop/store/docs/soap.txt)
|
|
@@ -3118,7 +3184,7 @@ type Query {
|
|
|
3118
3184
|
downloadMessage(id: ID!, isSecure: Boolean, isLocal: Boolean): SMimeMessage
|
|
3119
3185
|
downloadAttachment(id: ID!, part: ID!): Attachment
|
|
3120
3186
|
downloadDocument(id: ID!, url: String!): Attachment
|
|
3121
|
-
discoverRights: DiscoverRights
|
|
3187
|
+
discoverRights(right: [DiscoverRightInput!]!): DiscoverRights
|
|
3122
3188
|
freeBusy(names: [String!]!, start: Float, end: Float): [FreeBusy]
|
|
3123
3189
|
getContact(
|
|
3124
3190
|
id: ID
|
|
@@ -3205,6 +3271,7 @@ type Query {
|
|
|
3205
3271
|
contactAddr: String!
|
|
3206
3272
|
store: String!
|
|
3207
3273
|
): SMimePublicCertsResponse
|
|
3274
|
+
getSMimeCertInfo(certId: String): SmimeCertInfoResponse
|
|
3208
3275
|
getScratchCodes(username: String!): ScratchCodes
|
|
3209
3276
|
getSearchFolder: Folder
|
|
3210
3277
|
getTrustedDevices: GetTrustedDevicesResponse
|
|
@@ -3443,7 +3510,10 @@ type Mutation {
|
|
|
3443
3510
|
sendMessage(
|
|
3444
3511
|
message: SendMessageInput!
|
|
3445
3512
|
accountName: String
|
|
3513
|
+
sign: Boolean
|
|
3514
|
+
encrypt: Boolean
|
|
3446
3515
|
): SendMessageResponse
|
|
3516
|
+
saveSMimeCert(upload: SaveSMimeCertInputUpload!, password: String): SmimeCertInfoResponse
|
|
3447
3517
|
sendDeliveryReport(messageId: ID!): Boolean
|
|
3448
3518
|
sendInviteReply(inviteReply: InviteReplyInput!): InviteReplyResponse
|
|
3449
3519
|
sendShareNotification(shareNotification: ShareNotificationInput!): Boolean
|