@zimbra/api-client 92.1.0 → 94.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/package-lock.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zimbra/api-client",
3
- "version": "92.1.0",
3
+ "version": "94.0.0",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
@@ -5742,9 +5742,9 @@
5742
5742
  "dev": true
5743
5743
  },
5744
5744
  "dset": {
5745
- "version": "3.1.2",
5746
- "resolved": "https://registry.npmjs.org/dset/-/dset-3.1.2.tgz",
5747
- "integrity": "sha512-g/M9sqy3oHe477Ar4voQxWtaPIFw1jTdKZuomOjhCcBx9nHUNn0pu6NopuFFrTh/TRZIKEj+76vLWFu9BNKk+Q=="
5745
+ "version": "3.1.4",
5746
+ "resolved": "https://registry.npmjs.org/dset/-/dset-3.1.4.tgz",
5747
+ "integrity": "sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA=="
5748
5748
  },
5749
5749
  "eastasianwidth": {
5750
5750
  "version": "0.2.0",
@@ -8859,9 +8859,9 @@
8859
8859
  }
8860
8860
  },
8861
8861
  "rollup": {
8862
- "version": "2.79.1",
8863
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz",
8864
- "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==",
8862
+ "version": "2.79.2",
8863
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.2.tgz",
8864
+ "integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==",
8865
8865
  "dev": true,
8866
8866
  "requires": {
8867
8867
  "fsevents": "~2.3.2"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zimbra/api-client",
3
3
  "amdName": "zmApiJsClient",
4
- "version": "92.1.0",
4
+ "version": "94.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",
@@ -530,22 +530,44 @@ export class ZimbraBatchClient {
530
530
  loginNewPassword,
531
531
  password,
532
532
  username,
533
- dryRun = false
534
- }: ChangePasswordOptions) =>
535
- this.jsonRequest({
536
- name: 'ChangePassword',
537
- namespace: Namespace.Account,
538
- body: {
539
- account: {
540
- by: 'name',
541
- _content: username
533
+ dryRun = false,
534
+ authToken,
535
+ csrfToken
536
+ }: ChangePasswordOptions) => {
537
+ if (authToken) {
538
+ return this.jsonRequest({
539
+ name: 'ChangePassword',
540
+ namespace: Namespace.Account,
541
+ body: {
542
+ account: {
543
+ by: 'name',
544
+ _content: username
545
+ },
546
+ oldPassword: password,
547
+ password: loginNewPassword,
548
+ dryRun,
549
+ authToken: { _content: authToken },
550
+ csrfToken: { _content: csrfToken }
542
551
  },
543
- oldPassword: password,
544
- password: loginNewPassword,
545
- dryRun
546
- },
547
- singleRequest: true
548
- });
552
+ singleRequest: true
553
+ });
554
+ } else {
555
+ return this.jsonRequest({
556
+ name: 'ChangePassword',
557
+ namespace: Namespace.Account,
558
+ body: {
559
+ account: {
560
+ by: 'name',
561
+ _content: username
562
+ },
563
+ oldPassword: password,
564
+ password: loginNewPassword,
565
+ dryRun
566
+ },
567
+ singleRequest: true
568
+ });
569
+ }
570
+ };
549
571
 
550
572
  public checkCalendar = ({ id, value }: FolderActionCheckCalendarInput) =>
551
573
  this.action(ActionType.folder, {
@@ -860,8 +882,7 @@ export class ZimbraBatchClient {
860
882
  password,
861
883
  authToken,
862
884
  twoFactorCode,
863
- csrfTokenSecured,
864
- ignoreSameSite
885
+ csrfTokenSecured
865
886
  }: EnableTwoFactorAuthInput) =>
866
887
  this.jsonRequest({
867
888
  name: 'EnableTwoFactorAuth',
@@ -894,7 +915,6 @@ export class ZimbraBatchClient {
894
915
  _content: twoFactorCode
895
916
  }
896
917
  }),
897
- ...(ignoreSameSite && { ignoreSameSite }),
898
918
  csrfTokenSecured
899
919
  },
