@zimbra/api-client 70.0.0 → 74.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.
@@ -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
- const normalizedMessage = normalize(MessageInfo)(message);
159
- normalizedMessage.attributes =
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.absFolderPath.replace(`/${originalName}`, parentFolderAbsPath);
237
+ folder.absFolderPath = `${parentFolderAbsPath}/${folder.name}`;
237
238
  }
238
239
 
239
240
  if (folder.folders) {
240
- folder.folders = updateAbsoluteFolderPath(originalName, parentFolderAbsPath, folder.folders);
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 || 250000,
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(normalize(SearchResponse));
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 = (message: SendMessageInput, accountName: string) =>
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: denormalize(SendMessageInfo)({ message }),
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));
@@ -365,3 +365,10 @@ export interface NoOpOptions {
365
365
  limitToOneBlocked: number;
366
366
  wait: number;
367
367
  }
368
+
369
+ export interface DiscoverRightInput {
370
+ _content: string;
371
+ }
372
+ export interface DiscoverRightOptions {
373
+ right: Array<DiscoverRightInput>;
374
+ }
@@ -13,9 +13,7 @@ const MimePart = new Entity({
13
13
  cl: 'contentLocation',
14
14
  ct: 'contentType',
15
15
  s: 'size',
16
- part: 'part',
17
- mid: 'messageId',
18
- content: 'content'
16
+ mid: 'messageId'
19
17
  });
20
18
 
