@zimbra/api-client 91.0.0 → 92.1.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": "91.0.0",
4
+ "version": "92.1.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",
@@ -37,6 +37,9 @@
37
37
  "graphql"
38
38
  ],
39
39
  "repository": "Zimbra/zm-api-js-client",
40
+ "engines": {
41
+ "node": ">=18.12.0"
42
+ },
40
43
  "license": "BSD-3-Clause",
41
44
  "lint-staged": {
42
45
  "**/*.ts": [
@@ -47,7 +50,7 @@
47
50
  "@apollo/client": "3.4.16",
48
51
  "@graphql-tools/schema": "^10.0.3",
49
52
  "dataloader": "^2.2.2",
50
- "graphql": "^15.8.0",
53
+ "graphql": "^16.9.0",
51
54
  "lodash": "^4.17.21",
52
55
  "mitt": "^3.0.0"
53
56
  },
@@ -75,7 +78,7 @@
75
78
  "cross-var": "^1.1.0",
76
79
  "husky": "^8.0.3",
77
80
  "is-ci": "^3.0.1",
78
- "lint-staged": "13.2.3",
81
+ "lint-staged": "15.2.8",
79
82
  "mocha": "^10.2.0",
80
83
  "npm-run-all": "^4.1.5",
81
84
  "prettier": "^2.6.2",
@@ -24,17 +24,17 @@ export class LocalBatchLink extends ApolloLink {
24
24
  let emittedResponse = false;
25
25
  Promise.all(
26
26
  operations.map((operation: Operation) => {
27
- const query = print(operation.query);
28
27
  const { operationName, variables = {} } = operation;
28
+ const params = {
29
+ schema: this.schema,
30
+ source: print(operation.query),
31
+ rootValue: null,
32
+ contextValue: operation.getContext() || options.context || {},
33
+ variableValues: variables,
34
+ operationName: operationName
35
+ };
29
36
 
30
- return graphql(
31
- this.schema,
32
- query,
33
- null,
34
- operation.getContext() || options.context || {},
35
- variables,
36
- operationName
37
- );
37
+ return graphql(params);
38
38
  })
39
39
  )
40
40
  .then((results: FetchResult[]) => {
@@ -1,6 +1,5 @@
1
1
  import { defaultDataIdFromObject, InMemoryCache, InMemoryCacheConfig } from '@apollo/client/core';
2
2
  import get from 'lodash/get';
3
- import isEqual from 'lodash/isEqual';
4
3
  import uniqWith from 'lodash/uniqWith';
5
4
  import { EmailAddress } from './types';
6
5
 
@@ -97,7 +96,10 @@ const typePolicies = {
97
96
  fields: {
98
97
  emailAddresses: {
99
98
  merge(existing: EmailAddress[], incoming: EmailAddress[]) {
100
- return uniqWith([...(existing || []), ...(incoming || [])], isEqual);
99
+ return uniqWith(
100
+ [...(existing || []), ...(incoming || [])],
101
+ (a, b) => a.address === b.address && a.type === b.type
102
+ );
101
103
  }
102
104
  }
103
105
  }
@@ -952,13 +952,14 @@ export class ZimbraBatchClient {
952
952
  singleRequest: true
953
953
  }).then(Boolean);
954
954
 
955
- public freeBusy = ({ start, end, names }: FreeBusyOptions) =>
955
+ public freeBusy = ({ start, end, names, excludeUid }: FreeBusyOptions) =>
956
956
  this.jsonRequest({
957
957
  name: 'GetFreeBusy',
958
958
  body: {
959
959
  s: start,
960
960
  e: end,
961
- name: names.join(',')
961
+ name: names.join(','),
962
+ ...(excludeUid && { excludeUid })
962
963
  }
963
964
  }).then(res => normalize(FreeBusy)(res.usr));
964
965
 
@@ -75,6 +75,7 @@ export interface ZimbraClientOptions {
75
75
 
76
76
  export interface FreeBusyOptions {
77
77
  end: number;
78
+ excludeUid: string;
78
79
  names: Array<string>;
79
80
  start: number;
80
81
  }
@@ -841,6 +841,8 @@ export type ClientInfoAttributes = {
841
841
  zimbraClassicWebClientDisabled?: Maybe<Scalars['Boolean']['output']>;
842
842
  zimbraFeatureResetPasswordStatus?: Maybe<ResetPasswordStatus>;
843
843
  zimbraHelpModernURL?: Maybe<Scalars['String']['output']>;
844
+ zimbraSkinLogoAppBanner?: Maybe<Scalars['String']['output']>;
845
+ zimbraSkinLogoLoginBanner?: Maybe<Scalars['String']['output']>;
844
846
  zimbraWebClientLoginURL?: Maybe<Scalars['String']['output']>;
845
847
  zimbraWebClientLogoutURL?: Maybe<Scalars['String']['output']>;
846
848
  zimbraWebClientSkipLogoff?: Maybe<Scalars['Boolean']['output']>;
@@ -3507,6 +3509,7 @@ export type PreferencesInput = {
3507
3509
  zimbraPrefComposeFormat?: InputMaybe<Mode>;
3508
3510
  zimbraPrefDefaultCalendarId?: InputMaybe<Scalars['ID']['input']>;
3509
3511
  zimbraPrefDelegatedSendSaveTarget?: InputMaybe<PrefDelegatedSendSaveTarget>;
3512
+ zimbraPrefDeleteInviteOnReply?: InputMaybe<Scalars['Boolean']['input']>;
3510
3513
  zimbraPrefDisplayExternalImages?: InputMaybe<Scalars['Boolean']['input']>;
3511
3514
  zimbraPrefDisplayTimeInMailList?: InputMaybe<Scalars['Boolean']['input']>;
3512
3515
  zimbraPrefExternalSendersType?: InputMaybe<ExternalSendersType>;
@@ -3686,6 +3689,7 @@ export type QueryDownloadMessageArgs = {
3686
3689
 
3687
3690
  export type QueryFreeBusyArgs = {
3688
3691
  end?: InputMaybe<Scalars['Float']['input']>;
3692
+ excludeUid?: InputMaybe<Scalars['String']['input']>;
3689
3693
  names: Array<Scalars['String']['input']>;
3690
3694
  start?: InputMaybe<Scalars['Float']['input']>;
3691
3695
  };
@@ -4204,6 +4208,7 @@ export enum SearchType {
4204
4208
  Document = 'document',
4205
4209
  Message = 'message',
4206
4210
  Task = 'task',
4211
+ Unknown = 'unknown',
4207
4212
  Wiki = 'wiki'
4208
4213
  }
4209
4214
 
@@ -202,6 +202,7 @@ enum SearchType {
202
202
  task
203
203
  wiki
204
204
  document
205
+ unknown
205
206
  }
206
207
 
207
208
  enum ContactType {
@@ -511,6 +512,8 @@ type ClientInfoAttributes {
511
512
  zimbraFeatureResetPasswordStatus: ResetPasswordStatus
512
513
  zimbraHelpModernURL: String
513
514
  zimbraClassicWebClientDisabled: Boolean
515
+ zimbraSkinLogoLoginBanner: String
516
+ zimbraSkinLogoAppBanner: String
514
517
  }
515
518
 
516
519
  type ClientInfoType {
@@ -2744,6 +2747,7 @@ input PreferencesInput {
2744
2747
  zimbraPrefPowerPasteEnabled: Boolean
2745
2748
  zimbraPrefDisplayTimeInMailList: Boolean
2746
2749
  zimbraPrefPrimaryTwoFactorAuthMethod: String
2750
+ zimbraPrefDeleteInviteOnReply: Boolean
2747
2751
  }
2748
2752
 
2749
2753
  input ModifyIdentityInput {
@@ -3472,7 +3476,7 @@ type Query {
3472
3476
  downloadDocument(id: ID!, url: String!): Attachment
3473
3477
  listDocumentRevisions(id: ID!, version: Int!, count: Int!): Document
3474
3478
  discoverRights(right: [DiscoverRightInput!]!): DiscoverRights
3475
- freeBusy(names: [String!]!, start: Float, end: Float): [FreeBusy]
3479
+ freeBusy(names: [String!]!, start: Float, end: Float, excludeUid: String): [FreeBusy]
3476
3480
  getContact(
3477
3481
  id: ID
3478
3482
  ids: [ID!]