@zimbra/api-client 101.0.1-master.f2f7505.0 → 102.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.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zimbra/api-client",
3
3
  "amdName": "zmApiJsClient",
4
- "version": "101.0.1-master.f2f7505.0",
4
+ "version": "102.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",
@@ -78,7 +78,7 @@
78
78
  "chai": "^4.5.0",
79
79
  "copyfiles": "^2.4.1",
80
80
  "cross-var": "^1.1.0",
81
- "eslint": "^9.0.0",
81
+ "eslint": "^9.39.4",
82
82
  "husky": "^9.1.7",
83
83
  "lint-staged": "15.2.8",
84
84
  "mocha": "^10.8.2",
@@ -38,6 +38,7 @@ import {
38
38
  InviteReply,
39
39
  ListDocumentRevisions,
40
40
  MessageInfo,
41
+ RedirectMessage,
41
42
  SaveDocument,
42
43
  SaveDocuments,
43
44
  SearchCalendarResourcesResponse,
@@ -85,6 +86,7 @@ import {
85
86
  ModifyContactInput,
86
87
  ModifyIdentityInput,
87
88
  PreferencesInput,
89
+ RedirectMessgeInput,
88
90
  RevokeRightsInput,
89
91
  SaveSMimeCertInputUpload,
90
92
  SearchFolderInput,
@@ -487,6 +489,14 @@ export class ZimbraBatchClient {
487
489
  }
488
490
  });
489
491
 
492
+ public bounceMsg = (options: RedirectMessgeInput) =>
493
+ this.jsonRequest({
494
+ name: 'BounceMsg',
495
+ namespace: Namespace.Mail,
496
+ body: denormalize(RedirectMessage)(options),
497
+ singleRequest: true
498
+ }).then(Boolean);
499
+
490
500
  public cancelPendingAccountOnlyRemoteWipeSync = (deviceId: string) =>
