@zimbra/api-client 102.0.0 → 102.0.1-PREAPPS-9707.9e46b27.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 +15 -0
- package/dist/src/batch-client/index.d.ts +5 -1
- package/dist/src/batch-client/types.d.ts +8 -0
- package/dist/src/schema/generated-schema-types.d.ts +15 -0
- package/dist/zm-api-js-client.esm.js +25 -5
- package/dist/zm-api-js-client.esm.js.map +1 -1
- package/dist/zm-api-js-client.js +2 -2
- package/dist/zm-api-js-client.js.map +1 -1
- package/dist/zm-api-js-client.umd.js +3 -3
- package/dist/zm-api-js-client.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/batch-client/index.ts +14 -0
- package/src/batch-client/types.ts +10 -0
- package/src/schema/generated-schema-types.ts +19 -0
- package/src/schema/schema.graphql +15 -0
- package/src/schema/schema.ts +3 -1
- package/package-lock.json +0 -21073
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zimbra/api-client",
|
|
3
3
|
"amdName": "zmApiJsClient",
|
|
4
|
-
"version": "102.0.0",
|
|
4
|
+
"version": "102.0.1-PREAPPS-9707.9e46b27.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",
|
|
@@ -125,6 +125,7 @@ import {
|
|
|
125
125
|
AutoCompleteGALOptions,
|
|
126
126
|
AutoCompleteOptions,
|
|
127
127
|
ChangePasswordOptions,
|
|
128
|
+
CheckSpellingOptions,
|
|
128
129
|
CreateFolderOptions,
|
|
129
130
|
CreateSearchFolderOptions,
|
|
130
131
|
DiscoverRightOptions,
|
|
@@ -141,6 +142,7 @@ import {
|
|
|
141
142
|
GetMessageOptions,
|
|
142
143
|
GetSMimePublicCertsOptions,
|
|
143
144
|
LoginOptions,
|
|
145
|
+
Misspelled,
|
|
144
146
|
ModifyProfileImageOptions,
|
|
145
147
|
NoOpOptions,
|
|
146
148
|
RecoverAccountOptions,
|
|
@@ -2121,6 +2123,18 @@ export class ZimbraBatchClient {
|
|
|
2121
2123
|
});
|
|
2122
2124
|
};
|
|
2123
2125
|
|
|
2126
|
+
public checkSpelling = ({ text, ignore }: CheckSpellingOptions) =>
|
|
2127
|
+
this.jsonRequest({
|
|
2128
|
+
name: 'CheckSpelling',
|
|
2129
|
+
body: { _content: text, ignore: ignore?.join(',') }
|
|
2130
|
+
}).then(response => ({
|
|
2131
|
+
available: response.available,
|
|
2132
|
+
misspelled: (response.misspelled || []).map((m: Misspelled) => ({
|
|
2133
|
+
word: m.word,
|
|
2134
|
+
suggestions: (m.suggestions || '').split(',').filter(Boolean)
|
|
2135
|
+
}))
|
|
2136
|
+
}));
|
|
2137
|
+
|
|
2124
2138
|
private batchDataHandler = (requests: ReadonlyArray<RequestOptions>) =>
|
|
2125
2139
|
batchJsonRequest({
|
|
2126
2140
|
requests,
|
|
@@ -378,3 +378,13 @@ export interface DiscoverRightInput {
|
|
|
378
378
|
export interface DiscoverRightOptions {
|
|
379
379
|
right: Array<DiscoverRightInput>;
|
|
380
380
|
}
|
|
381
|
+
|
|
382
|
+
export interface CheckSpellingOptions {
|
|
383
|
+
text: string;
|
|
384
|
+
ignore: Array<string>;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
export interface Misspelled {
|
|
388
|
+
word: string;
|
|
389
|
+
suggestions: string;
|
|
390
|
+
}
|
|
@@ -853,6 +853,12 @@ export type CancelRuleInfo = {
|
|
|
853
853
|
tz?: Maybe<Scalars['String']['output']>;
|
|
854
854
|
};
|
|
855
855
|
|
|
856
|
+
export type CheckSpellingResponse = {
|
|
857
|
+
__typename?: 'CheckSpellingResponse';
|
|
858
|
+
available?: Maybe<Scalars['Boolean']['output']>;
|
|
859
|
+
misspelled?: Maybe<Array<Maybe<Misspelling>>>;
|
|
860
|
+
};
|
|
861
|
+
|
|
856
862
|
export type ClientInfoAttributes = {
|
|
857
863
|
__typename?: 'ClientInfoAttributes';
|
|
858
864
|
zimbraClassicWebClientDisabled?: Maybe<Scalars['Boolean']['output']>;
|
|
@@ -2598,6 +2604,12 @@ export type MimePartInput = {
|
|
|
2598
2604
|
url?: InputMaybe<Scalars['String']['input']>;
|
|
2599
2605
|
};
|
|
2600
2606
|
|
|
2607
|
+
export type Misspelling = {
|
|
2608
|
+
__typename?: 'Misspelling';
|
|
2609
|
+
suggestions?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
|
|
2610
|
+
word?: Maybe<Scalars['String']['output']>;
|
|
2611
|
+
};
|
|
2612
|
+
|
|
2601
2613
|
export enum Mode {
|
|
2602
2614
|
Html = 'html',
|
|
2603
2615
|
Text = 'text'
|
|
@@ -3659,6 +3671,7 @@ export type Query = {
|
|
|
3659
3671
|
accountInfo?: Maybe<AccountInfo>;
|
|
3660
3672
|
autoComplete?: Maybe<AutoCompleteResponse>;
|
|
3661
3673
|
autoCompleteGAL?: Maybe<AutoCompleteGalResponse>;
|
|
3674
|
+
checkSpelling?: Maybe<CheckSpellingResponse>;
|
|
3662
3675
|
clientInfo?: Maybe<ClientInfoType>;
|
|
3663
3676
|
discoverRights?: Maybe<DiscoverRights>;
|
|
3664
3677
|
downloadAttachment?: Maybe<Attachment>;
|
|
@@ -3730,6 +3743,12 @@ export type QueryAutoCompleteGalArgs = {
|
|
|
3730
3743
|
};
|
|
3731
3744
|
|
|
3732
3745
|
|
|
3746
|
+
export type QueryCheckSpellingArgs = {
|
|
3747
|
+
ignore?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
|
|
3748
|
+
text: Scalars['String']['input'];
|
|
3749
|
+
};
|
|
3750
|
+
|
|
3751
|
+
|
|
3733
3752
|
export type QueryClientInfoArgs = {
|
|
3734
3753
|
by?: InputMaybe<Scalars['String']['input']>;
|
|
3735
3754
|
domain?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -3530,6 +3530,16 @@ input DiscoverRightInput {
|
|
|
3530
3530
|
_content: String
|
|
3531
3531
|
}
|
|
3532
3532
|
|
|
3533
|
+
type Misspelling {
|
|
3534
|
+
word: String
|
|
3535
|
+
suggestions: [String]
|
|
3536
|
+
}
|
|
3537
|
+
|
|
3538
|
+
type CheckSpellingResponse {
|
|
3539
|
+
available: Boolean
|
|
3540
|
+
misspelled: [Misspelling]
|
|
3541
|
+
}
|
|
3542
|
+
|
|
3533
3543
|
# Zimbra GraphQL Queries
|
|
3534
3544
|
# - [[SOAP API Reference]](https://files.zimbra.com/docs/soap_api/8.7.11/api-reference/index.html)
|
|
3535
3545
|
# - [[SOAP Documentation]](https://github.com/Zimbra/zm-mailbox/blob/develop/store/docs/soap.txt)
|
|
@@ -3723,6 +3733,11 @@ type Query {
|
|
|
3723
3733
|
taskFolders: [Folder]
|
|
3724
3734
|
|
|
3725
3735
|
getTag: [Tag]
|
|
3736
|
+
|
|
3737
|
+
checkSpelling(
|
|
3738
|
+
text: String!
|
|
3739
|
+
ignore: [String]
|
|
3740
|
+
): CheckSpellingResponse
|
|
3726
3741
|
}
|
|
3727
3742
|
|
|
3728
3743
|
type Mutation {
|
package/src/schema/schema.ts
CHANGED
|
@@ -57,6 +57,7 @@ import {
|
|
|
57
57
|
AutoCompleteGALOptions,
|
|
58
58
|
AutoCompleteOptions,
|
|
59
59
|
ChangePasswordOptions,
|
|
60
|
+
CheckSpellingOptions,
|
|
60
61
|
ClientInfoInput,
|
|
61
62
|
CreateFolderOptions,
|
|
62
63
|
CreateSearchFolderOptions,
|
|
@@ -212,7 +213,8 @@ export function createZimbraSchema(options: ZimbraSchemaOptions): {
|
|
|
212
213
|
taskFolders: client.taskFolders,
|
|
213
214
|
getWhiteBlackList: client.getWhiteBlackList,
|
|
214
215
|
getAppSpecificPasswords: client.getAppSpecificPasswords,
|
|
215
|
-
getTag: client.getTag
|
|
216
|
+
getTag: client.getTag,
|
|
217
|
+
checkSpelling: (_, variables) => client.checkSpelling(variables as CheckSpellingOptions)
|
|
216
218
|
},
|
|
217
219
|
//resolveType is necessary to differentiate for any Union or Interfaces
|
|
218
220
|
MailItem: {
|