node-appwrite 17.2.0 → 18.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/README.md +67 -2
- package/dist/client.js +3 -3
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +3 -3
- package/dist/client.mjs.map +1 -1
- package/dist/enums/{v-c-s-deployment-type.js → vcs-deployment-type.js} +1 -1
- package/dist/enums/vcs-deployment-type.js.map +1 -0
- package/dist/enums/{v-c-s-deployment-type.mjs → vcs-deployment-type.mjs} +2 -2
- package/dist/enums/vcs-deployment-type.mjs.map +1 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/models.d.mts +717 -58
- package/dist/models.d.ts +717 -58
- package/dist/query.d.mts +70 -0
- package/dist/query.d.ts +70 -0
- package/dist/query.js +70 -0
- package/dist/query.js.map +1 -1
- package/dist/query.mjs +70 -0
- package/dist/query.mjs.map +1 -1
- package/dist/services/account.d.mts +625 -70
- package/dist/services/account.d.ts +625 -70
- package/dist/services/account.js +592 -292
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +592 -292
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/avatars.d.mts +157 -26
- package/dist/services/avatars.d.ts +157 -26
- package/dist/services/avatars.js +104 -93
- package/dist/services/avatars.js.map +1 -1
- package/dist/services/avatars.mjs +104 -93
- package/dist/services/avatars.mjs.map +1 -1
- package/dist/services/databases.d.mts +1224 -248
- package/dist/services/databases.d.ts +1224 -248
- package/dist/services/databases.js +877 -611
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +877 -611
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/functions.d.mts +530 -107
- package/dist/services/functions.d.ts +530 -107
- package/dist/services/functions.js +393 -276
- package/dist/services/functions.js.map +1 -1
- package/dist/services/functions.mjs +393 -276
- package/dist/services/functions.mjs.map +1 -1
- package/dist/services/graphql.d.mts +24 -2
- package/dist/services/graphql.d.ts +24 -2
- package/dist/services/graphql.js +20 -16
- package/dist/services/graphql.js.map +1 -1
- package/dist/services/graphql.mjs +20 -16
- package/dist/services/graphql.mjs.map +1 -1
- package/dist/services/health.d.mts +175 -16
- package/dist/services/health.d.ts +175 -16
- package/dist/services/health.js +144 -115
- package/dist/services/health.js.map +1 -1
- package/dist/services/health.mjs +144 -115
- package/dist/services/health.mjs.map +1 -1
- package/dist/services/locale.js.map +1 -1
- package/dist/services/locale.mjs.map +1 -1
- package/dist/services/messaging.d.mts +1544 -262
- package/dist/services/messaging.d.ts +1544 -262
- package/dist/services/messaging.js +1417 -592
- package/dist/services/messaging.js.map +1 -1
- package/dist/services/messaging.mjs +1417 -592
- package/dist/services/messaging.mjs.map +1 -1
- package/dist/services/sites.d.mts +495 -99
- package/dist/services/sites.d.ts +495 -99
- package/dist/services/sites.js +371 -258
- package/dist/services/sites.js.map +1 -1
- package/dist/services/sites.mjs +371 -258
- package/dist/services/sites.mjs.map +1 -1
- package/dist/services/storage.d.mts +306 -63
- package/dist/services/storage.d.ts +306 -63
- package/dist/services/storage.js +225 -158
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs +225 -158
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/tables-db.d.mts +1549 -0
- package/dist/services/tables-db.d.ts +1549 -0
- package/dist/services/tables-db.js +2374 -0
- package/dist/services/tables-db.js.map +1 -0
- package/dist/services/tables-db.mjs +2373 -0
- package/dist/services/tables-db.mjs.map +1 -0
- package/dist/services/teams.d.mts +233 -39
- package/dist/services/teams.d.ts +233 -39
- package/dist/services/teams.js +170 -135
- package/dist/services/teams.js.map +1 -1
- package/dist/services/teams.mjs +170 -135
- package/dist/services/teams.mjs.map +1 -1
- package/dist/services/tokens.d.mts +76 -11
- package/dist/services/tokens.d.ts +76 -11
- package/dist/services/tokens.js +60 -45
- package/dist/services/tokens.js.map +1 -1
- package/dist/services/tokens.mjs +60 -45
- package/dist/services/tokens.mjs.map +1 -1
- package/dist/services/users.d.mts +842 -115
- package/dist/services/users.d.ts +842 -115
- package/dist/services/users.js +719 -408
- package/dist/services/users.js.map +1 -1
- package/dist/services/users.mjs +719 -408
- package/dist/services/users.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/enums/v-c-s-deployment-type.js.map +0 -1
- package/dist/enums/v-c-s-deployment-type.mjs.map +0 -1
- /package/dist/enums/{v-c-s-deployment-type.d.mts → vcs-deployment-type.d.mts} +0 -0
- /package/dist/enums/{v-c-s-deployment-type.d.ts → vcs-deployment-type.d.ts} +0 -0
|
@@ -6,15 +6,18 @@ class Messaging {
|
|
|
6
6
|
constructor(client) {
|
|
7
7
|
this.client = client;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
listMessages(paramsOrFirst, ...rest) {
|
|
10
|
+
let params;
|
|
11
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12
|
+
params = paramsOrFirst || {};
|
|
13
|
+
} else {
|
|
14
|
+
params = {
|
|
15
|
+
queries: paramsOrFirst,
|
|
16
|
+
search: rest[0]
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
const queries = params.queries;
|
|
20
|
+
const search = params.search;
|
|
18
21
|
const apiPath = "/messaging/messages";
|
|
19
22
|
const payload = {};
|
|
20
23
|
if (typeof queries !== "undefined") {
|
|
@@ -32,25 +35,38 @@ class Messaging {
|
|
|
32
35
|
payload
|
|
33
36
|
);
|
|
34
37
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
38
|
+
createEmail(paramsOrFirst, ...rest) {
|
|
39
|
+
let params;
|
|
40
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
41
|
+
params = paramsOrFirst || {};
|
|
42
|
+
} else {
|
|
43
|
+
params = {
|
|
44
|
+
messageId: paramsOrFirst,
|
|
45
|
+
subject: rest[0],
|
|
46
|
+
content: rest[1],
|
|
47
|
+
topics: rest[2],
|
|
48
|
+
users: rest[3],
|
|
49
|
+
targets: rest[4],
|
|
50
|
+
cc: rest[5],
|
|
51
|
+
bcc: rest[6],
|
|
52
|
+
attachments: rest[7],
|
|
53
|
+
draft: rest[8],
|
|
54
|
+
html: rest[9],
|
|
55
|
+
scheduledAt: rest[10]
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
const messageId = params.messageId;
|
|
59
|
+
const subject = params.subject;
|
|
60
|
+
const content = params.content;
|
|
61
|
+
const topics = params.topics;
|
|
62
|
+
const users = params.users;
|
|
63
|
+
const targets = params.targets;
|
|
64
|
+
const cc = params.cc;
|
|
65
|
+
const bcc = params.bcc;
|
|
66
|
+
const attachments = params.attachments;
|
|
67
|
+
const draft = params.draft;
|
|
68
|
+
const html = params.html;
|
|
69
|
+
const scheduledAt = params.scheduledAt;
|
|
54
70
|
if (typeof messageId === "undefined") {
|
|
55
71
|
throw new client.AppwriteException('Missing required parameter: "messageId"');
|
|
56
72
|
}
|
|
@@ -109,26 +125,38 @@ class Messaging {
|
|
|
109
125
|
payload
|
|
110
126
|
);
|
|
111
127
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
updateEmail(paramsOrFirst, ...rest) {
|
|
129
|
+
let params;
|
|
130
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
131
|
+
params = paramsOrFirst || {};
|
|
132
|
+
} else {
|
|
133
|
+
params = {
|
|
134
|
+
messageId: paramsOrFirst,
|
|
135
|
+
topics: rest[0],
|
|
136
|
+
users: rest[1],
|
|
137
|
+
targets: rest[2],
|
|
138
|
+
subject: rest[3],
|
|
139
|
+
content: rest[4],
|
|
140
|
+
draft: rest[5],
|
|
141
|
+
html: rest[6],
|
|
142
|
+
cc: rest[7],
|
|
143
|
+
bcc: rest[8],
|
|
144
|
+
scheduledAt: rest[9],
|
|
145
|
+
attachments: rest[10]
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
const messageId = params.messageId;
|
|
149
|
+
const topics = params.topics;
|
|
150
|
+
const users = params.users;
|
|
151
|
+
const targets = params.targets;
|
|
152
|
+
const subject = params.subject;
|
|
153
|
+
const content = params.content;
|
|
154
|
+
const draft = params.draft;
|
|
155
|
+
const html = params.html;
|
|
156
|
+
const cc = params.cc;
|
|
157
|
+
const bcc = params.bcc;
|
|
158
|
+
const scheduledAt = params.scheduledAt;
|
|
159
|
+
const attachments = params.attachments;
|
|
132
160
|
if (typeof messageId === "undefined") {
|
|
133
161
|
throw new client.AppwriteException('Missing required parameter: "messageId"');
|
|
134
162
|
}
|
|
@@ -178,32 +206,52 @@ class Messaging {
|
|
|
178
206
|
payload
|
|
179
207
|
);
|
|
180
208
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
209
|
+
createPush(paramsOrFirst, ...rest) {
|
|
210
|
+
let params;
|
|
211
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
212
|
+
params = paramsOrFirst || {};
|
|
213
|
+
} else {
|
|
214
|
+
params = {
|
|
215
|
+
messageId: paramsOrFirst,
|
|
216
|
+
title: rest[0],
|
|
217
|
+
body: rest[1],
|
|
218
|
+
topics: rest[2],
|
|
219
|
+
users: rest[3],
|
|
220
|
+
targets: rest[4],
|
|
221
|
+
data: rest[5],
|
|
222
|
+
action: rest[6],
|
|
223
|
+
image: rest[7],
|
|
224
|
+
icon: rest[8],
|
|
225
|
+
sound: rest[9],
|
|
226
|
+
color: rest[10],
|
|
227
|
+
tag: rest[11],
|
|
228
|
+
badge: rest[12],
|
|
229
|
+
draft: rest[13],
|
|
230
|
+
scheduledAt: rest[14],
|
|
231
|
+
contentAvailable: rest[15],
|
|
232
|
+
critical: rest[16],
|
|
233
|
+
priority: rest[17]
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
const messageId = params.messageId;
|
|
237
|
+
const title = params.title;
|
|
238
|
+
const body = params.body;
|
|
239
|
+
const topics = params.topics;
|
|
240
|
+
const users = params.users;
|
|
241
|
+
const targets = params.targets;
|
|
242
|
+
const data = params.data;
|
|
243
|
+
const action = params.action;
|
|
244
|
+
const image = params.image;
|
|
245
|
+
const icon = params.icon;
|
|
246
|
+
const sound = params.sound;
|
|
247
|
+
const color = params.color;
|
|
248
|
+
const tag = params.tag;
|
|
249
|
+
const badge = params.badge;
|
|
250
|
+
const draft = params.draft;
|
|
251
|
+
const scheduledAt = params.scheduledAt;
|
|
252
|
+
const contentAvailable = params.contentAvailable;
|
|
253
|
+
const critical = params.critical;
|
|
254
|
+
const priority = params.priority;
|
|
207
255
|
if (typeof messageId === "undefined") {
|
|
208
256
|
throw new client.AppwriteException('Missing required parameter: "messageId"');
|
|
209
257
|
}
|
|
@@ -277,33 +325,52 @@ class Messaging {
|
|
|
277
325
|
payload
|
|
278
326
|
);
|
|
279
327
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
328
|
+
updatePush(paramsOrFirst, ...rest) {
|
|
329
|
+
let params;
|
|
330
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
331
|
+
params = paramsOrFirst || {};
|
|
332
|
+
} else {
|
|
333
|
+
params = {
|
|
334
|
+
messageId: paramsOrFirst,
|
|
335
|
+
topics: rest[0],
|
|
336
|
+
users: rest[1],
|
|
337
|
+
targets: rest[2],
|
|
338
|
+
title: rest[3],
|
|
339
|
+
body: rest[4],
|
|
340
|
+
data: rest[5],
|
|
341
|
+
action: rest[6],
|
|
342
|
+
image: rest[7],
|
|
343
|
+
icon: rest[8],
|
|
344
|
+
sound: rest[9],
|
|
345
|
+
color: rest[10],
|
|
346
|
+
tag: rest[11],
|
|
347
|
+
badge: rest[12],
|
|
348
|
+
draft: rest[13],
|
|
349
|
+
scheduledAt: rest[14],
|
|
350
|
+
contentAvailable: rest[15],
|
|
351
|
+
critical: rest[16],
|
|
352
|
+
priority: rest[17]
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
const messageId = params.messageId;
|
|
356
|
+
const topics = params.topics;
|
|
357
|
+
const users = params.users;
|
|
358
|
+
const targets = params.targets;
|
|
359
|
+
const title = params.title;
|
|
360
|
+
const body = params.body;
|
|
361
|
+
const data = params.data;
|
|
362
|
+
const action = params.action;
|
|
363
|
+
const image = params.image;
|
|
364
|
+
const icon = params.icon;
|
|
365
|
+
const sound = params.sound;
|
|
366
|
+
const color = params.color;
|
|
367
|
+
const tag = params.tag;
|
|
368
|
+
const badge = params.badge;
|
|
369
|
+
const draft = params.draft;
|
|
370
|
+
const scheduledAt = params.scheduledAt;
|
|
371
|
+
const contentAvailable = params.contentAvailable;
|
|
372
|
+
const critical = params.critical;
|
|
373
|
+
const priority = params.priority;
|
|
307
374
|
if (typeof messageId === "undefined") {
|
|
308
375
|
throw new client.AppwriteException('Missing required parameter: "messageId"');
|
|
309
376
|
}
|
|
@@ -374,20 +441,28 @@ class Messaging {
|
|
|
374
441
|
payload
|
|
375
442
|
);
|
|
376
443
|
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
444
|
+
createSms(paramsOrFirst, ...rest) {
|
|
445
|
+
let params;
|
|
446
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
447
|
+
params = paramsOrFirst || {};
|
|
448
|
+
} else {
|
|
449
|
+
params = {
|
|
450
|
+
messageId: paramsOrFirst,
|
|
451
|
+
content: rest[0],
|
|
452
|
+
topics: rest[1],
|
|
453
|
+
users: rest[2],
|
|
454
|
+
targets: rest[3],
|
|
455
|
+
draft: rest[4],
|
|
456
|
+
scheduledAt: rest[5]
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
const messageId = params.messageId;
|
|
460
|
+
const content = params.content;
|
|
461
|
+
const topics = params.topics;
|
|
462
|
+
const users = params.users;
|
|
463
|
+
const targets = params.targets;
|
|
464
|
+
const draft = params.draft;
|
|
465
|
+
const scheduledAt = params.scheduledAt;
|
|
391
466
|
if (typeof messageId === "undefined") {
|
|
392
467
|
throw new client.AppwriteException('Missing required parameter: "messageId"');
|
|
393
468
|
}
|
|
@@ -428,21 +503,90 @@ class Messaging {
|
|
|
428
503
|
payload
|
|
429
504
|
);
|
|
430
505
|
}
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
506
|
+
createSMS(paramsOrFirst, ...rest) {
|
|
507
|
+
let params;
|
|
508
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
509
|
+
params = paramsOrFirst || {};
|
|
510
|
+
} else {
|
|
511
|
+
params = {
|
|
512
|
+
messageId: paramsOrFirst,
|
|
513
|
+
content: rest[0],
|
|
514
|
+
topics: rest[1],
|
|
515
|
+
users: rest[2],
|
|
516
|
+
targets: rest[3],
|
|
517
|
+
draft: rest[4],
|
|
518
|
+
scheduledAt: rest[5]
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
const messageId = params.messageId;
|
|
522
|
+
const content = params.content;
|
|
523
|
+
const topics = params.topics;
|
|
524
|
+
const users = params.users;
|
|
525
|
+
const targets = params.targets;
|
|
526
|
+
const draft = params.draft;
|
|
527
|
+
const scheduledAt = params.scheduledAt;
|
|
528
|
+
if (typeof messageId === "undefined") {
|
|
529
|
+
throw new client.AppwriteException('Missing required parameter: "messageId"');
|
|
530
|
+
}
|
|
531
|
+
if (typeof content === "undefined") {
|
|
532
|
+
throw new client.AppwriteException('Missing required parameter: "content"');
|
|
533
|
+
}
|
|
534
|
+
const apiPath = "/messaging/messages/sms";
|
|
535
|
+
const payload = {};
|
|
536
|
+
if (typeof messageId !== "undefined") {
|
|
537
|
+
payload["messageId"] = messageId;
|
|
538
|
+
}
|
|
539
|
+
if (typeof content !== "undefined") {
|
|
540
|
+
payload["content"] = content;
|
|
541
|
+
}
|
|
542
|
+
if (typeof topics !== "undefined") {
|
|
543
|
+
payload["topics"] = topics;
|
|
544
|
+
}
|
|
545
|
+
if (typeof users !== "undefined") {
|
|
546
|
+
payload["users"] = users;
|
|
547
|
+
}
|
|
548
|
+
if (typeof targets !== "undefined") {
|
|
549
|
+
payload["targets"] = targets;
|
|
550
|
+
}
|
|
551
|
+
if (typeof draft !== "undefined") {
|
|
552
|
+
payload["draft"] = draft;
|
|
553
|
+
}
|
|
554
|
+
if (typeof scheduledAt !== "undefined") {
|
|
555
|
+
payload["scheduledAt"] = scheduledAt;
|
|
556
|
+
}
|
|
557
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
558
|
+
const apiHeaders = {
|
|
559
|
+
"content-type": "application/json"
|
|
560
|
+
};
|
|
561
|
+
return this.client.call(
|
|
562
|
+
"post",
|
|
563
|
+
uri,
|
|
564
|
+
apiHeaders,
|
|
565
|
+
payload
|
|
566
|
+
);
|
|
567
|
+
}
|
|
568
|
+
updateSms(paramsOrFirst, ...rest) {
|
|
569
|
+
let params;
|
|
570
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
571
|
+
params = paramsOrFirst || {};
|
|
572
|
+
} else {
|
|
573
|
+
params = {
|
|
574
|
+
messageId: paramsOrFirst,
|
|
575
|
+
topics: rest[0],
|
|
576
|
+
users: rest[1],
|
|
577
|
+
targets: rest[2],
|
|
578
|
+
content: rest[3],
|
|
579
|
+
draft: rest[4],
|
|
580
|
+
scheduledAt: rest[5]
|
|
581
|
+
};
|
|
582
|
+
}
|
|
583
|
+
const messageId = params.messageId;
|
|
584
|
+
const topics = params.topics;
|
|
585
|
+
const users = params.users;
|
|
586
|
+
const targets = params.targets;
|
|
587
|
+
const content = params.content;
|
|
588
|
+
const draft = params.draft;
|
|
589
|
+
const scheduledAt = params.scheduledAt;
|
|
446
590
|
if (typeof messageId === "undefined") {
|
|
447
591
|
throw new client.AppwriteException('Missing required parameter: "messageId"');
|
|
448
592
|
}
|
|
@@ -477,15 +621,72 @@ class Messaging {
|
|
|
477
621
|
payload
|
|
478
622
|
);
|
|
479
623
|
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
624
|
+
updateSMS(paramsOrFirst, ...rest) {
|
|
625
|
+
let params;
|
|
626
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
627
|
+
params = paramsOrFirst || {};
|
|
628
|
+
} else {
|
|
629
|
+
params = {
|
|
630
|
+
messageId: paramsOrFirst,
|
|
631
|
+
topics: rest[0],
|
|
632
|
+
users: rest[1],
|
|
633
|
+
targets: rest[2],
|
|
634
|
+
content: rest[3],
|
|
635
|
+
draft: rest[4],
|
|
636
|
+
scheduledAt: rest[5]
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
const messageId = params.messageId;
|
|
640
|
+
const topics = params.topics;
|
|
641
|
+
const users = params.users;
|
|
642
|
+
const targets = params.targets;
|
|
643
|
+
const content = params.content;
|
|
644
|
+
const draft = params.draft;
|
|
645
|
+
const scheduledAt = params.scheduledAt;
|
|
646
|
+
if (typeof messageId === "undefined") {
|
|
647
|
+
throw new client.AppwriteException('Missing required parameter: "messageId"');
|
|
648
|
+
}
|
|
649
|
+
const apiPath = "/messaging/messages/sms/{messageId}".replace("{messageId}", messageId);
|
|
650
|
+
const payload = {};
|
|
651
|
+
if (typeof topics !== "undefined") {
|
|
652
|
+
payload["topics"] = topics;
|
|
653
|
+
}
|
|
654
|
+
if (typeof users !== "undefined") {
|
|
655
|
+
payload["users"] = users;
|
|
656
|
+
}
|
|
657
|
+
if (typeof targets !== "undefined") {
|
|
658
|
+
payload["targets"] = targets;
|
|
659
|
+
}
|
|
660
|
+
if (typeof content !== "undefined") {
|
|
661
|
+
payload["content"] = content;
|
|
662
|
+
}
|
|
663
|
+
if (typeof draft !== "undefined") {
|
|
664
|
+
payload["draft"] = draft;
|
|
665
|
+
}
|
|
666
|
+
if (typeof scheduledAt !== "undefined") {
|
|
667
|
+
payload["scheduledAt"] = scheduledAt;
|
|
668
|
+
}
|
|
669
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
670
|
+
const apiHeaders = {
|
|
671
|
+
"content-type": "application/json"
|
|
672
|
+
};
|
|
673
|
+
return this.client.call(
|
|
674
|
+
"patch",
|
|
675
|
+
uri,
|
|
676
|
+
apiHeaders,
|
|
677
|
+
payload
|
|
678
|
+
);
|
|
679
|
+
}
|
|
680
|
+
getMessage(paramsOrFirst) {
|
|
681
|
+
let params;
|
|
682
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
683
|
+
params = paramsOrFirst || {};
|
|
684
|
+
} else {
|
|
685
|
+
params = {
|
|
686
|
+
messageId: paramsOrFirst
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
const messageId = params.messageId;
|
|
489
690
|
if (typeof messageId === "undefined") {
|
|
490
691
|
throw new client.AppwriteException('Missing required parameter: "messageId"');
|
|
491
692
|
}
|
|
@@ -500,14 +701,16 @@ class Messaging {
|
|
|
500
701
|
payload
|
|
501
702
|
);
|
|
502
703
|
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
704
|
+
delete(paramsOrFirst) {
|
|
705
|
+
let params;
|
|
706
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
707
|
+
params = paramsOrFirst || {};
|
|
708
|
+
} else {
|
|
709
|
+
params = {
|
|
710
|
+
messageId: paramsOrFirst
|
|
711
|
+
};
|
|
712
|
+
}
|
|
713
|
+
const messageId = params.messageId;
|
|
511
714
|
if (typeof messageId === "undefined") {
|
|
512
715
|
throw new client.AppwriteException('Missing required parameter: "messageId"');
|
|
513
716
|
}
|
|
@@ -524,15 +727,18 @@ class Messaging {
|
|
|
524
727
|
payload
|
|
525
728
|
);
|
|
526
729
|
}
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
730
|
+
listMessageLogs(paramsOrFirst, ...rest) {
|
|
731
|
+
let params;
|
|
732
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
733
|
+
params = paramsOrFirst || {};
|
|
734
|
+
} else {
|
|
735
|
+
params = {
|
|
736
|
+
messageId: paramsOrFirst,
|
|
737
|
+
queries: rest[0]
|
|
738
|
+
};
|
|
739
|
+
}
|
|
740
|
+
const messageId = params.messageId;
|
|
741
|
+
const queries = params.queries;
|
|
536
742
|
if (typeof messageId === "undefined") {
|
|
537
743
|
throw new client.AppwriteException('Missing required parameter: "messageId"');
|
|
538
744
|
}
|
|
@@ -550,15 +756,18 @@ class Messaging {
|
|
|
550
756
|
payload
|
|
551
757
|
);
|
|
552
758
|
}
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
759
|
+
listTargets(paramsOrFirst, ...rest) {
|
|
760
|
+
let params;
|
|
761
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
762
|
+
params = paramsOrFirst || {};
|
|
763
|
+
} else {
|
|
764
|
+
params = {
|
|
765
|
+
messageId: paramsOrFirst,
|
|
766
|
+
queries: rest[0]
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
const messageId = params.messageId;
|
|
770
|
+
const queries = params.queries;
|
|
562
771
|
if (typeof messageId === "undefined") {
|
|
563
772
|
throw new client.AppwriteException('Missing required parameter: "messageId"');
|
|
564
773
|
}
|
|
@@ -576,15 +785,18 @@ class Messaging {
|
|
|
576
785
|
payload
|
|
577
786
|
);
|
|
578
787
|
}
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
788
|
+
listProviders(paramsOrFirst, ...rest) {
|
|
789
|
+
let params;
|
|
790
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
791
|
+
params = paramsOrFirst || {};
|
|
792
|
+
} else {
|
|
793
|
+
params = {
|
|
794
|
+
queries: paramsOrFirst,
|
|
795
|
+
search: rest[0]
|
|
796
|
+
};
|
|
797
|
+
}
|
|
798
|
+
const queries = params.queries;
|
|
799
|
+
const search = params.search;
|
|
588
800
|
const apiPath = "/messaging/providers";
|
|
589
801
|
const payload = {};
|
|
590
802
|
if (typeof queries !== "undefined") {
|
|
@@ -602,21 +814,30 @@ class Messaging {
|
|
|
602
814
|
payload
|
|
603
815
|
);
|
|
604
816
|
}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
817
|
+
createApnsProvider(paramsOrFirst, ...rest) {
|
|
818
|
+
let params;
|
|
819
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
820
|
+
params = paramsOrFirst || {};
|
|
821
|
+
} else {
|
|
822
|
+
params = {
|
|
823
|
+
providerId: paramsOrFirst,
|
|
824
|
+
name: rest[0],
|
|
825
|
+
authKey: rest[1],
|
|
826
|
+
authKeyId: rest[2],
|
|
827
|
+
teamId: rest[3],
|
|
828
|
+
bundleId: rest[4],
|
|
829
|
+
sandbox: rest[5],
|
|
830
|
+
enabled: rest[6]
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
const providerId = params.providerId;
|
|
834
|
+
const name = params.name;
|
|
835
|
+
const authKey = params.authKey;
|
|
836
|
+
const authKeyId = params.authKeyId;
|
|
837
|
+
const teamId = params.teamId;
|
|
838
|
+
const bundleId = params.bundleId;
|
|
839
|
+
const sandbox = params.sandbox;
|
|
840
|
+
const enabled = params.enabled;
|
|
620
841
|
if (typeof providerId === "undefined") {
|
|
621
842
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
622
843
|
}
|
|
@@ -660,21 +881,158 @@ class Messaging {
|
|
|
660
881
|
payload
|
|
661
882
|
);
|
|
662
883
|
}
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
884
|
+
createAPNSProvider(paramsOrFirst, ...rest) {
|
|
885
|
+
let params;
|
|
886
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
887
|
+
params = paramsOrFirst || {};
|
|
888
|
+
} else {
|
|
889
|
+
params = {
|
|
890
|
+
providerId: paramsOrFirst,
|
|
891
|
+
name: rest[0],
|
|
892
|
+
authKey: rest[1],
|
|
893
|
+
authKeyId: rest[2],
|
|
894
|
+
teamId: rest[3],
|
|
895
|
+
bundleId: rest[4],
|
|
896
|
+
sandbox: rest[5],
|
|
897
|
+
enabled: rest[6]
|
|
898
|
+
};
|
|
899
|
+
}
|
|
900
|
+
const providerId = params.providerId;
|
|
901
|
+
const name = params.name;
|
|
902
|
+
const authKey = params.authKey;
|
|
903
|
+
const authKeyId = params.authKeyId;
|
|
904
|
+
const teamId = params.teamId;
|
|
905
|
+
const bundleId = params.bundleId;
|
|
906
|
+
const sandbox = params.sandbox;
|
|
907
|
+
const enabled = params.enabled;
|
|
908
|
+
if (typeof providerId === "undefined") {
|
|
909
|
+
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
910
|
+
}
|
|
911
|
+
if (typeof name === "undefined") {
|
|
912
|
+
throw new client.AppwriteException('Missing required parameter: "name"');
|
|
913
|
+
}
|
|
914
|
+
const apiPath = "/messaging/providers/apns";
|
|
915
|
+
const payload = {};
|
|
916
|
+
if (typeof providerId !== "undefined") {
|
|
917
|
+
payload["providerId"] = providerId;
|
|
918
|
+
}
|
|
919
|
+
if (typeof name !== "undefined") {
|
|
920
|
+
payload["name"] = name;
|
|
921
|
+
}
|
|
922
|
+
if (typeof authKey !== "undefined") {
|
|
923
|
+
payload["authKey"] = authKey;
|
|
924
|
+
}
|
|
925
|
+
if (typeof authKeyId !== "undefined") {
|
|
926
|
+
payload["authKeyId"] = authKeyId;
|
|
927
|
+
}
|
|
928
|
+
if (typeof teamId !== "undefined") {
|
|
929
|
+
payload["teamId"] = teamId;
|
|
930
|
+
}
|
|
931
|
+
if (typeof bundleId !== "undefined") {
|
|
932
|
+
payload["bundleId"] = bundleId;
|
|
933
|
+
}
|
|
934
|
+
if (typeof sandbox !== "undefined") {
|
|
935
|
+
payload["sandbox"] = sandbox;
|
|
936
|
+
}
|
|
937
|
+
if (typeof enabled !== "undefined") {
|
|
938
|
+
payload["enabled"] = enabled;
|
|
939
|
+
}
|
|
940
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
941
|
+
const apiHeaders = {
|
|
942
|
+
"content-type": "application/json"
|
|
943
|
+
};
|
|
944
|
+
return this.client.call(
|
|
945
|
+
"post",
|
|
946
|
+
uri,
|
|
947
|
+
apiHeaders,
|
|
948
|
+
payload
|
|
949
|
+
);
|
|
950
|
+
}
|
|
951
|
+
updateApnsProvider(paramsOrFirst, ...rest) {
|
|
952
|
+
let params;
|
|
953
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
954
|
+
params = paramsOrFirst || {};
|
|
955
|
+
} else {
|
|
956
|
+
params = {
|
|
957
|
+
providerId: paramsOrFirst,
|
|
958
|
+
name: rest[0],
|
|
959
|
+
enabled: rest[1],
|
|
960
|
+
authKey: rest[2],
|
|
961
|
+
authKeyId: rest[3],
|
|
962
|
+
teamId: rest[4],
|
|
963
|
+
bundleId: rest[5],
|
|
964
|
+
sandbox: rest[6]
|
|
965
|
+
};
|
|
966
|
+
}
|
|
967
|
+
const providerId = params.providerId;
|
|
968
|
+
const name = params.name;
|
|
969
|
+
const enabled = params.enabled;
|
|
970
|
+
const authKey = params.authKey;
|
|
971
|
+
const authKeyId = params.authKeyId;
|
|
972
|
+
const teamId = params.teamId;
|
|
973
|
+
const bundleId = params.bundleId;
|
|
974
|
+
const sandbox = params.sandbox;
|
|
975
|
+
if (typeof providerId === "undefined") {
|
|
976
|
+
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
977
|
+
}
|
|
978
|
+
const apiPath = "/messaging/providers/apns/{providerId}".replace("{providerId}", providerId);
|
|
979
|
+
const payload = {};
|
|
980
|
+
if (typeof name !== "undefined") {
|
|
981
|
+
payload["name"] = name;
|
|
982
|
+
}
|
|
983
|
+
if (typeof enabled !== "undefined") {
|
|
984
|
+
payload["enabled"] = enabled;
|
|
985
|
+
}
|
|
986
|
+
if (typeof authKey !== "undefined") {
|
|
987
|
+
payload["authKey"] = authKey;
|
|
988
|
+
}
|
|
989
|
+
if (typeof authKeyId !== "undefined") {
|
|
990
|
+
payload["authKeyId"] = authKeyId;
|
|
991
|
+
}
|
|
992
|
+
if (typeof teamId !== "undefined") {
|
|
993
|
+
payload["teamId"] = teamId;
|
|
994
|
+
}
|
|
995
|
+
if (typeof bundleId !== "undefined") {
|
|
996
|
+
payload["bundleId"] = bundleId;
|
|
997
|
+
}
|
|
998
|
+
if (typeof sandbox !== "undefined") {
|
|
999
|
+
payload["sandbox"] = sandbox;
|
|
1000
|
+
}
|
|
1001
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1002
|
+
const apiHeaders = {
|
|
1003
|
+
"content-type": "application/json"
|
|
1004
|
+
};
|
|
1005
|
+
return this.client.call(
|
|
1006
|
+
"patch",
|
|
1007
|
+
uri,
|
|
1008
|
+
apiHeaders,
|
|
1009
|
+
payload
|
|
1010
|
+
);
|
|
1011
|
+
}
|
|
1012
|
+
updateAPNSProvider(paramsOrFirst, ...rest) {
|
|
1013
|
+
let params;
|
|
1014
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1015
|
+
params = paramsOrFirst || {};
|
|
1016
|
+
} else {
|
|
1017
|
+
params = {
|
|
1018
|
+
providerId: paramsOrFirst,
|
|
1019
|
+
name: rest[0],
|
|
1020
|
+
enabled: rest[1],
|
|
1021
|
+
authKey: rest[2],
|
|
1022
|
+
authKeyId: rest[3],
|
|
1023
|
+
teamId: rest[4],
|
|
1024
|
+
bundleId: rest[5],
|
|
1025
|
+
sandbox: rest[6]
|
|
1026
|
+
};
|
|
1027
|
+
}
|
|
1028
|
+
const providerId = params.providerId;
|
|
1029
|
+
const name = params.name;
|
|
1030
|
+
const enabled = params.enabled;
|
|
1031
|
+
const authKey = params.authKey;
|
|
1032
|
+
const authKeyId = params.authKeyId;
|
|
1033
|
+
const teamId = params.teamId;
|
|
1034
|
+
const bundleId = params.bundleId;
|
|
1035
|
+
const sandbox = params.sandbox;
|
|
678
1036
|
if (typeof providerId === "undefined") {
|
|
679
1037
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
680
1038
|
}
|
|
@@ -712,17 +1070,22 @@ class Messaging {
|
|
|
712
1070
|
payload
|
|
713
1071
|
);
|
|
714
1072
|
}
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
1073
|
+
createFcmProvider(paramsOrFirst, ...rest) {
|
|
1074
|
+
let params;
|
|
1075
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1076
|
+
params = paramsOrFirst || {};
|
|
1077
|
+
} else {
|
|
1078
|
+
params = {
|
|
1079
|
+
providerId: paramsOrFirst,
|
|
1080
|
+
name: rest[0],
|
|
1081
|
+
serviceAccountJSON: rest[1],
|
|
1082
|
+
enabled: rest[2]
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
const providerId = params.providerId;
|
|
1086
|
+
const name = params.name;
|
|
1087
|
+
const serviceAccountJSON = params.serviceAccountJSON;
|
|
1088
|
+
const enabled = params.enabled;
|
|
726
1089
|
if (typeof providerId === "undefined") {
|
|
727
1090
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
728
1091
|
}
|
|
@@ -754,17 +1117,110 @@ class Messaging {
|
|
|
754
1117
|
payload
|
|
755
1118
|
);
|
|
756
1119
|
}
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
1120
|
+
createFCMProvider(paramsOrFirst, ...rest) {
|
|
1121
|
+
let params;
|
|
1122
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1123
|
+
params = paramsOrFirst || {};
|
|
1124
|
+
} else {
|
|
1125
|
+
params = {
|
|
1126
|
+
providerId: paramsOrFirst,
|
|
1127
|
+
name: rest[0],
|
|
1128
|
+
serviceAccountJSON: rest[1],
|
|
1129
|
+
enabled: rest[2]
|
|
1130
|
+
};
|
|
1131
|
+
}
|
|
1132
|
+
const providerId = params.providerId;
|
|
1133
|
+
const name = params.name;
|
|
1134
|
+
const serviceAccountJSON = params.serviceAccountJSON;
|
|
1135
|
+
const enabled = params.enabled;
|
|
1136
|
+
if (typeof providerId === "undefined") {
|
|
1137
|
+
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1138
|
+
}
|
|
1139
|
+
if (typeof name === "undefined") {
|
|
1140
|
+
throw new client.AppwriteException('Missing required parameter: "name"');
|
|
1141
|
+
}
|
|
1142
|
+
const apiPath = "/messaging/providers/fcm";
|
|
1143
|
+
const payload = {};
|
|
1144
|
+
if (typeof providerId !== "undefined") {
|
|
1145
|
+
payload["providerId"] = providerId;
|
|
1146
|
+
}
|
|
1147
|
+
if (typeof name !== "undefined") {
|
|
1148
|
+
payload["name"] = name;
|
|
1149
|
+
}
|
|
1150
|
+
if (typeof serviceAccountJSON !== "undefined") {
|
|
1151
|
+
payload["serviceAccountJSON"] = serviceAccountJSON;
|
|
1152
|
+
}
|
|
1153
|
+
if (typeof enabled !== "undefined") {
|
|
1154
|
+
payload["enabled"] = enabled;
|
|
1155
|
+
}
|
|
1156
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1157
|
+
const apiHeaders = {
|
|
1158
|
+
"content-type": "application/json"
|
|
1159
|
+
};
|
|
1160
|
+
return this.client.call(
|
|
1161
|
+
"post",
|
|
1162
|
+
uri,
|
|
1163
|
+
apiHeaders,
|
|
1164
|
+
payload
|
|
1165
|
+
);
|
|
1166
|
+
}
|
|
1167
|
+
updateFcmProvider(paramsOrFirst, ...rest) {
|
|
1168
|
+
let params;
|
|
1169
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1170
|
+
params = paramsOrFirst || {};
|
|
1171
|
+
} else {
|
|
1172
|
+
params = {
|
|
1173
|
+
providerId: paramsOrFirst,
|
|
1174
|
+
name: rest[0],
|
|
1175
|
+
enabled: rest[1],
|
|
1176
|
+
serviceAccountJSON: rest[2]
|
|
1177
|
+
};
|
|
1178
|
+
}
|
|
1179
|
+
const providerId = params.providerId;
|
|
1180
|
+
const name = params.name;
|
|
1181
|
+
const enabled = params.enabled;
|
|
1182
|
+
const serviceAccountJSON = params.serviceAccountJSON;
|
|
1183
|
+
if (typeof providerId === "undefined") {
|
|
1184
|
+
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1185
|
+
}
|
|
1186
|
+
const apiPath = "/messaging/providers/fcm/{providerId}".replace("{providerId}", providerId);
|
|
1187
|
+
const payload = {};
|
|
1188
|
+
if (typeof name !== "undefined") {
|
|
1189
|
+
payload["name"] = name;
|
|
1190
|
+
}
|
|
1191
|
+
if (typeof enabled !== "undefined") {
|
|
1192
|
+
payload["enabled"] = enabled;
|
|
1193
|
+
}
|
|
1194
|
+
if (typeof serviceAccountJSON !== "undefined") {
|
|
1195
|
+
payload["serviceAccountJSON"] = serviceAccountJSON;
|
|
1196
|
+
}
|
|
1197
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1198
|
+
const apiHeaders = {
|
|
1199
|
+
"content-type": "application/json"
|
|
1200
|
+
};
|
|
1201
|
+
return this.client.call(
|
|
1202
|
+
"patch",
|
|
1203
|
+
uri,
|
|
1204
|
+
apiHeaders,
|
|
1205
|
+
payload
|
|
1206
|
+
);
|
|
1207
|
+
}
|
|
1208
|
+
updateFCMProvider(paramsOrFirst, ...rest) {
|
|
1209
|
+
let params;
|
|
1210
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1211
|
+
params = paramsOrFirst || {};
|
|
1212
|
+
} else {
|
|
1213
|
+
params = {
|
|
1214
|
+
providerId: paramsOrFirst,
|
|
1215
|
+
name: rest[0],
|
|
1216
|
+
enabled: rest[1],
|
|
1217
|
+
serviceAccountJSON: rest[2]
|
|
1218
|
+
};
|
|
1219
|
+
}
|
|
1220
|
+
const providerId = params.providerId;
|
|
1221
|
+
const name = params.name;
|
|
1222
|
+
const enabled = params.enabled;
|
|
1223
|
+
const serviceAccountJSON = params.serviceAccountJSON;
|
|
768
1224
|
if (typeof providerId === "undefined") {
|
|
769
1225
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
770
1226
|
}
|
|
@@ -790,23 +1246,34 @@ class Messaging {
|
|
|
790
1246
|
payload
|
|
791
1247
|
);
|
|
792
1248
|
}
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
1249
|
+
createMailgunProvider(paramsOrFirst, ...rest) {
|
|
1250
|
+
let params;
|
|
1251
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1252
|
+
params = paramsOrFirst || {};
|
|
1253
|
+
} else {
|
|
1254
|
+
params = {
|
|
1255
|
+
providerId: paramsOrFirst,
|
|
1256
|
+
name: rest[0],
|
|
1257
|
+
apiKey: rest[1],
|
|
1258
|
+
domain: rest[2],
|
|
1259
|
+
isEuRegion: rest[3],
|
|
1260
|
+
fromName: rest[4],
|
|
1261
|
+
fromEmail: rest[5],
|
|
1262
|
+
replyToName: rest[6],
|
|
1263
|
+
replyToEmail: rest[7],
|
|
1264
|
+
enabled: rest[8]
|
|
1265
|
+
};
|
|
1266
|
+
}
|
|
1267
|
+
const providerId = params.providerId;
|
|
1268
|
+
const name = params.name;
|
|
1269
|
+
const apiKey = params.apiKey;
|
|
1270
|
+
const domain = params.domain;
|
|
1271
|
+
const isEuRegion = params.isEuRegion;
|
|
1272
|
+
const fromName = params.fromName;
|
|
1273
|
+
const fromEmail = params.fromEmail;
|
|
1274
|
+
const replyToName = params.replyToName;
|
|
1275
|
+
const replyToEmail = params.replyToEmail;
|
|
1276
|
+
const enabled = params.enabled;
|
|
810
1277
|
if (typeof providerId === "undefined") {
|
|
811
1278
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
812
1279
|
}
|
|
@@ -856,23 +1323,34 @@ class Messaging {
|
|
|
856
1323
|
payload
|
|
857
1324
|
);
|
|
858
1325
|
}
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
1326
|
+
updateMailgunProvider(paramsOrFirst, ...rest) {
|
|
1327
|
+
let params;
|
|
1328
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1329
|
+
params = paramsOrFirst || {};
|
|
1330
|
+
} else {
|
|
1331
|
+
params = {
|
|
1332
|
+
providerId: paramsOrFirst,
|
|
1333
|
+
name: rest[0],
|
|
1334
|
+
apiKey: rest[1],
|
|
1335
|
+
domain: rest[2],
|
|
1336
|
+
isEuRegion: rest[3],
|
|
1337
|
+
enabled: rest[4],
|
|
1338
|
+
fromName: rest[5],
|
|
1339
|
+
fromEmail: rest[6],
|
|
1340
|
+
replyToName: rest[7],
|
|
1341
|
+
replyToEmail: rest[8]
|
|
1342
|
+
};
|
|
1343
|
+
}
|
|
1344
|
+
const providerId = params.providerId;
|
|
1345
|
+
const name = params.name;
|
|
1346
|
+
const apiKey = params.apiKey;
|
|
1347
|
+
const domain = params.domain;
|
|
1348
|
+
const isEuRegion = params.isEuRegion;
|
|
1349
|
+
const enabled = params.enabled;
|
|
1350
|
+
const fromName = params.fromName;
|
|
1351
|
+
const fromEmail = params.fromEmail;
|
|
1352
|
+
const replyToName = params.replyToName;
|
|
1353
|
+
const replyToEmail = params.replyToEmail;
|
|
876
1354
|
if (typeof providerId === "undefined") {
|
|
877
1355
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
878
1356
|
}
|
|
@@ -916,19 +1394,26 @@ class Messaging {
|
|
|
916
1394
|
payload
|
|
917
1395
|
);
|
|
918
1396
|
}
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
1397
|
+
createMsg91Provider(paramsOrFirst, ...rest) {
|
|
1398
|
+
let params;
|
|
1399
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1400
|
+
params = paramsOrFirst || {};
|
|
1401
|
+
} else {
|
|
1402
|
+
params = {
|
|
1403
|
+
providerId: paramsOrFirst,
|
|
1404
|
+
name: rest[0],
|
|
1405
|
+
templateId: rest[1],
|
|
1406
|
+
senderId: rest[2],
|
|
1407
|
+
authKey: rest[3],
|
|
1408
|
+
enabled: rest[4]
|
|
1409
|
+
};
|
|
1410
|
+
}
|
|
1411
|
+
const providerId = params.providerId;
|
|
1412
|
+
const name = params.name;
|
|
1413
|
+
const templateId = params.templateId;
|
|
1414
|
+
const senderId = params.senderId;
|
|
1415
|
+
const authKey = params.authKey;
|
|
1416
|
+
const enabled = params.enabled;
|
|
932
1417
|
if (typeof providerId === "undefined") {
|
|
933
1418
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
934
1419
|
}
|
|
@@ -966,19 +1451,26 @@ class Messaging {
|
|
|
966
1451
|
payload
|
|
967
1452
|
);
|
|
968
1453
|
}
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
1454
|
+
updateMsg91Provider(paramsOrFirst, ...rest) {
|
|
1455
|
+
let params;
|
|
1456
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1457
|
+
params = paramsOrFirst || {};
|
|
1458
|
+
} else {
|
|
1459
|
+
params = {
|
|
1460
|
+
providerId: paramsOrFirst,
|
|
1461
|
+
name: rest[0],
|
|
1462
|
+
enabled: rest[1],
|
|
1463
|
+
templateId: rest[2],
|
|
1464
|
+
senderId: rest[3],
|
|
1465
|
+
authKey: rest[4]
|
|
1466
|
+
};
|
|
1467
|
+
}
|
|
1468
|
+
const providerId = params.providerId;
|
|
1469
|
+
const name = params.name;
|
|
1470
|
+
const enabled = params.enabled;
|
|
1471
|
+
const templateId = params.templateId;
|
|
1472
|
+
const senderId = params.senderId;
|
|
1473
|
+
const authKey = params.authKey;
|
|
982
1474
|
if (typeof providerId === "undefined") {
|
|
983
1475
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
984
1476
|
}
|
|
@@ -1010,21 +1502,30 @@ class Messaging {
|
|
|
1010
1502
|
payload
|
|
1011
1503
|
);
|
|
1012
1504
|
}
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1505
|
+
createSendgridProvider(paramsOrFirst, ...rest) {
|
|
1506
|
+
let params;
|
|
1507
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1508
|
+
params = paramsOrFirst || {};
|
|
1509
|
+
} else {
|
|
1510
|
+
params = {
|
|
1511
|
+
providerId: paramsOrFirst,
|
|
1512
|
+
name: rest[0],
|
|
1513
|
+
apiKey: rest[1],
|
|
1514
|
+
fromName: rest[2],
|
|
1515
|
+
fromEmail: rest[3],
|
|
1516
|
+
replyToName: rest[4],
|
|
1517
|
+
replyToEmail: rest[5],
|
|
1518
|
+
enabled: rest[6]
|
|
1519
|
+
};
|
|
1520
|
+
}
|
|
1521
|
+
const providerId = params.providerId;
|
|
1522
|
+
const name = params.name;
|
|
1523
|
+
const apiKey = params.apiKey;
|
|
1524
|
+
const fromName = params.fromName;
|
|
1525
|
+
const fromEmail = params.fromEmail;
|
|
1526
|
+
const replyToName = params.replyToName;
|
|
1527
|
+
const replyToEmail = params.replyToEmail;
|
|
1528
|
+
const enabled = params.enabled;
|
|
1028
1529
|
if (typeof providerId === "undefined") {
|
|
1029
1530
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1030
1531
|
}
|
|
@@ -1068,21 +1569,30 @@ class Messaging {
|
|
|
1068
1569
|
payload
|
|
1069
1570
|
);
|
|
1070
1571
|
}
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1572
|
+
updateSendgridProvider(paramsOrFirst, ...rest) {
|
|
1573
|
+
let params;
|
|
1574
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1575
|
+
params = paramsOrFirst || {};
|
|
1576
|
+
} else {
|
|
1577
|
+
params = {
|
|
1578
|
+
providerId: paramsOrFirst,
|
|
1579
|
+
name: rest[0],
|
|
1580
|
+
enabled: rest[1],
|
|
1581
|
+
apiKey: rest[2],
|
|
1582
|
+
fromName: rest[3],
|
|
1583
|
+
fromEmail: rest[4],
|
|
1584
|
+
replyToName: rest[5],
|
|
1585
|
+
replyToEmail: rest[6]
|
|
1586
|
+
};
|
|
1587
|
+
}
|
|
1588
|
+
const providerId = params.providerId;
|
|
1589
|
+
const name = params.name;
|
|
1590
|
+
const enabled = params.enabled;
|
|
1591
|
+
const apiKey = params.apiKey;
|
|
1592
|
+
const fromName = params.fromName;
|
|
1593
|
+
const fromEmail = params.fromEmail;
|
|
1594
|
+
const replyToName = params.replyToName;
|
|
1595
|
+
const replyToEmail = params.replyToEmail;
|
|
1086
1596
|
if (typeof providerId === "undefined") {
|
|
1087
1597
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1088
1598
|
}
|
|
@@ -1120,27 +1630,142 @@ class Messaging {
|
|
|
1120
1630
|
payload
|
|
1121
1631
|
);
|
|
1122
1632
|
}
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1633
|
+
createSmtpProvider(paramsOrFirst, ...rest) {
|
|
1634
|
+
let params;
|
|
1635
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1636
|
+
params = paramsOrFirst || {};
|
|
1637
|
+
} else {
|
|
1638
|
+
params = {
|
|
1639
|
+
providerId: paramsOrFirst,
|
|
1640
|
+
name: rest[0],
|
|
1641
|
+
host: rest[1],
|
|
1642
|
+
port: rest[2],
|
|
1643
|
+
username: rest[3],
|
|
1644
|
+
password: rest[4],
|
|
1645
|
+
encryption: rest[5],
|
|
1646
|
+
autoTLS: rest[6],
|
|
1647
|
+
mailer: rest[7],
|
|
1648
|
+
fromName: rest[8],
|
|
1649
|
+
fromEmail: rest[9],
|
|
1650
|
+
replyToName: rest[10],
|
|
1651
|
+
replyToEmail: rest[11],
|
|
1652
|
+
enabled: rest[12]
|
|
1653
|
+
};
|
|
1654
|
+
}
|
|
1655
|
+
const providerId = params.providerId;
|
|
1656
|
+
const name = params.name;
|
|
1657
|
+
const host = params.host;
|
|
1658
|
+
const port = params.port;
|
|
1659
|
+
const username = params.username;
|
|
1660
|
+
const password = params.password;
|
|
1661
|
+
const encryption = params.encryption;
|
|
1662
|
+
const autoTLS = params.autoTLS;
|
|
1663
|
+
const mailer = params.mailer;
|
|
1664
|
+
const fromName = params.fromName;
|
|
1665
|
+
const fromEmail = params.fromEmail;
|
|
1666
|
+
const replyToName = params.replyToName;
|
|
1667
|
+
const replyToEmail = params.replyToEmail;
|
|
1668
|
+
const enabled = params.enabled;
|
|
1669
|
+
if (typeof providerId === "undefined") {
|
|
1670
|
+
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1671
|
+
}
|
|
1672
|
+
if (typeof name === "undefined") {
|
|
1673
|
+
throw new client.AppwriteException('Missing required parameter: "name"');
|
|
1674
|
+
}
|
|
1675
|
+
if (typeof host === "undefined") {
|
|
1676
|
+
throw new client.AppwriteException('Missing required parameter: "host"');
|
|
1677
|
+
}
|
|
1678
|
+
const apiPath = "/messaging/providers/smtp";
|
|
1679
|
+
const payload = {};
|
|
1680
|
+
if (typeof providerId !== "undefined") {
|
|
1681
|
+
payload["providerId"] = providerId;
|
|
1682
|
+
}
|
|
1683
|
+
if (typeof name !== "undefined") {
|
|
1684
|
+
payload["name"] = name;
|
|
1685
|
+
}
|
|
1686
|
+
if (typeof host !== "undefined") {
|
|
1687
|
+
payload["host"] = host;
|
|
1688
|
+
}
|
|
1689
|
+
if (typeof port !== "undefined") {
|
|
1690
|
+
payload["port"] = port;
|
|
1691
|
+
}
|
|
1692
|
+
if (typeof username !== "undefined") {
|
|
1693
|
+
payload["username"] = username;
|
|
1694
|
+
}
|
|
1695
|
+
if (typeof password !== "undefined") {
|
|
1696
|
+
payload["password"] = password;
|
|
1697
|
+
}
|
|
1698
|
+
if (typeof encryption !== "undefined") {
|
|
1699
|
+
payload["encryption"] = encryption;
|
|
1700
|
+
}
|
|
1701
|
+
if (typeof autoTLS !== "undefined") {
|
|
1702
|
+
payload["autoTLS"] = autoTLS;
|
|
1703
|
+
}
|
|
1704
|
+
if (typeof mailer !== "undefined") {
|
|
1705
|
+
payload["mailer"] = mailer;
|
|
1706
|
+
}
|
|
1707
|
+
if (typeof fromName !== "undefined") {
|
|
1708
|
+
payload["fromName"] = fromName;
|
|
1709
|
+
}
|
|
1710
|
+
if (typeof fromEmail !== "undefined") {
|
|
1711
|
+
payload["fromEmail"] = fromEmail;
|
|
1712
|
+
}
|
|
1713
|
+
if (typeof replyToName !== "undefined") {
|
|
1714
|
+
payload["replyToName"] = replyToName;
|
|
1715
|
+
}
|
|
1716
|
+
if (typeof replyToEmail !== "undefined") {
|
|
1717
|
+
payload["replyToEmail"] = replyToEmail;
|
|
1718
|
+
}
|
|
1719
|
+
if (typeof enabled !== "undefined") {
|
|
1720
|
+
payload["enabled"] = enabled;
|
|
1721
|
+
}
|
|
1722
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1723
|
+
const apiHeaders = {
|
|
1724
|
+
"content-type": "application/json"
|
|
1725
|
+
};
|
|
1726
|
+
return this.client.call(
|
|
1727
|
+
"post",
|
|
1728
|
+
uri,
|
|
1729
|
+
apiHeaders,
|
|
1730
|
+
payload
|
|
1731
|
+
);
|
|
1732
|
+
}
|
|
1733
|
+
createSMTPProvider(paramsOrFirst, ...rest) {
|
|
1734
|
+
let params;
|
|
1735
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1736
|
+
params = paramsOrFirst || {};
|
|
1737
|
+
} else {
|
|
1738
|
+
params = {
|
|
1739
|
+
providerId: paramsOrFirst,
|
|
1740
|
+
name: rest[0],
|
|
1741
|
+
host: rest[1],
|
|
1742
|
+
port: rest[2],
|
|
1743
|
+
username: rest[3],
|
|
1744
|
+
password: rest[4],
|
|
1745
|
+
encryption: rest[5],
|
|
1746
|
+
autoTLS: rest[6],
|
|
1747
|
+
mailer: rest[7],
|
|
1748
|
+
fromName: rest[8],
|
|
1749
|
+
fromEmail: rest[9],
|
|
1750
|
+
replyToName: rest[10],
|
|
1751
|
+
replyToEmail: rest[11],
|
|
1752
|
+
enabled: rest[12]
|
|
1753
|
+
};
|
|
1754
|
+
}
|
|
1755
|
+
const providerId = params.providerId;
|
|
1756
|
+
const name = params.name;
|
|
1757
|
+
const host = params.host;
|
|
1758
|
+
const port = params.port;
|
|
1759
|
+
const username = params.username;
|
|
1760
|
+
const password = params.password;
|
|
1761
|
+
const encryption = params.encryption;
|
|
1762
|
+
const autoTLS = params.autoTLS;
|
|
1763
|
+
const mailer = params.mailer;
|
|
1764
|
+
const fromName = params.fromName;
|
|
1765
|
+
const fromEmail = params.fromEmail;
|
|
1766
|
+
const replyToName = params.replyToName;
|
|
1767
|
+
const replyToEmail = params.replyToEmail;
|
|
1768
|
+
const enabled = params.enabled;
|
|
1144
1769
|
if (typeof providerId === "undefined") {
|
|
1145
1770
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1146
1771
|
}
|
|
@@ -1205,27 +1830,133 @@ class Messaging {
|
|
|
1205
1830
|
payload
|
|
1206
1831
|
);
|
|
1207
1832
|
}
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1833
|
+
updateSmtpProvider(paramsOrFirst, ...rest) {
|
|
1834
|
+
let params;
|
|
1835
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1836
|
+
params = paramsOrFirst || {};
|
|
1837
|
+
} else {
|
|
1838
|
+
params = {
|
|
1839
|
+
providerId: paramsOrFirst,
|
|
1840
|
+
name: rest[0],
|
|
1841
|
+
host: rest[1],
|
|
1842
|
+
port: rest[2],
|
|
1843
|
+
username: rest[3],
|
|
1844
|
+
password: rest[4],
|
|
1845
|
+
encryption: rest[5],
|
|
1846
|
+
autoTLS: rest[6],
|
|
1847
|
+
mailer: rest[7],
|
|
1848
|
+
fromName: rest[8],
|
|
1849
|
+
fromEmail: rest[9],
|
|
1850
|
+
replyToName: rest[10],
|
|
1851
|
+
replyToEmail: rest[11],
|
|
1852
|
+
enabled: rest[12]
|
|
1853
|
+
};
|
|
1854
|
+
}
|
|
1855
|
+
const providerId = params.providerId;
|
|
1856
|
+
const name = params.name;
|
|
1857
|
+
const host = params.host;
|
|
1858
|
+
const port = params.port;
|
|
1859
|
+
const username = params.username;
|
|
1860
|
+
const password = params.password;
|
|
1861
|
+
const encryption = params.encryption;
|
|
1862
|
+
const autoTLS = params.autoTLS;
|
|
1863
|
+
const mailer = params.mailer;
|
|
1864
|
+
const fromName = params.fromName;
|
|
1865
|
+
const fromEmail = params.fromEmail;
|
|
1866
|
+
const replyToName = params.replyToName;
|
|
1867
|
+
const replyToEmail = params.replyToEmail;
|
|
1868
|
+
const enabled = params.enabled;
|
|
1869
|
+
if (typeof providerId === "undefined") {
|
|
1870
|
+
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1871
|
+
}
|
|
1872
|
+
const apiPath = "/messaging/providers/smtp/{providerId}".replace("{providerId}", providerId);
|
|
1873
|
+
const payload = {};
|
|
1874
|
+
if (typeof name !== "undefined") {
|
|
1875
|
+
payload["name"] = name;
|
|
1876
|
+
}
|
|
1877
|
+
if (typeof host !== "undefined") {
|
|
1878
|
+
payload["host"] = host;
|
|
1879
|
+
}
|
|
1880
|
+
if (typeof port !== "undefined") {
|
|
1881
|
+
payload["port"] = port;
|
|
1882
|
+
}
|
|
1883
|
+
if (typeof username !== "undefined") {
|
|
1884
|
+
payload["username"] = username;
|
|
1885
|
+
}
|
|
1886
|
+
if (typeof password !== "undefined") {
|
|
1887
|
+
payload["password"] = password;
|
|
1888
|
+
}
|
|
1889
|
+
if (typeof encryption !== "undefined") {
|
|
1890
|
+
payload["encryption"] = encryption;
|
|
1891
|
+
}
|
|
1892
|
+
if (typeof autoTLS !== "undefined") {
|
|
1893
|
+
payload["autoTLS"] = autoTLS;
|
|
1894
|
+
}
|
|
1895
|
+
if (typeof mailer !== "undefined") {
|
|
1896
|
+
payload["mailer"] = mailer;
|
|
1897
|
+
}
|
|
1898
|
+
if (typeof fromName !== "undefined") {
|
|
1899
|
+
payload["fromName"] = fromName;
|
|
1900
|
+
}
|
|
1901
|
+
if (typeof fromEmail !== "undefined") {
|
|
1902
|
+
payload["fromEmail"] = fromEmail;
|
|
1903
|
+
}
|
|
1904
|
+
if (typeof replyToName !== "undefined") {
|
|
1905
|
+
payload["replyToName"] = replyToName;
|
|
1906
|
+
}
|
|
1907
|
+
if (typeof replyToEmail !== "undefined") {
|
|
1908
|
+
payload["replyToEmail"] = replyToEmail;
|
|
1909
|
+
}
|
|
1910
|
+
if (typeof enabled !== "undefined") {
|
|
1911
|
+
payload["enabled"] = enabled;
|
|
1912
|
+
}
|
|
1913
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1914
|
+
const apiHeaders = {
|
|
1915
|
+
"content-type": "application/json"
|
|
1916
|
+
};
|
|
1917
|
+
return this.client.call(
|
|
1918
|
+
"patch",
|
|
1919
|
+
uri,
|
|
1920
|
+
apiHeaders,
|
|
1921
|
+
payload
|
|
1922
|
+
);
|
|
1923
|
+
}
|
|
1924
|
+
updateSMTPProvider(paramsOrFirst, ...rest) {
|
|
1925
|
+
let params;
|
|
1926
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1927
|
+
params = paramsOrFirst || {};
|
|
1928
|
+
} else {
|
|
1929
|
+
params = {
|
|
1930
|
+
providerId: paramsOrFirst,
|
|
1931
|
+
name: rest[0],
|
|
1932
|
+
host: rest[1],
|
|
1933
|
+
port: rest[2],
|
|
1934
|
+
username: rest[3],
|
|
1935
|
+
password: rest[4],
|
|
1936
|
+
encryption: rest[5],
|
|
1937
|
+
autoTLS: rest[6],
|
|
1938
|
+
mailer: rest[7],
|
|
1939
|
+
fromName: rest[8],
|
|
1940
|
+
fromEmail: rest[9],
|
|
1941
|
+
replyToName: rest[10],
|
|
1942
|
+
replyToEmail: rest[11],
|
|
1943
|
+
enabled: rest[12]
|
|
1944
|
+
};
|
|
1945
|
+
}
|
|
1946
|
+
const providerId = params.providerId;
|
|
1947
|
+
const name = params.name;
|
|
1948
|
+
const host = params.host;
|
|
1949
|
+
const port = params.port;
|
|
1950
|
+
const username = params.username;
|
|
1951
|
+
const password = params.password;
|
|
1952
|
+
const encryption = params.encryption;
|
|
1953
|
+
const autoTLS = params.autoTLS;
|
|
1954
|
+
const mailer = params.mailer;
|
|
1955
|
+
const fromName = params.fromName;
|
|
1956
|
+
const fromEmail = params.fromEmail;
|
|
1957
|
+
const replyToName = params.replyToName;
|
|
1958
|
+
const replyToEmail = params.replyToEmail;
|
|
1959
|
+
const enabled = params.enabled;
|
|
1229
1960
|
if (typeof providerId === "undefined") {
|
|
1230
1961
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1231
1962
|
}
|
|
@@ -1281,19 +2012,26 @@ class Messaging {
|
|
|
1281
2012
|
payload
|
|
1282
2013
|
);
|
|
1283
2014
|
}
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
2015
|
+
createTelesignProvider(paramsOrFirst, ...rest) {
|
|
2016
|
+
let params;
|
|
2017
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2018
|
+
params = paramsOrFirst || {};
|
|
2019
|
+
} else {
|
|
2020
|
+
params = {
|
|
2021
|
+
providerId: paramsOrFirst,
|
|
2022
|
+
name: rest[0],
|
|
2023
|
+
from: rest[1],
|
|
2024
|
+
customerId: rest[2],
|
|
2025
|
+
apiKey: rest[3],
|
|
2026
|
+
enabled: rest[4]
|
|
2027
|
+
};
|
|
2028
|
+
}
|
|
2029
|
+
const providerId = params.providerId;
|
|
2030
|
+
const name = params.name;
|
|
2031
|
+
const from = params.from;
|
|
2032
|
+
const customerId = params.customerId;
|
|
2033
|
+
const apiKey = params.apiKey;
|
|
2034
|
+
const enabled = params.enabled;
|
|
1297
2035
|
if (typeof providerId === "undefined") {
|
|
1298
2036
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1299
2037
|
}
|
|
@@ -1331,19 +2069,26 @@ class Messaging {
|
|
|
1331
2069
|
payload
|
|
1332
2070
|
);
|
|
1333
2071
|
}
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
2072
|
+
updateTelesignProvider(paramsOrFirst, ...rest) {
|
|
2073
|
+
let params;
|
|
2074
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2075
|
+
params = paramsOrFirst || {};
|
|
2076
|
+
} else {
|
|
2077
|
+
params = {
|
|
2078
|
+
providerId: paramsOrFirst,
|
|
2079
|
+
name: rest[0],
|
|
2080
|
+
enabled: rest[1],
|
|
2081
|
+
customerId: rest[2],
|
|
2082
|
+
apiKey: rest[3],
|
|
2083
|
+
from: rest[4]
|
|
2084
|
+
};
|
|
2085
|
+
}
|
|
2086
|
+
const providerId = params.providerId;
|
|
2087
|
+
const name = params.name;
|
|
2088
|
+
const enabled = params.enabled;
|
|
2089
|
+
const customerId = params.customerId;
|
|
2090
|
+
const apiKey = params.apiKey;
|
|
2091
|
+
const from = params.from;
|
|
1347
2092
|
if (typeof providerId === "undefined") {
|
|
1348
2093
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1349
2094
|
}
|
|
@@ -1375,19 +2120,26 @@ class Messaging {
|
|
|
1375
2120
|
payload
|
|
1376
2121
|
);
|
|
1377
2122
|
}
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
2123
|
+
createTextmagicProvider(paramsOrFirst, ...rest) {
|
|
2124
|
+
let params;
|
|
2125
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2126
|
+
params = paramsOrFirst || {};
|
|
2127
|
+
} else {
|
|
2128
|
+
params = {
|
|
2129
|
+
providerId: paramsOrFirst,
|
|
2130
|
+
name: rest[0],
|
|
2131
|
+
from: rest[1],
|
|
2132
|
+
username: rest[2],
|
|
2133
|
+
apiKey: rest[3],
|
|
2134
|
+
enabled: rest[4]
|
|
2135
|
+
};
|
|
2136
|
+
}
|
|
2137
|
+
const providerId = params.providerId;
|
|
2138
|
+
const name = params.name;
|
|
2139
|
+
const from = params.from;
|
|
2140
|
+
const username = params.username;
|
|
2141
|
+
const apiKey = params.apiKey;
|
|
2142
|
+
const enabled = params.enabled;
|
|
1391
2143
|
if (typeof providerId === "undefined") {
|
|
1392
2144
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1393
2145
|
}
|
|
@@ -1425,19 +2177,26 @@ class Messaging {
|
|
|
1425
2177
|
payload
|
|
1426
2178
|
);
|
|
1427
2179
|
}
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
2180
|
+
updateTextmagicProvider(paramsOrFirst, ...rest) {
|
|
2181
|
+
let params;
|
|
2182
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2183
|
+
params = paramsOrFirst || {};
|
|
2184
|
+
} else {
|
|
2185
|
+
params = {
|
|
2186
|
+
providerId: paramsOrFirst,
|
|
2187
|
+
name: rest[0],
|
|
2188
|
+
enabled: rest[1],
|
|
2189
|
+
username: rest[2],
|
|
2190
|
+
apiKey: rest[3],
|
|
2191
|
+
from: rest[4]
|
|
2192
|
+
};
|
|
2193
|
+
}
|
|
2194
|
+
const providerId = params.providerId;
|
|
2195
|
+
const name = params.name;
|
|
2196
|
+
const enabled = params.enabled;
|
|
2197
|
+
const username = params.username;
|
|
2198
|
+
const apiKey = params.apiKey;
|
|
2199
|
+
const from = params.from;
|
|
1441
2200
|
if (typeof providerId === "undefined") {
|
|
1442
2201
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1443
2202
|
}
|
|
@@ -1469,19 +2228,26 @@ class Messaging {
|
|
|
1469
2228
|
payload
|
|
1470
2229
|
);
|
|
1471
2230
|
}
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
2231
|
+
createTwilioProvider(paramsOrFirst, ...rest) {
|
|
2232
|
+
let params;
|
|
2233
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2234
|
+
params = paramsOrFirst || {};
|
|
2235
|
+
} else {
|
|
2236
|
+
params = {
|
|
2237
|
+
providerId: paramsOrFirst,
|
|
2238
|
+
name: rest[0],
|
|
2239
|
+
from: rest[1],
|
|
2240
|
+
accountSid: rest[2],
|
|
2241
|
+
authToken: rest[3],
|
|
2242
|
+
enabled: rest[4]
|
|
2243
|
+
};
|
|
2244
|
+
}
|
|
2245
|
+
const providerId = params.providerId;
|
|
2246
|
+
const name = params.name;
|
|
2247
|
+
const from = params.from;
|
|
2248
|
+
const accountSid = params.accountSid;
|
|
2249
|
+
const authToken = params.authToken;
|
|
2250
|
+
const enabled = params.enabled;
|
|
1485
2251
|
if (typeof providerId === "undefined") {
|
|
1486
2252
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1487
2253
|
}
|
|
@@ -1519,19 +2285,26 @@ class Messaging {
|
|
|
1519
2285
|
payload
|
|
1520
2286
|
);
|
|
1521
2287
|
}
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
2288
|
+
updateTwilioProvider(paramsOrFirst, ...rest) {
|
|
2289
|
+
let params;
|
|
2290
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2291
|
+
params = paramsOrFirst || {};
|
|
2292
|
+
} else {
|
|
2293
|
+
params = {
|
|
2294
|
+
providerId: paramsOrFirst,
|
|
2295
|
+
name: rest[0],
|
|
2296
|
+
enabled: rest[1],
|
|
2297
|
+
accountSid: rest[2],
|
|
2298
|
+
authToken: rest[3],
|
|
2299
|
+
from: rest[4]
|
|
2300
|
+
};
|
|
2301
|
+
}
|
|
2302
|
+
const providerId = params.providerId;
|
|
2303
|
+
const name = params.name;
|
|
2304
|
+
const enabled = params.enabled;
|
|
2305
|
+
const accountSid = params.accountSid;
|
|
2306
|
+
const authToken = params.authToken;
|
|
2307
|
+
const from = params.from;
|
|
1535
2308
|
if (typeof providerId === "undefined") {
|
|
1536
2309
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1537
2310
|
}
|
|
@@ -1563,19 +2336,26 @@ class Messaging {
|
|
|
1563
2336
|
payload
|
|
1564
2337
|
);
|
|
1565
2338
|
}
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
2339
|
+
createVonageProvider(paramsOrFirst, ...rest) {
|
|
2340
|
+
let params;
|
|
2341
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2342
|
+
params = paramsOrFirst || {};
|
|
2343
|
+
} else {
|
|
2344
|
+
params = {
|
|
2345
|
+
providerId: paramsOrFirst,
|
|
2346
|
+
name: rest[0],
|
|
2347
|
+
from: rest[1],
|
|
2348
|
+
apiKey: rest[2],
|
|
2349
|
+
apiSecret: rest[3],
|
|
2350
|
+
enabled: rest[4]
|
|
2351
|
+
};
|
|
2352
|
+
}
|
|
2353
|
+
const providerId = params.providerId;
|
|
2354
|
+
const name = params.name;
|
|
2355
|
+
const from = params.from;
|
|
2356
|
+
const apiKey = params.apiKey;
|
|
2357
|
+
const apiSecret = params.apiSecret;
|
|
2358
|
+
const enabled = params.enabled;
|
|
1579
2359
|
if (typeof providerId === "undefined") {
|
|
1580
2360
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1581
2361
|
}
|
|
@@ -1613,19 +2393,26 @@ class Messaging {
|
|
|
1613
2393
|
payload
|
|
1614
2394
|
);
|
|
1615
2395
|
}
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
2396
|
+
updateVonageProvider(paramsOrFirst, ...rest) {
|
|
2397
|
+
let params;
|
|
2398
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2399
|
+
params = paramsOrFirst || {};
|
|
2400
|
+
} else {
|
|
2401
|
+
params = {
|
|
2402
|
+
providerId: paramsOrFirst,
|
|
2403
|
+
name: rest[0],
|
|
2404
|
+
enabled: rest[1],
|
|
2405
|
+
apiKey: rest[2],
|
|
2406
|
+
apiSecret: rest[3],
|
|
2407
|
+
from: rest[4]
|
|
2408
|
+
};
|
|
2409
|
+
}
|
|
2410
|
+
const providerId = params.providerId;
|
|
2411
|
+
const name = params.name;
|
|
2412
|
+
const enabled = params.enabled;
|
|
2413
|
+
const apiKey = params.apiKey;
|
|
2414
|
+
const apiSecret = params.apiSecret;
|
|
2415
|
+
const from = params.from;
|
|
1629
2416
|
if (typeof providerId === "undefined") {
|
|
1630
2417
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1631
2418
|
}
|
|
@@ -1657,15 +2444,16 @@ class Messaging {
|
|
|
1657
2444
|
payload
|
|
1658
2445
|
);
|
|
1659
2446
|
}
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
2447
|
+
getProvider(paramsOrFirst) {
|
|
2448
|
+
let params;
|
|
2449
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2450
|
+
params = paramsOrFirst || {};
|
|
2451
|
+
} else {
|
|
2452
|
+
params = {
|
|
2453
|
+
providerId: paramsOrFirst
|
|
2454
|
+
};
|
|
2455
|
+
}
|
|
2456
|
+
const providerId = params.providerId;
|
|
1669
2457
|
if (typeof providerId === "undefined") {
|
|
1670
2458
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1671
2459
|
}
|
|
@@ -1680,14 +2468,16 @@ class Messaging {
|
|
|
1680
2468
|
payload
|
|
1681
2469
|
);
|
|
1682
2470
|
}
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
2471
|
+
deleteProvider(paramsOrFirst) {
|
|
2472
|
+
let params;
|
|
2473
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2474
|
+
params = paramsOrFirst || {};
|
|
2475
|
+
} else {
|
|
2476
|
+
params = {
|
|
2477
|
+
providerId: paramsOrFirst
|
|
2478
|
+
};
|
|
2479
|
+
}
|
|
2480
|
+
const providerId = params.providerId;
|
|
1691
2481
|
if (typeof providerId === "undefined") {
|
|
1692
2482
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1693
2483
|
}
|
|
@@ -1704,15 +2494,18 @@ class Messaging {
|
|
|
1704
2494
|
payload
|
|
1705
2495
|
);
|
|
1706
2496
|
}
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
2497
|
+
listProviderLogs(paramsOrFirst, ...rest) {
|
|
2498
|
+
let params;
|
|
2499
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2500
|
+
params = paramsOrFirst || {};
|
|
2501
|
+
} else {
|
|
2502
|
+
params = {
|
|
2503
|
+
providerId: paramsOrFirst,
|
|
2504
|
+
queries: rest[0]
|
|
2505
|
+
};
|
|
2506
|
+
}
|
|
2507
|
+
const providerId = params.providerId;
|
|
2508
|
+
const queries = params.queries;
|
|
1716
2509
|
if (typeof providerId === "undefined") {
|
|
1717
2510
|
throw new client.AppwriteException('Missing required parameter: "providerId"');
|
|
1718
2511
|
}
|
|
@@ -1730,15 +2523,18 @@ class Messaging {
|
|
|
1730
2523
|
payload
|
|
1731
2524
|
);
|
|
1732
2525
|
}
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
2526
|
+
listSubscriberLogs(paramsOrFirst, ...rest) {
|
|
2527
|
+
let params;
|
|
2528
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2529
|
+
params = paramsOrFirst || {};
|
|
2530
|
+
} else {
|
|
2531
|
+
params = {
|
|
2532
|
+
subscriberId: paramsOrFirst,
|
|
2533
|
+
queries: rest[0]
|
|
2534
|
+
};
|
|
2535
|
+
}
|
|
2536
|
+
const subscriberId = params.subscriberId;
|
|
2537
|
+
const queries = params.queries;
|
|
1742
2538
|
if (typeof subscriberId === "undefined") {
|
|
1743
2539
|
throw new client.AppwriteException('Missing required parameter: "subscriberId"');
|
|
1744
2540
|
}
|
|
@@ -1756,15 +2552,18 @@ class Messaging {
|
|
|
1756
2552
|
payload
|
|
1757
2553
|
);
|
|
1758
2554
|
}
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
2555
|
+
listTopics(paramsOrFirst, ...rest) {
|
|
2556
|
+
let params;
|
|
2557
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2558
|
+
params = paramsOrFirst || {};
|
|
2559
|
+
} else {
|
|
2560
|
+
params = {
|
|
2561
|
+
queries: paramsOrFirst,
|
|
2562
|
+
search: rest[0]
|
|
2563
|
+
};
|
|
2564
|
+
}
|
|
2565
|
+
const queries = params.queries;
|
|
2566
|
+
const search = params.search;
|
|
1768
2567
|
const apiPath = "/messaging/topics";
|
|
1769
2568
|
const payload = {};
|
|
1770
2569
|
if (typeof queries !== "undefined") {
|
|
@@ -1782,16 +2581,20 @@ class Messaging {
|
|
|
1782
2581
|
payload
|
|
1783
2582
|
);
|
|
1784
2583
|
}
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
2584
|
+
createTopic(paramsOrFirst, ...rest) {
|
|
2585
|
+
let params;
|
|
2586
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2587
|
+
params = paramsOrFirst || {};
|
|
2588
|
+
} else {
|
|
2589
|
+
params = {
|
|
2590
|
+
topicId: paramsOrFirst,
|
|
2591
|
+
name: rest[0],
|
|
2592
|
+
subscribe: rest[1]
|
|
2593
|
+
};
|
|
2594
|
+
}
|
|
2595
|
+
const topicId = params.topicId;
|
|
2596
|
+
const name = params.name;
|
|
2597
|
+
const subscribe = params.subscribe;
|
|
1795
2598
|
if (typeof topicId === "undefined") {
|
|
1796
2599
|
throw new client.AppwriteException('Missing required parameter: "topicId"');
|
|
1797
2600
|
}
|
|
@@ -1820,15 +2623,16 @@ class Messaging {
|
|
|
1820
2623
|
payload
|
|
1821
2624
|
);
|
|
1822
2625
|
}
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
2626
|
+
getTopic(paramsOrFirst) {
|
|
2627
|
+
let params;
|
|
2628
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2629
|
+
params = paramsOrFirst || {};
|
|
2630
|
+
} else {
|
|
2631
|
+
params = {
|
|
2632
|
+
topicId: paramsOrFirst
|
|
2633
|
+
};
|
|
2634
|
+
}
|
|
2635
|
+
const topicId = params.topicId;
|
|
1832
2636
|
if (typeof topicId === "undefined") {
|
|
1833
2637
|
throw new client.AppwriteException('Missing required parameter: "topicId"');
|
|
1834
2638
|
}
|
|
@@ -1843,17 +2647,20 @@ class Messaging {
|
|
|
1843
2647
|
payload
|
|
1844
2648
|
);
|
|
1845
2649
|
}
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
2650
|
+
updateTopic(paramsOrFirst, ...rest) {
|
|
2651
|
+
let params;
|
|
2652
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2653
|
+
params = paramsOrFirst || {};
|
|
2654
|
+
} else {
|
|
2655
|
+
params = {
|
|
2656
|
+
topicId: paramsOrFirst,
|
|
2657
|
+
name: rest[0],
|
|
2658
|
+
subscribe: rest[1]
|
|
2659
|
+
};
|
|
2660
|
+
}
|
|
2661
|
+
const topicId = params.topicId;
|
|
2662
|
+
const name = params.name;
|
|
2663
|
+
const subscribe = params.subscribe;
|
|
1857
2664
|
if (typeof topicId === "undefined") {
|
|
1858
2665
|
throw new client.AppwriteException('Missing required parameter: "topicId"');
|
|
1859
2666
|
}
|
|
@@ -1876,14 +2683,16 @@ class Messaging {
|
|
|
1876
2683
|
payload
|
|
1877
2684
|
);
|
|
1878
2685
|
}
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
2686
|
+
deleteTopic(paramsOrFirst) {
|
|
2687
|
+
let params;
|
|
2688
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2689
|
+
params = paramsOrFirst || {};
|
|
2690
|
+
} else {
|
|
2691
|
+
params = {
|
|
2692
|
+
topicId: paramsOrFirst
|
|
2693
|
+
};
|
|
2694
|
+
}
|
|
2695
|
+
const topicId = params.topicId;
|
|
1887
2696
|
if (typeof topicId === "undefined") {
|
|
1888
2697
|
throw new client.AppwriteException('Missing required parameter: "topicId"');
|
|
1889
2698
|
}
|
|
@@ -1900,15 +2709,18 @@ class Messaging {
|
|
|
1900
2709
|
payload
|
|
1901
2710
|
);
|
|
1902
2711
|
}
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
2712
|
+
listTopicLogs(paramsOrFirst, ...rest) {
|
|
2713
|
+
let params;
|
|
2714
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2715
|
+
params = paramsOrFirst || {};
|
|
2716
|
+
} else {
|
|
2717
|
+
params = {
|
|
2718
|
+
topicId: paramsOrFirst,
|
|
2719
|
+
queries: rest[0]
|
|
2720
|
+
};
|
|
2721
|
+
}
|
|
2722
|
+
const topicId = params.topicId;
|
|
2723
|
+
const queries = params.queries;
|
|
1912
2724
|
if (typeof topicId === "undefined") {
|
|
1913
2725
|
throw new client.AppwriteException('Missing required parameter: "topicId"');
|
|
1914
2726
|
}
|
|
@@ -1926,16 +2738,20 @@ class Messaging {
|
|
|
1926
2738
|
payload
|
|
1927
2739
|
);
|
|
1928
2740
|
}
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
2741
|
+
listSubscribers(paramsOrFirst, ...rest) {
|
|
2742
|
+
let params;
|
|
2743
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2744
|
+
params = paramsOrFirst || {};
|
|
2745
|
+
} else {
|
|
2746
|
+
params = {
|
|
2747
|
+
topicId: paramsOrFirst,
|
|
2748
|
+
queries: rest[0],
|
|
2749
|
+
search: rest[1]
|
|
2750
|
+
};
|
|
2751
|
+
}
|
|
2752
|
+
const topicId = params.topicId;
|
|
2753
|
+
const queries = params.queries;
|
|
2754
|
+
const search = params.search;
|
|
1939
2755
|
if (typeof topicId === "undefined") {
|
|
1940
2756
|
throw new client.AppwriteException('Missing required parameter: "topicId"');
|
|
1941
2757
|
}
|
|
@@ -1956,16 +2772,20 @@ class Messaging {
|
|
|
1956
2772
|
payload
|
|
1957
2773
|
);
|
|
1958
2774
|
}
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
2775
|
+
createSubscriber(paramsOrFirst, ...rest) {
|
|
2776
|
+
let params;
|
|
2777
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2778
|
+
params = paramsOrFirst || {};
|
|
2779
|
+
} else {
|
|
2780
|
+
params = {
|
|
2781
|
+
topicId: paramsOrFirst,
|
|
2782
|
+
subscriberId: rest[0],
|
|
2783
|
+
targetId: rest[1]
|
|
2784
|
+
};
|
|
2785
|
+
}
|
|
2786
|
+
const topicId = params.topicId;
|
|
2787
|
+
const subscriberId = params.subscriberId;
|
|
2788
|
+
const targetId = params.targetId;
|
|
1969
2789
|
if (typeof topicId === "undefined") {
|
|
1970
2790
|
throw new client.AppwriteException('Missing required parameter: "topicId"');
|
|
1971
2791
|
}
|
|
@@ -1994,16 +2814,18 @@ class Messaging {
|
|
|
1994
2814
|
payload
|
|
1995
2815
|
);
|
|
1996
2816
|
}
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2817
|
+
getSubscriber(paramsOrFirst, ...rest) {
|
|
2818
|
+
let params;
|
|
2819
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2820
|
+
params = paramsOrFirst || {};
|
|
2821
|
+
} else {
|
|
2822
|
+
params = {
|
|
2823
|
+
topicId: paramsOrFirst,
|
|
2824
|
+
subscriberId: rest[0]
|
|
2825
|
+
};
|
|
2826
|
+
}
|
|
2827
|
+
const topicId = params.topicId;
|
|
2828
|
+
const subscriberId = params.subscriberId;
|
|
2007
2829
|
if (typeof topicId === "undefined") {
|
|
2008
2830
|
throw new client.AppwriteException('Missing required parameter: "topicId"');
|
|
2009
2831
|
}
|
|
@@ -2021,15 +2843,18 @@ class Messaging {
|
|
|
2021
2843
|
payload
|
|
2022
2844
|
);
|
|
2023
2845
|
}
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2846
|
+
deleteSubscriber(paramsOrFirst, ...rest) {
|
|
2847
|
+
let params;
|
|
2848
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
2849
|
+
params = paramsOrFirst || {};
|
|
2850
|
+
} else {
|
|
2851
|
+
params = {
|
|
2852
|
+
topicId: paramsOrFirst,
|
|
2853
|
+
subscriberId: rest[0]
|
|
2854
|
+
};
|
|
2855
|
+
}
|
|
2856
|
+
const topicId = params.topicId;
|
|
2857
|
+
const subscriberId = params.subscriberId;
|
|
2033
2858
|
if (typeof topicId === "undefined") {
|
|
2034
2859
|
throw new client.AppwriteException('Missing required parameter: "topicId"');
|
|
2035
2860
|
}
|