900
920
  namespace: Namespace.Account,
@@ -1462,14 +1482,10 @@ export class ZimbraBatchClient {
1462
1482
  const versionIds = data.documents.map((doc: any) => doc.version);
1463
1483
  const maxVersion = Math.max(...versionIds);
1464
1484
  const latestDocumentVersion = data.documents.find((doc: any) => doc.version === maxVersion);
1465
- const versionDocuments = data.documents.map((versionDoc: any) => ({
1466
- ...versionDoc,
1467
- name: latestDocumentVersion.name
1468
- }));
1469
1485
 
1470
1486
  return {
1471
1487
  ...latestDocumentVersion,
1472
- docs: versionDocuments
1488
+ docs: data.documents
1473
1489
  };
1474
1490
  });
1475
1491
 
@@ -1481,8 +1497,7 @@ export class ZimbraBatchClient {
1481
1497
  persistAuthTokenCookie,
1482
1498
  twoFactorCode,
1483
1499
  deviceTrusted,
1484
- csrfTokenSecured,
1485
- ignoreSameSite
1500
+ csrfTokenSecured
1486
1501
  }: LoginOptions) =>
1487
1502
  this.jsonRequest({
1488
1503
  name: 'Auth',
@@ -1495,7 +1510,6 @@ export class ZimbraBatchClient {
1495
1510
  by: 'name',
1496
1511
  _content: username
1497
1512
  },
1498
- ...(ignoreSameSite && { ignoreSameSite }),
1499
1513
  ...(password && { password }),
1500
1514
  ...(recoveryCode && {
1501
1515
  recoveryCode: {
@@ -231,6 +231,8 @@ export interface ShareInfoOptions {
231
231
  }
232
232
 
233
233
  export interface ChangePasswordOptions {
234
+ authToken: string;
235
+ csrfToken: string;
234
236
  dryRun: boolean;
235
237
  loginNewPassword: string;
236
238
  password: string;
@@ -245,7 +247,6 @@ export interface ModifyProfileImageOptions {
245
247
  export interface LoginOptions {
246
248
  csrfTokenSecured: boolean;
247
249
  deviceTrusted?: boolean;
248
- ignoreSameSite?: boolean;
249
250
  password: string;
250
251
  persistAuthTokenCookie?: boolean;
251
252
  recoveryCode?: string;
@@ -92,7 +92,7 @@ const CalendarItemAttendees = new Entity({
92
92
 
93
93
  const CalendarItemReply = new Entity({
94
94
  ptst: 'participationStatus',
95
- at: 'attendee'
95
+ at: 'address'
96
96
  });
97
97
 
98
98
  const CalendarItemOrganizer = new Entity({
@@ -384,6 +384,7 @@ export type AuthResponse = {
384
384
  authToken?: Maybe<Array<Maybe<AuthToken>>>;
385
385
  csrfToken?: Maybe<CsrfToken>;
386
386
  lifetime?: Maybe<Scalars['Float']['output']>;
387
+ resetPassword?: Maybe<ResetPassword>;
387
388
  session?: Maybe<Session>;
388
389
  skin?: Maybe<Array<Maybe<Skin>>>;
389
390
  trustedDevicesEnabled?: Maybe<TrustedDevicesEnabled>;
@@ -819,7 +820,7 @@ export type CalendarItemRecurrenceRuleInput = {
819
820
 
820
821
  export type CalendarItemReply = {
821
822
  __typename?: 'CalendarItemReply';
822
- attendee?: Maybe<Scalars['String']['output']>;
823
+ address?: Maybe<Scalars['String']['output']>;
823
824
  participationStatus?: Maybe<ParticipationStatus>;
824
825
  };
825
826
 
@@ -1136,7 +1137,7 @@ export type ConversationConditionInput = {
1136
1137
 
1137
1138
  export type CounterAppointmentInput = {
1138
1139
  componentNum?: InputMaybe<Scalars['Int']['input']>;
1139
- id: Scalars['ID']['input'];
1140
+ id?: InputMaybe<Scalars['ID']['input']>;
1140
1141
  message: CounterAppointmentMessageInput;
1141
1142
  modifiedSequence?: InputMaybe<Scalars['Float']['input']>;
1142
1143
  revision?: InputMaybe<Scalars['Float']['input']>;
@@ -1534,7 +1535,6 @@ export type EnableTwoFactorAuthInput = {
1534
1535
  authToken?: InputMaybe<Scalars['String']['input']>;
1535
1536
  csrfTokenSecured: Scalars['Boolean']['input'];
1536
1537
  email?: InputMaybe<Scalars['String']['input']>;
1537
- ignoreSameSite?: InputMaybe<Scalars['Boolean']['input']>;
1538
1538
  method: Scalars['String']['input'];
1539
1539
  name: Scalars['String']['input'];
1540
1540
  password?: InputMaybe<Scalars['String']['input']>;
@@ -2329,11 +2329,17 @@ export enum LicenseStatus {
2329
2329
  ActivationGracePeriod = 'ACTIVATION_GRACE_PERIOD',
2330
2330
  Expired = 'EXPIRED',
2331
2331
  Invalid = 'INVALID',
2332
+ InvalidLicense = 'INVALID_LICENSE',
2333
+ InvalidLicenseUsageLimit = 'INVALID_LICENSE_USAGE_LIMIT',
2332
2334
  InFuture = 'IN_FUTURE',
2335
+ LicenseActivationRestricted = 'LICENSE_ACTIVATION_RESTRICTED',
2333
2336
  LicenseGracePeriod = 'LICENSE_GRACE_PERIOD',
2337
+ LicenseInvalidSupportEndDate = 'LICENSE_INVALID_SUPPORT_END_DATE',
2334
2338
  NotActivated = 'NOT_ACTIVATED',
2335
2339
  NotInstalled = 'NOT_INSTALLED',
2336
- Ok = 'OK'
2340
+ NumberOfActivationsExceed = 'NUMBER_OF_ACTIVATIONS_EXCEED',
2341
+ Ok = 'OK',
2342
+ TrialHasExpired = 'TRIAL_HAS_EXPIRED'
2337
2343
  }
2338
2344
 
2339
2345
  export type Locale = {
@@ -2386,6 +2392,7 @@ export type MailboxMetadataAttrs = {
2386
2392
  archivedFolder?: Maybe<Scalars['String']['output']>;
2387
2393
  privacyOverlayPrefs_showOverlay?: Maybe<Scalars['Boolean']['output']>;
2388
2394
  privacyOverlayPrefs_timeOut?: Maybe<Scalars['Int']['output']>;
2395
+ zimbraPrefColorMode?: Maybe<Scalars['String']['output']>;
2389
2396
  zimbraPrefContactSourceFolderID?: Maybe<Scalars['String']['output']>;
2390
2397
  zimbraPrefCustomFolderTreeOpen?: Maybe<Scalars['Boolean']['output']>;
2391
2398
  zimbraPrefDateFormat?: Maybe<Scalars['String']['output']>;
@@ -2393,6 +2400,7 @@ export type MailboxMetadataAttrs = {
2393
2400
  zimbraPrefFoldersExpanded?: Maybe<Scalars['String']['output']>;
2394
2401
  zimbraPrefGenerateLinkPreviews?: Maybe<Scalars['Boolean']['output']>;
2395
2402
  zimbraPrefGroupByList?: Maybe<Scalars['String']['output']>;
2403
+ zimbraPrefHideMuteConvModal?: Maybe<Scalars['Boolean']['output']>;
2396
2404
  zimbraPrefMessageListDensity?: Maybe<Scalars['String']['output']>;
2397
2405
  zimbraPrefMultitasking?: Maybe<Scalars['String']['output']>;
2398
2406
  zimbraPrefReadingPaneSashHorizontal?: Maybe<Scalars['Int']['output']>;
@@ -2416,6 +2424,7 @@ export type MailboxMetadataSectionAttrsInput = {
2416
2424
  archivedFolder?: InputMaybe<Scalars['String']['input']>;
2417
2425
  privacyOverlayPrefs_showOverlay?: InputMaybe<Scalars['Boolean']['input']>;
2418
2426
  privacyOverlayPrefs_timeOut?: InputMaybe<Scalars['Int']['input']>;
2427
+ zimbraPrefColorMode?: InputMaybe<Scalars['String']['input']>;
2419
2428
  zimbraPrefContactSourceFolderID?: InputMaybe<Scalars['String']['input']>;
2420
2429
  zimbraPrefCustomFolderTreeOpen?: InputMaybe<Scalars['Boolean']['input']>;
2421
2430
  zimbraPrefDateFormat?: InputMaybe<Scalars['String']['input']>;
@@ -2423,6 +2432,7 @@ export type MailboxMetadataSectionAttrsInput = {
2423
2432
  zimbraPrefFoldersExpanded?: InputMaybe<Scalars['String']['input']>;
2424
2433
  zimbraPrefGenerateLinkPreviews?: InputMaybe<Scalars['Boolean']['input']>;
2425
2434
  zimbraPrefGroupByList?: InputMaybe<Scalars['String']['input']>;
2435
+ zimbraPrefHideMuteConvModal?: InputMaybe<Scalars['Boolean']['input']>;
2426
2436
  zimbraPrefMessageListDensity?: InputMaybe<Scalars['String']['input']>;
2427
2437
  zimbraPrefMultitasking?: InputMaybe<Scalars['String']['input']>;
2428
2438
  zimbraPrefReadingPaneSashHorizontal?: InputMaybe<Scalars['Int']['input']>;
@@ -2793,6 +2803,8 @@ export type MutationChangeFolderColorArgs = {
2793
2803
 
2794
2804
 
2795
2805
  export type MutationChangePasswordArgs = {
2806
+ authToken?: InputMaybe<Scalars['String']['input']>;
2807
+ csrfToken?: InputMaybe<Scalars['String']['input']>;
2796
2808
  dryRun?: InputMaybe<Scalars['Boolean']['input']>;
2797
2809
  loginNewPassword: Scalars['String']['input'];
2798
2810
  password: Scalars['String']['input'];
@@ -3007,7 +3019,6 @@ export type MutationItemActionArgs = {
3007
3019
  export type MutationLoginArgs = {
3008
3020
  csrfTokenSecured: Scalars['Boolean']['input'];
3009
3021
  deviceTrusted?: InputMaybe<Scalars['Boolean']['input']>;
3010
- ignoreSameSite?: InputMaybe<Scalars['Boolean']['input']>;
3011
3022
  password?: InputMaybe<Scalars['String']['input']>;
3012
3023
  persistAuthTokenCookie?: InputMaybe<Scalars['Boolean']['input']>;
3013
3024
  recoveryCode?: InputMaybe<Scalars['String']['input']>;
@@ -4036,6 +4047,11 @@ export type ReplyActionInput = {
4036
4047
  index?: InputMaybe<Scalars['Int']['input']>;
4037
4048
  };
4038
4049
 
4050
+ export type ResetPassword = {
4051
+ __typename?: 'ResetPassword';
4052
+ _content?: Maybe<Scalars['Boolean']['output']>;
4053
+ };
4054
+
4039
4055
  export type ResetPasswordResponse = {
4040
4056
  __typename?: 'ResetPasswordResponse';
4041
4057
  attrs?: Maybe<ResetPasswordResponseAttributes>;
@@ -274,6 +274,12 @@ enum LicenseStatus {
274
274
  INVALID
275
275
  LICENSE_GRACE_PERIOD
276
276
  ACTIVATION_GRACE_PERIOD
277
+ INVALID_LICENSE
278
+ TRIAL_HAS_EXPIRED
279
+ INVALID_LICENSE_USAGE_LIMIT
280
+ NUMBER_OF_ACTIVATIONS_EXCEED
281
+ LICENSE_ACTIVATION_RESTRICTED
282
+ LICENSE_INVALID_SUPPORT_END_DATE
277
283
  }
278
284
 
279
285
  enum SetRecoveryAccountOp {
@@ -337,6 +343,7 @@ type AuthResponse {
337
343
  session: Session
338
344
  skin: [Skin]
339
345
  csrfToken: CsrfToken
346
+ resetPassword: ResetPassword
340
347
  }
341
348
 
342
349
  type ScratchCodeType {
@@ -382,6 +389,10 @@ type TrustedDevicesEnabled {
382
389
  _content: Boolean
383
390
  }
384
391
 
392
+ type ResetPassword {
393
+ _content: Boolean
394
+ }
395
+
385
396
  type Session {
386
397
  id: ID
387
398
  _content: String
@@ -2110,6 +2121,8 @@ type MailboxMetadataAttrs {
2110
2121
  zimbraPrefSMIMEDefaultSetting: String
2111
2122
  zimbraPrefSMIMELastOperation: String
2112
2123
  zimbraPrefContactSourceFolderID: String
2124
+ zimbraPrefHideMuteConvModal: Boolean
2125
+ zimbraPrefColorMode: String
2113
2126
  }
2114
2127
 
2115
2128
  type MailboxMetadataMeta {
@@ -2143,6 +2156,8 @@ input MailboxMetadataSectionAttrsInput {
2143
2156
  zimbraPrefSMIMEDefaultSetting: String
2144
2157
  zimbraPrefSMIMELastOperation: String
2145
2158
  zimbraPrefContactSourceFolderID: String
2159
+ zimbraPrefHideMuteConvModal: Boolean
2160
+ zimbraPrefColorMode: String
2146
2161
  }
2147
2162
 
2148
2163
  type MimePart {
@@ -2284,7 +2299,7 @@ input CalendarItemMessageInput {
2284
2299
  }
2285
2300
 
2286
2301
  input CounterAppointmentInput {
2287
- id: ID!
2302
+ id: ID
2288
2303
  modifiedSequence: Float
2289
2304
  revision: Float
2290
2305
  componentNum: Int # comp
@@ -2413,7 +2428,7 @@ type CalendarItemAttendee {
2413
2428
 
2414
2429
  type CalendarItemReply {
2415
2430
  participationStatus: ParticipationStatus
2416
- attendee: String
2431
+ address: String
2417
2432
  }
2418
2433
 
2419
2434
  input CalendarItemAttendeesInput {
@@ -3079,7 +3094,6 @@ input EnableTwoFactorAuthInput {
3079
3094
  twoFactorCode: String
3080
3095
  authToken: String
3081
3096
  csrfTokenSecured: Boolean!
3082
- ignoreSameSite: Boolean
3083
3097
  }
3084
3098
 
3085
3099
  input SendTwoFactorAuthCodeInput {
@@ -3675,6 +3689,8 @@ type Mutation {
3675
3689
  loginNewPassword: String!
3676
3690
  password: String!
3677
3691
  username: String!
3692
+ authToken: String
3693
+ csrfToken: String
3678
3694
  ): AuthResponse
3679
3695
  modifyProfileImage(
3680
3696
  content: String
@@ -3761,7 +3777,6 @@ type Mutation {
3761
3777
  twoFactorCode: String
3762
3778
  deviceTrusted: Boolean
3763
3779
  csrfTokenSecured: Boolean!
3764
- ignoreSameSite: Boolean
3765
3780
  ): AuthResponse
3766
3781
  enableTwoFactorAuth(
3767
3782
  options: EnableTwoFactorAuthInput!