@droz-js/sdk 0.9.22 → 0.9.24
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 +1 -1
- package/src/drozbase-ws.d.ts +3 -0
- package/src/drozbase.d.ts +3 -0
- package/src/sdks/campaigns.d.ts +322 -0
- package/src/sdks/campaigns.js +91 -0
- package/src/sdks/drozbase.d.ts +7 -0
- package/src/sdks/drozbase.js +11 -3
- package/src/sdks/drozcommons.d.ts +1 -1
- package/src/sdks/nucleus.d.ts +1 -1
- package/src/sdks/whatsapp.d.ts +154 -0
- package/src/sdks/whatsapp.js +108 -1
- package/src/whatsapp.d.ts +14 -0
package/package.json
CHANGED
package/src/drozbase-ws.d.ts
CHANGED
|
@@ -611,6 +611,9 @@ declare const DrozBaseWs_base: new () => {
|
|
|
611
611
|
onNotification(variables?: import("./sdks/drozbase").Exact<{
|
|
612
612
|
[key: string]: never;
|
|
613
613
|
}>, options?: unknown): AsyncIterableIterator<import("./sdks/drozbase").OnNotificationSubscription>;
|
|
614
|
+
createInitialContent(variables?: import("./sdks/drozbase").Exact<{
|
|
615
|
+
[key: string]: never;
|
|
616
|
+
}>, options?: unknown): Promise<import("./sdks/drozbase").CreateInitialContentMutation>;
|
|
614
617
|
getOrganizationSettings(variables?: import("./sdks/drozbase").Exact<{
|
|
615
618
|
[key: string]: never;
|
|
616
619
|
}>, options?: unknown): Promise<import("./sdks/drozbase").GetOrganizationSettingsQuery>;
|
package/src/drozbase.d.ts
CHANGED
|
@@ -614,6 +614,9 @@ declare const DrozBase_base: new (options?: import("./client/http").HttpClientOp
|
|
|
614
614
|
onNotification(variables?: import("./sdks/drozbase").Exact<{
|
|
615
615
|
[key: string]: never;
|
|
616
616
|
}>, options?: unknown): AsyncIterableIterator<import("./sdks/drozbase").OnNotificationSubscription>;
|
|
617
|
+
createInitialContent(variables?: import("./sdks/drozbase").Exact<{
|
|
618
|
+
[key: string]: never;
|
|
619
|
+
}>, options?: unknown): Promise<import("./sdks/drozbase").CreateInitialContentMutation>;
|
|
617
620
|
getOrganizationSettings(variables?: import("./sdks/drozbase").Exact<{
|
|
618
621
|
[key: string]: never;
|
|
619
622
|
}>, options?: unknown): Promise<import("./sdks/drozbase").GetOrganizationSettingsQuery>;
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
export type Maybe<T> = T;
|
|
2
|
+
export type InputMaybe<T> = T;
|
|
3
|
+
export type Exact<T extends {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
}> = {
|
|
6
|
+
[K in keyof T]: T[K];
|
|
7
|
+
};
|
|
8
|
+
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
9
|
+
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
10
|
+
};
|
|
11
|
+
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
12
|
+
[SubKey in K]: Maybe<T[SubKey]>;
|
|
13
|
+
};
|
|
14
|
+
export type MakeEmpty<T extends {
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}, K extends keyof T> = {
|
|
17
|
+
[_ in K]?: never;
|
|
18
|
+
};
|
|
19
|
+
export type Incremental<T> = T | {
|
|
20
|
+
[P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
|
|
21
|
+
};
|
|
22
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
23
|
+
export type Scalars = {
|
|
24
|
+
ID: {
|
|
25
|
+
input: string;
|
|
26
|
+
output: string;
|
|
27
|
+
};
|
|
28
|
+
String: {
|
|
29
|
+
input: string;
|
|
30
|
+
output: string;
|
|
31
|
+
};
|
|
32
|
+
Boolean: {
|
|
33
|
+
input: boolean;
|
|
34
|
+
output: boolean;
|
|
35
|
+
};
|
|
36
|
+
Int: {
|
|
37
|
+
input: number;
|
|
38
|
+
output: number;
|
|
39
|
+
};
|
|
40
|
+
Float: {
|
|
41
|
+
input: number;
|
|
42
|
+
output: number;
|
|
43
|
+
};
|
|
44
|
+
Base64: {
|
|
45
|
+
input: object;
|
|
46
|
+
output: string;
|
|
47
|
+
};
|
|
48
|
+
CountryCode: {
|
|
49
|
+
input: string;
|
|
50
|
+
output: string;
|
|
51
|
+
};
|
|
52
|
+
Currency: {
|
|
53
|
+
input: string;
|
|
54
|
+
output: string;
|
|
55
|
+
};
|
|
56
|
+
DRN: {
|
|
57
|
+
input: string;
|
|
58
|
+
output: string;
|
|
59
|
+
};
|
|
60
|
+
Date: {
|
|
61
|
+
input: Date;
|
|
62
|
+
output: Date;
|
|
63
|
+
};
|
|
64
|
+
DateTime: {
|
|
65
|
+
input: Date;
|
|
66
|
+
output: Date;
|
|
67
|
+
};
|
|
68
|
+
EmailAddress: {
|
|
69
|
+
input: string;
|
|
70
|
+
output: string;
|
|
71
|
+
};
|
|
72
|
+
IPAddress: {
|
|
73
|
+
input: string;
|
|
74
|
+
output: string;
|
|
75
|
+
};
|
|
76
|
+
JSON: {
|
|
77
|
+
input: any;
|
|
78
|
+
output: any;
|
|
79
|
+
};
|
|
80
|
+
JSONObject: {
|
|
81
|
+
input: any;
|
|
82
|
+
output: any;
|
|
83
|
+
};
|
|
84
|
+
Locale: {
|
|
85
|
+
input: string;
|
|
86
|
+
output: string;
|
|
87
|
+
};
|
|
88
|
+
Number: {
|
|
89
|
+
input: string | number;
|
|
90
|
+
output: number;
|
|
91
|
+
};
|
|
92
|
+
PhoneNumber: {
|
|
93
|
+
input: string;
|
|
94
|
+
output: string;
|
|
95
|
+
};
|
|
96
|
+
Set: {
|
|
97
|
+
input: any;
|
|
98
|
+
output: any[];
|
|
99
|
+
};
|
|
100
|
+
Tag: {
|
|
101
|
+
input: string;
|
|
102
|
+
output: string;
|
|
103
|
+
};
|
|
104
|
+
TenantId: {
|
|
105
|
+
input: string;
|
|
106
|
+
output: string;
|
|
107
|
+
};
|
|
108
|
+
Timezone: {
|
|
109
|
+
input: string;
|
|
110
|
+
output: string;
|
|
111
|
+
};
|
|
112
|
+
URL: {
|
|
113
|
+
input: string;
|
|
114
|
+
output: string;
|
|
115
|
+
};
|
|
116
|
+
VariableName: {
|
|
117
|
+
input: string;
|
|
118
|
+
output: string;
|
|
119
|
+
};
|
|
120
|
+
Void: {
|
|
121
|
+
input: void;
|
|
122
|
+
output: void;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
export type AgentInfo = {
|
|
126
|
+
id: Scalars['ID']['output'];
|
|
127
|
+
name: Scalars['String']['output'];
|
|
128
|
+
picture?: Maybe<Scalars['String']['output']>;
|
|
129
|
+
};
|
|
130
|
+
export declare enum AppInstanceStatus {
|
|
131
|
+
Active = "Active",
|
|
132
|
+
Failing = "Failing",
|
|
133
|
+
Inactive = "Inactive"
|
|
134
|
+
}
|
|
135
|
+
export type Campaign = {
|
|
136
|
+
createdAt: Scalars['DateTime']['output'];
|
|
137
|
+
id: Scalars['ID']['output'];
|
|
138
|
+
instanceIdTrigger?: Maybe<Scalars['ID']['output']>;
|
|
139
|
+
name: Scalars['String']['output'];
|
|
140
|
+
objective?: Maybe<Scalars['String']['output']>;
|
|
141
|
+
templateId?: Maybe<Scalars['ID']['output']>;
|
|
142
|
+
updatedAt: Scalars['DateTime']['output'];
|
|
143
|
+
};
|
|
144
|
+
export declare enum Can {
|
|
145
|
+
Manage = "manage",
|
|
146
|
+
Read = "read",
|
|
147
|
+
Remove = "remove",
|
|
148
|
+
Write = "write"
|
|
149
|
+
}
|
|
150
|
+
export type CreateCampaignInput = {
|
|
151
|
+
credentialId?: InputMaybe<Scalars['ID']['input']>;
|
|
152
|
+
instanceIdTrigger?: InputMaybe<Scalars['ID']['input']>;
|
|
153
|
+
name: Scalars['String']['input'];
|
|
154
|
+
objective?: InputMaybe<Scalars['String']['input']>;
|
|
155
|
+
templateId?: InputMaybe<Scalars['ID']['input']>;
|
|
156
|
+
};
|
|
157
|
+
export type I18nText = {
|
|
158
|
+
lang: Scalars['Locale']['output'];
|
|
159
|
+
value: Scalars['String']['output'];
|
|
160
|
+
};
|
|
161
|
+
export type I18nTextInput = {
|
|
162
|
+
lang: Scalars['Locale']['input'];
|
|
163
|
+
value: Scalars['String']['input'];
|
|
164
|
+
};
|
|
165
|
+
export type Mutation = {
|
|
166
|
+
createCampaign?: Maybe<Campaign>;
|
|
167
|
+
removeCampaign?: Maybe<Campaign>;
|
|
168
|
+
updateCampaign?: Maybe<Campaign>;
|
|
169
|
+
version?: Maybe<Scalars['String']['output']>;
|
|
170
|
+
};
|
|
171
|
+
export type MutationCreateCampaignArgs = {
|
|
172
|
+
input: CreateCampaignInput;
|
|
173
|
+
};
|
|
174
|
+
export type MutationRemoveCampaignArgs = {
|
|
175
|
+
input: RemoveCampaignInput;
|
|
176
|
+
};
|
|
177
|
+
export type MutationUpdateCampaignArgs = {
|
|
178
|
+
input: UpdateCampaignInput;
|
|
179
|
+
};
|
|
180
|
+
export type NumberMatcher = {
|
|
181
|
+
btw?: Maybe<Array<Scalars['Number']['output']>>;
|
|
182
|
+
eq?: Maybe<Scalars['Number']['output']>;
|
|
183
|
+
gt?: Maybe<Scalars['Number']['output']>;
|
|
184
|
+
gte?: Maybe<Scalars['Number']['output']>;
|
|
185
|
+
lt?: Maybe<Scalars['Number']['output']>;
|
|
186
|
+
lte?: Maybe<Scalars['Number']['output']>;
|
|
187
|
+
ne?: Maybe<Scalars['Number']['output']>;
|
|
188
|
+
};
|
|
189
|
+
export type NumberMatcherInput = {
|
|
190
|
+
btw?: InputMaybe<Array<Scalars['Number']['input']>>;
|
|
191
|
+
eq?: InputMaybe<Scalars['Number']['input']>;
|
|
192
|
+
gt?: InputMaybe<Scalars['Number']['input']>;
|
|
193
|
+
gte?: InputMaybe<Scalars['Number']['input']>;
|
|
194
|
+
lt?: InputMaybe<Scalars['Number']['input']>;
|
|
195
|
+
lte?: InputMaybe<Scalars['Number']['input']>;
|
|
196
|
+
ne?: InputMaybe<Scalars['Number']['input']>;
|
|
197
|
+
};
|
|
198
|
+
export type PageInfo = {
|
|
199
|
+
hasNext: Scalars['Boolean']['output'];
|
|
200
|
+
next?: Maybe<Scalars['Base64']['output']>;
|
|
201
|
+
};
|
|
202
|
+
export type Query = {
|
|
203
|
+
app?: Maybe<Scalars['DRN']['output']>;
|
|
204
|
+
getCampaign?: Maybe<Campaign>;
|
|
205
|
+
getHttpEndpoint?: Maybe<Scalars['String']['output']>;
|
|
206
|
+
listCampaigns?: Maybe<Array<Maybe<Campaign>>>;
|
|
207
|
+
version?: Maybe<Scalars['String']['output']>;
|
|
208
|
+
};
|
|
209
|
+
export type QueryGetCampaignArgs = {
|
|
210
|
+
id: Scalars['ID']['input'];
|
|
211
|
+
};
|
|
212
|
+
export type RemoveCampaignInput = {
|
|
213
|
+
id: Scalars['ID']['input'];
|
|
214
|
+
};
|
|
215
|
+
export type SearchResultsFacet = {
|
|
216
|
+
name: Scalars['String']['output'];
|
|
217
|
+
stats?: Maybe<SearchResultsFacetStats>;
|
|
218
|
+
values?: Maybe<Array<SearchResultsFacetValue>>;
|
|
219
|
+
};
|
|
220
|
+
export type SearchResultsFacetStats = {
|
|
221
|
+
max?: Maybe<Scalars['Float']['output']>;
|
|
222
|
+
min?: Maybe<Scalars['Float']['output']>;
|
|
223
|
+
};
|
|
224
|
+
export type SearchResultsFacetValue = {
|
|
225
|
+
count: Scalars['Float']['output'];
|
|
226
|
+
value: Scalars['String']['output'];
|
|
227
|
+
};
|
|
228
|
+
export type SearchResultsStats = {
|
|
229
|
+
found: Scalars['Float']['output'];
|
|
230
|
+
outOf: Scalars['Float']['output'];
|
|
231
|
+
page: Scalars['Float']['output'];
|
|
232
|
+
perPage: Scalars['Float']['output'];
|
|
233
|
+
searchTime: Scalars['Float']['output'];
|
|
234
|
+
totalPages: Scalars['Float']['output'];
|
|
235
|
+
};
|
|
236
|
+
export type StringMatcher = {
|
|
237
|
+
btw?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
|
|
238
|
+
ct?: Maybe<Scalars['String']['output']>;
|
|
239
|
+
cti?: Maybe<Scalars['String']['output']>;
|
|
240
|
+
eq?: Maybe<Scalars['String']['output']>;
|
|
241
|
+
eqi?: Maybe<Scalars['String']['output']>;
|
|
242
|
+
gt?: Maybe<Scalars['String']['output']>;
|
|
243
|
+
gte?: Maybe<Scalars['String']['output']>;
|
|
244
|
+
in?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
|
|
245
|
+
lt?: Maybe<Scalars['String']['output']>;
|
|
246
|
+
lte?: Maybe<Scalars['String']['output']>;
|
|
247
|
+
ne?: Maybe<Scalars['String']['output']>;
|
|
248
|
+
};
|
|
249
|
+
export type StringMatcherInput = {
|
|
250
|
+
btw?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
|
|
251
|
+
ct?: InputMaybe<Scalars['String']['input']>;
|
|
252
|
+
cti?: InputMaybe<Scalars['String']['input']>;
|
|
253
|
+
eq?: InputMaybe<Scalars['String']['input']>;
|
|
254
|
+
eqi?: InputMaybe<Scalars['String']['input']>;
|
|
255
|
+
gt?: InputMaybe<Scalars['String']['input']>;
|
|
256
|
+
gte?: InputMaybe<Scalars['String']['input']>;
|
|
257
|
+
in?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
|
|
258
|
+
lt?: InputMaybe<Scalars['String']['input']>;
|
|
259
|
+
lte?: InputMaybe<Scalars['String']['input']>;
|
|
260
|
+
ne?: InputMaybe<Scalars['String']['input']>;
|
|
261
|
+
};
|
|
262
|
+
export declare enum Typenames {
|
|
263
|
+
Any = "Any",
|
|
264
|
+
Campaigns = "Campaigns",
|
|
265
|
+
GraphqlConnections = "GraphqlConnections",
|
|
266
|
+
GraphqlSubscriptions = "GraphqlSubscriptions"
|
|
267
|
+
}
|
|
268
|
+
export type UpdateCampaignInput = {
|
|
269
|
+
credentialId?: InputMaybe<Scalars['ID']['input']>;
|
|
270
|
+
id: Scalars['ID']['input'];
|
|
271
|
+
instanceIdTrigger?: InputMaybe<Scalars['ID']['input']>;
|
|
272
|
+
name?: InputMaybe<Scalars['String']['input']>;
|
|
273
|
+
objective?: InputMaybe<Scalars['String']['input']>;
|
|
274
|
+
templateId?: InputMaybe<Scalars['ID']['input']>;
|
|
275
|
+
};
|
|
276
|
+
export type CampaignFragment = Pick<Campaign, 'id' | 'name' | 'objective' | 'instanceIdTrigger' | 'templateId' | 'createdAt' | 'updatedAt'>;
|
|
277
|
+
export type GetCampaignQueryVariables = Exact<{
|
|
278
|
+
id: Scalars['ID']['input'];
|
|
279
|
+
}>;
|
|
280
|
+
export type GetCampaignQuery = {
|
|
281
|
+
getCampaign?: Maybe<CampaignFragment>;
|
|
282
|
+
};
|
|
283
|
+
export type ListCampaignsQueryVariables = Exact<{
|
|
284
|
+
[key: string]: never;
|
|
285
|
+
}>;
|
|
286
|
+
export type ListCampaignsQuery = {
|
|
287
|
+
listCampaigns?: Maybe<Array<Maybe<CampaignFragment>>>;
|
|
288
|
+
};
|
|
289
|
+
export type CreateCampaignMutationVariables = Exact<{
|
|
290
|
+
input: CreateCampaignInput;
|
|
291
|
+
}>;
|
|
292
|
+
export type CreateCampaignMutation = {
|
|
293
|
+
createCampaign?: Maybe<CampaignFragment>;
|
|
294
|
+
};
|
|
295
|
+
export type UpdateCampaignMutationVariables = Exact<{
|
|
296
|
+
input: UpdateCampaignInput;
|
|
297
|
+
}>;
|
|
298
|
+
export type UpdateCampaignMutation = {
|
|
299
|
+
updateCampaign?: Maybe<CampaignFragment>;
|
|
300
|
+
};
|
|
301
|
+
export type RemoveCampaignMutationVariables = Exact<{
|
|
302
|
+
input: RemoveCampaignInput;
|
|
303
|
+
}>;
|
|
304
|
+
export type RemoveCampaignMutation = {
|
|
305
|
+
removeCampaign?: Maybe<CampaignFragment>;
|
|
306
|
+
};
|
|
307
|
+
export declare const CampaignFragmentDoc = "\n fragment campaign on Campaign {\n id\n name\n objective\n instanceIdTrigger\n templateId\n createdAt\n updatedAt\n}\n ";
|
|
308
|
+
export declare const GetCampaignDocument = "\n query getCampaign($id: ID!) {\n getCampaign(id: $id) {\n ...campaign\n }\n}\n \n fragment campaign on Campaign {\n id\n name\n objective\n instanceIdTrigger\n templateId\n createdAt\n updatedAt\n}\n ";
|
|
309
|
+
export declare const ListCampaignsDocument = "\n query listCampaigns {\n listCampaigns {\n ...campaign\n }\n}\n \n fragment campaign on Campaign {\n id\n name\n objective\n instanceIdTrigger\n templateId\n createdAt\n updatedAt\n}\n ";
|
|
310
|
+
export declare const CreateCampaignDocument = "\n mutation createCampaign($input: CreateCampaignInput!) {\n createCampaign(input: $input) {\n ...campaign\n }\n}\n \n fragment campaign on Campaign {\n id\n name\n objective\n instanceIdTrigger\n templateId\n createdAt\n updatedAt\n}\n ";
|
|
311
|
+
export declare const UpdateCampaignDocument = "\n mutation updateCampaign($input: UpdateCampaignInput!) {\n updateCampaign(input: $input) {\n ...campaign\n }\n}\n \n fragment campaign on Campaign {\n id\n name\n objective\n instanceIdTrigger\n templateId\n createdAt\n updatedAt\n}\n ";
|
|
312
|
+
export declare const RemoveCampaignDocument = "\n mutation removeCampaign($input: RemoveCampaignInput!) {\n removeCampaign(input: $input) {\n ...campaign\n }\n}\n \n fragment campaign on Campaign {\n id\n name\n objective\n instanceIdTrigger\n templateId\n createdAt\n updatedAt\n}\n ";
|
|
313
|
+
export type Requester<C = {}> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | AsyncIterableIterator<R>;
|
|
314
|
+
export declare function getSdk<C>(requester: Requester<C>): {
|
|
315
|
+
getCampaign(variables: GetCampaignQueryVariables, options?: C): Promise<GetCampaignQuery>;
|
|
316
|
+
listCampaigns(variables?: ListCampaignsQueryVariables, options?: C): Promise<ListCampaignsQuery>;
|
|
317
|
+
createCampaign(variables: CreateCampaignMutationVariables, options?: C): Promise<CreateCampaignMutation>;
|
|
318
|
+
updateCampaign(variables: UpdateCampaignMutationVariables, options?: C): Promise<UpdateCampaignMutation>;
|
|
319
|
+
removeCampaign(variables: RemoveCampaignMutationVariables, options?: C): Promise<RemoveCampaignMutation>;
|
|
320
|
+
};
|
|
321
|
+
export type Sdk = ReturnType<typeof getSdk>;
|
|
322
|
+
export declare const serviceName = "@droz/campaigns";
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.serviceName = exports.RemoveCampaignDocument = exports.UpdateCampaignDocument = exports.CreateCampaignDocument = exports.ListCampaignsDocument = exports.GetCampaignDocument = exports.CampaignFragmentDoc = exports.Typenames = exports.Can = exports.AppInstanceStatus = void 0;
|
|
5
|
+
exports.getSdk = getSdk;
|
|
6
|
+
var AppInstanceStatus;
|
|
7
|
+
(function (AppInstanceStatus) {
|
|
8
|
+
AppInstanceStatus["Active"] = "Active";
|
|
9
|
+
AppInstanceStatus["Failing"] = "Failing";
|
|
10
|
+
AppInstanceStatus["Inactive"] = "Inactive";
|
|
11
|
+
})(AppInstanceStatus || (exports.AppInstanceStatus = AppInstanceStatus = {}));
|
|
12
|
+
var Can;
|
|
13
|
+
(function (Can) {
|
|
14
|
+
Can["Manage"] = "manage";
|
|
15
|
+
Can["Read"] = "read";
|
|
16
|
+
Can["Remove"] = "remove";
|
|
17
|
+
Can["Write"] = "write";
|
|
18
|
+
})(Can || (exports.Can = Can = {}));
|
|
19
|
+
var Typenames;
|
|
20
|
+
(function (Typenames) {
|
|
21
|
+
Typenames["Any"] = "Any";
|
|
22
|
+
Typenames["Campaigns"] = "Campaigns";
|
|
23
|
+
Typenames["GraphqlConnections"] = "GraphqlConnections";
|
|
24
|
+
Typenames["GraphqlSubscriptions"] = "GraphqlSubscriptions";
|
|
25
|
+
})(Typenames || (exports.Typenames = Typenames = {}));
|
|
26
|
+
exports.CampaignFragmentDoc = `
|
|
27
|
+
fragment campaign on Campaign {
|
|
28
|
+
id
|
|
29
|
+
name
|
|
30
|
+
objective
|
|
31
|
+
instanceIdTrigger
|
|
32
|
+
templateId
|
|
33
|
+
createdAt
|
|
34
|
+
updatedAt
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
exports.GetCampaignDocument = `
|
|
38
|
+
query getCampaign($id: ID!) {
|
|
39
|
+
getCampaign(id: $id) {
|
|
40
|
+
...campaign
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
${exports.CampaignFragmentDoc}`;
|
|
44
|
+
exports.ListCampaignsDocument = `
|
|
45
|
+
query listCampaigns {
|
|
46
|
+
listCampaigns {
|
|
47
|
+
...campaign
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
${exports.CampaignFragmentDoc}`;
|
|
51
|
+
exports.CreateCampaignDocument = `
|
|
52
|
+
mutation createCampaign($input: CreateCampaignInput!) {
|
|
53
|
+
createCampaign(input: $input) {
|
|
54
|
+
...campaign
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
${exports.CampaignFragmentDoc}`;
|
|
58
|
+
exports.UpdateCampaignDocument = `
|
|
59
|
+
mutation updateCampaign($input: UpdateCampaignInput!) {
|
|
60
|
+
updateCampaign(input: $input) {
|
|
61
|
+
...campaign
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
${exports.CampaignFragmentDoc}`;
|
|
65
|
+
exports.RemoveCampaignDocument = `
|
|
66
|
+
mutation removeCampaign($input: RemoveCampaignInput!) {
|
|
67
|
+
removeCampaign(input: $input) {
|
|
68
|
+
...campaign
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
${exports.CampaignFragmentDoc}`;
|
|
72
|
+
function getSdk(requester) {
|
|
73
|
+
return {
|
|
74
|
+
getCampaign(variables, options) {
|
|
75
|
+
return requester(exports.GetCampaignDocument, variables, options);
|
|
76
|
+
},
|
|
77
|
+
listCampaigns(variables, options) {
|
|
78
|
+
return requester(exports.ListCampaignsDocument, variables, options);
|
|
79
|
+
},
|
|
80
|
+
createCampaign(variables, options) {
|
|
81
|
+
return requester(exports.CreateCampaignDocument, variables, options);
|
|
82
|
+
},
|
|
83
|
+
updateCampaign(variables, options) {
|
|
84
|
+
return requester(exports.UpdateCampaignDocument, variables, options);
|
|
85
|
+
},
|
|
86
|
+
removeCampaign(variables, options) {
|
|
87
|
+
return requester(exports.RemoveCampaignDocument, variables, options);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
exports.serviceName = '@droz/campaigns';
|
package/src/sdks/drozbase.d.ts
CHANGED
|
@@ -1029,6 +1029,7 @@ export type Mutation = {
|
|
|
1029
1029
|
createFormResponse?: Maybe<FormResponse>;
|
|
1030
1030
|
createFormSection: FormFormSection;
|
|
1031
1031
|
createGroup?: Maybe<Group>;
|
|
1032
|
+
createInitialContent?: Maybe<Scalars['Boolean']['output']>;
|
|
1032
1033
|
createIntegrationConfig?: Maybe<IntegrationConfig>;
|
|
1033
1034
|
createQuiz?: Maybe<Quiz>;
|
|
1034
1035
|
createQuizEntry?: Maybe<QuizQuizEntry>;
|
|
@@ -4551,6 +4552,10 @@ export type OnNotificationSubscriptionVariables = Exact<{
|
|
|
4551
4552
|
export type OnNotificationSubscription = {
|
|
4552
4553
|
onNotification?: Maybe<NotificationFragment>;
|
|
4553
4554
|
};
|
|
4555
|
+
export type CreateInitialContentMutationVariables = Exact<{
|
|
4556
|
+
[key: string]: never;
|
|
4557
|
+
}>;
|
|
4558
|
+
export type CreateInitialContentMutation = Pick<Mutation, 'createInitialContent'>;
|
|
4554
4559
|
export type OrganizationSettingsInfoFragment = Pick<OrganizationSettingsInfo, 'title' | 'logo' | 'description' | 'content' | 'showTitleOnHomePage' | 'showLogoOnHomePage' | 'domain'>;
|
|
4555
4560
|
export type OrganizationSettingsLicenseFragment = Pick<OrganizationSettingsLicense, 'storageInBytes' | 'maxUsers' | 'readOnly'>;
|
|
4556
4561
|
export type OrganizationSettingsUsageFragment = Pick<OrganizationSettingsUsage, 'storageInBytes'>;
|
|
@@ -5458,6 +5463,7 @@ export declare const MarkNotificationsAsReadDocument = "\n mutation markNotif
|
|
|
5458
5463
|
export declare const UnsubscribeDocument = "\n mutation unsubscribe($input: UnsubscribeInput!) {\n unsubscribe(input: $input)\n}\n ";
|
|
5459
5464
|
export declare const NotifyPlanUpgradeDocument = "\n mutation notifyPlanUpgrade($input: NotifyPlanUpgradeInput!) {\n notifyPlanUpgrade(input: $input)\n}\n ";
|
|
5460
5465
|
export declare const OnNotificationDocument = "\n subscription onNotification {\n onNotification {\n ...notification\n }\n}\n \n fragment notification on Notification {\n id\n actor {\n ...userInfo\n }\n action\n ref {\n ...record\n }\n alternativeRef {\n ...record\n }\n content\n seen\n read\n createdAt\n}\n \n\n fragment userInfo on UserInfo {\n username\n name\n picture\n enabled\n bio\n department\n}\n \n\n fragment record on Record {\n id\n slug\n title\n trail\n typename\n color\n thumbnailUrl\n downloadUrl\n origin\n identifier\n createdAt\n updatedAt\n status\n}\n ";
|
|
5466
|
+
export declare const CreateInitialContentDocument = "\n mutation createInitialContent {\n createInitialContent\n}\n ";
|
|
5461
5467
|
export declare const GetOrganizationSettingsDocument = "\n query getOrganizationSettings {\n organizationSettingsInfo {\n ...organizationSettingsInfo\n }\n organizationSettingsContent {\n ...organizationSettingsContent\n }\n organizationSettingsTheme {\n ...organizationSettingsTheme\n }\n organizationSettingsTypography {\n ...organizationSettingsTypography\n }\n organizationSettingsGroups {\n ...organizationSettingsGroups\n }\n organizationSettingsSecurity {\n ...organizationSettingsSecurity\n }\n organizationSettingsGame {\n ...organizationSettingsGame\n }\n organizationSettingsLicense {\n ...organizationSettingsLicense\n }\n organizationSettingsUsage {\n ...organizationSettingsUsage\n }\n}\n \n fragment organizationSettingsInfo on OrganizationSettingsInfo {\n title\n logo\n description\n content\n showTitleOnHomePage\n showLogoOnHomePage\n domain\n}\n \n\n fragment organizationSettingsContent on OrganizationSettingsContent {\n requireTags\n enableAnswers\n notifyRecordUpdates\n scriptsHeader\n scriptsFooter\n}\n \n\n fragment organizationSettingsTheme on OrganizationSettingsTheme {\n enabled\n primaryColor\n backgroundImage\n showUnsplashInfo\n keepThemeOnHeader\n clipPath\n}\n \n\n fragment organizationSettingsTypography on OrganizationSettingsTypography {\n fontFamily\n letterSpacing\n h1 {\n ...typographyStyle\n }\n h2 {\n ...typographyStyle\n }\n h3 {\n ...typographyStyle\n }\n h4 {\n ...typographyStyle\n }\n h5 {\n ...typographyStyle\n }\n h6 {\n ...typographyStyle\n }\n p {\n ...typographyStyle\n }\n cssStyle\n}\n \n\n fragment typographyStyle on TypographyStyle {\n color\n fontSize\n fontVariant\n fontWeight\n letterSpacing\n lineHeight\n marginBottom\n marginTop\n textTransform\n}\n \n\n fragment organizationSettingsGroups on OrganizationSettingsGroups {\n groupsMapping\n}\n \n\n fragment organizationSettingsSecurity on OrganizationSettingsSecurity {\n requiresAuthentication\n doNotAllowUserSignup\n allowedEmailDomains\n allowedIPs\n allowedContentTypes\n maxFileSizeInBytes\n sessionCookieSameSite\n}\n \n\n fragment organizationSettingsGame on OrganizationSettingsGame {\n variablePointsFactor\n enableGameWeeklyDigest\n}\n \n\n fragment organizationSettingsLicense on OrganizationSettingsLicense {\n storageInBytes\n maxUsers\n readOnly\n}\n \n\n fragment organizationSettingsUsage on OrganizationSettingsUsage {\n storageInBytes\n}\n ";
|
|
5462
5468
|
export declare const GetOrganizationSettingsInfoDocument = "\n query getOrganizationSettingsInfo {\n organizationSettingsInfo {\n ...organizationSettingsInfo\n }\n}\n \n fragment organizationSettingsInfo on OrganizationSettingsInfo {\n title\n logo\n description\n content\n showTitleOnHomePage\n showLogoOnHomePage\n domain\n}\n ";
|
|
5463
5469
|
export declare const GetOrganizationSettingsContentDocument = "\n query getOrganizationSettingsContent {\n organizationSettingsContent {\n ...organizationSettingsContent\n }\n}\n \n fragment organizationSettingsContent on OrganizationSettingsContent {\n requireTags\n enableAnswers\n notifyRecordUpdates\n scriptsHeader\n scriptsFooter\n}\n ";
|
|
@@ -5729,6 +5735,7 @@ export declare function getSdk<C>(requester: Requester<C>): {
|
|
|
5729
5735
|
unsubscribe(variables: UnsubscribeMutationVariables, options?: C): Promise<UnsubscribeMutation>;
|
|
5730
5736
|
notifyPlanUpgrade(variables: NotifyPlanUpgradeMutationVariables, options?: C): Promise<NotifyPlanUpgradeMutation>;
|
|
5731
5737
|
onNotification(variables?: OnNotificationSubscriptionVariables, options?: C): AsyncIterableIterator<OnNotificationSubscription>;
|
|
5738
|
+
createInitialContent(variables?: CreateInitialContentMutationVariables, options?: C): Promise<CreateInitialContentMutation>;
|
|
5732
5739
|
getOrganizationSettings(variables?: GetOrganizationSettingsQueryVariables, options?: C): Promise<GetOrganizationSettingsQuery>;
|
|
5733
5740
|
getOrganizationSettingsInfo(variables?: GetOrganizationSettingsInfoQueryVariables, options?: C): Promise<GetOrganizationSettingsInfoQuery>;
|
|
5734
5741
|
getOrganizationSettingsContent(variables?: GetOrganizationSettingsContentQueryVariables, options?: C): Promise<GetOrganizationSettingsContentQuery>;
|
package/src/sdks/drozbase.js
CHANGED
|
@@ -6,9 +6,9 @@ exports.SearchHitFragmentDoc = exports.FormFragmentDoc = exports.CourseFragmentD
|
|
|
6
6
|
exports.DeleteGroupDocument = exports.UpdateGroupDocument = exports.CreateGroupDocument = exports.ResetUserPasswordDocument = exports.UpdateUserNameDocument = exports.UpdateUserEmailDocument = exports.SetUserPasswordDocument = exports.DeleteUserDocument = exports.AddUserDocument = exports.UpdateProfileDocument = exports.GenerateImpersonateTokenDocument = exports.UsersCsvDocument = exports.GetUserGroupsDocument = exports.GetGroupAdminsDocument = exports.GetGroupUsersDocument = exports.GetAllGroupsDocument = exports.GetGroupDocument = exports.GetAllUsersDocument = exports.GetUsersDocument = exports.GetUserByEmailDocument = exports.GetUserDocument = exports.GetMeDocument = exports.GetAuthInfoDocument = exports.GetAuthTokenDocument = exports.GetSessionDocument = exports.GetPermissionsMatrixDocument = exports.RemoveApprovalFlowStepDocument = exports.UpdateApprovalFlowStepDocument = exports.CreateApprovalFlowStepDocument = exports.RemoveApprovalFlowDocument = exports.UpdateApprovalFlowDocument = exports.CreateApprovalFlowDocument = exports.EstimateApprovalFlowStepApproversDocument = exports.GetApprovalFlowExecutionDocument = exports.GetApprovalFlowDocument = exports.QueryVectorStoreDocument = exports.FindAnswerDocument = exports.GenerateRecordAnalyticsEmbedUrlDocument = exports.GenerateOrganizationAnalyticsEmbedUrlDocument = exports.WebhookFragmentDoc = exports.TaskFragmentDoc = exports.RecordWithParentFragmentDoc = exports.SystemInfoFragmentDoc = exports.AuthInfoFragmentDoc = exports.ContentTypeFragmentDoc = exports.SpaceSettingsFragmentDoc = exports.SpaceApprovalSettingsFragmentDoc = exports.SpaceContentSettingsFragmentDoc = exports.SecuritySettingsFragmentDoc = exports.FacetsFragmentDoc = void 0;
|
|
7
7
|
exports.ApproveAndPromoteCourseVersionDocument = exports.PromoteCourseVersionDocument = exports.ApproveCourseVersionDocument = exports.RequestChangesOnCourseVersionDocument = exports.SubmitCourseVersionForApprovalDocument = exports.RegenerateCourseCertificateDocument = exports.RemoveCourseCertificateSettingsDocument = exports.SetCourseCertificateSettingsDocument = exports.SetCourseGeneralSettingsDocument = exports.SetCourseQuizSettingsDocument = exports.SubmitCourseQuizEntryResponseDocument = exports.ReEnrollCourseDocument = exports.UnenrollCourseDocument = exports.BatchEnrollCourseDocument = exports.EnrollCourseDocument = exports.RemoveCourseDocument = exports.UpdateCourseDocument = exports.EditCourseDocument = exports.CreateCourseDocument = exports.ListEnrolledCoursesDocument = exports.GetCourseEnrolledUsersDocument = exports.GetCourseProgressInfoDocument = exports.GetCourseSettingsDocument = exports.GetCourseEntryDocument = exports.GetCourseLessonDocument = exports.GetCourseChapterDocument = exports.GetCourseVersionsDocument = exports.GetCoursesDocument = exports.GetCourseDocument = exports.FullDumpDocument = exports.FullReindexDocument = exports.ReindexDocument = exports.DecryptDocument = exports.EncryptDocument = exports.RestoreItemFromTrashBinDocument = exports.CreateSymlinkDocument = exports.IgnoreSimilarityForDocsDocument = exports.TriggerSimilarityCheckDocument = exports.FindSimilarItemsDocument = exports.ListSimilarItemsDocument = exports.GetTrashBinItemsDocument = exports.GetTrailDocument = exports.GetRecordByOriginDocument = exports.GetRecordInfoDocument = exports.GetRecordsDocument = exports.GetRecordDocument = exports.UpdateChecklistItemDocument = exports.GetChecklistItemDocument = exports.RemoveUserFromGroupDocument = exports.AddUserToGroupDocument = void 0;
|
|
8
8
|
exports.RequestChangesOnFormVersionDocument = exports.SubmitFormVersionForApprovalDocument = exports.RemoveFormDocument = exports.UpdateFormDocument = exports.EditFormDocument = exports.CreateFormDocument = exports.SearchFormResponsesDocument = exports.GetUserQuizResponsesDocument = exports.GetQuizEntriesDocument = exports.GetQuizDocument = exports.GetFormResponsesDocument = exports.GetFormResponseDocument = exports.GetFormSectionFieldsDocument = exports.GetFormSectionsDocument = exports.GetFormDocument = exports.DocToDocxDocument = exports.SetDocContentSettingsDocument = exports.ApproveAndPromoteDocVersionDocument = exports.PromoteDocVersionDocument = exports.ApproveDocVersionDocument = exports.RequestChangesOnDocVersionDocument = exports.SubmitDocVersionForApprovalDocument = exports.GenerateAndSetPrefixCodeForDocDocument = exports.CloneDocDocument = exports.RemoveDocDocument = exports.UpdateDocDocument = exports.EditDocDocument = exports.CreateDocDocument = exports.GetDocsByDateToRequireReviewDocument = exports.GetRecentlyViewedDocsDocument = exports.CompareDocsDocument = exports.GetDocSettingsDocument = exports.GetDocContentAsMarkdownDocument = exports.GetDocVersionsDocument = exports.GetDocsDocument = exports.GetDocByFilterDocument = exports.GetDocDocument = exports.RemoveDiscussionDocument = exports.UpdateDiscussionDocument = exports.CreateDiscussionDocument = exports.GetDiscussionDocument = exports.GetDiscussionsDocument = exports.CompleteCourseEntryDocument = exports.RemoveCourseEntryDocument = exports.UpdateCourseLessonDocument = exports.CreateCourseQuizDocument = exports.CreateCourseLessonDocument = exports.RemoveCourseChapterDocument = exports.UpdateCourseChapterDocument = exports.CreateCourseChapterDocument = void 0;
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
11
|
-
exports.serviceName = exports.TestWebhookDocument = exports.RemoveWebhookDocument = exports.UpdateWebhookDocument = exports.CreateWebhookDocument = exports.ListWebhooksDocument = exports.GetWebhookDocument = exports.OnDraftsDocument = exports.RemoveDraftDocument = exports.RemoveFavoriteDocument = exports.SaveFavoriteDocument = exports.SetUserPrefsDocument = exports.SearchUsersDocument = exports.IsUserFavoriteDocument = exports.GetUserFavoritesDocument = exports.GetUserPrefsDocument = exports.GetUserDraftsDocument = exports.OnTasksDocument = exports.RemoveTaskDocument = exports.LeaveTaskDocument = exports.GetUserTasksDocument = exports.GetTaskDocument = exports.BootstrapDocument = exports.GetSystemTimeDocument = exports.GetSystemInfoDocument = exports.OnFilesDocument = exports.OnFileDocument = exports.ConvertStorageToHtmlDocument = exports.GetFilesDocument = exports.GetFileDocument = exports.SetSpaceApprovalsSettingsDocument = void 0;
|
|
9
|
+
exports.GetOrganizationSettingsInfoDocument = exports.GetOrganizationSettingsDocument = exports.CreateInitialContentDocument = exports.OnNotificationDocument = exports.NotifyPlanUpgradeDocument = exports.UnsubscribeDocument = exports.MarkNotificationsAsReadDocument = exports.MarkAllNotificationsAsSeenDocument = exports.SetUserEmailPreferencesDocument = exports.GetUserEmailPreferencesDocument = exports.GetUserNotificationsDocument = exports.GetWebArticleDocument = exports.GetIconsDocument = exports.GetGifsDocument = exports.QueryByLabelsDocument = exports.UpdateZendeskArticleDocument = exports.MigrateDocument = exports.RemoveIntegrationConfigDocument = exports.UpdateIntegrationConfigDocument = exports.CreateIntegrationConfigDocument = exports.GetIntegrationConfigDocument = exports.ListIntegrationConfigsDocument = exports.GetGameLeaderboardGlobalDocument = exports.GetGameLeaderboardWeeklyDocument = exports.GetGameLeaderboardDailyDocument = exports.GetGameLeaderboardDocument = exports.UpdateFormResponsesTitlesDocument = exports.ReindexFormResponsesDocument = exports.SubmitQuizEntryResponseDocument = exports.UpdateCheckboxQuizEntryDocument = exports.UpdateRadioboxQuizEntryDocument = exports.ChangeQuizEntryTypeDocument = exports.RemoveQuizEntryDocument = exports.CreateQuizEntryDocument = exports.UpdateQuizDocument = exports.CreateQuizDocument = exports.SubmitFormFieldResponseDocument = exports.SubmitFormResponseDocument = exports.RemoveFormResponseDocument = exports.UpdateFormResponseDocument = exports.CreateFormResponseDocument = exports.RemoveFormFieldDocument = exports.UpdateFormFieldDocument = exports.CreateFormFieldDocument = exports.RemoveFormSectionDocument = exports.UpdateFormSectionDocument = exports.CreateFormSectionDocument = exports.ApproveAndPromoteFormVersionDocument = exports.PromoteFormVersionDocument = exports.ApproveFormVersionDocument = void 0;
|
|
10
|
+
exports.RemoveSpaceDocument = exports.MoveSpaceChildDocument = exports.MoveSpaceChildrenDocument = exports.UpdateSpaceDocument = exports.CreateSpaceDocument = exports.ListAvailablePrefixCodesDocument = exports.GetAllAllowedContentTypesDocument = exports.GetSpaceAllowedContentTypesDocument = exports.GetSpaceSettingsDocument = exports.ListSpaceContentsDocument = exports.GetSpacesDocument = exports.GetSpaceDocument = exports.SetSecuritySettingsDocument = exports.GetSecuritySettingsDocument = exports.RenameContentsTagDocument = exports.RemoveContentsTagDocument = exports.RemoveSynonymsDocument = exports.UpdateSynonymsDocument = exports.CreateSynonymsDocument = exports.ListSynonymsDocument = exports.SearchTagsForResourceDocument = exports.SearchForRelatedDocument = exports.SearchForFacetValuesDocument = exports.SearchDocument = exports.ToggleReactionDocument = exports.GetReactionsDocument = exports.RemovePermissionDocument = exports.SetPermissionDocument = exports.QueryPermissionsDocument = exports.GetPoliciesDocument = exports.GetPermissionsDocument = exports.GetSubjectsDocument = exports.RecomputeGroupMappingsDocument = exports.UpdateOrganizationSettingsReactionsDocument = exports.UpdateOrganizationSettingsGroupsDocument = exports.UpdateOrganizationSettingsGameDocument = exports.UpdateOrganizationSettingsSecurityDocument = exports.UpdateOrganizationSettingsThemeDocument = exports.UpdateOrganizationSettingsTypographyDocument = exports.UpdateOrganizationSettingsContentDocument = exports.UpdateOrganizationSettingsInfoDocument = exports.GetOrganizationSettingsUsageDocument = exports.GetOrganizationSettingsLicenseDocument = exports.GetOrganizationSettingsReactionsDocument = exports.GetOrganizationSettingsGroupsDocument = exports.GetOrganizationSettingsGameDocument = exports.GetOrganizationSettingsSecurityDocument = exports.GetOrganizationSettingsThemeDocument = exports.GetOrganizationSettingsTypographyDocument = exports.GetOrganizationSettingsContentDocument = void 0;
|
|
11
|
+
exports.serviceName = exports.TestWebhookDocument = exports.RemoveWebhookDocument = exports.UpdateWebhookDocument = exports.CreateWebhookDocument = exports.ListWebhooksDocument = exports.GetWebhookDocument = exports.OnDraftsDocument = exports.RemoveDraftDocument = exports.RemoveFavoriteDocument = exports.SaveFavoriteDocument = exports.SetUserPrefsDocument = exports.SearchUsersDocument = exports.IsUserFavoriteDocument = exports.GetUserFavoritesDocument = exports.GetUserPrefsDocument = exports.GetUserDraftsDocument = exports.OnTasksDocument = exports.RemoveTaskDocument = exports.LeaveTaskDocument = exports.GetUserTasksDocument = exports.GetTaskDocument = exports.BootstrapDocument = exports.GetSystemTimeDocument = exports.GetSystemInfoDocument = exports.OnFilesDocument = exports.OnFileDocument = exports.ConvertStorageToHtmlDocument = exports.GetFilesDocument = exports.GetFileDocument = exports.SetSpaceApprovalsSettingsDocument = exports.SetSpaceContentSettingsDocument = void 0;
|
|
12
12
|
exports.getSdk = getSdk;
|
|
13
13
|
var AppInstanceStatus;
|
|
14
14
|
(function (AppInstanceStatus) {
|
|
@@ -3452,6 +3452,11 @@ exports.OnNotificationDocument = `
|
|
|
3452
3452
|
${exports.NotificationFragmentDoc}
|
|
3453
3453
|
${exports.UserInfoFragmentDoc}
|
|
3454
3454
|
${exports.RecordFragmentDoc}`;
|
|
3455
|
+
exports.CreateInitialContentDocument = `
|
|
3456
|
+
mutation createInitialContent {
|
|
3457
|
+
createInitialContent
|
|
3458
|
+
}
|
|
3459
|
+
`;
|
|
3455
3460
|
exports.GetOrganizationSettingsDocument = `
|
|
3456
3461
|
query getOrganizationSettings {
|
|
3457
3462
|
organizationSettingsInfo {
|
|
@@ -4845,6 +4850,9 @@ function getSdk(requester) {
|
|
|
4845
4850
|
onNotification(variables, options) {
|
|
4846
4851
|
return requester(exports.OnNotificationDocument, variables, options);
|
|
4847
4852
|
},
|
|
4853
|
+
createInitialContent(variables, options) {
|
|
4854
|
+
return requester(exports.CreateInitialContentDocument, variables, options);
|
|
4855
|
+
},
|
|
4848
4856
|
getOrganizationSettings(variables, options) {
|
|
4849
4857
|
return requester(exports.GetOrganizationSettingsDocument, variables, options);
|
|
4850
4858
|
},
|
|
@@ -269,7 +269,7 @@ export type Mutation = {
|
|
|
269
269
|
deploy: Deployment;
|
|
270
270
|
destroy: Deployment;
|
|
271
271
|
joinTenantAsSuperAdmin?: Maybe<Scalars['String']['output']>;
|
|
272
|
-
leaveTenantOrganization?: Maybe<Scalars['
|
|
272
|
+
leaveTenantOrganization?: Maybe<Scalars['Void']['output']>;
|
|
273
273
|
removeAccountParameter?: Maybe<Parameter>;
|
|
274
274
|
removeGlobalParameter?: Maybe<Parameter>;
|
|
275
275
|
removeTenant: Tenant;
|
package/src/sdks/nucleus.d.ts
CHANGED
|
@@ -454,7 +454,7 @@ export type Mutation = {
|
|
|
454
454
|
editStateMachineConfig?: Maybe<StateMachineConfig>;
|
|
455
455
|
getOrCreateCustomer: Customer;
|
|
456
456
|
joinAsSuperAdmin?: Maybe<Scalars['String']['output']>;
|
|
457
|
-
leaveOrganization?: Maybe<Scalars['
|
|
457
|
+
leaveOrganization?: Maybe<Scalars['Void']['output']>;
|
|
458
458
|
patchSessionAttributes?: Maybe<Scalars['JSON']['output']>;
|
|
459
459
|
publishStateMachineConfig?: Maybe<StateMachineConfig>;
|
|
460
460
|
registerAppInstance: AppInstance;
|
package/src/sdks/whatsapp.d.ts
CHANGED
|
@@ -143,6 +143,19 @@ export type CreateWhatsAppInstanceInput = {
|
|
|
143
143
|
name: Scalars['String']['input'];
|
|
144
144
|
phoneNumberId: Scalars['String']['input'];
|
|
145
145
|
};
|
|
146
|
+
export type CreateWhatsAppTemplateInput = {
|
|
147
|
+
category: TemplateCategory;
|
|
148
|
+
components: TemplateComponentsInput;
|
|
149
|
+
credentialId: Scalars['String']['input'];
|
|
150
|
+
language: Scalars['String']['input'];
|
|
151
|
+
name: Scalars['String']['input'];
|
|
152
|
+
};
|
|
153
|
+
export type EditWhatsAppTemplateInput = {
|
|
154
|
+
category?: InputMaybe<TemplateCategory>;
|
|
155
|
+
components?: InputMaybe<TemplateComponentsInput>;
|
|
156
|
+
credentialId: Scalars['String']['input'];
|
|
157
|
+
id: Scalars['ID']['input'];
|
|
158
|
+
};
|
|
146
159
|
export type I18nText = {
|
|
147
160
|
lang: Scalars['Locale']['output'];
|
|
148
161
|
value: Scalars['String']['output'];
|
|
@@ -153,6 +166,8 @@ export type I18nTextInput = {
|
|
|
153
166
|
};
|
|
154
167
|
export type Mutation = {
|
|
155
168
|
createWhatsAppInstance?: Maybe<WhatsAppInstance>;
|
|
169
|
+
createWhatsAppTemplate?: Maybe<WhatsAppTemplate>;
|
|
170
|
+
editWhatsAppTemplate?: Maybe<Scalars['Void']['output']>;
|
|
156
171
|
removeWhatsAppInstance?: Maybe<WhatsAppInstance>;
|
|
157
172
|
updateWhatsAppInstance?: Maybe<WhatsAppInstance>;
|
|
158
173
|
version?: Maybe<Scalars['String']['output']>;
|
|
@@ -160,6 +175,12 @@ export type Mutation = {
|
|
|
160
175
|
export type MutationCreateWhatsAppInstanceArgs = {
|
|
161
176
|
input: CreateWhatsAppInstanceInput;
|
|
162
177
|
};
|
|
178
|
+
export type MutationCreateWhatsAppTemplateArgs = {
|
|
179
|
+
input: CreateWhatsAppTemplateInput;
|
|
180
|
+
};
|
|
181
|
+
export type MutationEditWhatsAppTemplateArgs = {
|
|
182
|
+
input: EditWhatsAppTemplateInput;
|
|
183
|
+
};
|
|
163
184
|
export type MutationRemoveWhatsAppInstanceArgs = {
|
|
164
185
|
input: RemoveWhatsAppInstanceInput;
|
|
165
186
|
};
|
|
@@ -192,16 +213,26 @@ export type Query = {
|
|
|
192
213
|
app?: Maybe<Scalars['DRN']['output']>;
|
|
193
214
|
getHttpEndpoint?: Maybe<Scalars['String']['output']>;
|
|
194
215
|
getWhatsAppInstance?: Maybe<WhatsAppInstance>;
|
|
216
|
+
getWhatsAppTemplate?: Maybe<WhatsAppTemplate>;
|
|
195
217
|
listWhatsAppInstances?: Maybe<Array<Maybe<WhatsAppInstance>>>;
|
|
196
218
|
listWhatsAppPhoneNumbers?: Maybe<Array<Maybe<WhatsAppPhoneNumber>>>;
|
|
219
|
+
listWhatsAppTemplates?: Maybe<Array<Maybe<WhatsAppTemplate>>>;
|
|
197
220
|
version?: Maybe<Scalars['String']['output']>;
|
|
198
221
|
};
|
|
199
222
|
export type QueryGetWhatsAppInstanceArgs = {
|
|
200
223
|
id: Scalars['ID']['input'];
|
|
201
224
|
};
|
|
225
|
+
export type QueryGetWhatsAppTemplateArgs = {
|
|
226
|
+
credentialsId: Scalars['ID']['input'];
|
|
227
|
+
id: Scalars['ID']['input'];
|
|
228
|
+
};
|
|
202
229
|
export type QueryListWhatsAppPhoneNumbersArgs = {
|
|
203
230
|
credentialsId: Scalars['ID']['input'];
|
|
204
231
|
};
|
|
232
|
+
export type QueryListWhatsAppTemplatesArgs = {
|
|
233
|
+
credentialsId: Scalars['ID']['input'];
|
|
234
|
+
status?: InputMaybe<TemplateStatus>;
|
|
235
|
+
};
|
|
205
236
|
export type RemoveWhatsAppInstanceInput = {
|
|
206
237
|
id: Scalars['ID']['input'];
|
|
207
238
|
};
|
|
@@ -252,6 +283,75 @@ export type StringMatcherInput = {
|
|
|
252
283
|
lte?: InputMaybe<Scalars['String']['input']>;
|
|
253
284
|
ne?: InputMaybe<Scalars['String']['input']>;
|
|
254
285
|
};
|
|
286
|
+
export type TemplateBaseComponent = {
|
|
287
|
+
example?: Maybe<Array<Scalars['String']['output']>>;
|
|
288
|
+
text: Scalars['String']['output'];
|
|
289
|
+
};
|
|
290
|
+
export type TemplateBaseComponentInput = {
|
|
291
|
+
example?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
292
|
+
text: Scalars['String']['input'];
|
|
293
|
+
};
|
|
294
|
+
export type TemplateButtonsComponent = {
|
|
295
|
+
example?: Maybe<Array<Scalars['String']['output']>>;
|
|
296
|
+
text: Scalars['String']['output'];
|
|
297
|
+
type: TemplateButtonsType;
|
|
298
|
+
url?: Maybe<Scalars['String']['output']>;
|
|
299
|
+
};
|
|
300
|
+
export type TemplateButtonsComponentInput = {
|
|
301
|
+
example?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
302
|
+
text: Scalars['String']['input'];
|
|
303
|
+
type: TemplateButtonsType;
|
|
304
|
+
url?: InputMaybe<Scalars['String']['input']>;
|
|
305
|
+
};
|
|
306
|
+
export declare enum TemplateButtonsType {
|
|
307
|
+
CopyCode = "COPY_CODE",
|
|
308
|
+
QuickReply = "QUICK_REPLY",
|
|
309
|
+
Url = "URL"
|
|
310
|
+
}
|
|
311
|
+
export declare enum TemplateCategory {
|
|
312
|
+
Authentication = "AUTHENTICATION",
|
|
313
|
+
Marketing = "MARKETING",
|
|
314
|
+
Utility = "UTILITY"
|
|
315
|
+
}
|
|
316
|
+
export declare enum TemplateComponentType {
|
|
317
|
+
Body = "BODY",
|
|
318
|
+
Buttons = "BUTTONS",
|
|
319
|
+
Footer = "FOOTER",
|
|
320
|
+
Header = "HEADER"
|
|
321
|
+
}
|
|
322
|
+
export type TemplateComponents = {
|
|
323
|
+
body: TemplateBaseComponent;
|
|
324
|
+
buttons?: Maybe<Array<Maybe<TemplateButtonsComponent>>>;
|
|
325
|
+
footer?: Maybe<TemplateBaseComponent>;
|
|
326
|
+
header?: Maybe<TemplateHeaderComponent>;
|
|
327
|
+
};
|
|
328
|
+
export type TemplateComponentsInput = {
|
|
329
|
+
body: TemplateBaseComponentInput;
|
|
330
|
+
buttons?: InputMaybe<Array<InputMaybe<TemplateButtonsComponentInput>>>;
|
|
331
|
+
footer?: InputMaybe<TemplateBaseComponentInput>;
|
|
332
|
+
header?: InputMaybe<TemplateHeaderComponentInput>;
|
|
333
|
+
};
|
|
334
|
+
export type TemplateHeaderComponent = {
|
|
335
|
+
example?: Maybe<Array<Scalars['String']['output']>>;
|
|
336
|
+
format: TemplateHeaderFormat;
|
|
337
|
+
text: Scalars['String']['output'];
|
|
338
|
+
};
|
|
339
|
+
export declare enum TemplateHeaderFormat {
|
|
340
|
+
Document = "DOCUMENT",
|
|
341
|
+
Image = "IMAGE",
|
|
342
|
+
Text = "TEXT",
|
|
343
|
+
Video = "VIDEO"
|
|
344
|
+
}
|
|
345
|
+
export declare enum TemplateStatus {
|
|
346
|
+
Approved = "APPROVED",
|
|
347
|
+
Deleted = "DELETED",
|
|
348
|
+
InAppeal = "IN_APPEAL",
|
|
349
|
+
LimitExceeded = "LIMIT_EXCEEDED",
|
|
350
|
+
Paused = "PAUSED",
|
|
351
|
+
Pending = "PENDING",
|
|
352
|
+
PendingDeletion = "PENDING_DELETION",
|
|
353
|
+
Rejected = "REJECTED"
|
|
354
|
+
}
|
|
255
355
|
export declare enum Typenames {
|
|
256
356
|
Any = "Any",
|
|
257
357
|
GraphqlConnections = "GraphqlConnections",
|
|
@@ -278,7 +378,28 @@ export type WhatsAppPhoneNumber = {
|
|
|
278
378
|
displayPhoneNumber: Scalars['String']['output'];
|
|
279
379
|
id: Scalars['String']['output'];
|
|
280
380
|
};
|
|
381
|
+
export type WhatsAppTemplate = {
|
|
382
|
+
category: TemplateCategory;
|
|
383
|
+
components: TemplateComponents;
|
|
384
|
+
id: Scalars['ID']['output'];
|
|
385
|
+
language: Scalars['String']['output'];
|
|
386
|
+
name: Scalars['String']['output'];
|
|
387
|
+
status: TemplateStatus;
|
|
388
|
+
};
|
|
389
|
+
export type TemplateHeaderComponentInput = {
|
|
390
|
+
example?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
391
|
+
format: TemplateHeaderFormat;
|
|
392
|
+
text: Scalars['String']['input'];
|
|
393
|
+
};
|
|
281
394
|
export type WhatsappInstanceFragment = Pick<WhatsAppInstance, 'id' | 'name' | 'drn' | 'phoneNumberId' | 'wabaId' | 'credentialsId' | 'createdAt' | 'updatedAt'>;
|
|
395
|
+
export type WhatsAppTemplateFragment = (Pick<WhatsAppTemplate, 'id' | 'name' | 'category' | 'status'> & {
|
|
396
|
+
components: {
|
|
397
|
+
body: Pick<TemplateBaseComponent, 'example' | 'text'>;
|
|
398
|
+
header?: Maybe<Pick<TemplateHeaderComponent, 'text' | 'example' | 'format'>>;
|
|
399
|
+
footer?: Maybe<Pick<TemplateBaseComponent, 'text' | 'example'>>;
|
|
400
|
+
buttons?: Maybe<Array<Maybe<Pick<TemplateButtonsComponent, 'example' | 'text' | 'type' | 'url'>>>>;
|
|
401
|
+
};
|
|
402
|
+
});
|
|
282
403
|
export type WhatsAppPhoneNumberFragment = Pick<WhatsAppPhoneNumber, 'id' | 'displayPhoneNumber'>;
|
|
283
404
|
export type GetWhatsAppInstanceQueryVariables = Exact<{
|
|
284
405
|
id: Scalars['ID']['input'];
|
|
@@ -298,6 +419,20 @@ export type ListWhatsAppPhoneNumbersQueryVariables = Exact<{
|
|
|
298
419
|
export type ListWhatsAppPhoneNumbersQuery = {
|
|
299
420
|
listWhatsAppPhoneNumbers?: Maybe<Array<Maybe<WhatsAppPhoneNumberFragment>>>;
|
|
300
421
|
};
|
|
422
|
+
export type ListWhatsAppTemplatesQueryVariables = Exact<{
|
|
423
|
+
credentialsId: Scalars['ID']['input'];
|
|
424
|
+
status?: InputMaybe<TemplateStatus>;
|
|
425
|
+
}>;
|
|
426
|
+
export type ListWhatsAppTemplatesQuery = {
|
|
427
|
+
listWhatsAppTemplates?: Maybe<Array<Maybe<WhatsAppTemplateFragment>>>;
|
|
428
|
+
};
|
|
429
|
+
export type GetWhatsAppTemplateQueryVariables = Exact<{
|
|
430
|
+
id: Scalars['ID']['input'];
|
|
431
|
+
credentialsId: Scalars['ID']['input'];
|
|
432
|
+
}>;
|
|
433
|
+
export type GetWhatsAppTemplateQuery = {
|
|
434
|
+
getWhatsAppTemplate?: Maybe<WhatsAppTemplateFragment>;
|
|
435
|
+
};
|
|
301
436
|
export type CreateWhatsAppInstanceMutationVariables = Exact<{
|
|
302
437
|
input: CreateWhatsAppInstanceInput;
|
|
303
438
|
}>;
|
|
@@ -316,22 +451,41 @@ export type RemoveWhatsAppInstanceMutationVariables = Exact<{
|
|
|
316
451
|
export type RemoveWhatsAppInstanceMutation = {
|
|
317
452
|
removeWhatsAppInstance?: Maybe<WhatsappInstanceFragment>;
|
|
318
453
|
};
|
|
454
|
+
export type CreateWhatsAppTemplateMutationVariables = Exact<{
|
|
455
|
+
input: CreateWhatsAppTemplateInput;
|
|
456
|
+
}>;
|
|
457
|
+
export type CreateWhatsAppTemplateMutation = {
|
|
458
|
+
createWhatsAppTemplate?: Maybe<Pick<WhatsAppTemplate, 'id' | 'name' | 'status' | 'category'>>;
|
|
459
|
+
};
|
|
460
|
+
export type EditWhatsAppTemplateMutationVariables = Exact<{
|
|
461
|
+
input: EditWhatsAppTemplateInput;
|
|
462
|
+
}>;
|
|
463
|
+
export type EditWhatsAppTemplateMutation = Pick<Mutation, 'editWhatsAppTemplate'>;
|
|
319
464
|
export declare const WhatsappInstanceFragmentDoc = "\n fragment whatsappInstance on WhatsAppInstance {\n id\n name\n drn\n phoneNumberId\n wabaId\n credentialsId\n createdAt\n updatedAt\n}\n ";
|
|
465
|
+
export declare const WhatsAppTemplateFragmentDoc = "\n fragment whatsAppTemplate on WhatsAppTemplate {\n id\n name\n category\n status\n components {\n body {\n example\n text\n }\n header {\n text\n example\n format\n }\n footer {\n text\n example\n }\n buttons {\n example\n text\n type\n url\n }\n }\n}\n ";
|
|
320
466
|
export declare const WhatsAppPhoneNumberFragmentDoc = "\n fragment whatsAppPhoneNumber on WhatsAppPhoneNumber {\n id\n displayPhoneNumber\n}\n ";
|
|
321
467
|
export declare const GetWhatsAppInstanceDocument = "\n query getWhatsAppInstance($id: ID!) {\n getWhatsAppInstance(id: $id) {\n ...whatsappInstance\n }\n}\n \n fragment whatsappInstance on WhatsAppInstance {\n id\n name\n drn\n phoneNumberId\n wabaId\n credentialsId\n createdAt\n updatedAt\n}\n ";
|
|
322
468
|
export declare const ListWhatsAppInstancesDocument = "\n query listWhatsAppInstances {\n listWhatsAppInstances {\n ...whatsappInstance\n }\n}\n \n fragment whatsappInstance on WhatsAppInstance {\n id\n name\n drn\n phoneNumberId\n wabaId\n credentialsId\n createdAt\n updatedAt\n}\n ";
|
|
323
469
|
export declare const ListWhatsAppPhoneNumbersDocument = "\n query listWhatsAppPhoneNumbers($credentialsId: ID!) {\n listWhatsAppPhoneNumbers(credentialsId: $credentialsId) {\n ...whatsAppPhoneNumber\n }\n}\n \n fragment whatsAppPhoneNumber on WhatsAppPhoneNumber {\n id\n displayPhoneNumber\n}\n ";
|
|
470
|
+
export declare const ListWhatsAppTemplatesDocument = "\n query listWhatsAppTemplates($credentialsId: ID!, $status: TemplateStatus) {\n listWhatsAppTemplates(credentialsId: $credentialsId, status: $status) {\n ...whatsAppTemplate\n }\n}\n \n fragment whatsAppTemplate on WhatsAppTemplate {\n id\n name\n category\n status\n components {\n body {\n example\n text\n }\n header {\n text\n example\n format\n }\n footer {\n text\n example\n }\n buttons {\n example\n text\n type\n url\n }\n }\n}\n ";
|
|
471
|
+
export declare const GetWhatsAppTemplateDocument = "\n query getWhatsAppTemplate($id: ID!, $credentialsId: ID!) {\n getWhatsAppTemplate(id: $id, credentialsId: $credentialsId) {\n ...whatsAppTemplate\n }\n}\n \n fragment whatsAppTemplate on WhatsAppTemplate {\n id\n name\n category\n status\n components {\n body {\n example\n text\n }\n header {\n text\n example\n format\n }\n footer {\n text\n example\n }\n buttons {\n example\n text\n type\n url\n }\n }\n}\n ";
|
|
324
472
|
export declare const CreateWhatsAppInstanceDocument = "\n mutation createWhatsAppInstance($input: CreateWhatsAppInstanceInput!) {\n createWhatsAppInstance(input: $input) {\n ...whatsappInstance\n }\n}\n \n fragment whatsappInstance on WhatsAppInstance {\n id\n name\n drn\n phoneNumberId\n wabaId\n credentialsId\n createdAt\n updatedAt\n}\n ";
|
|
325
473
|
export declare const UpdateWhatsAppInstanceDocument = "\n mutation updateWhatsAppInstance($input: UpdateWhatsAppInstanceInput!) {\n updateWhatsAppInstance(input: $input) {\n ...whatsappInstance\n }\n}\n \n fragment whatsappInstance on WhatsAppInstance {\n id\n name\n drn\n phoneNumberId\n wabaId\n credentialsId\n createdAt\n updatedAt\n}\n ";
|
|
326
474
|
export declare const RemoveWhatsAppInstanceDocument = "\n mutation removeWhatsAppInstance($input: RemoveWhatsAppInstanceInput!) {\n removeWhatsAppInstance(input: $input) {\n ...whatsappInstance\n }\n}\n \n fragment whatsappInstance on WhatsAppInstance {\n id\n name\n drn\n phoneNumberId\n wabaId\n credentialsId\n createdAt\n updatedAt\n}\n ";
|
|
475
|
+
export declare const CreateWhatsAppTemplateDocument = "\n mutation createWhatsAppTemplate($input: CreateWhatsAppTemplateInput!) {\n createWhatsAppTemplate(input: $input) {\n id\n name\n status\n category\n }\n}\n ";
|
|
476
|
+
export declare const EditWhatsAppTemplateDocument = "\n mutation editWhatsAppTemplate($input: EditWhatsAppTemplateInput!) {\n editWhatsAppTemplate(input: $input)\n}\n ";
|
|
327
477
|
export type Requester<C = {}> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | AsyncIterableIterator<R>;
|
|
328
478
|
export declare function getSdk<C>(requester: Requester<C>): {
|
|
329
479
|
getWhatsAppInstance(variables: GetWhatsAppInstanceQueryVariables, options?: C): Promise<GetWhatsAppInstanceQuery>;
|
|
330
480
|
listWhatsAppInstances(variables?: ListWhatsAppInstancesQueryVariables, options?: C): Promise<ListWhatsAppInstancesQuery>;
|
|
331
481
|
listWhatsAppPhoneNumbers(variables: ListWhatsAppPhoneNumbersQueryVariables, options?: C): Promise<ListWhatsAppPhoneNumbersQuery>;
|
|
482
|
+
listWhatsAppTemplates(variables: ListWhatsAppTemplatesQueryVariables, options?: C): Promise<ListWhatsAppTemplatesQuery>;
|
|
483
|
+
getWhatsAppTemplate(variables: GetWhatsAppTemplateQueryVariables, options?: C): Promise<GetWhatsAppTemplateQuery>;
|
|
332
484
|
createWhatsAppInstance(variables: CreateWhatsAppInstanceMutationVariables, options?: C): Promise<CreateWhatsAppInstanceMutation>;
|
|
333
485
|
updateWhatsAppInstance(variables: UpdateWhatsAppInstanceMutationVariables, options?: C): Promise<UpdateWhatsAppInstanceMutation>;
|
|
334
486
|
removeWhatsAppInstance(variables: RemoveWhatsAppInstanceMutationVariables, options?: C): Promise<RemoveWhatsAppInstanceMutation>;
|
|
487
|
+
createWhatsAppTemplate(variables: CreateWhatsAppTemplateMutationVariables, options?: C): Promise<CreateWhatsAppTemplateMutation>;
|
|
488
|
+
editWhatsAppTemplate(variables: EditWhatsAppTemplateMutationVariables, options?: C): Promise<EditWhatsAppTemplateMutation>;
|
|
335
489
|
};
|
|
336
490
|
export type Sdk = ReturnType<typeof getSdk>;
|
|
337
491
|
export declare const serviceName = "@droz/whatsapp";
|
package/src/sdks/whatsapp.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.serviceName = exports.RemoveWhatsAppInstanceDocument = exports.UpdateWhatsAppInstanceDocument = exports.CreateWhatsAppInstanceDocument = exports.ListWhatsAppPhoneNumbersDocument = exports.ListWhatsAppInstancesDocument = exports.GetWhatsAppInstanceDocument = exports.WhatsAppPhoneNumberFragmentDoc = exports.WhatsappInstanceFragmentDoc = exports.Typenames = exports.Can = exports.AppInstanceStatus = void 0;
|
|
4
|
+
exports.serviceName = exports.EditWhatsAppTemplateDocument = exports.CreateWhatsAppTemplateDocument = exports.RemoveWhatsAppInstanceDocument = exports.UpdateWhatsAppInstanceDocument = exports.CreateWhatsAppInstanceDocument = exports.GetWhatsAppTemplateDocument = exports.ListWhatsAppTemplatesDocument = exports.ListWhatsAppPhoneNumbersDocument = exports.ListWhatsAppInstancesDocument = exports.GetWhatsAppInstanceDocument = exports.WhatsAppPhoneNumberFragmentDoc = exports.WhatsAppTemplateFragmentDoc = exports.WhatsappInstanceFragmentDoc = exports.Typenames = exports.TemplateStatus = exports.TemplateHeaderFormat = exports.TemplateComponentType = exports.TemplateCategory = exports.TemplateButtonsType = exports.Can = exports.AppInstanceStatus = void 0;
|
|
5
5
|
exports.getSdk = getSdk;
|
|
6
6
|
var AppInstanceStatus;
|
|
7
7
|
(function (AppInstanceStatus) {
|
|
@@ -16,6 +16,43 @@ var Can;
|
|
|
16
16
|
Can["Remove"] = "remove";
|
|
17
17
|
Can["Write"] = "write";
|
|
18
18
|
})(Can || (exports.Can = Can = {}));
|
|
19
|
+
var TemplateButtonsType;
|
|
20
|
+
(function (TemplateButtonsType) {
|
|
21
|
+
TemplateButtonsType["CopyCode"] = "COPY_CODE";
|
|
22
|
+
TemplateButtonsType["QuickReply"] = "QUICK_REPLY";
|
|
23
|
+
TemplateButtonsType["Url"] = "URL";
|
|
24
|
+
})(TemplateButtonsType || (exports.TemplateButtonsType = TemplateButtonsType = {}));
|
|
25
|
+
var TemplateCategory;
|
|
26
|
+
(function (TemplateCategory) {
|
|
27
|
+
TemplateCategory["Authentication"] = "AUTHENTICATION";
|
|
28
|
+
TemplateCategory["Marketing"] = "MARKETING";
|
|
29
|
+
TemplateCategory["Utility"] = "UTILITY";
|
|
30
|
+
})(TemplateCategory || (exports.TemplateCategory = TemplateCategory = {}));
|
|
31
|
+
var TemplateComponentType;
|
|
32
|
+
(function (TemplateComponentType) {
|
|
33
|
+
TemplateComponentType["Body"] = "BODY";
|
|
34
|
+
TemplateComponentType["Buttons"] = "BUTTONS";
|
|
35
|
+
TemplateComponentType["Footer"] = "FOOTER";
|
|
36
|
+
TemplateComponentType["Header"] = "HEADER";
|
|
37
|
+
})(TemplateComponentType || (exports.TemplateComponentType = TemplateComponentType = {}));
|
|
38
|
+
var TemplateHeaderFormat;
|
|
39
|
+
(function (TemplateHeaderFormat) {
|
|
40
|
+
TemplateHeaderFormat["Document"] = "DOCUMENT";
|
|
41
|
+
TemplateHeaderFormat["Image"] = "IMAGE";
|
|
42
|
+
TemplateHeaderFormat["Text"] = "TEXT";
|
|
43
|
+
TemplateHeaderFormat["Video"] = "VIDEO";
|
|
44
|
+
})(TemplateHeaderFormat || (exports.TemplateHeaderFormat = TemplateHeaderFormat = {}));
|
|
45
|
+
var TemplateStatus;
|
|
46
|
+
(function (TemplateStatus) {
|
|
47
|
+
TemplateStatus["Approved"] = "APPROVED";
|
|
48
|
+
TemplateStatus["Deleted"] = "DELETED";
|
|
49
|
+
TemplateStatus["InAppeal"] = "IN_APPEAL";
|
|
50
|
+
TemplateStatus["LimitExceeded"] = "LIMIT_EXCEEDED";
|
|
51
|
+
TemplateStatus["Paused"] = "PAUSED";
|
|
52
|
+
TemplateStatus["Pending"] = "PENDING";
|
|
53
|
+
TemplateStatus["PendingDeletion"] = "PENDING_DELETION";
|
|
54
|
+
TemplateStatus["Rejected"] = "REJECTED";
|
|
55
|
+
})(TemplateStatus || (exports.TemplateStatus = TemplateStatus = {}));
|
|
19
56
|
var Typenames;
|
|
20
57
|
(function (Typenames) {
|
|
21
58
|
Typenames["Any"] = "Any";
|
|
@@ -35,6 +72,35 @@ exports.WhatsappInstanceFragmentDoc = `
|
|
|
35
72
|
updatedAt
|
|
36
73
|
}
|
|
37
74
|
`;
|
|
75
|
+
exports.WhatsAppTemplateFragmentDoc = `
|
|
76
|
+
fragment whatsAppTemplate on WhatsAppTemplate {
|
|
77
|
+
id
|
|
78
|
+
name
|
|
79
|
+
category
|
|
80
|
+
status
|
|
81
|
+
components {
|
|
82
|
+
body {
|
|
83
|
+
example
|
|
84
|
+
text
|
|
85
|
+
}
|
|
86
|
+
header {
|
|
87
|
+
text
|
|
88
|
+
example
|
|
89
|
+
format
|
|
90
|
+
}
|
|
91
|
+
footer {
|
|
92
|
+
text
|
|
93
|
+
example
|
|
94
|
+
}
|
|
95
|
+
buttons {
|
|
96
|
+
example
|
|
97
|
+
text
|
|
98
|
+
type
|
|
99
|
+
url
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
`;
|
|
38
104
|
exports.WhatsAppPhoneNumberFragmentDoc = `
|
|
39
105
|
fragment whatsAppPhoneNumber on WhatsAppPhoneNumber {
|
|
40
106
|
id
|
|
@@ -62,6 +128,20 @@ exports.ListWhatsAppPhoneNumbersDocument = `
|
|
|
62
128
|
}
|
|
63
129
|
}
|
|
64
130
|
${exports.WhatsAppPhoneNumberFragmentDoc}`;
|
|
131
|
+
exports.ListWhatsAppTemplatesDocument = `
|
|
132
|
+
query listWhatsAppTemplates($credentialsId: ID!, $status: TemplateStatus) {
|
|
133
|
+
listWhatsAppTemplates(credentialsId: $credentialsId, status: $status) {
|
|
134
|
+
...whatsAppTemplate
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
${exports.WhatsAppTemplateFragmentDoc}`;
|
|
138
|
+
exports.GetWhatsAppTemplateDocument = `
|
|
139
|
+
query getWhatsAppTemplate($id: ID!, $credentialsId: ID!) {
|
|
140
|
+
getWhatsAppTemplate(id: $id, credentialsId: $credentialsId) {
|
|
141
|
+
...whatsAppTemplate
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
${exports.WhatsAppTemplateFragmentDoc}`;
|
|
65
145
|
exports.CreateWhatsAppInstanceDocument = `
|
|
66
146
|
mutation createWhatsAppInstance($input: CreateWhatsAppInstanceInput!) {
|
|
67
147
|
createWhatsAppInstance(input: $input) {
|
|
@@ -83,6 +163,21 @@ exports.RemoveWhatsAppInstanceDocument = `
|
|
|
83
163
|
}
|
|
84
164
|
}
|
|
85
165
|
${exports.WhatsappInstanceFragmentDoc}`;
|
|
166
|
+
exports.CreateWhatsAppTemplateDocument = `
|
|
167
|
+
mutation createWhatsAppTemplate($input: CreateWhatsAppTemplateInput!) {
|
|
168
|
+
createWhatsAppTemplate(input: $input) {
|
|
169
|
+
id
|
|
170
|
+
name
|
|
171
|
+
status
|
|
172
|
+
category
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
`;
|
|
176
|
+
exports.EditWhatsAppTemplateDocument = `
|
|
177
|
+
mutation editWhatsAppTemplate($input: EditWhatsAppTemplateInput!) {
|
|
178
|
+
editWhatsAppTemplate(input: $input)
|
|
179
|
+
}
|
|
180
|
+
`;
|
|
86
181
|
function getSdk(requester) {
|
|
87
182
|
return {
|
|
88
183
|
getWhatsAppInstance(variables, options) {
|
|
@@ -94,6 +189,12 @@ function getSdk(requester) {
|
|
|
94
189
|
listWhatsAppPhoneNumbers(variables, options) {
|
|
95
190
|
return requester(exports.ListWhatsAppPhoneNumbersDocument, variables, options);
|
|
96
191
|
},
|
|
192
|
+
listWhatsAppTemplates(variables, options) {
|
|
193
|
+
return requester(exports.ListWhatsAppTemplatesDocument, variables, options);
|
|
194
|
+
},
|
|
195
|
+
getWhatsAppTemplate(variables, options) {
|
|
196
|
+
return requester(exports.GetWhatsAppTemplateDocument, variables, options);
|
|
197
|
+
},
|
|
97
198
|
createWhatsAppInstance(variables, options) {
|
|
98
199
|
return requester(exports.CreateWhatsAppInstanceDocument, variables, options);
|
|
99
200
|
},
|
|
@@ -102,6 +203,12 @@ function getSdk(requester) {
|
|
|
102
203
|
},
|
|
103
204
|
removeWhatsAppInstance(variables, options) {
|
|
104
205
|
return requester(exports.RemoveWhatsAppInstanceDocument, variables, options);
|
|
206
|
+
},
|
|
207
|
+
createWhatsAppTemplate(variables, options) {
|
|
208
|
+
return requester(exports.CreateWhatsAppTemplateDocument, variables, options);
|
|
209
|
+
},
|
|
210
|
+
editWhatsAppTemplate(variables, options) {
|
|
211
|
+
return requester(exports.EditWhatsAppTemplateDocument, variables, options);
|
|
105
212
|
}
|
|
106
213
|
};
|
|
107
214
|
}
|
package/src/whatsapp.d.ts
CHANGED
|
@@ -15,6 +15,14 @@ declare const WhatsApp_base: new (options?: import("./client/http").HttpClientOp
|
|
|
15
15
|
listWhatsAppPhoneNumbers(variables: import("./sdks/whatsapp").Exact<{
|
|
16
16
|
credentialsId: import("./sdks/whatsapp").Scalars["ID"]["input"];
|
|
17
17
|
}>, options?: unknown): Promise<import("./sdks/whatsapp").ListWhatsAppPhoneNumbersQuery>;
|
|
18
|
+
listWhatsAppTemplates(variables: import("./sdks/whatsapp").Exact<{
|
|
19
|
+
credentialsId: import("./sdks/whatsapp").Scalars["ID"]["input"];
|
|
20
|
+
status?: import("./sdks/whatsapp").InputMaybe<import("./sdks/whatsapp").TemplateStatus>;
|
|
21
|
+
}>, options?: unknown): Promise<import("./sdks/whatsapp").ListWhatsAppTemplatesQuery>;
|
|
22
|
+
getWhatsAppTemplate(variables: import("./sdks/whatsapp").Exact<{
|
|
23
|
+
id: import("./sdks/whatsapp").Scalars["ID"]["input"];
|
|
24
|
+
credentialsId: import("./sdks/whatsapp").Scalars["ID"]["input"];
|
|
25
|
+
}>, options?: unknown): Promise<import("./sdks/whatsapp").GetWhatsAppTemplateQuery>;
|
|
18
26
|
createWhatsAppInstance(variables: import("./sdks/whatsapp").Exact<{
|
|
19
27
|
input: import("./sdks/whatsapp").CreateWhatsAppInstanceInput;
|
|
20
28
|
}>, options?: unknown): Promise<import("./sdks/whatsapp").CreateWhatsAppInstanceMutation>;
|
|
@@ -24,6 +32,12 @@ declare const WhatsApp_base: new (options?: import("./client/http").HttpClientOp
|
|
|
24
32
|
removeWhatsAppInstance(variables: import("./sdks/whatsapp").Exact<{
|
|
25
33
|
input: import("./sdks/whatsapp").RemoveWhatsAppInstanceInput;
|
|
26
34
|
}>, options?: unknown): Promise<import("./sdks/whatsapp").RemoveWhatsAppInstanceMutation>;
|
|
35
|
+
createWhatsAppTemplate(variables: import("./sdks/whatsapp").Exact<{
|
|
36
|
+
input: import("./sdks/whatsapp").CreateWhatsAppTemplateInput;
|
|
37
|
+
}>, options?: unknown): Promise<import("./sdks/whatsapp").CreateWhatsAppTemplateMutation>;
|
|
38
|
+
editWhatsAppTemplate(variables: import("./sdks/whatsapp").Exact<{
|
|
39
|
+
input: import("./sdks/whatsapp").EditWhatsAppTemplateInput;
|
|
40
|
+
}>, options?: unknown): Promise<import("./sdks/whatsapp").EditWhatsAppTemplateMutation>;
|
|
27
41
|
};
|
|
28
42
|
export declare class WhatsApp extends WhatsApp_base {
|
|
29
43
|
}
|