491
501
  this.jsonRequest({
492
502
  name: 'CancelPendingAccountOnlyRemoteWipe',
@@ -1423,16 +1433,19 @@ export class ZimbraBatchClient {
1423
1433
  namespace: Namespace.Account
1424
1434
  }).then(certificate => normalize(SmimeCertInfoResponse)(certificate || {}));
1425
1435
 
1426
- public getSMimePublicCerts = (options: GetSMimePublicCertsOptions) =>
1436
+ public getSMimePublicCerts = ({ contactAddr, store }: GetSMimePublicCertsOptions) =>
1427
1437
  this.jsonRequest({
1428
1438
  name: 'GetSMIMEPublicCerts',
1429
1439
  body: {
1430
1440
  store: {
1431
- _content: options.store
1441
+ _content: store
1432
1442
  },
1433
- email: {
1434
- _content: options.contactAddr
1435
- }
1443
+ email:
1444
+ typeof contactAddr === 'string'
1445
+ ? {
1446
+ _content: contactAddr
1447
+ }
1448
+ : contactAddr.map(add => ({ _content: add }))
1436
1449
  },
1437
1450
  namespace: Namespace.Account
1438
1451
  });
@@ -308,7 +308,7 @@ export interface CreateSearchFolderOptions {
308
308
  }
309
309
 
310
310
  export interface GetSMimePublicCertsOptions {
311
- contactAddr: string;
311
+ contactAddr: string | Array<string>;
312
312
  store: string;
313
313
  }
314
314
 
@@ -605,6 +605,15 @@ const DateCondition = new Entity({
605
605
  d: 'date'
606
606
  });
607
607
 
608
+ const RedirectMessageAttribute = new Entity({
609
+ id: 'id',
610
+ e: ['emailAddresses', MailItemEmailAddress]
611
+ });
612
+
613
+ export const RedirectMessage = new Entity({
614
+ m: ['message', RedirectMessageAttribute]
615
+ });
616
+
608
617
  const ImportanceCondition = new Entity({
609
618
  imp: 'importance'
610
619
  });
@@ -1838,6 +1838,7 @@ export type Folder = {
1838
1838
  query?: Maybe<Scalars['String']['output']>;
1839
1839
  retentionPolicy?: Maybe<Array<Maybe<RetentionPolicy>>>;
1840
1840
  revision?: Maybe<Scalars['Float']['output']>;
1841
+ rgb?: Maybe<Scalars['String']['output']>;
1841
1842
  search?: Maybe<Array<Maybe<Folder>>>;
1842
1843
  sharedItemId?: Maybe<Scalars['ID']['output']>;
1843
1844
  types?: Maybe<Scalars['String']['output']>;
@@ -2669,6 +2670,7 @@ export type Mutation = {
2669
2670
  allowDeviceSync?: Maybe<Device>;
2670
2671
  applyFilterRules?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
2671
2672
  blockDeviceSync?: Maybe<Device>;
2673
+ bounceMessage?: Maybe<Scalars['Boolean']['output']>;
2672
2674
  cancelPendingAccountOnlyRemoteWipeSync?: Maybe<Device>;
2673
2675
  cancelPendingRemoteWipeSync?: Maybe<Device>;
2674
2676
  cancelTask?: Maybe<Scalars['Boolean']['output']>;
@@ -2811,6 +2813,11 @@ export type MutationBlockDeviceSyncArgs = {
2811
2813
  };
2812
2814
 
2813
2815
 
2816
+ export type MutationBounceMessageArgs = {
2817
+ message?: InputMaybe<RedirectMessgeInput>;
2818
+ };
2819
+
2820
+
2814
2821
  export type MutationCancelPendingAccountOnlyRemoteWipeSyncArgs = {
2815
2822
  deviceId?: InputMaybe<Scalars['String']['input']>;
2816
2823
  };
@@ -2909,6 +2916,7 @@ export type MutationCreateFolderArgs = {
2909
2916
  isLocalFolder?: InputMaybe<Scalars['Boolean']['input']>;
2910
2917
  name: Scalars['String']['input'];
2911
2918
  parentFolderId?: InputMaybe<Scalars['ID']['input']>;
2919
+ rgb?: InputMaybe<Scalars['String']['input']>;
2912
2920
  url?: InputMaybe<Scalars['String']['input']>;
2913
2921
  view?: InputMaybe<FolderView>;
2914
2922
  };
@@ -3901,7 +3909,7 @@ export type QueryGetSMimeCertInfoArgs = {
3901
3909
 
3902
3910
 
3903
3911
  export type QueryGetSMimePublicCertsArgs = {
3904
- contactAddr: Scalars['String']['input'];
3912
+ contactAddr: Array<InputMaybe<Scalars['String']['input']>>;
3905
3913
  store: Scalars['String']['input'];
3906
3914
  };
3907
3915
 
@@ -4039,6 +4047,11 @@ export type RedirectActionInput = {
4039
4047
  index?: InputMaybe<Scalars['Int']['input']>;
4040
4048
  };
4041
4049
 
4050
+ export type RedirectMessgeInput = {
4051
+ emailAddresses?: InputMaybe<Array<InputMaybe<MailItemEmailAddressInput>>>;
4052
+ id: Scalars['ID']['input'];
4053
+ };
4054
+
4042
4055
  export type RelatedContact = {
4043
4056
  __typename?: 'RelatedContact';
4044
4057
  email?: Maybe<Scalars['String']['output']>;
@@ -1175,6 +1175,7 @@ type Folder {
1175
1175
  absFolderPath: String
1176
1176
  acl: ACL
1177
1177
  color: Int
1178
+ rgb: String
1178
1179
  flags: String
1179
1180
  id: ID
1180
1181
  uuid: ID
@@ -3047,6 +3048,11 @@ input ForwardMessageInput {
3047
3048
  emailAddresses: [MailItemEmailAddressInput] #e
3048
3049
  }
3049
3050
 
3051
+ input RedirectMessgeInput {
3052
+ id: ID!
3053
+ emailAddresses: [MailItemEmailAddressInput]
3054
+ }
3055
+
3050
3056
  input ShareNotificationInput {
3051
3057
  action: ShareInputAction
3052
3058
  item: ShareNotificationItemInput!
@@ -3643,7 +3649,7 @@ type Query {
3643
3649
  getMessagesMetadata(ids: [ID!]!, isLocal: Boolean): [MessageInfo]
3644
3650
  getRights(input: GetRightsInput!): RightsResponse
3645
3651
  getSMimePublicCerts(
3646
- contactAddr: String!
3652
+ contactAddr: [String]!
3647
3653
  store: String!
3648
3654
  ): SMimePublicCertsResponse
3649
3655
  getSMimeCertInfo(certId: String): SmimeCertInfoResponse
@@ -3786,6 +3792,7 @@ type Mutation {
3786
3792
  modifyContactList(contact: ModifyContactInput!): Contact
3787
3793
  createFolder(
3788
3794
  color: Int
3795
+ rgb: String
3789
3796
  fetchIfExists: Boolean
3790
3797
  flags: String
3791
3798
  name: String!
@@ -3928,9 +3935,10 @@ type Mutation {
3928
3935
  cancelPendingRemoteWipeSync(deviceId: String): Device
3929
3936
  subscribeDistributionList(op: String!, by: String, dl: String!): String
3930
3937
  distributionListAction(dlActions: DistributionListActionInput!): Boolean
3938
+ bounceMessage(message: RedirectMessgeInput): Boolean
3931
3939
  }
3932
3940
 
3933
3941
  schema {
3934
3942
  query: Query
3935
3943
  mutation: Mutation
3936
- }
3944
+ }
@@ -32,6 +32,7 @@ import {
32
32
  PreferencesInput,
33
33
  PropertiesInput,
34
34
  PurgetRevisionInput,
35
+ RedirectMessgeInput,
35
36
  RevokeRightsInput,
36
37
  SaveSMimeCertInputUpload,
37
38
  SearchFolderInput,
@@ -440,6 +441,7 @@ export function createZimbraSchema(options: ZimbraSchemaOptions): {
440
441
  blockDeviceSync: (_, { deviceId }) => {
441
442
  client.blockDeviceSync(deviceId);
442
443
  },
444
+ bounceMessage: (_, variables) => client.bounceMsg(variables as RedirectMessgeInput),
443
445
  accountOnlyRemoteWipeSync: (_, { deviceId }) => {
444
446
  client.accountOnlyRemoteWipeSync(deviceId);
445
447
  },