21
19
  const CalendarItemAlarmTriggerRelative = new Entity({
@@ -192,6 +190,7 @@ const ExistingAttachmentsInfo = new Entity({
192
190
  const AttachmentsInfo = new Entity({
193
191
  aid: 'attachmentId',
194
192
  doc: 'documents',
193
+ m: 'messages',
195
194
  mp: ['existingAttachments', ExistingAttachmentsInfo]
196
195
  });
197
196
 
@@ -200,6 +199,43 @@ MimePart.addMapping({
200
199
  attach: ['attachments', AttachmentsInfo]
201
200
  });
202
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
+
203
239
  const commonMailItemFields = {
204
240
  ...commonMessageFields,
205
241
  e: ['emailAddresses', MailItemEmailAddress],
@@ -209,7 +245,8 @@ const commonMailItemFields = {
209
245
  su: 'subject',
210
246
  origid: 'origId',
211
247
  attach: ['attachments', AttachmentsInfo],
212
- rt: 'replyType'
248
+ rt: 'replyType',
249
+ certificate: ['certificate', SmimeCert]
213
250
  };
214
251
 
215
252
  const SendMessageFields = new Entity({
@@ -445,7 +482,8 @@ const contactFields = {
445
482
  sf: 'sortField',
446
483
  t: 'tags',
447
484
  tn: 'tagNames',
448
- _attrs: ['attributes', ContactAttributes]
485
+ _attrs: ['attributes', ContactAttributes],
486
+ certificate: ['certificate', SmimeCert]
449
487
  };
450
488
 
451
489
  const contactListMembers = new Entity({
@@ -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;
@@ -330,6 +330,7 @@ export type AttachmentInput = {
330
330
  attachmentId?: Maybe<Scalars['String']>;
331
331
  documents?: Maybe<Array<Maybe<DocumentInput>>>;
332
332
  existingAttachments?: Maybe<Array<Maybe<ExistingAttachmentInput>>>;
333
+ messages?: Maybe<Array<Maybe<EmlInput>>>;
333
334
  };
334
335
 
335
336
  export type AuthResponse = {
@@ -816,6 +817,7 @@ export enum ConnectionType {
816
817
  export type Contact = {
817
818
  __typename?: 'Contact';
818
819
  attributes?: Maybe<ContactAttributes>;
820
+ certificate?: Maybe<Array<Maybe<SmimeCert>>>;
819
821
  date?: Maybe<Scalars['Float']>;
820
822
  fileAsStr?: Maybe<Scalars['String']>;
821
823
  folderId?: Maybe<Scalars['ID']>;
@@ -1233,6 +1235,10 @@ export type Device = {
1233
1235
  ua?: Maybe<Scalars['String']>;
1234
1236
  };
1235
1237
 
1238
+ export type DiscoverRightInput = {
1239
+ _content?: Maybe<Scalars['String']>;
1240
+ };
1241
+
1236
1242
  export type DiscoverRights = {
1237
1243
  __typename?: 'DiscoverRights';
1238
1244
  targets?: Maybe<Array<Maybe<Targets>>>;
@@ -1299,6 +1305,10 @@ export type DtTimeInfo = {
1299
1305
  utc?: Maybe<Scalars['Float']>;
1300
1306
  };
1301
1307
 
1308
+ export type EmlInput = {
1309
+ id?: Maybe<Scalars['ID']>;
1310
+ };
1311
+
1302
1312
  export type EmailAddress = {
1303
1313
  __typename?: 'EmailAddress';
1304
1314
  address?: Maybe<Scalars['String']>;
@@ -2217,9 +2227,11 @@ export type MessageInfo = MailItem & {
2217
2227
  autoSendTime?: Maybe<Scalars['Float']>;
2218
2228
  bcc?: Maybe<Array<Maybe<EmailAddress>>>;
2219
2229
  cc?: Maybe<Array<Maybe<EmailAddress>>>;
2230
+ certificate?: Maybe<Array<Maybe<SmimeCert>>>;
2220
2231
  changeDate?: Maybe<Scalars['Float']>;
2221
2232
  conversationId?: Maybe<Scalars['ID']>;
2222
2233
  date?: Maybe<Scalars['Float']>;
2234
+ decryptionErrorCode?: Maybe<Scalars['String']>;
2223
2235
  emailAddresses?: Maybe<Array<Maybe<EmailAddress>>>;
2224
2236
  excerpt?: Maybe<Scalars['String']>;
2225
2237
  flags?: Maybe<Scalars['String']>;
@@ -2229,6 +2241,8 @@ export type MessageInfo = MailItem & {
2229
2241
  id?: Maybe<Scalars['ID']>;
2230
2242
  inlineAttachments?: Maybe<Array<Maybe<MimePart>>>;
2231
2243
  invitations?: Maybe<Array<Maybe<InviteInfo>>>;
2244
+ isEncrypted?: Maybe<Scalars['Boolean']>;
2245
+ isSigned?: Maybe<Scalars['Boolean']>;
2232
2246
  local?: Maybe<Scalars['Boolean']>;
2233
2247
  mimeParts?: Maybe<Array<Maybe<MimePart>>>;
2234
2248
  modifiedSequence?: Maybe<Scalars['Float']>;
@@ -2282,6 +2296,7 @@ export type MimePart = {
2282
2296
  mimeParts?: Maybe<Array<Maybe<MimePart>>>;
2283
2297
  part?: Maybe<Scalars['ID']>;
2284
2298
  size?: Maybe<Scalars['Float']>;
2299
+ truncated?: Maybe<Scalars['Boolean']>;
2285
2300
  url?: Maybe<Scalars['String']>;
2286
2301
  };
2287
2302
 
@@ -2298,6 +2313,7 @@ export type MimePartInput = {
2298
2313
  mimeParts?: Maybe<Array<Maybe<MimePartInput>>>;
2299
2314
  part?: Maybe<Scalars['ID']>;
2300
2315
  size?: Maybe<Scalars['Float']>;
2316
+ truncated?: Maybe<Scalars['Boolean']>;
2301
2317
  url?: Maybe<Scalars['String']>;
2302
2318
  };
2303
2319
 
@@ -2444,6 +2460,7 @@ export type Mutation = {
2444
2460
  revokeTrustedDevice?: Maybe<Scalars['Boolean']>;
2445
2461
  saveDocument?: Maybe<SaveDocumentResponse>;
2446
2462
  saveDraft?: Maybe<SaveDraftResponse>;
2463
+ saveSMimeCert?: Maybe<SmimeCertInfoResponse>;
2447
2464
  sendDeliveryReport?: Maybe<Scalars['Boolean']>;
2448
2465
  sendInviteReply?: Maybe<InviteReplyResponse>;
2449
2466
  sendMessage?: Maybe<SendMessageResponse>;
@@ -2904,6 +2921,12 @@ export type MutationSaveDraftArgs = {
2904
2921
  };
2905
2922
 
2906
2923
 
2924
+ export type MutationSaveSMimeCertArgs = {
2925
+ password?: Maybe<Scalars['String']>;
2926
+ upload: SaveSMimeCertInputUpload;
2927
+ };
2928
+
2929
+
2907
2930
  export type MutationSendDeliveryReportArgs = {
2908
2931
  messageId: Scalars['ID'];
2909
2932
  };
@@ -2916,7 +2939,9 @@ export type MutationSendInviteReplyArgs = {
2916
2939
 
2917
2940
  export type MutationSendMessageArgs = {
2918
2941
  accountName?: Maybe<Scalars['String']>;
2942
+ encrypt?: Maybe<Scalars['Boolean']>;
2919
2943
  message: SendMessageInput;
2944
+ sign?: Maybe<Scalars['Boolean']>;
2920
2945
  };
2921
2946
 
2922
2947
 
@@ -3043,6 +3068,7 @@ export type Owner = {
3043
3068
  };
3044
3069
 
3045
3070
  export enum ParticipationRole {
3071
+ Cha = 'CHA',
3046
3072
  Non = 'NON',
3047
3073
  Opt = 'OPT',
3048
3074
  Req = 'REQ'
@@ -3277,6 +3303,7 @@ export type Query = {
3277
3303
  getPreferences?: Maybe<Preferences>;
3278
3304
  getReminders?: Maybe<RemindersResponse>;
3279
3305
  getRights?: Maybe<RightsResponse>;
3306
+ getSMimeCertInfo?: Maybe<SmimeCertInfoResponse>;
3280
3307
  getSMimePublicCerts?: Maybe<SMimePublicCertsResponse>;
3281
3308
  getScratchCodes?: Maybe<ScratchCodes>;
3282
3309
  getSearchFolder?: Maybe<Folder>;
@@ -3320,6 +3347,11 @@ export type QueryClientInfoArgs = {
3320
3347
  };
3321
3348
 
3322
3349
 
3350
+ export type QueryDiscoverRightsArgs = {
3351
+ right: Array<DiscoverRightInput>;
3352
+ };
3353
+
3354
+
3323
3355
  export type QueryDownloadAttachmentArgs = {
3324
3356
  id: Scalars['ID'];
3325
3357
  part: Scalars['ID'];
@@ -3462,6 +3494,11 @@ export type QueryGetRightsArgs = {
3462
3494
  };
3463
3495
 
3464
3496
 
3497
+ export type QueryGetSMimeCertInfoArgs = {
3498
+ certId?: Maybe<Scalars['String']>;
3499
+ };
3500
+
3501
+
3465
3502
  export type QueryGetSMimePublicCertsArgs = {
3466
3503
  contactAddr: Scalars['String'];
3467
3504
  store: Scalars['String'];
@@ -3693,6 +3730,7 @@ export type SMimeMessage = {
3693
3730
  __typename?: 'SMimeMessage';
3694
3731
  content?: Maybe<Scalars['String']>;
3695
3732
  id?: Maybe<Scalars['ID']>;
3733
+ isSecure?: Maybe<Scalars['Boolean']>;
3696
3734
  };
3697
3735
 
3698
3736
  export type SMimePublicCert = {
@@ -3759,6 +3797,10 @@ export type SaveMessageDataInput = {
3759
3797
  meta: Scalars['String'];
3760
3798
  };
3761
3799
 
3800
+ export type SaveSMimeCertInputUpload = {
3801
+ id?: Maybe<Scalars['String']>;
3802
+ };
3803
+
3762
3804
  export type ScratchCode = {
3763
3805
  __typename?: 'ScratchCode';
3764
3806
  scratchCode?: Maybe<Array<Maybe<ScratchCodeType>>>;
@@ -3977,6 +4019,67 @@ export type Skin = {
3977
4019
  _content?: Maybe<Scalars['String']>;
3978
4020
  };
3979
4021
 
4022
+ export type SmimeCert = {
4023
+ __typename?: 'SmimeCert';
4024
+ default?: Maybe<Scalars['Boolean']>;
4025
+ emailAddress?: Maybe<Scalars['String']>;
4026
+ errorCode?: Maybe<Scalars['String']>;
4027
+ issuedBy?: Maybe<SmimeCertIssuedBy>;
4028
+ issuedTo?: Maybe<SmimeCertIssuedTo>;
4029
+ privateKeyId?: Maybe<Scalars['String']>;
4030
+ publicCertificateId?: Maybe<Scalars['String']>;
4031
+ signature?: Maybe<SmimeCertSignature>;
4032
+ subjectAltName?: Maybe<SmimeCertSubjectAltName>;
4033
+ validity?: Maybe<SmimeCertValidity>;
4034
+ };
4035
+
4036
+ export type SmimeCertInfoResponse = {
4037
+ __typename?: 'SmimeCertInfoResponse';
4038
+ certificates?: Maybe<Array<Maybe<SmimeCert>>>;
4039
+ };
4040
+
4041
+ export type SmimeCertIssuedBy = {
4042
+ __typename?: 'SmimeCertIssuedBy';
4043
+ commonName?: Maybe<Scalars['String']>;
4044
+ country?: Maybe<Scalars['String']>;
4045
+ emailAddress?: Maybe<Scalars['String']>;
4046
+ locality?: Maybe<Scalars['String']>;
4047
+ organizationName?: Maybe<Scalars['String']>;
4048
+ state?: Maybe<Scalars['String']>;
4049
+ };
4050
+
4051
+ export type SmimeCertIssuedTo = {
4052
+ __typename?: 'SmimeCertIssuedTo';
4053
+ commonName?: Maybe<Scalars['String']>;
4054
+ country?: Maybe<Scalars['String']>;
4055
+ emailAddress?: Maybe<Scalars['String']>;
4056
+ organizationName?: Maybe<Scalars['String']>;
4057
+ organizationUnit?: Maybe<Scalars['String']>;
4058
+ state?: Maybe<Scalars['String']>;
4059
+ };
4060
+
4061
+ export type SmimeCertSignature = {
4062
+ __typename?: 'SmimeCertSignature';
4063
+ algorithm?: Maybe<Scalars['String']>;
4064
+ serialNo?: Maybe<Scalars['String']>;
4065
+ };
4066
+
4067
+ export type SmimeCertSubjectAltName = {
4068
+ __typename?: 'SmimeCertSubjectAltName';
4069
+ rfc822Name?: Maybe<Array<Maybe<SmimeCertSubjectRfc822Name>>>;
4070
+ };
4071
+
4072
+ export type SmimeCertSubjectRfc822Name = {
4073
+ __typename?: 'SmimeCertSubjectRfc822Name';
4074
+ content?: Maybe<Scalars['String']>;
4075
+ };
4076
+
4077
+ export type SmimeCertValidity = {
4078
+ __typename?: 'SmimeCertValidity';
4079
+ endDate?: Maybe<Scalars['Float']>;
4080
+ startDate?: Maybe<Scalars['Float']>;
4081
+ };
4082
+
3980
4083
  export type SnoozeInput = {
3981
4084
  id: Scalars['ID'];
3982
4085
  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 {
@@ -1975,6 +1981,7 @@ type MimePart {
1975
1981
  url: String
1976
1982
  messageId: ID
1977
1983
  base64: String
1984
+ truncated: Boolean
1978
1985
  }
1979
1986
 
1980
1987
  type ActionData {
@@ -2001,7 +2008,8 @@ input MimePartInput {
2001
2008
  url: String
2002
2009
  messageId: ID
2003
2010
  attachments: [AttachmentInput]
2004
- base64: String
2011
+ base64: String,
2012
+ truncated: Boolean
2005
2013
  }
2006
2014
 
2007
2015
  input ExistingAttachmentInput {
@@ -2013,9 +2021,14 @@ input DocumentInput {
2013
2021
  id: ID
2014
2022
  }
2015
2023
 
2024
+ input EMLInput {
2025
+ id: ID
2026
+ }
2027
+
2016
2028
  input AttachmentInput {
2017
2029
  attachmentId: String
2018
2030
  documents: [DocumentInput]
2031
+ messages: [EMLInput]
2019
2032
  existingAttachments: [ExistingAttachmentInput]
2020
2033
  }
2021
2034
 
@@ -2106,6 +2119,10 @@ input SendMessageInput {
2106
2119
  inlineAttachments: [MimePartInput] #attach
2107
2120
  }
2108
2121
 
2122
+ input SaveSMimeCertInputUpload {
2123
+ id: String
2124
+ }
2125
+
2109
2126
  input CalendarItemInviteInput {
2110
2127
  components: [CalendarItemInviteComponentInput]!
2111
2128
  }
@@ -2982,9 +2999,63 @@ type SMimePublicCertsResponse {
2982
2999
  certs: [SMimePublicCerts]
2983
3000
  }
2984
3001
 
3002
+ type SmimeCertIssuedBy {
3003
+ country: String
3004
+ commonName: String
3005
+ emailAddress: String
3006
+ locality: String
3007
+ organizationName: String
3008
+ state: String
3009
+ }
3010
+
3011
+ type SmimeCertIssuedTo {
3012
+ country: String
3013
+ commonName: String
3014
+ emailAddress: String
3015
+ organizationName: String
3016
+ organizationUnit: String
3017
+ state: String
3018
+ }
3019
+
3020
+ type SmimeCertSignature {
3021
+ algorithm: String
3022
+ serialNo: String
3023
+ }
3024
+
3025
+ type SmimeCertSubjectRfc822Name {
3026
+ content: String
3027
+ }
3028
+
3029
+ type SmimeCertSubjectAltName {
3030
+ rfc822Name: [SmimeCertSubjectRfc822Name]
3031
+ }
3032
+
3033
+ type SmimeCertValidity {
3034
+ endDate: Float
3035
+ startDate: Float
3036
+ }
3037
+
3038
+ type SmimeCert {
3039
+ default: Boolean
3040
+ emailAddress: String
3041
+ issuedBy: SmimeCertIssuedBy
3042
+ issuedTo: SmimeCertIssuedTo
3043
+ publicCertificateId: String
3044
+ privateKeyId: String
3045
+ signature: SmimeCertSignature
3046
+ subjectAltName: SmimeCertSubjectAltName
3047
+ validity: SmimeCertValidity
3048
+ errorCode: String
3049
+ }
3050
+
3051
+ type SmimeCertInfoResponse {
3052
+ certificates: [SmimeCert]
3053
+ }
3054
+
2985
3055
  type SMimeMessage {
2986
3056
  id: ID
2987
3057
  content: String
3058
+ isSecure: Boolean
2988
3059
  }
2989
3060
 
2990
3061
  type Attachment {
@@ -3088,6 +3159,10 @@ input SearchConditionsInput {
3088
3159
  conds: ConditionsInput
3089
3160
  }
3090
3161
 
3162
+ input DiscoverRightInput {
3163
+ _content: String
3164
+ }
3165
+
3091
3166
  # Zimbra GraphQL Queries
3092
3167
  # - [[SOAP API Reference]](https://files.zimbra.com/docs/soap_api/8.7.11/api-reference/index.html)
3093
3168
  # - [[SOAP Documentation]](https://github.com/Zimbra/zm-mailbox/blob/develop/store/docs/soap.txt)
@@ -3111,7 +3186,7 @@ type Query {
3111
3186
  downloadMessage(id: ID!, isSecure: Boolean, isLocal: Boolean): SMimeMessage
3112
3187
  downloadAttachment(id: ID!, part: ID!): Attachment
3113
3188
  downloadDocument(id: ID!, url: String!): Attachment
3114
- discoverRights: DiscoverRights
3189
+ discoverRights(right: [DiscoverRightInput!]!): DiscoverRights
3115
3190
  freeBusy(names: [String!]!, start: Float, end: Float): [FreeBusy]
3116
3191
  getContact(
3117
3192
  id: ID
@@ -3198,6 +3273,7 @@ type Query {
3198
3273
  contactAddr: String!
3199
3274
  store: String!
3200
3275
  ): SMimePublicCertsResponse
3276
+ getSMimeCertInfo(certId: String): SmimeCertInfoResponse
3201
3277
  getScratchCodes(username: String!): ScratchCodes
3202
3278
  getSearchFolder: Folder
3203
3279
  getTrustedDevices: GetTrustedDevicesResponse
@@ -3436,7 +3512,10 @@ type Mutation {
3436
3512
  sendMessage(
3437
3513
  message: SendMessageInput!
3438
3514
  accountName: String
3515
+ sign: Boolean
3516
+ encrypt: Boolean
3439
3517
  ): SendMessageResponse
3518
+ saveSMimeCert(upload: SaveSMimeCertInputUpload!, password: String): SmimeCertInfoResponse
3440
3519
  sendDeliveryReport(messageId: ID!): Boolean
3441
3520
  sendInviteReply(inviteReply: InviteReplyInput!): InviteReplyResponse
3442
3521
  sendShareNotification(shareNotification: ShareNotificationInput!): Boolean