@zimbra/api-client 71.0.0 → 75.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 +76 -6
- package/dist/src/batch-client/index.d.ts +7 -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 +82 -4
- package/dist/src/utils/normalize-otherAttribute-contact.d.ts +1 -1
- package/dist/zm-api-js-client.esm.js +267 -186
- 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 +136 -152
- package/package.json +8 -8
- package/src/apollo/zimbra-in-memory-cache.ts +6 -2
- package/src/batch-client/index.ts +48 -24
- 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 +98 -4
- package/src/schema/schema.graphql +76 -6
- package/src/schema/schema.ts +10 -3
- package/src/utils/normalize-mime-parts.ts +10 -2
- package/src/utils/normalize-otherAttribute-contact.ts +23 -5
|
@@ -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 })
|
|
@@ -233,13 +234,12 @@ function updateAbsoluteFolderPath(originalName: any, parentFolderAbsPath: string
|
|
|
233
234
|
if (originalName === 'USER_ROOT') {
|
|
234
235
|
folder.absFolderPath = `${parentFolderAbsPath}${folder.absFolderPath}`;
|
|
235
236
|
} else {
|
|
236
|
-
folder.absFolderPath = folder.
|
|
237
|
+
folder.absFolderPath = `${parentFolderAbsPath}/${folder.name}`;
|
|
237
238
|
}
|
|
238
239
|
|
|
239
240
|
if (folder.folders) {
|
|
240
|
-
folder.folders = updateAbsoluteFolderPath(originalName,
|
|
241
|
+
folder.folders = updateAbsoluteFolderPath(originalName, folder.absFolderPath, folder.folders);
|
|
241
242
|
}
|
|
242
|
-
|
|
243
243
|
return folder;
|
|
244
244
|
});
|
|
245
245
|
}
|
|
@@ -590,7 +590,7 @@ export class ZimbraBatchClient {
|
|
|
590
590
|
public createContact = (data: CreateContactInput) =>
|
|
591
591
|
this.jsonRequest({
|
|
592
592
|
name: 'CreateContact',
|
|
593
|
-
body: createContactBody(data),
|
|
593
|
+
body: createContactBody(data, this.localStoreClient !== undefined),
|
|
594
594
|
singleRequest: true
|
|
595
595
|
}).then(res => normalize(Contact)(normalizeOtherAttr(res.cn)[0]));
|
|
596
596
|
|
|
@@ -754,19 +754,12 @@ export class ZimbraBatchClient {
|
|
|
754
754
|
singleRequest: true
|
|
755
755
|
}).then(Boolean);
|
|
756
756
|
|
|
757
|
-
public discoverRights = () =>
|
|
757
|
+
public discoverRights = ({ right }: DiscoverRightOptions) =>
|
|
758
758
|
this.jsonRequest({
|
|
759
759
|
name: 'DiscoverRights',
|
|
760
760
|
namespace: Namespace.Account,
|
|
761
761
|
body: {
|
|
762
|
-
right
|
|
763
|
-
{
|
|
764
|
-
_content: 'sendAs'
|
|
765
|
-
},
|
|
766
|
-
{
|
|
767
|
-
_content: 'sendOnBehalfOf'
|
|
768
|
-
}
|
|
769
|
-
]
|
|
762
|
+
right
|
|
770
763
|
}
|
|
771
764
|
}).then(res => normalize(DiscoverRightsResponse)(res));
|
|
772
765
|
|
|
@@ -816,7 +809,8 @@ export class ZimbraBatchClient {
|
|
|
816
809
|
this.download({ isSecure, url: `/service/home/~/?auth=co&id=${id}` }).then(
|
|
817
810
|
({ content }: any) => ({
|
|
818
811
|
id,
|
|
819
|
-
content
|
|
812
|
+
content,
|
|
813
|
+
isSecure
|
|
820
814
|
})
|
|
821
815
|
);
|
|
822
816
|
|
|
@@ -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;
|
|
@@ -817,6 +817,7 @@ export enum ConnectionType {
|
|
|
817
817
|
export type Contact = {
|
|
818
818
|
__typename?: 'Contact';
|
|
819
819
|
attributes?: Maybe<ContactAttributes>;
|
|
820
|
+
certificate?: Maybe<Array<Maybe<SmimeCert>>>;
|
|
820
821
|
date?: Maybe<Scalars['Float']>;
|
|
821
822
|
fileAsStr?: Maybe<Scalars['String']>;
|
|
822
823
|
folderId?: Maybe<Scalars['ID']>;
|
|
@@ -886,8 +887,6 @@ export type ContactAttributes = {
|
|
|
886
887
|
otherURL?: Maybe<Scalars['String']>;
|
|
887
888
|
pager?: Maybe<Scalars['String']>;
|
|
888
889
|
pager2?: Maybe<Scalars['String']>;
|
|
889
|
-
phone?: Maybe<Scalars['String']>;
|
|
890
|
-
phone2?: Maybe<Scalars['String']>;
|
|
891
890
|
phoneticFirstName?: Maybe<Scalars['String']>;
|
|
892
891
|
phoneticLastName?: Maybe<Scalars['String']>;
|
|
893
892
|
thumbnailPhoto?: Maybe<Scalars['String']>;
|
|
@@ -965,8 +964,6 @@ export type ContactAttrsInput = {
|
|
|
965
964
|
otherURL?: Maybe<Scalars['String']>;
|
|
966
965
|
pager?: Maybe<Scalars['String']>;
|
|
967
966
|
pager2?: Maybe<Scalars['String']>;
|
|
968
|
-
phone?: Maybe<Scalars['String']>;
|
|
969
|
-
phone2?: Maybe<Scalars['String']>;
|
|
970
967
|
phoneticFirstName?: Maybe<Scalars['String']>;
|
|
971
968
|
phoneticLastName?: Maybe<Scalars['String']>;
|
|
972
969
|
type?: Maybe<Scalars['String']>;
|
|
@@ -1234,6 +1231,10 @@ export type Device = {
|
|
|
1234
1231
|
ua?: Maybe<Scalars['String']>;
|
|
1235
1232
|
};
|
|
1236
1233
|
|
|
1234
|
+
export type DiscoverRightInput = {
|
|
1235
|
+
_content?: Maybe<Scalars['String']>;
|
|
1236
|
+
};
|
|
1237
|
+
|
|
1237
1238
|
export type DiscoverRights = {
|
|
1238
1239
|
__typename?: 'DiscoverRights';
|
|
1239
1240
|
targets?: Maybe<Array<Maybe<Targets>>>;
|
|
@@ -2222,9 +2223,11 @@ export type MessageInfo = MailItem & {
|
|
|
2222
2223
|
autoSendTime?: Maybe<Scalars['Float']>;
|
|
2223
2224
|
bcc?: Maybe<Array<Maybe<EmailAddress>>>;
|
|
2224
2225
|
cc?: Maybe<Array<Maybe<EmailAddress>>>;
|
|
2226
|
+
certificate?: Maybe<Array<Maybe<SmimeCert>>>;
|
|
2225
2227
|
changeDate?: Maybe<Scalars['Float']>;
|
|
2226
2228
|
conversationId?: Maybe<Scalars['ID']>;
|
|
2227
2229
|
date?: Maybe<Scalars['Float']>;
|
|
2230
|
+
decryptionErrorCode?: Maybe<Scalars['String']>;
|
|
2228
2231
|
emailAddresses?: Maybe<Array<Maybe<EmailAddress>>>;
|
|
2229
2232
|
excerpt?: Maybe<Scalars['String']>;
|
|
2230
2233
|
flags?: Maybe<Scalars['String']>;
|
|
@@ -2234,6 +2237,8 @@ export type MessageInfo = MailItem & {
|
|
|
2234
2237
|
id?: Maybe<Scalars['ID']>;
|
|
2235
2238
|
inlineAttachments?: Maybe<Array<Maybe<MimePart>>>;
|
|
2236
2239
|
invitations?: Maybe<Array<Maybe<InviteInfo>>>;
|
|
2240
|
+
isEncrypted?: Maybe<Scalars['Boolean']>;
|
|
2241
|
+
isSigned?: Maybe<Scalars['Boolean']>;
|
|
2237
2242
|
local?: Maybe<Scalars['Boolean']>;
|
|
2238
2243
|
mimeParts?: Maybe<Array<Maybe<MimePart>>>;
|
|
2239
2244
|
modifiedSequence?: Maybe<Scalars['Float']>;
|
|
@@ -2287,6 +2292,7 @@ export type MimePart = {
|
|
|
2287
2292
|
mimeParts?: Maybe<Array<Maybe<MimePart>>>;
|
|
2288
2293
|
part?: Maybe<Scalars['ID']>;
|
|
2289
2294
|
size?: Maybe<Scalars['Float']>;
|
|
2295
|
+
truncated?: Maybe<Scalars['Boolean']>;
|
|
2290
2296
|
url?: Maybe<Scalars['String']>;
|
|
2291
2297
|
};
|
|
2292
2298
|
|
|
@@ -2303,6 +2309,7 @@ export type MimePartInput = {
|
|
|
2303
2309
|
mimeParts?: Maybe<Array<Maybe<MimePartInput>>>;
|
|
2304
2310
|
part?: Maybe<Scalars['ID']>;
|
|
2305
2311
|
size?: Maybe<Scalars['Float']>;
|
|
2312
|
+
truncated?: Maybe<Scalars['Boolean']>;
|
|
2306
2313
|
url?: Maybe<Scalars['String']>;
|
|
2307
2314
|
};
|
|
2308
2315
|
|
|
@@ -2449,6 +2456,7 @@ export type Mutation = {
|
|
|
2449
2456
|
revokeTrustedDevice?: Maybe<Scalars['Boolean']>;
|
|
2450
2457
|
saveDocument?: Maybe<SaveDocumentResponse>;
|
|
2451
2458
|
saveDraft?: Maybe<SaveDraftResponse>;
|
|
2459
|
+
saveSMimeCert?: Maybe<SmimeCertInfoResponse>;
|
|
2452
2460
|
sendDeliveryReport?: Maybe<Scalars['Boolean']>;
|
|
2453
2461
|
sendInviteReply?: Maybe<InviteReplyResponse>;
|
|
2454
2462
|
sendMessage?: Maybe<SendMessageResponse>;
|
|
@@ -2909,6 +2917,12 @@ export type MutationSaveDraftArgs = {
|
|
|
2909
2917
|
};
|
|
2910
2918
|
|
|
2911
2919
|
|
|
2920
|
+
export type MutationSaveSMimeCertArgs = {
|
|
2921
|
+
password?: Maybe<Scalars['String']>;
|
|
2922
|
+
upload: SaveSMimeCertInputUpload;
|
|
2923
|
+
};
|
|
2924
|
+
|
|
2925
|
+
|
|
2912
2926
|
export type MutationSendDeliveryReportArgs = {
|
|
2913
2927
|
messageId: Scalars['ID'];
|
|
2914
2928
|
};
|
|
@@ -2921,7 +2935,9 @@ export type MutationSendInviteReplyArgs = {
|
|
|
2921
2935
|
|
|
2922
2936
|
export type MutationSendMessageArgs = {
|
|
2923
2937
|
accountName?: Maybe<Scalars['String']>;
|
|
2938
|
+
encrypt?: Maybe<Scalars['Boolean']>;
|
|
2924
2939
|
message: SendMessageInput;
|
|
2940
|
+
sign?: Maybe<Scalars['Boolean']>;
|
|
2925
2941
|
};
|
|
2926
2942
|
|
|
2927
2943
|
|
|
@@ -3048,6 +3064,7 @@ export type Owner = {
|
|
|
3048
3064
|
};
|
|
3049
3065
|
|
|
3050
3066
|
export enum ParticipationRole {
|
|
3067
|
+
Cha = 'CHA',
|
|
3051
3068
|
Non = 'NON',
|
|
3052
3069
|
Opt = 'OPT',
|
|
3053
3070
|
Req = 'REQ'
|
|
@@ -3282,6 +3299,7 @@ export type Query = {
|
|
|
3282
3299
|
getPreferences?: Maybe<Preferences>;
|
|
3283
3300
|
getReminders?: Maybe<RemindersResponse>;
|
|
3284
3301
|
getRights?: Maybe<RightsResponse>;
|
|
3302
|
+
getSMimeCertInfo?: Maybe<SmimeCertInfoResponse>;
|
|
3285
3303
|
getSMimePublicCerts?: Maybe<SMimePublicCertsResponse>;
|
|
3286
3304
|
getScratchCodes?: Maybe<ScratchCodes>;
|
|
3287
3305
|
getSearchFolder?: Maybe<Folder>;
|
|
@@ -3325,6 +3343,11 @@ export type QueryClientInfoArgs = {
|
|
|
3325
3343
|
};
|
|
3326
3344
|
|
|
3327
3345
|
|
|
3346
|
+
export type QueryDiscoverRightsArgs = {
|
|
3347
|
+
right: Array<DiscoverRightInput>;
|
|
3348
|
+
};
|
|
3349
|
+
|
|
3350
|
+
|
|
3328
3351
|
export type QueryDownloadAttachmentArgs = {
|
|
3329
3352
|
id: Scalars['ID'];
|
|
3330
3353
|
part: Scalars['ID'];
|
|
@@ -3467,6 +3490,11 @@ export type QueryGetRightsArgs = {
|
|
|
3467
3490
|
};
|
|
3468
3491
|
|
|
3469
3492
|
|
|
3493
|
+
export type QueryGetSMimeCertInfoArgs = {
|
|
3494
|
+
certId?: Maybe<Scalars['String']>;
|
|
3495
|
+
};
|
|
3496
|
+
|
|
3497
|
+
|
|
3470
3498
|
export type QueryGetSMimePublicCertsArgs = {
|
|
3471
3499
|
contactAddr: Scalars['String'];
|
|
3472
3500
|
store: Scalars['String'];
|
|
@@ -3698,6 +3726,7 @@ export type SMimeMessage = {
|
|
|
3698
3726
|
__typename?: 'SMimeMessage';
|
|
3699
3727
|
content?: Maybe<Scalars['String']>;
|
|
3700
3728
|
id?: Maybe<Scalars['ID']>;
|
|
3729
|
+
isSecure?: Maybe<Scalars['Boolean']>;
|
|
3701
3730
|
};
|
|
3702
3731
|
|
|
3703
3732
|
export type SMimePublicCert = {
|
|
@@ -3764,6 +3793,10 @@ export type SaveMessageDataInput = {
|
|
|
3764
3793
|
meta: Scalars['String'];
|
|
3765
3794
|
};
|
|
3766
3795
|
|
|
3796
|
+
export type SaveSMimeCertInputUpload = {
|
|
3797
|
+
id?: Maybe<Scalars['String']>;
|
|
3798
|
+
};
|
|
3799
|
+
|
|
3767
3800
|
export type ScratchCode = {
|
|
3768
3801
|
__typename?: 'ScratchCode';
|
|
3769
3802
|
scratchCode?: Maybe<Array<Maybe<ScratchCodeType>>>;
|
|
@@ -3982,6 +4015,67 @@ export type Skin = {
|
|
|
3982
4015
|
_content?: Maybe<Scalars['String']>;
|
|
3983
4016
|
};
|
|
3984
4017
|
|
|
4018
|
+
export type SmimeCert = {
|
|
4019
|
+
__typename?: 'SmimeCert';
|
|
4020
|
+
default?: Maybe<Scalars['Boolean']>;
|
|
4021
|
+
emailAddress?: Maybe<Scalars['String']>;
|
|
4022
|
+
errorCode?: Maybe<Scalars['String']>;
|
|
4023
|
+
issuedBy?: Maybe<SmimeCertIssuedBy>;
|
|
4024
|
+
issuedTo?: Maybe<SmimeCertIssuedTo>;
|
|
4025
|
+
privateKeyId?: Maybe<Scalars['String']>;
|
|
4026
|
+
publicCertificateId?: Maybe<Scalars['String']>;
|
|
4027
|
+
signature?: Maybe<SmimeCertSignature>;
|
|
4028
|
+
subjectAltName?: Maybe<SmimeCertSubjectAltName>;
|
|
4029
|
+
validity?: Maybe<SmimeCertValidity>;
|
|
4030
|
+
};
|
|
4031
|
+
|
|
4032
|
+
export type SmimeCertInfoResponse = {
|
|
4033
|
+
__typename?: 'SmimeCertInfoResponse';
|
|
4034
|
+
certificates?: Maybe<Array<Maybe<SmimeCert>>>;
|
|
4035
|
+
};
|
|
4036
|
+
|
|
4037
|
+
export type SmimeCertIssuedBy = {
|
|
4038
|
+
__typename?: 'SmimeCertIssuedBy';
|
|
4039
|
+
commonName?: Maybe<Scalars['String']>;
|
|
4040
|
+
country?: Maybe<Scalars['String']>;
|
|
4041
|
+
emailAddress?: Maybe<Scalars['String']>;
|
|
4042
|
+
locality?: Maybe<Scalars['String']>;
|
|
4043
|
+
organizationName?: Maybe<Scalars['String']>;
|
|
4044
|
+
state?: Maybe<Scalars['String']>;
|
|
4045
|
+
};
|
|
4046
|
+
|
|
4047
|
+
export type SmimeCertIssuedTo = {
|
|
4048
|
+
__typename?: 'SmimeCertIssuedTo';
|
|
4049
|
+
commonName?: Maybe<Scalars['String']>;
|
|
4050
|
+
country?: Maybe<Scalars['String']>;
|
|
4051
|
+
emailAddress?: Maybe<Scalars['String']>;
|
|
4052
|
+
organizationName?: Maybe<Scalars['String']>;
|
|
4053
|
+
organizationUnit?: Maybe<Scalars['String']>;
|
|
4054
|
+
state?: Maybe<Scalars['String']>;
|
|
4055
|
+
};
|
|
4056
|
+
|
|
4057
|
+
export type SmimeCertSignature = {
|
|
4058
|
+
__typename?: 'SmimeCertSignature';
|
|
4059
|
+
algorithm?: Maybe<Scalars['String']>;
|
|
4060
|
+
serialNo?: Maybe<Scalars['String']>;
|
|
4061
|
+
};
|
|
4062
|
+
|
|
4063
|
+
export type SmimeCertSubjectAltName = {
|
|
4064
|
+
__typename?: 'SmimeCertSubjectAltName';
|
|
4065
|
+
rfc822Name?: Maybe<Array<Maybe<SmimeCertSubjectRfc822Name>>>;
|
|
4066
|
+
};
|
|
4067
|
+
|
|
4068
|
+
export type SmimeCertSubjectRfc822Name = {
|
|
4069
|
+
__typename?: 'SmimeCertSubjectRfc822Name';
|
|
4070
|
+
content?: Maybe<Scalars['String']>;
|
|
4071
|
+
};
|
|
4072
|
+
|
|
4073
|
+
export type SmimeCertValidity = {
|
|
4074
|
+
__typename?: 'SmimeCertValidity';
|
|
4075
|
+
endDate?: Maybe<Scalars['Float']>;
|
|
4076
|
+
startDate?: Maybe<Scalars['Float']>;
|
|
4077
|
+
};
|
|
4078
|
+
|
|
3985
4079
|
export type SnoozeInput = {
|
|
3986
4080
|
id: Scalars['ID'];
|
|
3987
4081
|
until: Scalars['Float'];
|
|
@@ -153,6 +153,7 @@ enum InviteCompletionStatus {
|
|
|
153
153
|
enum ParticipationRole {
|
|
154
154
|
REQ # required
|
|
155
155
|
OPT # optional
|
|
156
|
+
CHA # chair
|
|
156
157
|
NON # informational purposes only
|
|
157
158
|
}
|
|
158
159
|
|
|
@@ -512,6 +513,8 @@ type MessageInfo implements MailItem {
|
|
|
512
513
|
modifiedSequence: Float # ms
|
|
513
514
|
invitations: [InviteInfo] # inv
|
|
514
515
|
sortField: String # sf, Sort field used for cursor-based pagination
|
|
516
|
+
decryptionErrorCode: String
|
|
517
|
+
certificate: [SmimeCert]
|
|
515
518
|
mimeParts: [MimePart]
|
|
516
519
|
to: [EmailAddress]
|
|
517
520
|
from: [EmailAddress]
|
|
@@ -526,6 +529,8 @@ type MessageInfo implements MailItem {
|
|
|
526
529
|
share: [ShareNotification] # shr
|
|
527
530
|
replyType: String #rt
|
|
528
531
|
attributes: MessageAttributes
|
|
532
|
+
isEncrypted: Boolean
|
|
533
|
+
isSigned: Boolean
|
|
529
534
|
autoSendTime: Float
|
|
530
535
|
local: Boolean
|
|
531
536
|
part: String
|
|
@@ -1639,6 +1644,7 @@ type Contact {
|
|
|
1639
1644
|
tagNames: String # tn
|
|
1640
1645
|
attributes: ContactAttributes
|
|
1641
1646
|
members: [ContactListMember]
|
|
1647
|
+
certificate: [SmimeCert]
|
|
1642
1648
|
}
|
|
1643
1649
|
|
|
1644
1650
|
type OtherContactAttribute {
|
|
@@ -1662,8 +1668,6 @@ type ContactAttributes {
|
|
|
1662
1668
|
workEmail2: String
|
|
1663
1669
|
homeEmail: String
|
|
1664
1670
|
homeEmail2: String
|
|
1665
|
-
phone: String
|
|
1666
|
-
phone2: String
|
|
1667
1671
|
companyPhone: String
|
|
1668
1672
|
companyPhone2: String
|
|
1669
1673
|
otherPhone: String
|
|
@@ -1768,8 +1772,6 @@ input ContactAttrsInput {
|
|
|
1768
1772
|
workEmail2: String
|
|
1769
1773
|
homeEmail: String
|
|
1770
1774
|
homeEmail2: String
|
|
1771
|
-
phone: String
|
|
1772
|
-
phone2: String
|
|
1773
1775
|
companyPhone: String
|
|
1774
1776
|
companyPhone2: String
|
|
1775
1777
|
otherPhone: String
|
|
@@ -1975,6 +1977,7 @@ type MimePart {
|
|
|
1975
1977
|
url: String
|
|
1976
1978
|
messageId: ID
|
|
1977
1979
|
base64: String
|
|
1980
|
+
truncated: Boolean
|
|
1978
1981
|
}
|
|
1979
1982
|
|
|
1980
1983
|
type ActionData {
|
|
@@ -2001,7 +2004,8 @@ input MimePartInput {
|
|
|
2001
2004
|
url: String
|
|
2002
2005
|
messageId: ID
|
|
2003
2006
|
attachments: [AttachmentInput]
|
|
2004
|
-
base64: String
|
|
2007
|
+
base64: String,
|
|
2008
|
+
truncated: Boolean
|
|
2005
2009
|
}
|
|
2006
2010
|
|
|
2007
2011
|
input ExistingAttachmentInput {
|
|
@@ -2111,6 +2115,10 @@ input SendMessageInput {
|
|
|
2111
2115
|
inlineAttachments: [MimePartInput] #attach
|
|
2112
2116
|
}
|
|
2113
2117
|
|
|
2118
|
+
input SaveSMimeCertInputUpload {
|
|
2119
|
+
id: String
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2114
2122
|
input CalendarItemInviteInput {
|
|
2115
2123
|
components: [CalendarItemInviteComponentInput]!
|
|
2116
2124
|
}
|
|
@@ -2987,9 +2995,63 @@ type SMimePublicCertsResponse {
|
|
|
2987
2995
|
certs: [SMimePublicCerts]
|
|
2988
2996
|
}
|
|
2989
2997
|
|
|
2998
|
+
type SmimeCertIssuedBy {
|
|
2999
|
+
country: String
|
|
3000
|
+
commonName: String
|
|
3001
|
+
emailAddress: String
|
|
3002
|
+
locality: String
|
|
3003
|
+
organizationName: String
|
|
3004
|
+
state: String
|
|
3005
|
+
}
|
|
3006
|
+
|
|
3007
|
+
type SmimeCertIssuedTo {
|
|
3008
|
+
country: String
|
|
3009
|
+
commonName: String
|
|
3010
|
+
emailAddress: String
|
|
3011
|
+
organizationName: String
|
|
3012
|
+
organizationUnit: String
|
|
3013
|
+
state: String
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
type SmimeCertSignature {
|
|
3017
|
+
algorithm: String
|
|
3018
|
+
serialNo: String
|
|
3019
|
+
}
|
|
3020
|
+
|
|
3021
|
+
type SmimeCertSubjectRfc822Name {
|
|
3022
|
+
content: String
|
|
3023
|
+
}
|
|
3024
|
+
|
|
3025
|
+
type SmimeCertSubjectAltName {
|
|
3026
|
+
rfc822Name: [SmimeCertSubjectRfc822Name]
|
|
3027
|
+
}
|
|
3028
|
+
|
|
3029
|
+
type SmimeCertValidity {
|
|
3030
|
+
endDate: Float
|
|
3031
|
+
startDate: Float
|
|
3032
|
+
}
|
|
3033
|
+
|
|
3034
|
+
type SmimeCert {
|
|
3035
|
+
default: Boolean
|
|
3036
|
+
emailAddress: String
|
|
3037
|
+
issuedBy: SmimeCertIssuedBy
|
|
3038
|
+
issuedTo: SmimeCertIssuedTo
|
|
3039
|
+
publicCertificateId: String
|
|
3040
|
+
privateKeyId: String
|
|
3041
|
+
signature: SmimeCertSignature
|
|
3042
|
+
subjectAltName: SmimeCertSubjectAltName
|
|
3043
|
+
validity: SmimeCertValidity
|
|
3044
|
+
errorCode: String
|
|
3045
|
+
}
|
|
3046
|
+
|
|
3047
|
+
type SmimeCertInfoResponse {
|
|
3048
|
+
certificates: [SmimeCert]
|
|
3049
|
+
}
|
|
3050
|
+
|
|
2990
3051
|
type SMimeMessage {
|
|
2991
3052
|
id: ID
|
|
2992
3053
|
content: String
|
|
3054
|
+
isSecure: Boolean
|
|
2993
3055
|
}
|
|
2994
3056
|
|
|
2995
3057
|
type Attachment {
|
|
@@ -3093,6 +3155,10 @@ input SearchConditionsInput {
|
|
|
3093
3155
|
conds: ConditionsInput
|
|
3094
3156
|
}
|
|
3095
3157
|
|
|
3158
|
+
input DiscoverRightInput {
|
|
3159
|
+
_content: String
|
|
3160
|
+
}
|
|
3161
|
+
|
|
3096
3162
|
# Zimbra GraphQL Queries
|
|
3097
3163
|
# - [[SOAP API Reference]](https://files.zimbra.com/docs/soap_api/8.7.11/api-reference/index.html)
|
|
3098
3164
|
# - [[SOAP Documentation]](https://github.com/Zimbra/zm-mailbox/blob/develop/store/docs/soap.txt)
|
|
@@ -3116,7 +3182,7 @@ type Query {
|
|
|
3116
3182
|
downloadMessage(id: ID!, isSecure: Boolean, isLocal: Boolean): SMimeMessage
|
|
3117
3183
|
downloadAttachment(id: ID!, part: ID!): Attachment
|
|
3118
3184
|
downloadDocument(id: ID!, url: String!): Attachment
|
|
3119
|
-
discoverRights: DiscoverRights
|
|
3185
|
+
discoverRights(right: [DiscoverRightInput!]!): DiscoverRights
|
|
3120
3186
|
freeBusy(names: [String!]!, start: Float, end: Float): [FreeBusy]
|
|
3121
3187
|
getContact(
|
|
3122
3188
|
id: ID
|
|
@@ -3203,6 +3269,7 @@ type Query {
|
|
|
3203
3269
|
contactAddr: String!
|
|
3204
3270
|
store: String!
|
|
3205
3271
|
): SMimePublicCertsResponse
|
|
3272
|
+
getSMimeCertInfo(certId: String): SmimeCertInfoResponse
|
|
3206
3273
|
getScratchCodes(username: String!): ScratchCodes
|
|
3207
3274
|
getSearchFolder: Folder
|
|
3208
3275
|
getTrustedDevices: GetTrustedDevicesResponse
|
|
@@ -3441,7 +3508,10 @@ type Mutation {
|
|
|
3441
3508
|
sendMessage(
|
|
3442
3509
|
message: SendMessageInput!
|
|
3443
3510
|
accountName: String
|
|
3511
|
+
sign: Boolean
|
|
3512
|
+
encrypt: Boolean
|
|
3444
3513
|
): SendMessageResponse
|
|
3514
|
+
saveSMimeCert(upload: SaveSMimeCertInputUpload!, password: String): SmimeCertInfoResponse
|
|
3445
3515
|
sendDeliveryReport(messageId: ID!): Boolean
|
|
3446
3516
|
sendInviteReply(inviteReply: InviteReplyInput!): InviteReplyResponse
|
|
3447
3517
|
sendShareNotification(shareNotification: ShareNotificationInput!): Boolean
|