appwrite-cli 5.0.3 → 6.0.0-rc.1
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 +4 -4
- package/docs/examples/functions/create-build.md +1 -1
- package/docs/examples/functions/create-execution.md +1 -0
- package/docs/examples/functions/create.md +1 -0
- package/docs/examples/functions/delete-execution.md +3 -0
- package/docs/examples/functions/update-deployment-build.md +3 -0
- package/docs/examples/functions/update.md +1 -0
- package/docs/examples/messaging/update-email.md +1 -0
- package/docs/examples/projects/create-j-w-t.md +4 -0
- package/docs/examples/projects/update-mock-numbers.md +3 -0
- package/docs/examples/projects/update-session-alerts.md +3 -0
- package/docs/examples/users/create-j-w-t.md +4 -0
- package/docs/examples/vcs/get-repository-contents.md +4 -0
- package/index.js +34 -7
- package/install.ps1 +3 -3
- package/install.sh +2 -2
- package/lib/client.js +19 -5
- package/lib/commands/account.js +307 -153
- package/lib/commands/assistant.js +8 -5
- package/lib/commands/avatars.js +116 -60
- package/lib/commands/console.js +8 -5
- package/lib/commands/databases.js +353 -164
- package/lib/commands/functions.js +310 -100
- package/lib/commands/generic.js +206 -54
- package/lib/commands/graphql.js +14 -8
- package/lib/commands/health.js +140 -71
- package/lib/commands/init.js +250 -155
- package/lib/commands/locale.js +50 -26
- package/lib/commands/messaging.js +363 -179
- package/lib/commands/migrations.js +98 -50
- package/lib/commands/project.js +38 -20
- package/lib/commands/projects.js +449 -144
- package/lib/commands/proxy.js +32 -17
- package/lib/commands/pull.js +231 -0
- package/lib/commands/push.js +1518 -0
- package/lib/commands/run.js +282 -0
- package/lib/commands/storage.js +160 -76
- package/lib/commands/teams.js +102 -50
- package/lib/commands/users.js +325 -135
- package/lib/commands/vcs.js +102 -29
- package/lib/config.js +190 -18
- package/lib/emulation/docker.js +187 -0
- package/lib/emulation/utils.js +177 -0
- package/lib/id.js +30 -0
- package/lib/paginate.js +1 -2
- package/lib/parser.js +69 -12
- package/lib/questions.js +462 -84
- package/lib/sdks.js +1 -1
- package/lib/spinner.js +103 -0
- package/lib/utils.js +248 -3
- package/lib/validations.js +17 -0
- package/package.json +6 -2
- package/scoop/appwrite.json +3 -3
- package/lib/commands/deploy.js +0 -941
|
@@ -4,7 +4,7 @@ const tar = require("tar");
|
|
|
4
4
|
const ignore = require("ignore");
|
|
5
5
|
const { promisify } = require('util');
|
|
6
6
|
const libClient = require('../client.js');
|
|
7
|
-
const { getAllFiles } = require('../utils.js');
|
|
7
|
+
const { getAllFiles, showConsoleLink } = require('../utils.js');
|
|
8
8
|
const { Command } = require('commander');
|
|
9
9
|
const { sdkForProject, sdkForConsole } = require('../sdks')
|
|
10
10
|
const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser')
|
|
@@ -43,6 +43,7 @@ const messaging = new Command("messaging").description(commandDescriptions['mess
|
|
|
43
43
|
* @typedef {Object} MessagingListMessagesRequestParams
|
|
44
44
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType
|
|
45
45
|
* @property {string} search Search term to filter your list results. Max length: 256 chars.
|
|
46
|
+
* @property {boolean} overrideForCli
|
|
46
47
|
* @property {boolean} parseOutput
|
|
47
48
|
* @property {libClient | undefined} sdk
|
|
48
49
|
*/
|
|
@@ -50,8 +51,9 @@ const messaging = new Command("messaging").description(commandDescriptions['mess
|
|
|
50
51
|
/**
|
|
51
52
|
* @param {MessagingListMessagesRequestParams} params
|
|
52
53
|
*/
|
|
53
|
-
const messagingListMessages = async ({
|
|
54
|
-
let client = !sdk ? await sdkForProject() :
|
|
54
|
+
const messagingListMessages = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
55
|
+
let client = !sdk ? await sdkForProject() :
|
|
56
|
+
sdk;
|
|
55
57
|
let apiPath = '/messaging/messages';
|
|
56
58
|
let payload = {};
|
|
57
59
|
if (typeof queries !== 'undefined') {
|
|
@@ -68,11 +70,16 @@ const messagingListMessages = async ({ queries, search, parseOutput = true, sdk
|
|
|
68
70
|
}, payload);
|
|
69
71
|
|
|
70
72
|
if (parseOutput) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
if(console) {
|
|
74
|
+
showConsoleLink('messaging', 'listMessages');
|
|
75
|
+
} else {
|
|
76
|
+
parse(response)
|
|
77
|
+
success()
|
|
78
|
+
}
|
|
73
79
|
}
|
|
74
|
-
|
|
80
|
+
|
|
75
81
|
return response;
|
|
82
|
+
|
|
76
83
|
}
|
|
77
84
|
|
|
78
85
|
/**
|
|
@@ -85,10 +92,11 @@ const messagingListMessages = async ({ queries, search, parseOutput = true, sdk
|
|
|
85
92
|
* @property {string[]} targets List of Targets IDs.
|
|
86
93
|
* @property {string[]} cc Array of target IDs to be added as CC.
|
|
87
94
|
* @property {string[]} bcc Array of target IDs to be added as BCC.
|
|
88
|
-
* @property {string[]} attachments Array of compound bucket IDs
|
|
95
|
+
* @property {string[]} attachments Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
|
|
89
96
|
* @property {boolean} draft Is message a draft
|
|
90
97
|
* @property {boolean} html Is content of type HTML
|
|
91
98
|
* @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
|
|
99
|
+
* @property {boolean} overrideForCli
|
|
92
100
|
* @property {boolean} parseOutput
|
|
93
101
|
* @property {libClient | undefined} sdk
|
|
94
102
|
*/
|
|
@@ -96,8 +104,9 @@ const messagingListMessages = async ({ queries, search, parseOutput = true, sdk
|
|
|
96
104
|
/**
|
|
97
105
|
* @param {MessagingCreateEmailRequestParams} params
|
|
98
106
|
*/
|
|
99
|
-
const messagingCreateEmail = async ({
|
|
100
|
-
let client = !sdk ? await sdkForProject() :
|
|
107
|
+
const messagingCreateEmail = async ({messageId,subject,content,topics,users,targets,cc,bcc,attachments,draft,html,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
108
|
+
let client = !sdk ? await sdkForProject() :
|
|
109
|
+
sdk;
|
|
101
110
|
let apiPath = '/messaging/messages/email';
|
|
102
111
|
let payload = {};
|
|
103
112
|
if (typeof messageId !== 'undefined') {
|
|
@@ -153,8 +162,9 @@ const messagingCreateEmail = async ({ messageId, subject, content, topics, users
|
|
|
153
162
|
parse(response)
|
|
154
163
|
success()
|
|
155
164
|
}
|
|
156
|
-
|
|
165
|
+
|
|
157
166
|
return response;
|
|
167
|
+
|
|
158
168
|
}
|
|
159
169
|
|
|
160
170
|
/**
|
|
@@ -170,6 +180,8 @@ const messagingCreateEmail = async ({ messageId, subject, content, topics, users
|
|
|
170
180
|
* @property {string[]} cc Array of target IDs to be added as CC.
|
|
171
181
|
* @property {string[]} bcc Array of target IDs to be added as BCC.
|
|
172
182
|
* @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
|
|
183
|
+
* @property {string[]} attachments Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
|
|
184
|
+
* @property {boolean} overrideForCli
|
|
173
185
|
* @property {boolean} parseOutput
|
|
174
186
|
* @property {libClient | undefined} sdk
|
|
175
187
|
*/
|
|
@@ -177,8 +189,9 @@ const messagingCreateEmail = async ({ messageId, subject, content, topics, users
|
|
|
177
189
|
/**
|
|
178
190
|
* @param {MessagingUpdateEmailRequestParams} params
|
|
179
191
|
*/
|
|
180
|
-
const messagingUpdateEmail = async ({
|
|
181
|
-
let client = !sdk ? await sdkForProject() :
|
|
192
|
+
const messagingUpdateEmail = async ({messageId,topics,users,targets,subject,content,draft,html,cc,bcc,scheduledAt,attachments,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
193
|
+
let client = !sdk ? await sdkForProject() :
|
|
194
|
+
sdk;
|
|
182
195
|
let apiPath = '/messaging/messages/email/{messageId}'.replace('{messageId}', messageId);
|
|
183
196
|
let payload = {};
|
|
184
197
|
topics = topics === true ? [] : topics;
|
|
@@ -216,6 +229,10 @@ const messagingUpdateEmail = async ({ messageId, topics, users, targets, subject
|
|
|
216
229
|
if (typeof scheduledAt !== 'undefined') {
|
|
217
230
|
payload['scheduledAt'] = scheduledAt;
|
|
218
231
|
}
|
|
232
|
+
attachments = attachments === true ? [] : attachments;
|
|
233
|
+
if (typeof attachments !== 'undefined') {
|
|
234
|
+
payload['attachments'] = attachments;
|
|
235
|
+
}
|
|
219
236
|
|
|
220
237
|
let response = undefined;
|
|
221
238
|
|
|
@@ -227,8 +244,9 @@ const messagingUpdateEmail = async ({ messageId, topics, users, targets, subject
|
|
|
227
244
|
parse(response)
|
|
228
245
|
success()
|
|
229
246
|
}
|
|
230
|
-
|
|
247
|
+
|
|
231
248
|
return response;
|
|
249
|
+
|
|
232
250
|
}
|
|
233
251
|
|
|
234
252
|
/**
|
|
@@ -241,7 +259,7 @@ const messagingUpdateEmail = async ({ messageId, topics, users, targets, subject
|
|
|
241
259
|
* @property {string[]} targets List of Targets IDs.
|
|
242
260
|
* @property {object} data Additional Data for push notification.
|
|
243
261
|
* @property {string} action Action for push notification.
|
|
244
|
-
* @property {string} image Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage.
|
|
262
|
+
* @property {string} image Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.
|
|
245
263
|
* @property {string} icon Icon for push notification. Available only for Android and Web Platform.
|
|
246
264
|
* @property {string} sound Sound for push notification. Available only for Android and IOS Platform.
|
|
247
265
|
* @property {string} color Color for push notification. Available only for Android Platform.
|
|
@@ -249,6 +267,7 @@ const messagingUpdateEmail = async ({ messageId, topics, users, targets, subject
|
|
|
249
267
|
* @property {string} badge Badge for push notification. Available only for IOS Platform.
|
|
250
268
|
* @property {boolean} draft Is message a draft
|
|
251
269
|
* @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
|
|
270
|
+
* @property {boolean} overrideForCli
|
|
252
271
|
* @property {boolean} parseOutput
|
|
253
272
|
* @property {libClient | undefined} sdk
|
|
254
273
|
*/
|
|
@@ -256,8 +275,9 @@ const messagingUpdateEmail = async ({ messageId, topics, users, targets, subject
|
|
|
256
275
|
/**
|
|
257
276
|
* @param {MessagingCreatePushRequestParams} params
|
|
258
277
|
*/
|
|
259
|
-
const messagingCreatePush = async ({
|
|
260
|
-
let client = !sdk ? await sdkForProject() :
|
|
278
|
+
const messagingCreatePush = async ({messageId,title,body,topics,users,targets,data,action,image,icon,sound,color,tag,badge,draft,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
279
|
+
let client = !sdk ? await sdkForProject() :
|
|
280
|
+
sdk;
|
|
261
281
|
let apiPath = '/messaging/messages/push';
|
|
262
282
|
let payload = {};
|
|
263
283
|
if (typeof messageId !== 'undefined') {
|
|
@@ -322,8 +342,9 @@ const messagingCreatePush = async ({ messageId, title, body, topics, users, targ
|
|
|
322
342
|
parse(response)
|
|
323
343
|
success()
|
|
324
344
|
}
|
|
325
|
-
|
|
345
|
+
|
|
326
346
|
return response;
|
|
347
|
+
|
|
327
348
|
}
|
|
328
349
|
|
|
329
350
|
/**
|
|
@@ -336,7 +357,7 @@ const messagingCreatePush = async ({ messageId, title, body, topics, users, targ
|
|
|
336
357
|
* @property {string} body Body for push notification.
|
|
337
358
|
* @property {object} data Additional Data for push notification.
|
|
338
359
|
* @property {string} action Action for push notification.
|
|
339
|
-
* @property {string} image Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage.
|
|
360
|
+
* @property {string} image Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.
|
|
340
361
|
* @property {string} icon Icon for push notification. Available only for Android and Web platforms.
|
|
341
362
|
* @property {string} sound Sound for push notification. Available only for Android and iOS platforms.
|
|
342
363
|
* @property {string} color Color for push notification. Available only for Android platforms.
|
|
@@ -344,6 +365,7 @@ const messagingCreatePush = async ({ messageId, title, body, topics, users, targ
|
|
|
344
365
|
* @property {number} badge Badge for push notification. Available only for iOS platforms.
|
|
345
366
|
* @property {boolean} draft Is message a draft
|
|
346
367
|
* @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
|
|
368
|
+
* @property {boolean} overrideForCli
|
|
347
369
|
* @property {boolean} parseOutput
|
|
348
370
|
* @property {libClient | undefined} sdk
|
|
349
371
|
*/
|
|
@@ -351,8 +373,9 @@ const messagingCreatePush = async ({ messageId, title, body, topics, users, targ
|
|
|
351
373
|
/**
|
|
352
374
|
* @param {MessagingUpdatePushRequestParams} params
|
|
353
375
|
*/
|
|
354
|
-
const messagingUpdatePush = async ({
|
|
355
|
-
let client = !sdk ? await sdkForProject() :
|
|
376
|
+
const messagingUpdatePush = async ({messageId,topics,users,targets,title,body,data,action,image,icon,sound,color,tag,badge,draft,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
377
|
+
let client = !sdk ? await sdkForProject() :
|
|
378
|
+
sdk;
|
|
356
379
|
let apiPath = '/messaging/messages/push/{messageId}'.replace('{messageId}', messageId);
|
|
357
380
|
let payload = {};
|
|
358
381
|
topics = topics === true ? [] : topics;
|
|
@@ -414,8 +437,9 @@ const messagingUpdatePush = async ({ messageId, topics, users, targets, title, b
|
|
|
414
437
|
parse(response)
|
|
415
438
|
success()
|
|
416
439
|
}
|
|
417
|
-
|
|
440
|
+
|
|
418
441
|
return response;
|
|
442
|
+
|
|
419
443
|
}
|
|
420
444
|
|
|
421
445
|
/**
|
|
@@ -427,6 +451,7 @@ const messagingUpdatePush = async ({ messageId, topics, users, targets, title, b
|
|
|
427
451
|
* @property {string[]} targets List of Targets IDs.
|
|
428
452
|
* @property {boolean} draft Is message a draft
|
|
429
453
|
* @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
|
|
454
|
+
* @property {boolean} overrideForCli
|
|
430
455
|
* @property {boolean} parseOutput
|
|
431
456
|
* @property {libClient | undefined} sdk
|
|
432
457
|
*/
|
|
@@ -434,8 +459,9 @@ const messagingUpdatePush = async ({ messageId, topics, users, targets, title, b
|
|
|
434
459
|
/**
|
|
435
460
|
* @param {MessagingCreateSmsRequestParams} params
|
|
436
461
|
*/
|
|
437
|
-
const messagingCreateSms = async ({
|
|
438
|
-
let client = !sdk ? await sdkForProject() :
|
|
462
|
+
const messagingCreateSms = async ({messageId,content,topics,users,targets,draft,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
463
|
+
let client = !sdk ? await sdkForProject() :
|
|
464
|
+
sdk;
|
|
439
465
|
let apiPath = '/messaging/messages/sms';
|
|
440
466
|
let payload = {};
|
|
441
467
|
if (typeof messageId !== 'undefined') {
|
|
@@ -473,8 +499,9 @@ const messagingCreateSms = async ({ messageId, content, topics, users, targets,
|
|
|
473
499
|
parse(response)
|
|
474
500
|
success()
|
|
475
501
|
}
|
|
476
|
-
|
|
502
|
+
|
|
477
503
|
return response;
|
|
504
|
+
|
|
478
505
|
}
|
|
479
506
|
|
|
480
507
|
/**
|
|
@@ -486,6 +513,7 @@ const messagingCreateSms = async ({ messageId, content, topics, users, targets,
|
|
|
486
513
|
* @property {string} content Email Content.
|
|
487
514
|
* @property {boolean} draft Is message a draft
|
|
488
515
|
* @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
|
|
516
|
+
* @property {boolean} overrideForCli
|
|
489
517
|
* @property {boolean} parseOutput
|
|
490
518
|
* @property {libClient | undefined} sdk
|
|
491
519
|
*/
|
|
@@ -493,8 +521,9 @@ const messagingCreateSms = async ({ messageId, content, topics, users, targets,
|
|
|
493
521
|
/**
|
|
494
522
|
* @param {MessagingUpdateSmsRequestParams} params
|
|
495
523
|
*/
|
|
496
|
-
const messagingUpdateSms = async ({
|
|
497
|
-
let client = !sdk ? await sdkForProject() :
|
|
524
|
+
const messagingUpdateSms = async ({messageId,topics,users,targets,content,draft,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
525
|
+
let client = !sdk ? await sdkForProject() :
|
|
526
|
+
sdk;
|
|
498
527
|
let apiPath = '/messaging/messages/sms/{messageId}'.replace('{messageId}', messageId);
|
|
499
528
|
let payload = {};
|
|
500
529
|
topics = topics === true ? [] : topics;
|
|
@@ -529,13 +558,15 @@ const messagingUpdateSms = async ({ messageId, topics, users, targets, content,
|
|
|
529
558
|
parse(response)
|
|
530
559
|
success()
|
|
531
560
|
}
|
|
532
|
-
|
|
561
|
+
|
|
533
562
|
return response;
|
|
563
|
+
|
|
534
564
|
}
|
|
535
565
|
|
|
536
566
|
/**
|
|
537
567
|
* @typedef {Object} MessagingGetMessageRequestParams
|
|
538
568
|
* @property {string} messageId Message ID.
|
|
569
|
+
* @property {boolean} overrideForCli
|
|
539
570
|
* @property {boolean} parseOutput
|
|
540
571
|
* @property {libClient | undefined} sdk
|
|
541
572
|
*/
|
|
@@ -543,8 +574,9 @@ const messagingUpdateSms = async ({ messageId, topics, users, targets, content,
|
|
|
543
574
|
/**
|
|
544
575
|
* @param {MessagingGetMessageRequestParams} params
|
|
545
576
|
*/
|
|
546
|
-
const messagingGetMessage = async ({
|
|
547
|
-
let client = !sdk ? await sdkForProject() :
|
|
577
|
+
const messagingGetMessage = async ({messageId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
578
|
+
let client = !sdk ? await sdkForProject() :
|
|
579
|
+
sdk;
|
|
548
580
|
let apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', messageId);
|
|
549
581
|
let payload = {};
|
|
550
582
|
|
|
@@ -555,16 +587,22 @@ const messagingGetMessage = async ({ messageId, parseOutput = true, sdk = undefi
|
|
|
555
587
|
}, payload);
|
|
556
588
|
|
|
557
589
|
if (parseOutput) {
|
|
558
|
-
|
|
559
|
-
|
|
590
|
+
if(console) {
|
|
591
|
+
showConsoleLink('messaging', 'getMessage', messageId);
|
|
592
|
+
} else {
|
|
593
|
+
parse(response)
|
|
594
|
+
success()
|
|
595
|
+
}
|
|
560
596
|
}
|
|
561
|
-
|
|
597
|
+
|
|
562
598
|
return response;
|
|
599
|
+
|
|
563
600
|
}
|
|
564
601
|
|
|
565
602
|
/**
|
|
566
603
|
* @typedef {Object} MessagingDeleteRequestParams
|
|
567
604
|
* @property {string} messageId Message ID.
|
|
605
|
+
* @property {boolean} overrideForCli
|
|
568
606
|
* @property {boolean} parseOutput
|
|
569
607
|
* @property {libClient | undefined} sdk
|
|
570
608
|
*/
|
|
@@ -572,8 +610,9 @@ const messagingGetMessage = async ({ messageId, parseOutput = true, sdk = undefi
|
|
|
572
610
|
/**
|
|
573
611
|
* @param {MessagingDeleteRequestParams} params
|
|
574
612
|
*/
|
|
575
|
-
const messagingDelete = async ({
|
|
576
|
-
let client = !sdk ? await sdkForProject() :
|
|
613
|
+
const messagingDelete = async ({messageId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
614
|
+
let client = !sdk ? await sdkForProject() :
|
|
615
|
+
sdk;
|
|
577
616
|
let apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', messageId);
|
|
578
617
|
let payload = {};
|
|
579
618
|
|
|
@@ -587,14 +626,16 @@ const messagingDelete = async ({ messageId, parseOutput = true, sdk = undefined}
|
|
|
587
626
|
parse(response)
|
|
588
627
|
success()
|
|
589
628
|
}
|
|
590
|
-
|
|
629
|
+
|
|
591
630
|
return response;
|
|
631
|
+
|
|
592
632
|
}
|
|
593
633
|
|
|
594
634
|
/**
|
|
595
635
|
* @typedef {Object} MessagingListMessageLogsRequestParams
|
|
596
636
|
* @property {string} messageId Message ID.
|
|
597
637
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
638
|
+
* @property {boolean} overrideForCli
|
|
598
639
|
* @property {boolean} parseOutput
|
|
599
640
|
* @property {libClient | undefined} sdk
|
|
600
641
|
*/
|
|
@@ -602,8 +643,9 @@ const messagingDelete = async ({ messageId, parseOutput = true, sdk = undefined}
|
|
|
602
643
|
/**
|
|
603
644
|
* @param {MessagingListMessageLogsRequestParams} params
|
|
604
645
|
*/
|
|
605
|
-
const messagingListMessageLogs = async ({
|
|
606
|
-
let client = !sdk ? await sdkForProject() :
|
|
646
|
+
const messagingListMessageLogs = async ({messageId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
647
|
+
let client = !sdk ? await sdkForProject() :
|
|
648
|
+
sdk;
|
|
607
649
|
let apiPath = '/messaging/messages/{messageId}/logs'.replace('{messageId}', messageId);
|
|
608
650
|
let payload = {};
|
|
609
651
|
if (typeof queries !== 'undefined') {
|
|
@@ -617,17 +659,23 @@ const messagingListMessageLogs = async ({ messageId, queries, parseOutput = true
|
|
|
617
659
|
}, payload);
|
|
618
660
|
|
|
619
661
|
if (parseOutput) {
|
|
620
|
-
|
|
621
|
-
|
|
662
|
+
if(console) {
|
|
663
|
+
showConsoleLink('messaging', 'listMessageLogs', messageId);
|
|
664
|
+
} else {
|
|
665
|
+
parse(response)
|
|
666
|
+
success()
|
|
667
|
+
}
|
|
622
668
|
}
|
|
623
|
-
|
|
669
|
+
|
|
624
670
|
return response;
|
|
671
|
+
|
|
625
672
|
}
|
|
626
673
|
|
|
627
674
|
/**
|
|
628
675
|
* @typedef {Object} MessagingListTargetsRequestParams
|
|
629
676
|
* @property {string} messageId Message ID.
|
|
630
677
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType
|
|
678
|
+
* @property {boolean} overrideForCli
|
|
631
679
|
* @property {boolean} parseOutput
|
|
632
680
|
* @property {libClient | undefined} sdk
|
|
633
681
|
*/
|
|
@@ -635,8 +683,9 @@ const messagingListMessageLogs = async ({ messageId, queries, parseOutput = true
|
|
|
635
683
|
/**
|
|
636
684
|
* @param {MessagingListTargetsRequestParams} params
|
|
637
685
|
*/
|
|
638
|
-
const messagingListTargets = async ({
|
|
639
|
-
let client = !sdk ? await sdkForProject() :
|
|
686
|
+
const messagingListTargets = async ({messageId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
687
|
+
let client = !sdk ? await sdkForProject() :
|
|
688
|
+
sdk;
|
|
640
689
|
let apiPath = '/messaging/messages/{messageId}/targets'.replace('{messageId}', messageId);
|
|
641
690
|
let payload = {};
|
|
642
691
|
if (typeof queries !== 'undefined') {
|
|
@@ -653,14 +702,16 @@ const messagingListTargets = async ({ messageId, queries, parseOutput = true, sd
|
|
|
653
702
|
parse(response)
|
|
654
703
|
success()
|
|
655
704
|
}
|
|
656
|
-
|
|
705
|
+
|
|
657
706
|
return response;
|
|
707
|
+
|
|
658
708
|
}
|
|
659
709
|
|
|
660
710
|
/**
|
|
661
711
|
* @typedef {Object} MessagingListProvidersRequestParams
|
|
662
712
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled
|
|
663
713
|
* @property {string} search Search term to filter your list results. Max length: 256 chars.
|
|
714
|
+
* @property {boolean} overrideForCli
|
|
664
715
|
* @property {boolean} parseOutput
|
|
665
716
|
* @property {libClient | undefined} sdk
|
|
666
717
|
*/
|
|
@@ -668,8 +719,9 @@ const messagingListTargets = async ({ messageId, queries, parseOutput = true, sd
|
|
|
668
719
|
/**
|
|
669
720
|
* @param {MessagingListProvidersRequestParams} params
|
|
670
721
|
*/
|
|
671
|
-
const messagingListProviders = async ({
|
|
672
|
-
let client = !sdk ? await sdkForProject() :
|
|
722
|
+
const messagingListProviders = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
723
|
+
let client = !sdk ? await sdkForProject() :
|
|
724
|
+
sdk;
|
|
673
725
|
let apiPath = '/messaging/providers';
|
|
674
726
|
let payload = {};
|
|
675
727
|
if (typeof queries !== 'undefined') {
|
|
@@ -686,11 +738,16 @@ const messagingListProviders = async ({ queries, search, parseOutput = true, sdk
|
|
|
686
738
|
}, payload);
|
|
687
739
|
|
|
688
740
|
if (parseOutput) {
|
|
689
|
-
|
|
690
|
-
|
|
741
|
+
if(console) {
|
|
742
|
+
showConsoleLink('messaging', 'listProviders');
|
|
743
|
+
} else {
|
|
744
|
+
parse(response)
|
|
745
|
+
success()
|
|
746
|
+
}
|
|
691
747
|
}
|
|
692
|
-
|
|
748
|
+
|
|
693
749
|
return response;
|
|
750
|
+
|
|
694
751
|
}
|
|
695
752
|
|
|
696
753
|
/**
|
|
@@ -703,6 +760,7 @@ const messagingListProviders = async ({ queries, search, parseOutput = true, sdk
|
|
|
703
760
|
* @property {string} bundleId APNS bundle ID.
|
|
704
761
|
* @property {boolean} sandbox Use APNS sandbox environment.
|
|
705
762
|
* @property {boolean} enabled Set as enabled.
|
|
763
|
+
* @property {boolean} overrideForCli
|
|
706
764
|
* @property {boolean} parseOutput
|
|
707
765
|
* @property {libClient | undefined} sdk
|
|
708
766
|
*/
|
|
@@ -710,8 +768,9 @@ const messagingListProviders = async ({ queries, search, parseOutput = true, sdk
|
|
|
710
768
|
/**
|
|
711
769
|
* @param {MessagingCreateApnsProviderRequestParams} params
|
|
712
770
|
*/
|
|
713
|
-
const messagingCreateApnsProvider = async ({
|
|
714
|
-
let client = !sdk ? await sdkForProject() :
|
|
771
|
+
const messagingCreateApnsProvider = async ({providerId,name,authKey,authKeyId,teamId,bundleId,sandbox,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
772
|
+
let client = !sdk ? await sdkForProject() :
|
|
773
|
+
sdk;
|
|
715
774
|
let apiPath = '/messaging/providers/apns';
|
|
716
775
|
let payload = {};
|
|
717
776
|
if (typeof providerId !== 'undefined') {
|
|
@@ -749,8 +808,9 @@ const messagingCreateApnsProvider = async ({ providerId, name, authKey, authKeyI
|
|
|
749
808
|
parse(response)
|
|
750
809
|
success()
|
|
751
810
|
}
|
|
752
|
-
|
|
811
|
+
|
|
753
812
|
return response;
|
|
813
|
+
|
|
754
814
|
}
|
|
755
815
|
|
|
756
816
|
/**
|
|
@@ -763,6 +823,7 @@ const messagingCreateApnsProvider = async ({ providerId, name, authKey, authKeyI
|
|
|
763
823
|
* @property {string} teamId APNS team ID.
|
|
764
824
|
* @property {string} bundleId APNS bundle ID.
|
|
765
825
|
* @property {boolean} sandbox Use APNS sandbox environment.
|
|
826
|
+
* @property {boolean} overrideForCli
|
|
766
827
|
* @property {boolean} parseOutput
|
|
767
828
|
* @property {libClient | undefined} sdk
|
|
768
829
|
*/
|
|
@@ -770,8 +831,9 @@ const messagingCreateApnsProvider = async ({ providerId, name, authKey, authKeyI
|
|
|
770
831
|
/**
|
|
771
832
|
* @param {MessagingUpdateApnsProviderRequestParams} params
|
|
772
833
|
*/
|
|
773
|
-
const messagingUpdateApnsProvider = async ({
|
|
774
|
-
let client = !sdk ? await sdkForProject() :
|
|
834
|
+
const messagingUpdateApnsProvider = async ({providerId,name,enabled,authKey,authKeyId,teamId,bundleId,sandbox,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
835
|
+
let client = !sdk ? await sdkForProject() :
|
|
836
|
+
sdk;
|
|
775
837
|
let apiPath = '/messaging/providers/apns/{providerId}'.replace('{providerId}', providerId);
|
|
776
838
|
let payload = {};
|
|
777
839
|
if (typeof name !== 'undefined') {
|
|
@@ -806,8 +868,9 @@ const messagingUpdateApnsProvider = async ({ providerId, name, enabled, authKey,
|
|
|
806
868
|
parse(response)
|
|
807
869
|
success()
|
|
808
870
|
}
|
|
809
|
-
|
|
871
|
+
|
|
810
872
|
return response;
|
|
873
|
+
|
|
811
874
|
}
|
|
812
875
|
|
|
813
876
|
/**
|
|
@@ -816,6 +879,7 @@ const messagingUpdateApnsProvider = async ({ providerId, name, enabled, authKey,
|
|
|
816
879
|
* @property {string} name Provider name.
|
|
817
880
|
* @property {object} serviceAccountJSON FCM service account JSON.
|
|
818
881
|
* @property {boolean} enabled Set as enabled.
|
|
882
|
+
* @property {boolean} overrideForCli
|
|
819
883
|
* @property {boolean} parseOutput
|
|
820
884
|
* @property {libClient | undefined} sdk
|
|
821
885
|
*/
|
|
@@ -823,8 +887,9 @@ const messagingUpdateApnsProvider = async ({ providerId, name, enabled, authKey,
|
|
|
823
887
|
/**
|
|
824
888
|
* @param {MessagingCreateFcmProviderRequestParams} params
|
|
825
889
|
*/
|
|
826
|
-
const messagingCreateFcmProvider = async ({
|
|
827
|
-
let client = !sdk ? await sdkForProject() :
|
|
890
|
+
const messagingCreateFcmProvider = async ({providerId,name,serviceAccountJSON,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
891
|
+
let client = !sdk ? await sdkForProject() :
|
|
892
|
+
sdk;
|
|
828
893
|
let apiPath = '/messaging/providers/fcm';
|
|
829
894
|
let payload = {};
|
|
830
895
|
if (typeof providerId !== 'undefined') {
|
|
@@ -850,8 +915,9 @@ const messagingCreateFcmProvider = async ({ providerId, name, serviceAccountJSON
|
|
|
850
915
|
parse(response)
|
|
851
916
|
success()
|
|
852
917
|
}
|
|
853
|
-
|
|
918
|
+
|
|
854
919
|
return response;
|
|
920
|
+
|
|
855
921
|
}
|
|
856
922
|
|
|
857
923
|
/**
|
|
@@ -860,6 +926,7 @@ const messagingCreateFcmProvider = async ({ providerId, name, serviceAccountJSON
|
|
|
860
926
|
* @property {string} name Provider name.
|
|
861
927
|
* @property {boolean} enabled Set as enabled.
|
|
862
928
|
* @property {object} serviceAccountJSON FCM service account JSON.
|
|
929
|
+
* @property {boolean} overrideForCli
|
|
863
930
|
* @property {boolean} parseOutput
|
|
864
931
|
* @property {libClient | undefined} sdk
|
|
865
932
|
*/
|
|
@@ -867,8 +934,9 @@ const messagingCreateFcmProvider = async ({ providerId, name, serviceAccountJSON
|
|
|
867
934
|
/**
|
|
868
935
|
* @param {MessagingUpdateFcmProviderRequestParams} params
|
|
869
936
|
*/
|
|
870
|
-
const messagingUpdateFcmProvider = async ({
|
|
871
|
-
let client = !sdk ? await sdkForProject() :
|
|
937
|
+
const messagingUpdateFcmProvider = async ({providerId,name,enabled,serviceAccountJSON,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
938
|
+
let client = !sdk ? await sdkForProject() :
|
|
939
|
+
sdk;
|
|
872
940
|
let apiPath = '/messaging/providers/fcm/{providerId}'.replace('{providerId}', providerId);
|
|
873
941
|
let payload = {};
|
|
874
942
|
if (typeof name !== 'undefined') {
|
|
@@ -891,8 +959,9 @@ const messagingUpdateFcmProvider = async ({ providerId, name, enabled, serviceAc
|
|
|
891
959
|
parse(response)
|
|
892
960
|
success()
|
|
893
961
|
}
|
|
894
|
-
|
|
962
|
+
|
|
895
963
|
return response;
|
|
964
|
+
|
|
896
965
|
}
|
|
897
966
|
|
|
898
967
|
/**
|
|
@@ -907,6 +976,7 @@ const messagingUpdateFcmProvider = async ({ providerId, name, enabled, serviceAc
|
|
|
907
976
|
* @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.
|
|
908
977
|
* @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.
|
|
909
978
|
* @property {boolean} enabled Set as enabled.
|
|
979
|
+
* @property {boolean} overrideForCli
|
|
910
980
|
* @property {boolean} parseOutput
|
|
911
981
|
* @property {libClient | undefined} sdk
|
|
912
982
|
*/
|
|
@@ -914,8 +984,9 @@ const messagingUpdateFcmProvider = async ({ providerId, name, enabled, serviceAc
|
|
|
914
984
|
/**
|
|
915
985
|
* @param {MessagingCreateMailgunProviderRequestParams} params
|
|
916
986
|
*/
|
|
917
|
-
const messagingCreateMailgunProvider = async ({
|
|
918
|
-
let client = !sdk ? await sdkForProject() :
|
|
987
|
+
const messagingCreateMailgunProvider = async ({providerId,name,apiKey,domain,isEuRegion,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
988
|
+
let client = !sdk ? await sdkForProject() :
|
|
989
|
+
sdk;
|
|
919
990
|
let apiPath = '/messaging/providers/mailgun';
|
|
920
991
|
let payload = {};
|
|
921
992
|
if (typeof providerId !== 'undefined') {
|
|
@@ -959,8 +1030,9 @@ const messagingCreateMailgunProvider = async ({ providerId, name, apiKey, domain
|
|
|
959
1030
|
parse(response)
|
|
960
1031
|
success()
|
|
961
1032
|
}
|
|
962
|
-
|
|
1033
|
+
|
|
963
1034
|
return response;
|
|
1035
|
+
|
|
964
1036
|
}
|
|
965
1037
|
|
|
966
1038
|
/**
|
|
@@ -975,6 +1047,7 @@ const messagingCreateMailgunProvider = async ({ providerId, name, apiKey, domain
|
|
|
975
1047
|
* @property {string} fromEmail Sender email address.
|
|
976
1048
|
* @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name.
|
|
977
1049
|
* @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email.
|
|
1050
|
+
* @property {boolean} overrideForCli
|
|
978
1051
|
* @property {boolean} parseOutput
|
|
979
1052
|
* @property {libClient | undefined} sdk
|
|
980
1053
|
*/
|
|
@@ -982,8 +1055,9 @@ const messagingCreateMailgunProvider = async ({ providerId, name, apiKey, domain
|
|
|
982
1055
|
/**
|
|
983
1056
|
* @param {MessagingUpdateMailgunProviderRequestParams} params
|
|
984
1057
|
*/
|
|
985
|
-
const messagingUpdateMailgunProvider = async ({
|
|
986
|
-
let client = !sdk ? await sdkForProject() :
|
|
1058
|
+
const messagingUpdateMailgunProvider = async ({providerId,name,apiKey,domain,isEuRegion,enabled,fromName,fromEmail,replyToName,replyToEmail,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1059
|
+
let client = !sdk ? await sdkForProject() :
|
|
1060
|
+
sdk;
|
|
987
1061
|
let apiPath = '/messaging/providers/mailgun/{providerId}'.replace('{providerId}', providerId);
|
|
988
1062
|
let payload = {};
|
|
989
1063
|
if (typeof name !== 'undefined') {
|
|
@@ -1024,18 +1098,20 @@ const messagingUpdateMailgunProvider = async ({ providerId, name, apiKey, domain
|
|
|
1024
1098
|
parse(response)
|
|
1025
1099
|
success()
|
|
1026
1100
|
}
|
|
1027
|
-
|
|
1101
|
+
|
|
1028
1102
|
return response;
|
|
1103
|
+
|
|
1029
1104
|
}
|
|
1030
1105
|
|
|
1031
1106
|
/**
|
|
1032
1107
|
* @typedef {Object} MessagingCreateMsg91ProviderRequestParams
|
|
1033
1108
|
* @property {string} providerId Provider ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
1034
1109
|
* @property {string} name Provider name.
|
|
1035
|
-
* @property {string}
|
|
1036
|
-
* @property {string} senderId Msg91
|
|
1037
|
-
* @property {string} authKey Msg91
|
|
1110
|
+
* @property {string} templateId Msg91 template ID
|
|
1111
|
+
* @property {string} senderId Msg91 sender ID.
|
|
1112
|
+
* @property {string} authKey Msg91 auth key.
|
|
1038
1113
|
* @property {boolean} enabled Set as enabled.
|
|
1114
|
+
* @property {boolean} overrideForCli
|
|
1039
1115
|
* @property {boolean} parseOutput
|
|
1040
1116
|
* @property {libClient | undefined} sdk
|
|
1041
1117
|
*/
|
|
@@ -1043,8 +1119,9 @@ const messagingUpdateMailgunProvider = async ({ providerId, name, apiKey, domain
|
|
|
1043
1119
|
/**
|
|
1044
1120
|
* @param {MessagingCreateMsg91ProviderRequestParams} params
|
|
1045
1121
|
*/
|
|
1046
|
-
const messagingCreateMsg91Provider = async ({
|
|
1047
|
-
let client = !sdk ? await sdkForProject() :
|
|
1122
|
+
const messagingCreateMsg91Provider = async ({providerId,name,templateId,senderId,authKey,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1123
|
+
let client = !sdk ? await sdkForProject() :
|
|
1124
|
+
sdk;
|
|
1048
1125
|
let apiPath = '/messaging/providers/msg91';
|
|
1049
1126
|
let payload = {};
|
|
1050
1127
|
if (typeof providerId !== 'undefined') {
|
|
@@ -1053,8 +1130,8 @@ const messagingCreateMsg91Provider = async ({ providerId, name, from, senderId,
|
|
|
1053
1130
|
if (typeof name !== 'undefined') {
|
|
1054
1131
|
payload['name'] = name;
|
|
1055
1132
|
}
|
|
1056
|
-
if (typeof
|
|
1057
|
-
payload['
|
|
1133
|
+
if (typeof templateId !== 'undefined') {
|
|
1134
|
+
payload['templateId'] = templateId;
|
|
1058
1135
|
}
|
|
1059
1136
|
if (typeof senderId !== 'undefined') {
|
|
1060
1137
|
payload['senderId'] = senderId;
|
|
@@ -1076,8 +1153,9 @@ const messagingCreateMsg91Provider = async ({ providerId, name, from, senderId,
|
|
|
1076
1153
|
parse(response)
|
|
1077
1154
|
success()
|
|
1078
1155
|
}
|
|
1079
|
-
|
|
1156
|
+
|
|
1080
1157
|
return response;
|
|
1158
|
+
|
|
1081
1159
|
}
|
|
1082
1160
|
|
|
1083
1161
|
/**
|
|
@@ -1085,9 +1163,10 @@ const messagingCreateMsg91Provider = async ({ providerId, name, from, senderId,
|
|
|
1085
1163
|
* @property {string} providerId Provider ID.
|
|
1086
1164
|
* @property {string} name Provider name.
|
|
1087
1165
|
* @property {boolean} enabled Set as enabled.
|
|
1088
|
-
* @property {string}
|
|
1089
|
-
* @property {string}
|
|
1090
|
-
* @property {string}
|
|
1166
|
+
* @property {string} templateId Msg91 template ID.
|
|
1167
|
+
* @property {string} senderId Msg91 sender ID.
|
|
1168
|
+
* @property {string} authKey Msg91 auth key.
|
|
1169
|
+
* @property {boolean} overrideForCli
|
|
1091
1170
|
* @property {boolean} parseOutput
|
|
1092
1171
|
* @property {libClient | undefined} sdk
|
|
1093
1172
|
*/
|
|
@@ -1095,8 +1174,9 @@ const messagingCreateMsg91Provider = async ({ providerId, name, from, senderId,
|
|
|
1095
1174
|
/**
|
|
1096
1175
|
* @param {MessagingUpdateMsg91ProviderRequestParams} params
|
|
1097
1176
|
*/
|
|
1098
|
-
const messagingUpdateMsg91Provider = async ({
|
|
1099
|
-
let client = !sdk ? await sdkForProject() :
|
|
1177
|
+
const messagingUpdateMsg91Provider = async ({providerId,name,enabled,templateId,senderId,authKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1178
|
+
let client = !sdk ? await sdkForProject() :
|
|
1179
|
+
sdk;
|
|
1100
1180
|
let apiPath = '/messaging/providers/msg91/{providerId}'.replace('{providerId}', providerId);
|
|
1101
1181
|
let payload = {};
|
|
1102
1182
|
if (typeof name !== 'undefined') {
|
|
@@ -1105,15 +1185,15 @@ const messagingUpdateMsg91Provider = async ({ providerId, name, enabled, senderI
|
|
|
1105
1185
|
if (typeof enabled !== 'undefined') {
|
|
1106
1186
|
payload['enabled'] = enabled;
|
|
1107
1187
|
}
|
|
1188
|
+
if (typeof templateId !== 'undefined') {
|
|
1189
|
+
payload['templateId'] = templateId;
|
|
1190
|
+
}
|
|
1108
1191
|
if (typeof senderId !== 'undefined') {
|
|
1109
1192
|
payload['senderId'] = senderId;
|
|
1110
1193
|
}
|
|
1111
1194
|
if (typeof authKey !== 'undefined') {
|
|
1112
1195
|
payload['authKey'] = authKey;
|
|
1113
1196
|
}
|
|
1114
|
-
if (typeof from !== 'undefined') {
|
|
1115
|
-
payload['from'] = from;
|
|
1116
|
-
}
|
|
1117
1197
|
|
|
1118
1198
|
let response = undefined;
|
|
1119
1199
|
|
|
@@ -1125,8 +1205,9 @@ const messagingUpdateMsg91Provider = async ({ providerId, name, enabled, senderI
|
|
|
1125
1205
|
parse(response)
|
|
1126
1206
|
success()
|
|
1127
1207
|
}
|
|
1128
|
-
|
|
1208
|
+
|
|
1129
1209
|
return response;
|
|
1210
|
+
|
|
1130
1211
|
}
|
|
1131
1212
|
|
|
1132
1213
|
/**
|
|
@@ -1139,6 +1220,7 @@ const messagingUpdateMsg91Provider = async ({ providerId, name, enabled, senderI
|
|
|
1139
1220
|
* @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name.
|
|
1140
1221
|
* @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email.
|
|
1141
1222
|
* @property {boolean} enabled Set as enabled.
|
|
1223
|
+
* @property {boolean} overrideForCli
|
|
1142
1224
|
* @property {boolean} parseOutput
|
|
1143
1225
|
* @property {libClient | undefined} sdk
|
|
1144
1226
|
*/
|
|
@@ -1146,8 +1228,9 @@ const messagingUpdateMsg91Provider = async ({ providerId, name, enabled, senderI
|
|
|
1146
1228
|
/**
|
|
1147
1229
|
* @param {MessagingCreateSendgridProviderRequestParams} params
|
|
1148
1230
|
*/
|
|
1149
|
-
const messagingCreateSendgridProvider = async ({
|
|
1150
|
-
let client = !sdk ? await sdkForProject() :
|
|
1231
|
+
const messagingCreateSendgridProvider = async ({providerId,name,apiKey,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1232
|
+
let client = !sdk ? await sdkForProject() :
|
|
1233
|
+
sdk;
|
|
1151
1234
|
let apiPath = '/messaging/providers/sendgrid';
|
|
1152
1235
|
let payload = {};
|
|
1153
1236
|
if (typeof providerId !== 'undefined') {
|
|
@@ -1185,8 +1268,9 @@ const messagingCreateSendgridProvider = async ({ providerId, name, apiKey, fromN
|
|
|
1185
1268
|
parse(response)
|
|
1186
1269
|
success()
|
|
1187
1270
|
}
|
|
1188
|
-
|
|
1271
|
+
|
|
1189
1272
|
return response;
|
|
1273
|
+
|
|
1190
1274
|
}
|
|
1191
1275
|
|
|
1192
1276
|
/**
|
|
@@ -1199,6 +1283,7 @@ const messagingCreateSendgridProvider = async ({ providerId, name, apiKey, fromN
|
|
|
1199
1283
|
* @property {string} fromEmail Sender email address.
|
|
1200
1284
|
* @property {string} replyToName Name set in the Reply To field for the mail. Default value is Sender Name.
|
|
1201
1285
|
* @property {string} replyToEmail Email set in the Reply To field for the mail. Default value is Sender Email.
|
|
1286
|
+
* @property {boolean} overrideForCli
|
|
1202
1287
|
* @property {boolean} parseOutput
|
|
1203
1288
|
* @property {libClient | undefined} sdk
|
|
1204
1289
|
*/
|
|
@@ -1206,8 +1291,9 @@ const messagingCreateSendgridProvider = async ({ providerId, name, apiKey, fromN
|
|
|
1206
1291
|
/**
|
|
1207
1292
|
* @param {MessagingUpdateSendgridProviderRequestParams} params
|
|
1208
1293
|
*/
|
|
1209
|
-
const messagingUpdateSendgridProvider = async ({
|
|
1210
|
-
let client = !sdk ? await sdkForProject() :
|
|
1294
|
+
const messagingUpdateSendgridProvider = async ({providerId,name,enabled,apiKey,fromName,fromEmail,replyToName,replyToEmail,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1295
|
+
let client = !sdk ? await sdkForProject() :
|
|
1296
|
+
sdk;
|
|
1211
1297
|
let apiPath = '/messaging/providers/sendgrid/{providerId}'.replace('{providerId}', providerId);
|
|
1212
1298
|
let payload = {};
|
|
1213
1299
|
if (typeof name !== 'undefined') {
|
|
@@ -1242,8 +1328,9 @@ const messagingUpdateSendgridProvider = async ({ providerId, name, enabled, apiK
|
|
|
1242
1328
|
parse(response)
|
|
1243
1329
|
success()
|
|
1244
1330
|
}
|
|
1245
|
-
|
|
1331
|
+
|
|
1246
1332
|
return response;
|
|
1333
|
+
|
|
1247
1334
|
}
|
|
1248
1335
|
|
|
1249
1336
|
/**
|
|
@@ -1262,6 +1349,7 @@ const messagingUpdateSendgridProvider = async ({ providerId, name, enabled, apiK
|
|
|
1262
1349
|
* @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name.
|
|
1263
1350
|
* @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email.
|
|
1264
1351
|
* @property {boolean} enabled Set as enabled.
|
|
1352
|
+
* @property {boolean} overrideForCli
|
|
1265
1353
|
* @property {boolean} parseOutput
|
|
1266
1354
|
* @property {libClient | undefined} sdk
|
|
1267
1355
|
*/
|
|
@@ -1269,8 +1357,9 @@ const messagingUpdateSendgridProvider = async ({ providerId, name, enabled, apiK
|
|
|
1269
1357
|
/**
|
|
1270
1358
|
* @param {MessagingCreateSmtpProviderRequestParams} params
|
|
1271
1359
|
*/
|
|
1272
|
-
const messagingCreateSmtpProvider = async ({
|
|
1273
|
-
let client = !sdk ? await sdkForProject() :
|
|
1360
|
+
const messagingCreateSmtpProvider = async ({providerId,name,host,port,username,password,encryption,autoTLS,mailer,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1361
|
+
let client = !sdk ? await sdkForProject() :
|
|
1362
|
+
sdk;
|
|
1274
1363
|
let apiPath = '/messaging/providers/smtp';
|
|
1275
1364
|
let payload = {};
|
|
1276
1365
|
if (typeof providerId !== 'undefined') {
|
|
@@ -1326,8 +1415,9 @@ const messagingCreateSmtpProvider = async ({ providerId, name, host, port, usern
|
|
|
1326
1415
|
parse(response)
|
|
1327
1416
|
success()
|
|
1328
1417
|
}
|
|
1329
|
-
|
|
1418
|
+
|
|
1330
1419
|
return response;
|
|
1420
|
+
|
|
1331
1421
|
}
|
|
1332
1422
|
|
|
1333
1423
|
/**
|
|
@@ -1346,6 +1436,7 @@ const messagingCreateSmtpProvider = async ({ providerId, name, host, port, usern
|
|
|
1346
1436
|
* @property {string} replyToName Name set in the Reply To field for the mail. Default value is Sender Name.
|
|
1347
1437
|
* @property {string} replyToEmail Email set in the Reply To field for the mail. Default value is Sender Email.
|
|
1348
1438
|
* @property {boolean} enabled Set as enabled.
|
|
1439
|
+
* @property {boolean} overrideForCli
|
|
1349
1440
|
* @property {boolean} parseOutput
|
|
1350
1441
|
* @property {libClient | undefined} sdk
|
|
1351
1442
|
*/
|
|
@@ -1353,8 +1444,9 @@ const messagingCreateSmtpProvider = async ({ providerId, name, host, port, usern
|
|
|
1353
1444
|
/**
|
|
1354
1445
|
* @param {MessagingUpdateSmtpProviderRequestParams} params
|
|
1355
1446
|
*/
|
|
1356
|
-
const messagingUpdateSmtpProvider = async ({
|
|
1357
|
-
let client = !sdk ? await sdkForProject() :
|
|
1447
|
+
const messagingUpdateSmtpProvider = async ({providerId,name,host,port,username,password,encryption,autoTLS,mailer,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1448
|
+
let client = !sdk ? await sdkForProject() :
|
|
1449
|
+
sdk;
|
|
1358
1450
|
let apiPath = '/messaging/providers/smtp/{providerId}'.replace('{providerId}', providerId);
|
|
1359
1451
|
let payload = {};
|
|
1360
1452
|
if (typeof name !== 'undefined') {
|
|
@@ -1407,8 +1499,9 @@ const messagingUpdateSmtpProvider = async ({ providerId, name, host, port, usern
|
|
|
1407
1499
|
parse(response)
|
|
1408
1500
|
success()
|
|
1409
1501
|
}
|
|
1410
|
-
|
|
1502
|
+
|
|
1411
1503
|
return response;
|
|
1504
|
+
|
|
1412
1505
|
}
|
|
1413
1506
|
|
|
1414
1507
|
/**
|
|
@@ -1419,6 +1512,7 @@ const messagingUpdateSmtpProvider = async ({ providerId, name, host, port, usern
|
|
|
1419
1512
|
* @property {string} customerId Telesign customer ID.
|
|
1420
1513
|
* @property {string} apiKey Telesign API key.
|
|
1421
1514
|
* @property {boolean} enabled Set as enabled.
|
|
1515
|
+
* @property {boolean} overrideForCli
|
|
1422
1516
|
* @property {boolean} parseOutput
|
|
1423
1517
|
* @property {libClient | undefined} sdk
|
|
1424
1518
|
*/
|
|
@@ -1426,8 +1520,9 @@ const messagingUpdateSmtpProvider = async ({ providerId, name, host, port, usern
|
|
|
1426
1520
|
/**
|
|
1427
1521
|
* @param {MessagingCreateTelesignProviderRequestParams} params
|
|
1428
1522
|
*/
|
|
1429
|
-
const messagingCreateTelesignProvider = async ({
|
|
1430
|
-
let client = !sdk ? await sdkForProject() :
|
|
1523
|
+
const messagingCreateTelesignProvider = async ({providerId,name,from,customerId,apiKey,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1524
|
+
let client = !sdk ? await sdkForProject() :
|
|
1525
|
+
sdk;
|
|
1431
1526
|
let apiPath = '/messaging/providers/telesign';
|
|
1432
1527
|
let payload = {};
|
|
1433
1528
|
if (typeof providerId !== 'undefined') {
|
|
@@ -1459,8 +1554,9 @@ const messagingCreateTelesignProvider = async ({ providerId, name, from, custome
|
|
|
1459
1554
|
parse(response)
|
|
1460
1555
|
success()
|
|
1461
1556
|
}
|
|
1462
|
-
|
|
1557
|
+
|
|
1463
1558
|
return response;
|
|
1559
|
+
|
|
1464
1560
|
}
|
|
1465
1561
|
|
|
1466
1562
|
/**
|
|
@@ -1471,6 +1567,7 @@ const messagingCreateTelesignProvider = async ({ providerId, name, from, custome
|
|
|
1471
1567
|
* @property {string} customerId Telesign customer ID.
|
|
1472
1568
|
* @property {string} apiKey Telesign API key.
|
|
1473
1569
|
* @property {string} from Sender number.
|
|
1570
|
+
* @property {boolean} overrideForCli
|
|
1474
1571
|
* @property {boolean} parseOutput
|
|
1475
1572
|
* @property {libClient | undefined} sdk
|
|
1476
1573
|
*/
|
|
@@ -1478,8 +1575,9 @@ const messagingCreateTelesignProvider = async ({ providerId, name, from, custome
|
|
|
1478
1575
|
/**
|
|
1479
1576
|
* @param {MessagingUpdateTelesignProviderRequestParams} params
|
|
1480
1577
|
*/
|
|
1481
|
-
const messagingUpdateTelesignProvider = async ({
|
|
1482
|
-
let client = !sdk ? await sdkForProject() :
|
|
1578
|
+
const messagingUpdateTelesignProvider = async ({providerId,name,enabled,customerId,apiKey,from,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1579
|
+
let client = !sdk ? await sdkForProject() :
|
|
1580
|
+
sdk;
|
|
1483
1581
|
let apiPath = '/messaging/providers/telesign/{providerId}'.replace('{providerId}', providerId);
|
|
1484
1582
|
let payload = {};
|
|
1485
1583
|
if (typeof name !== 'undefined') {
|
|
@@ -1508,8 +1606,9 @@ const messagingUpdateTelesignProvider = async ({ providerId, name, enabled, cust
|
|
|
1508
1606
|
parse(response)
|
|
1509
1607
|
success()
|
|
1510
1608
|
}
|
|
1511
|
-
|
|
1609
|
+
|
|
1512
1610
|
return response;
|
|
1611
|
+
|
|
1513
1612
|
}
|
|
1514
1613
|
|
|
1515
1614
|
/**
|
|
@@ -1520,6 +1619,7 @@ const messagingUpdateTelesignProvider = async ({ providerId, name, enabled, cust
|
|
|
1520
1619
|
* @property {string} username Textmagic username.
|
|
1521
1620
|
* @property {string} apiKey Textmagic apiKey.
|
|
1522
1621
|
* @property {boolean} enabled Set as enabled.
|
|
1622
|
+
* @property {boolean} overrideForCli
|
|
1523
1623
|
* @property {boolean} parseOutput
|
|
1524
1624
|
* @property {libClient | undefined} sdk
|
|
1525
1625
|
*/
|
|
@@ -1527,8 +1627,9 @@ const messagingUpdateTelesignProvider = async ({ providerId, name, enabled, cust
|
|
|
1527
1627
|
/**
|
|
1528
1628
|
* @param {MessagingCreateTextmagicProviderRequestParams} params
|
|
1529
1629
|
*/
|
|
1530
|
-
const messagingCreateTextmagicProvider = async ({
|
|
1531
|
-
let client = !sdk ? await sdkForProject() :
|
|
1630
|
+
const messagingCreateTextmagicProvider = async ({providerId,name,from,username,apiKey,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1631
|
+
let client = !sdk ? await sdkForProject() :
|
|
1632
|
+
sdk;
|
|
1532
1633
|
let apiPath = '/messaging/providers/textmagic';
|
|
1533
1634
|
let payload = {};
|
|
1534
1635
|
if (typeof providerId !== 'undefined') {
|
|
@@ -1560,8 +1661,9 @@ const messagingCreateTextmagicProvider = async ({ providerId, name, from, userna
|
|
|
1560
1661
|
parse(response)
|
|
1561
1662
|
success()
|
|
1562
1663
|
}
|
|
1563
|
-
|
|
1664
|
+
|
|
1564
1665
|
return response;
|
|
1666
|
+
|
|
1565
1667
|
}
|
|
1566
1668
|
|
|
1567
1669
|
/**
|
|
@@ -1572,6 +1674,7 @@ const messagingCreateTextmagicProvider = async ({ providerId, name, from, userna
|
|
|
1572
1674
|
* @property {string} username Textmagic username.
|
|
1573
1675
|
* @property {string} apiKey Textmagic apiKey.
|
|
1574
1676
|
* @property {string} from Sender number.
|
|
1677
|
+
* @property {boolean} overrideForCli
|
|
1575
1678
|
* @property {boolean} parseOutput
|
|
1576
1679
|
* @property {libClient | undefined} sdk
|
|
1577
1680
|
*/
|
|
@@ -1579,8 +1682,9 @@ const messagingCreateTextmagicProvider = async ({ providerId, name, from, userna
|
|
|
1579
1682
|
/**
|
|
1580
1683
|
* @param {MessagingUpdateTextmagicProviderRequestParams} params
|
|
1581
1684
|
*/
|
|
1582
|
-
const messagingUpdateTextmagicProvider = async ({
|
|
1583
|
-
let client = !sdk ? await sdkForProject() :
|
|
1685
|
+
const messagingUpdateTextmagicProvider = async ({providerId,name,enabled,username,apiKey,from,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1686
|
+
let client = !sdk ? await sdkForProject() :
|
|
1687
|
+
sdk;
|
|
1584
1688
|
let apiPath = '/messaging/providers/textmagic/{providerId}'.replace('{providerId}', providerId);
|
|
1585
1689
|
let payload = {};
|
|
1586
1690
|
if (typeof name !== 'undefined') {
|
|
@@ -1609,8 +1713,9 @@ const messagingUpdateTextmagicProvider = async ({ providerId, name, enabled, use
|
|
|
1609
1713
|
parse(response)
|
|
1610
1714
|
success()
|
|
1611
1715
|
}
|
|
1612
|
-
|
|
1716
|
+
|
|
1613
1717
|
return response;
|
|
1718
|
+
|
|
1614
1719
|
}
|
|
1615
1720
|
|
|
1616
1721
|
/**
|
|
@@ -1621,6 +1726,7 @@ const messagingUpdateTextmagicProvider = async ({ providerId, name, enabled, use
|
|
|
1621
1726
|
* @property {string} accountSid Twilio account secret ID.
|
|
1622
1727
|
* @property {string} authToken Twilio authentication token.
|
|
1623
1728
|
* @property {boolean} enabled Set as enabled.
|
|
1729
|
+
* @property {boolean} overrideForCli
|
|
1624
1730
|
* @property {boolean} parseOutput
|
|
1625
1731
|
* @property {libClient | undefined} sdk
|
|
1626
1732
|
*/
|
|
@@ -1628,8 +1734,9 @@ const messagingUpdateTextmagicProvider = async ({ providerId, name, enabled, use
|
|
|
1628
1734
|
/**
|
|
1629
1735
|
* @param {MessagingCreateTwilioProviderRequestParams} params
|
|
1630
1736
|
*/
|
|
1631
|
-
const messagingCreateTwilioProvider = async ({
|
|
1632
|
-
let client = !sdk ? await sdkForProject() :
|
|
1737
|
+
const messagingCreateTwilioProvider = async ({providerId,name,from,accountSid,authToken,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1738
|
+
let client = !sdk ? await sdkForProject() :
|
|
1739
|
+
sdk;
|
|
1633
1740
|
let apiPath = '/messaging/providers/twilio';
|
|
1634
1741
|
let payload = {};
|
|
1635
1742
|
if (typeof providerId !== 'undefined') {
|
|
@@ -1661,8 +1768,9 @@ const messagingCreateTwilioProvider = async ({ providerId, name, from, accountSi
|
|
|
1661
1768
|
parse(response)
|
|
1662
1769
|
success()
|
|
1663
1770
|
}
|
|
1664
|
-
|
|
1771
|
+
|
|
1665
1772
|
return response;
|
|
1773
|
+
|
|
1666
1774
|
}
|
|
1667
1775
|
|
|
1668
1776
|
/**
|
|
@@ -1673,6 +1781,7 @@ const messagingCreateTwilioProvider = async ({ providerId, name, from, accountSi
|
|
|
1673
1781
|
* @property {string} accountSid Twilio account secret ID.
|
|
1674
1782
|
* @property {string} authToken Twilio authentication token.
|
|
1675
1783
|
* @property {string} from Sender number.
|
|
1784
|
+
* @property {boolean} overrideForCli
|
|
1676
1785
|
* @property {boolean} parseOutput
|
|
1677
1786
|
* @property {libClient | undefined} sdk
|
|
1678
1787
|
*/
|
|
@@ -1680,8 +1789,9 @@ const messagingCreateTwilioProvider = async ({ providerId, name, from, accountSi
|
|
|
1680
1789
|
/**
|
|
1681
1790
|
* @param {MessagingUpdateTwilioProviderRequestParams} params
|
|
1682
1791
|
*/
|
|
1683
|
-
const messagingUpdateTwilioProvider = async ({
|
|
1684
|
-
let client = !sdk ? await sdkForProject() :
|
|
1792
|
+
const messagingUpdateTwilioProvider = async ({providerId,name,enabled,accountSid,authToken,from,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1793
|
+
let client = !sdk ? await sdkForProject() :
|
|
1794
|
+
sdk;
|
|
1685
1795
|
let apiPath = '/messaging/providers/twilio/{providerId}'.replace('{providerId}', providerId);
|
|
1686
1796
|
let payload = {};
|
|
1687
1797
|
if (typeof name !== 'undefined') {
|
|
@@ -1710,8 +1820,9 @@ const messagingUpdateTwilioProvider = async ({ providerId, name, enabled, accoun
|
|
|
1710
1820
|
parse(response)
|
|
1711
1821
|
success()
|
|
1712
1822
|
}
|
|
1713
|
-
|
|
1823
|
+
|
|
1714
1824
|
return response;
|
|
1825
|
+
|
|
1715
1826
|
}
|
|
1716
1827
|
|
|
1717
1828
|
/**
|
|
@@ -1722,6 +1833,7 @@ const messagingUpdateTwilioProvider = async ({ providerId, name, enabled, accoun
|
|
|
1722
1833
|
* @property {string} apiKey Vonage API key.
|
|
1723
1834
|
* @property {string} apiSecret Vonage API secret.
|
|
1724
1835
|
* @property {boolean} enabled Set as enabled.
|
|
1836
|
+
* @property {boolean} overrideForCli
|
|
1725
1837
|
* @property {boolean} parseOutput
|
|
1726
1838
|
* @property {libClient | undefined} sdk
|
|
1727
1839
|
*/
|
|
@@ -1729,8 +1841,9 @@ const messagingUpdateTwilioProvider = async ({ providerId, name, enabled, accoun
|
|
|
1729
1841
|
/**
|
|
1730
1842
|
* @param {MessagingCreateVonageProviderRequestParams} params
|
|
1731
1843
|
*/
|
|
1732
|
-
const messagingCreateVonageProvider = async ({
|
|
1733
|
-
let client = !sdk ? await sdkForProject() :
|
|
1844
|
+
const messagingCreateVonageProvider = async ({providerId,name,from,apiKey,apiSecret,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1845
|
+
let client = !sdk ? await sdkForProject() :
|
|
1846
|
+
sdk;
|
|
1734
1847
|
let apiPath = '/messaging/providers/vonage';
|
|
1735
1848
|
let payload = {};
|
|
1736
1849
|
if (typeof providerId !== 'undefined') {
|
|
@@ -1762,8 +1875,9 @@ const messagingCreateVonageProvider = async ({ providerId, name, from, apiKey, a
|
|
|
1762
1875
|
parse(response)
|
|
1763
1876
|
success()
|
|
1764
1877
|
}
|
|
1765
|
-
|
|
1878
|
+
|
|
1766
1879
|
return response;
|
|
1880
|
+
|
|
1767
1881
|
}
|
|
1768
1882
|
|
|
1769
1883
|
/**
|
|
@@ -1774,6 +1888,7 @@ const messagingCreateVonageProvider = async ({ providerId, name, from, apiKey, a
|
|
|
1774
1888
|
* @property {string} apiKey Vonage API key.
|
|
1775
1889
|
* @property {string} apiSecret Vonage API secret.
|
|
1776
1890
|
* @property {string} from Sender number.
|
|
1891
|
+
* @property {boolean} overrideForCli
|
|
1777
1892
|
* @property {boolean} parseOutput
|
|
1778
1893
|
* @property {libClient | undefined} sdk
|
|
1779
1894
|
*/
|
|
@@ -1781,8 +1896,9 @@ const messagingCreateVonageProvider = async ({ providerId, name, from, apiKey, a
|
|
|
1781
1896
|
/**
|
|
1782
1897
|
* @param {MessagingUpdateVonageProviderRequestParams} params
|
|
1783
1898
|
*/
|
|
1784
|
-
const messagingUpdateVonageProvider = async ({
|
|
1785
|
-
let client = !sdk ? await sdkForProject() :
|
|
1899
|
+
const messagingUpdateVonageProvider = async ({providerId,name,enabled,apiKey,apiSecret,from,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1900
|
+
let client = !sdk ? await sdkForProject() :
|
|
1901
|
+
sdk;
|
|
1786
1902
|
let apiPath = '/messaging/providers/vonage/{providerId}'.replace('{providerId}', providerId);
|
|
1787
1903
|
let payload = {};
|
|
1788
1904
|
if (typeof name !== 'undefined') {
|
|
@@ -1811,13 +1927,15 @@ const messagingUpdateVonageProvider = async ({ providerId, name, enabled, apiKey
|
|
|
1811
1927
|
parse(response)
|
|
1812
1928
|
success()
|
|
1813
1929
|
}
|
|
1814
|
-
|
|
1930
|
+
|
|
1815
1931
|
return response;
|
|
1932
|
+
|
|
1816
1933
|
}
|
|
1817
1934
|
|
|
1818
1935
|
/**
|
|
1819
1936
|
* @typedef {Object} MessagingGetProviderRequestParams
|
|
1820
1937
|
* @property {string} providerId Provider ID.
|
|
1938
|
+
* @property {boolean} overrideForCli
|
|
1821
1939
|
* @property {boolean} parseOutput
|
|
1822
1940
|
* @property {libClient | undefined} sdk
|
|
1823
1941
|
*/
|
|
@@ -1825,8 +1943,9 @@ const messagingUpdateVonageProvider = async ({ providerId, name, enabled, apiKey
|
|
|
1825
1943
|
/**
|
|
1826
1944
|
* @param {MessagingGetProviderRequestParams} params
|
|
1827
1945
|
*/
|
|
1828
|
-
const messagingGetProvider = async ({
|
|
1829
|
-
let client = !sdk ? await sdkForProject() :
|
|
1946
|
+
const messagingGetProvider = async ({providerId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
1947
|
+
let client = !sdk ? await sdkForProject() :
|
|
1948
|
+
sdk;
|
|
1830
1949
|
let apiPath = '/messaging/providers/{providerId}'.replace('{providerId}', providerId);
|
|
1831
1950
|
let payload = {};
|
|
1832
1951
|
|
|
@@ -1837,16 +1956,22 @@ const messagingGetProvider = async ({ providerId, parseOutput = true, sdk = unde
|
|
|
1837
1956
|
}, payload);
|
|
1838
1957
|
|
|
1839
1958
|
if (parseOutput) {
|
|
1840
|
-
|
|
1841
|
-
|
|
1959
|
+
if(console) {
|
|
1960
|
+
showConsoleLink('messaging', 'getProvider', providerId);
|
|
1961
|
+
} else {
|
|
1962
|
+
parse(response)
|
|
1963
|
+
success()
|
|
1964
|
+
}
|
|
1842
1965
|
}
|
|
1843
|
-
|
|
1966
|
+
|
|
1844
1967
|
return response;
|
|
1968
|
+
|
|
1845
1969
|
}
|
|
1846
1970
|
|
|
1847
1971
|
/**
|
|
1848
1972
|
* @typedef {Object} MessagingDeleteProviderRequestParams
|
|
1849
1973
|
* @property {string} providerId Provider ID.
|
|
1974
|
+
* @property {boolean} overrideForCli
|
|
1850
1975
|
* @property {boolean} parseOutput
|
|
1851
1976
|
* @property {libClient | undefined} sdk
|
|
1852
1977
|
*/
|
|
@@ -1854,8 +1979,9 @@ const messagingGetProvider = async ({ providerId, parseOutput = true, sdk = unde
|
|
|
1854
1979
|
/**
|
|
1855
1980
|
* @param {MessagingDeleteProviderRequestParams} params
|
|
1856
1981
|
*/
|
|
1857
|
-
const messagingDeleteProvider = async ({
|
|
1858
|
-
let client = !sdk ? await sdkForProject() :
|
|
1982
|
+
const messagingDeleteProvider = async ({providerId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1983
|
+
let client = !sdk ? await sdkForProject() :
|
|
1984
|
+
sdk;
|
|
1859
1985
|
let apiPath = '/messaging/providers/{providerId}'.replace('{providerId}', providerId);
|
|
1860
1986
|
let payload = {};
|
|
1861
1987
|
|
|
@@ -1869,14 +1995,16 @@ const messagingDeleteProvider = async ({ providerId, parseOutput = true, sdk = u
|
|
|
1869
1995
|
parse(response)
|
|
1870
1996
|
success()
|
|
1871
1997
|
}
|
|
1872
|
-
|
|
1998
|
+
|
|
1873
1999
|
return response;
|
|
2000
|
+
|
|
1874
2001
|
}
|
|
1875
2002
|
|
|
1876
2003
|
/**
|
|
1877
2004
|
* @typedef {Object} MessagingListProviderLogsRequestParams
|
|
1878
2005
|
* @property {string} providerId Provider ID.
|
|
1879
2006
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
2007
|
+
* @property {boolean} overrideForCli
|
|
1880
2008
|
* @property {boolean} parseOutput
|
|
1881
2009
|
* @property {libClient | undefined} sdk
|
|
1882
2010
|
*/
|
|
@@ -1884,8 +2012,9 @@ const messagingDeleteProvider = async ({ providerId, parseOutput = true, sdk = u
|
|
|
1884
2012
|
/**
|
|
1885
2013
|
* @param {MessagingListProviderLogsRequestParams} params
|
|
1886
2014
|
*/
|
|
1887
|
-
const messagingListProviderLogs = async ({
|
|
1888
|
-
let client = !sdk ? await sdkForProject() :
|
|
2015
|
+
const messagingListProviderLogs = async ({providerId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2016
|
+
let client = !sdk ? await sdkForProject() :
|
|
2017
|
+
sdk;
|
|
1889
2018
|
let apiPath = '/messaging/providers/{providerId}/logs'.replace('{providerId}', providerId);
|
|
1890
2019
|
let payload = {};
|
|
1891
2020
|
if (typeof queries !== 'undefined') {
|
|
@@ -1902,14 +2031,16 @@ const messagingListProviderLogs = async ({ providerId, queries, parseOutput = tr
|
|
|
1902
2031
|
parse(response)
|
|
1903
2032
|
success()
|
|
1904
2033
|
}
|
|
1905
|
-
|
|
2034
|
+
|
|
1906
2035
|
return response;
|
|
2036
|
+
|
|
1907
2037
|
}
|
|
1908
2038
|
|
|
1909
2039
|
/**
|
|
1910
2040
|
* @typedef {Object} MessagingListSubscriberLogsRequestParams
|
|
1911
2041
|
* @property {string} subscriberId Subscriber ID.
|
|
1912
2042
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
2043
|
+
* @property {boolean} overrideForCli
|
|
1913
2044
|
* @property {boolean} parseOutput
|
|
1914
2045
|
* @property {libClient | undefined} sdk
|
|
1915
2046
|
*/
|
|
@@ -1917,8 +2048,9 @@ const messagingListProviderLogs = async ({ providerId, queries, parseOutput = tr
|
|
|
1917
2048
|
/**
|
|
1918
2049
|
* @param {MessagingListSubscriberLogsRequestParams} params
|
|
1919
2050
|
*/
|
|
1920
|
-
const messagingListSubscriberLogs = async ({
|
|
1921
|
-
let client = !sdk ? await sdkForProject() :
|
|
2051
|
+
const messagingListSubscriberLogs = async ({subscriberId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2052
|
+
let client = !sdk ? await sdkForProject() :
|
|
2053
|
+
sdk;
|
|
1922
2054
|
let apiPath = '/messaging/subscribers/{subscriberId}/logs'.replace('{subscriberId}', subscriberId);
|
|
1923
2055
|
let payload = {};
|
|
1924
2056
|
if (typeof queries !== 'undefined') {
|
|
@@ -1935,14 +2067,16 @@ const messagingListSubscriberLogs = async ({ subscriberId, queries, parseOutput
|
|
|
1935
2067
|
parse(response)
|
|
1936
2068
|
success()
|
|
1937
2069
|
}
|
|
1938
|
-
|
|
2070
|
+
|
|
1939
2071
|
return response;
|
|
2072
|
+
|
|
1940
2073
|
}
|
|
1941
2074
|
|
|
1942
2075
|
/**
|
|
1943
2076
|
* @typedef {Object} MessagingListTopicsRequestParams
|
|
1944
2077
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal
|
|
1945
2078
|
* @property {string} search Search term to filter your list results. Max length: 256 chars.
|
|
2079
|
+
* @property {boolean} overrideForCli
|
|
1946
2080
|
* @property {boolean} parseOutput
|
|
1947
2081
|
* @property {libClient | undefined} sdk
|
|
1948
2082
|
*/
|
|
@@ -1950,8 +2084,9 @@ const messagingListSubscriberLogs = async ({ subscriberId, queries, parseOutput
|
|
|
1950
2084
|
/**
|
|
1951
2085
|
* @param {MessagingListTopicsRequestParams} params
|
|
1952
2086
|
*/
|
|
1953
|
-
const messagingListTopics = async ({
|
|
1954
|
-
let client = !sdk ? await sdkForProject() :
|
|
2087
|
+
const messagingListTopics = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
2088
|
+
let client = !sdk ? await sdkForProject() :
|
|
2089
|
+
sdk;
|
|
1955
2090
|
let apiPath = '/messaging/topics';
|
|
1956
2091
|
let payload = {};
|
|
1957
2092
|
if (typeof queries !== 'undefined') {
|
|
@@ -1968,11 +2103,16 @@ const messagingListTopics = async ({ queries, search, parseOutput = true, sdk =
|
|
|
1968
2103
|
}, payload);
|
|
1969
2104
|
|
|
1970
2105
|
if (parseOutput) {
|
|
1971
|
-
|
|
1972
|
-
|
|
2106
|
+
if(console) {
|
|
2107
|
+
showConsoleLink('messaging', 'listTopics');
|
|
2108
|
+
} else {
|
|
2109
|
+
parse(response)
|
|
2110
|
+
success()
|
|
2111
|
+
}
|
|
1973
2112
|
}
|
|
1974
|
-
|
|
2113
|
+
|
|
1975
2114
|
return response;
|
|
2115
|
+
|
|
1976
2116
|
}
|
|
1977
2117
|
|
|
1978
2118
|
/**
|
|
@@ -1980,6 +2120,7 @@ const messagingListTopics = async ({ queries, search, parseOutput = true, sdk =
|
|
|
1980
2120
|
* @property {string} topicId Topic ID. Choose a custom Topic ID or a new Topic ID.
|
|
1981
2121
|
* @property {string} name Topic Name.
|
|
1982
2122
|
* @property {string[]} subscribe An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
|
|
2123
|
+
* @property {boolean} overrideForCli
|
|
1983
2124
|
* @property {boolean} parseOutput
|
|
1984
2125
|
* @property {libClient | undefined} sdk
|
|
1985
2126
|
*/
|
|
@@ -1987,8 +2128,9 @@ const messagingListTopics = async ({ queries, search, parseOutput = true, sdk =
|
|
|
1987
2128
|
/**
|
|
1988
2129
|
* @param {MessagingCreateTopicRequestParams} params
|
|
1989
2130
|
*/
|
|
1990
|
-
const messagingCreateTopic = async ({
|
|
1991
|
-
let client = !sdk ? await sdkForProject() :
|
|
2131
|
+
const messagingCreateTopic = async ({topicId,name,subscribe,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2132
|
+
let client = !sdk ? await sdkForProject() :
|
|
2133
|
+
sdk;
|
|
1992
2134
|
let apiPath = '/messaging/topics';
|
|
1993
2135
|
let payload = {};
|
|
1994
2136
|
if (typeof topicId !== 'undefined') {
|
|
@@ -2012,13 +2154,15 @@ const messagingCreateTopic = async ({ topicId, name, subscribe, parseOutput = tr
|
|
|
2012
2154
|
parse(response)
|
|
2013
2155
|
success()
|
|
2014
2156
|
}
|
|
2015
|
-
|
|
2157
|
+
|
|
2016
2158
|
return response;
|
|
2159
|
+
|
|
2017
2160
|
}
|
|
2018
2161
|
|
|
2019
2162
|
/**
|
|
2020
2163
|
* @typedef {Object} MessagingGetTopicRequestParams
|
|
2021
2164
|
* @property {string} topicId Topic ID.
|
|
2165
|
+
* @property {boolean} overrideForCli
|
|
2022
2166
|
* @property {boolean} parseOutput
|
|
2023
2167
|
* @property {libClient | undefined} sdk
|
|
2024
2168
|
*/
|
|
@@ -2026,8 +2170,9 @@ const messagingCreateTopic = async ({ topicId, name, subscribe, parseOutput = tr
|
|
|
2026
2170
|
/**
|
|
2027
2171
|
* @param {MessagingGetTopicRequestParams} params
|
|
2028
2172
|
*/
|
|
2029
|
-
const messagingGetTopic = async ({
|
|
2030
|
-
let client = !sdk ? await sdkForProject() :
|
|
2173
|
+
const messagingGetTopic = async ({topicId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
2174
|
+
let client = !sdk ? await sdkForProject() :
|
|
2175
|
+
sdk;
|
|
2031
2176
|
let apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId);
|
|
2032
2177
|
let payload = {};
|
|
2033
2178
|
|
|
@@ -2038,11 +2183,16 @@ const messagingGetTopic = async ({ topicId, parseOutput = true, sdk = undefined}
|
|
|
2038
2183
|
}, payload);
|
|
2039
2184
|
|
|
2040
2185
|
if (parseOutput) {
|
|
2041
|
-
|
|
2042
|
-
|
|
2186
|
+
if(console) {
|
|
2187
|
+
showConsoleLink('messaging', 'getTopic', topicId);
|
|
2188
|
+
} else {
|
|
2189
|
+
parse(response)
|
|
2190
|
+
success()
|
|
2191
|
+
}
|
|
2043
2192
|
}
|
|
2044
|
-
|
|
2193
|
+
|
|
2045
2194
|
return response;
|
|
2195
|
+
|
|
2046
2196
|
}
|
|
2047
2197
|
|
|
2048
2198
|
/**
|
|
@@ -2050,6 +2200,7 @@ const messagingGetTopic = async ({ topicId, parseOutput = true, sdk = undefined}
|
|
|
2050
2200
|
* @property {string} topicId Topic ID.
|
|
2051
2201
|
* @property {string} name Topic Name.
|
|
2052
2202
|
* @property {string[]} subscribe An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
|
|
2203
|
+
* @property {boolean} overrideForCli
|
|
2053
2204
|
* @property {boolean} parseOutput
|
|
2054
2205
|
* @property {libClient | undefined} sdk
|
|
2055
2206
|
*/
|
|
@@ -2057,8 +2208,9 @@ const messagingGetTopic = async ({ topicId, parseOutput = true, sdk = undefined}
|
|
|
2057
2208
|
/**
|
|
2058
2209
|
* @param {MessagingUpdateTopicRequestParams} params
|
|
2059
2210
|
*/
|
|
2060
|
-
const messagingUpdateTopic = async ({
|
|
2061
|
-
let client = !sdk ? await sdkForProject() :
|
|
2211
|
+
const messagingUpdateTopic = async ({topicId,name,subscribe,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2212
|
+
let client = !sdk ? await sdkForProject() :
|
|
2213
|
+
sdk;
|
|
2062
2214
|
let apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId);
|
|
2063
2215
|
let payload = {};
|
|
2064
2216
|
if (typeof name !== 'undefined') {
|
|
@@ -2079,13 +2231,15 @@ const messagingUpdateTopic = async ({ topicId, name, subscribe, parseOutput = tr
|
|
|
2079
2231
|
parse(response)
|
|
2080
2232
|
success()
|
|
2081
2233
|
}
|
|
2082
|
-
|
|
2234
|
+
|
|
2083
2235
|
return response;
|
|
2236
|
+
|
|
2084
2237
|
}
|
|
2085
2238
|
|
|
2086
2239
|
/**
|
|
2087
2240
|
* @typedef {Object} MessagingDeleteTopicRequestParams
|
|
2088
2241
|
* @property {string} topicId Topic ID.
|
|
2242
|
+
* @property {boolean} overrideForCli
|
|
2089
2243
|
* @property {boolean} parseOutput
|
|
2090
2244
|
* @property {libClient | undefined} sdk
|
|
2091
2245
|
*/
|
|
@@ -2093,8 +2247,9 @@ const messagingUpdateTopic = async ({ topicId, name, subscribe, parseOutput = tr
|
|
|
2093
2247
|
/**
|
|
2094
2248
|
* @param {MessagingDeleteTopicRequestParams} params
|
|
2095
2249
|
*/
|
|
2096
|
-
const messagingDeleteTopic = async ({
|
|
2097
|
-
let client = !sdk ? await sdkForProject() :
|
|
2250
|
+
const messagingDeleteTopic = async ({topicId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2251
|
+
let client = !sdk ? await sdkForProject() :
|
|
2252
|
+
sdk;
|
|
2098
2253
|
let apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId);
|
|
2099
2254
|
let payload = {};
|
|
2100
2255
|
|
|
@@ -2108,14 +2263,16 @@ const messagingDeleteTopic = async ({ topicId, parseOutput = true, sdk = undefin
|
|
|
2108
2263
|
parse(response)
|
|
2109
2264
|
success()
|
|
2110
2265
|
}
|
|
2111
|
-
|
|
2266
|
+
|
|
2112
2267
|
return response;
|
|
2268
|
+
|
|
2113
2269
|
}
|
|
2114
2270
|
|
|
2115
2271
|
/**
|
|
2116
2272
|
* @typedef {Object} MessagingListTopicLogsRequestParams
|
|
2117
2273
|
* @property {string} topicId Topic ID.
|
|
2118
2274
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
2275
|
+
* @property {boolean} overrideForCli
|
|
2119
2276
|
* @property {boolean} parseOutput
|
|
2120
2277
|
* @property {libClient | undefined} sdk
|
|
2121
2278
|
*/
|
|
@@ -2123,8 +2280,9 @@ const messagingDeleteTopic = async ({ topicId, parseOutput = true, sdk = undefin
|
|
|
2123
2280
|
/**
|
|
2124
2281
|
* @param {MessagingListTopicLogsRequestParams} params
|
|
2125
2282
|
*/
|
|
2126
|
-
const messagingListTopicLogs = async ({
|
|
2127
|
-
let client = !sdk ? await sdkForProject() :
|
|
2283
|
+
const messagingListTopicLogs = async ({topicId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2284
|
+
let client = !sdk ? await sdkForProject() :
|
|
2285
|
+
sdk;
|
|
2128
2286
|
let apiPath = '/messaging/topics/{topicId}/logs'.replace('{topicId}', topicId);
|
|
2129
2287
|
let payload = {};
|
|
2130
2288
|
if (typeof queries !== 'undefined') {
|
|
@@ -2141,8 +2299,9 @@ const messagingListTopicLogs = async ({ topicId, queries, parseOutput = true, sd
|
|
|
2141
2299
|
parse(response)
|
|
2142
2300
|
success()
|
|
2143
2301
|
}
|
|
2144
|
-
|
|
2302
|
+
|
|
2145
2303
|
return response;
|
|
2304
|
+
|
|
2146
2305
|
}
|
|
2147
2306
|
|
|
2148
2307
|
/**
|
|
@@ -2150,6 +2309,7 @@ const messagingListTopicLogs = async ({ topicId, queries, parseOutput = true, sd
|
|
|
2150
2309
|
* @property {string} topicId Topic ID. The topic ID subscribed to.
|
|
2151
2310
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled
|
|
2152
2311
|
* @property {string} search Search term to filter your list results. Max length: 256 chars.
|
|
2312
|
+
* @property {boolean} overrideForCli
|
|
2153
2313
|
* @property {boolean} parseOutput
|
|
2154
2314
|
* @property {libClient | undefined} sdk
|
|
2155
2315
|
*/
|
|
@@ -2157,8 +2317,9 @@ const messagingListTopicLogs = async ({ topicId, queries, parseOutput = true, sd
|
|
|
2157
2317
|
/**
|
|
2158
2318
|
* @param {MessagingListSubscribersRequestParams} params
|
|
2159
2319
|
*/
|
|
2160
|
-
const messagingListSubscribers = async ({
|
|
2161
|
-
let client = !sdk ? await sdkForProject() :
|
|
2320
|
+
const messagingListSubscribers = async ({topicId,queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
2321
|
+
let client = !sdk ? await sdkForProject() :
|
|
2322
|
+
sdk;
|
|
2162
2323
|
let apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', topicId);
|
|
2163
2324
|
let payload = {};
|
|
2164
2325
|
if (typeof queries !== 'undefined') {
|
|
@@ -2175,11 +2336,16 @@ const messagingListSubscribers = async ({ topicId, queries, search, parseOutput
|
|
|
2175
2336
|
}, payload);
|
|
2176
2337
|
|
|
2177
2338
|
if (parseOutput) {
|
|
2178
|
-
|
|
2179
|
-
|
|
2339
|
+
if(console) {
|
|
2340
|
+
showConsoleLink('messaging', 'listSubscribers', topicId);
|
|
2341
|
+
} else {
|
|
2342
|
+
parse(response)
|
|
2343
|
+
success()
|
|
2344
|
+
}
|
|
2180
2345
|
}
|
|
2181
|
-
|
|
2346
|
+
|
|
2182
2347
|
return response;
|
|
2348
|
+
|
|
2183
2349
|
}
|
|
2184
2350
|
|
|
2185
2351
|
/**
|
|
@@ -2187,6 +2353,7 @@ const messagingListSubscribers = async ({ topicId, queries, search, parseOutput
|
|
|
2187
2353
|
* @property {string} topicId Topic ID. The topic ID to subscribe to.
|
|
2188
2354
|
* @property {string} subscriberId Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.
|
|
2189
2355
|
* @property {string} targetId Target ID. The target ID to link to the specified Topic ID.
|
|
2356
|
+
* @property {boolean} overrideForCli
|
|
2190
2357
|
* @property {boolean} parseOutput
|
|
2191
2358
|
* @property {libClient | undefined} sdk
|
|
2192
2359
|
*/
|
|
@@ -2194,8 +2361,9 @@ const messagingListSubscribers = async ({ topicId, queries, search, parseOutput
|
|
|
2194
2361
|
/**
|
|
2195
2362
|
* @param {MessagingCreateSubscriberRequestParams} params
|
|
2196
2363
|
*/
|
|
2197
|
-
const messagingCreateSubscriber = async ({
|
|
2198
|
-
let client = !sdk ? await sdkForProject() :
|
|
2364
|
+
const messagingCreateSubscriber = async ({topicId,subscriberId,targetId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2365
|
+
let client = !sdk ? await sdkForProject() :
|
|
2366
|
+
sdk;
|
|
2199
2367
|
let apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', topicId);
|
|
2200
2368
|
let payload = {};
|
|
2201
2369
|
if (typeof subscriberId !== 'undefined') {
|
|
@@ -2215,14 +2383,16 @@ const messagingCreateSubscriber = async ({ topicId, subscriberId, targetId, pars
|
|
|
2215
2383
|
parse(response)
|
|
2216
2384
|
success()
|
|
2217
2385
|
}
|
|
2218
|
-
|
|
2386
|
+
|
|
2219
2387
|
return response;
|
|
2388
|
+
|
|
2220
2389
|
}
|
|
2221
2390
|
|
|
2222
2391
|
/**
|
|
2223
2392
|
* @typedef {Object} MessagingGetSubscriberRequestParams
|
|
2224
2393
|
* @property {string} topicId Topic ID. The topic ID subscribed to.
|
|
2225
2394
|
* @property {string} subscriberId Subscriber ID.
|
|
2395
|
+
* @property {boolean} overrideForCli
|
|
2226
2396
|
* @property {boolean} parseOutput
|
|
2227
2397
|
* @property {libClient | undefined} sdk
|
|
2228
2398
|
*/
|
|
@@ -2230,8 +2400,9 @@ const messagingCreateSubscriber = async ({ topicId, subscriberId, targetId, pars
|
|
|
2230
2400
|
/**
|
|
2231
2401
|
* @param {MessagingGetSubscriberRequestParams} params
|
|
2232
2402
|
*/
|
|
2233
|
-
const messagingGetSubscriber = async ({
|
|
2234
|
-
let client = !sdk ? await sdkForProject() :
|
|
2403
|
+
const messagingGetSubscriber = async ({topicId,subscriberId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2404
|
+
let client = !sdk ? await sdkForProject() :
|
|
2405
|
+
sdk;
|
|
2235
2406
|
let apiPath = '/messaging/topics/{topicId}/subscribers/{subscriberId}'.replace('{topicId}', topicId).replace('{subscriberId}', subscriberId);
|
|
2236
2407
|
let payload = {};
|
|
2237
2408
|
|
|
@@ -2245,14 +2416,16 @@ const messagingGetSubscriber = async ({ topicId, subscriberId, parseOutput = tru
|
|
|
2245
2416
|
parse(response)
|
|
2246
2417
|
success()
|
|
2247
2418
|
}
|
|
2248
|
-
|
|
2419
|
+
|
|
2249
2420
|
return response;
|
|
2421
|
+
|
|
2250
2422
|
}
|
|
2251
2423
|
|
|
2252
2424
|
/**
|
|
2253
2425
|
* @typedef {Object} MessagingDeleteSubscriberRequestParams
|
|
2254
2426
|
* @property {string} topicId Topic ID. The topic ID subscribed to.
|
|
2255
2427
|
* @property {string} subscriberId Subscriber ID.
|
|
2428
|
+
* @property {boolean} overrideForCli
|
|
2256
2429
|
* @property {boolean} parseOutput
|
|
2257
2430
|
* @property {libClient | undefined} sdk
|
|
2258
2431
|
*/
|
|
@@ -2260,8 +2433,9 @@ const messagingGetSubscriber = async ({ topicId, subscriberId, parseOutput = tru
|
|
|
2260
2433
|
/**
|
|
2261
2434
|
* @param {MessagingDeleteSubscriberRequestParams} params
|
|
2262
2435
|
*/
|
|
2263
|
-
const messagingDeleteSubscriber = async ({
|
|
2264
|
-
let client = !sdk ? await sdkForProject() :
|
|
2436
|
+
const messagingDeleteSubscriber = async ({topicId,subscriberId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2437
|
+
let client = !sdk ? await sdkForProject() :
|
|
2438
|
+
sdk;
|
|
2265
2439
|
let apiPath = '/messaging/topics/{topicId}/subscribers/{subscriberId}'.replace('{topicId}', topicId).replace('{subscriberId}', subscriberId);
|
|
2266
2440
|
let payload = {};
|
|
2267
2441
|
|
|
@@ -2275,8 +2449,9 @@ const messagingDeleteSubscriber = async ({ topicId, subscriberId, parseOutput =
|
|
|
2275
2449
|
parse(response)
|
|
2276
2450
|
success()
|
|
2277
2451
|
}
|
|
2278
|
-
|
|
2452
|
+
|
|
2279
2453
|
return response;
|
|
2454
|
+
|
|
2280
2455
|
}
|
|
2281
2456
|
|
|
2282
2457
|
messaging
|
|
@@ -2284,6 +2459,7 @@ messaging
|
|
|
2284
2459
|
.description(`Get a list of all messages from the current Appwrite project.`)
|
|
2285
2460
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType`)
|
|
2286
2461
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
2462
|
+
.option(`--console`, `Get the resource console url`)
|
|
2287
2463
|
.action(actionRunner(messagingListMessages))
|
|
2288
2464
|
|
|
2289
2465
|
messaging
|
|
@@ -2297,7 +2473,7 @@ messaging
|
|
|
2297
2473
|
.option(`--targets [targets...]`, `List of Targets IDs.`)
|
|
2298
2474
|
.option(`--cc [cc...]`, `Array of target IDs to be added as CC.`)
|
|
2299
2475
|
.option(`--bcc [bcc...]`, `Array of target IDs to be added as BCC.`)
|
|
2300
|
-
.option(`--attachments [attachments...]`, `Array of compound bucket IDs
|
|
2476
|
+
.option(`--attachments [attachments...]`, `Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.`)
|
|
2301
2477
|
.option(`--draft <draft>`, `Is message a draft`, parseBool)
|
|
2302
2478
|
.option(`--html <html>`, `Is content of type HTML`, parseBool)
|
|
2303
2479
|
.option(`--scheduledAt <scheduledAt>`, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`)
|
|
@@ -2317,6 +2493,7 @@ messaging
|
|
|
2317
2493
|
.option(`--cc [cc...]`, `Array of target IDs to be added as CC.`)
|
|
2318
2494
|
.option(`--bcc [bcc...]`, `Array of target IDs to be added as BCC.`)
|
|
2319
2495
|
.option(`--scheduledAt <scheduledAt>`, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`)
|
|
2496
|
+
.option(`--attachments [attachments...]`, `Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.`)
|
|
2320
2497
|
.action(actionRunner(messagingUpdateEmail))
|
|
2321
2498
|
|
|
2322
2499
|
messaging
|
|
@@ -2330,7 +2507,7 @@ messaging
|
|
|
2330
2507
|
.option(`--targets [targets...]`, `List of Targets IDs.`)
|
|
2331
2508
|
.option(`--data <data>`, `Additional Data for push notification.`)
|
|
2332
2509
|
.option(`--action <action>`, `Action for push notification.`)
|
|
2333
|
-
.option(`--image <image>`, `Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage
|
|
2510
|
+
.option(`--image <image>`, `Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.`)
|
|
2334
2511
|
.option(`--icon <icon>`, `Icon for push notification. Available only for Android and Web Platform.`)
|
|
2335
2512
|
.option(`--sound <sound>`, `Sound for push notification. Available only for Android and IOS Platform.`)
|
|
2336
2513
|
.option(`--color <color>`, `Color for push notification. Available only for Android Platform.`)
|
|
@@ -2351,7 +2528,7 @@ messaging
|
|
|
2351
2528
|
.option(`--body <body>`, `Body for push notification.`)
|
|
2352
2529
|
.option(`--data <data>`, `Additional Data for push notification.`)
|
|
2353
2530
|
.option(`--action <action>`, `Action for push notification.`)
|
|
2354
|
-
.option(`--image <image>`, `Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage
|
|
2531
|
+
.option(`--image <image>`, `Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.`)
|
|
2355
2532
|
.option(`--icon <icon>`, `Icon for push notification. Available only for Android and Web platforms.`)
|
|
2356
2533
|
.option(`--sound <sound>`, `Sound for push notification. Available only for Android and iOS platforms.`)
|
|
2357
2534
|
.option(`--color <color>`, `Color for push notification. Available only for Android platforms.`)
|
|
@@ -2389,6 +2566,7 @@ messaging
|
|
|
2389
2566
|
.command(`getMessage`)
|
|
2390
2567
|
.description(`Get a message by its unique ID. `)
|
|
2391
2568
|
.requiredOption(`--messageId <messageId>`, `Message ID.`)
|
|
2569
|
+
.option(`--console`, `Get the resource console url`)
|
|
2392
2570
|
.action(actionRunner(messagingGetMessage))
|
|
2393
2571
|
|
|
2394
2572
|
messaging
|
|
@@ -2402,6 +2580,7 @@ messaging
|
|
|
2402
2580
|
.description(`Get the message activity logs listed by its unique ID.`)
|
|
2403
2581
|
.requiredOption(`--messageId <messageId>`, `Message ID.`)
|
|
2404
2582
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
|
|
2583
|
+
.option(`--console`, `Get the resource console url`)
|
|
2405
2584
|
.action(actionRunner(messagingListMessageLogs))
|
|
2406
2585
|
|
|
2407
2586
|
messaging
|
|
@@ -2416,6 +2595,7 @@ messaging
|
|
|
2416
2595
|
.description(`Get a list of all providers from the current Appwrite project.`)
|
|
2417
2596
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled`)
|
|
2418
2597
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
2598
|
+
.option(`--console`, `Get the resource console url`)
|
|
2419
2599
|
.action(actionRunner(messagingListProviders))
|
|
2420
2600
|
|
|
2421
2601
|
messaging
|
|
@@ -2497,9 +2677,9 @@ messaging
|
|
|
2497
2677
|
.description(`Create a new MSG91 provider.`)
|
|
2498
2678
|
.requiredOption(`--providerId <providerId>`, `Provider ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
2499
2679
|
.requiredOption(`--name <name>`, `Provider name.`)
|
|
2500
|
-
.option(`--
|
|
2501
|
-
.option(`--senderId <senderId>`, `Msg91
|
|
2502
|
-
.option(`--authKey <authKey>`, `Msg91
|
|
2680
|
+
.option(`--templateId <templateId>`, `Msg91 template ID`)
|
|
2681
|
+
.option(`--senderId <senderId>`, `Msg91 sender ID.`)
|
|
2682
|
+
.option(`--authKey <authKey>`, `Msg91 auth key.`)
|
|
2503
2683
|
.option(`--enabled <enabled>`, `Set as enabled.`, parseBool)
|
|
2504
2684
|
.action(actionRunner(messagingCreateMsg91Provider))
|
|
2505
2685
|
|
|
@@ -2509,9 +2689,9 @@ messaging
|
|
|
2509
2689
|
.requiredOption(`--providerId <providerId>`, `Provider ID.`)
|
|
2510
2690
|
.option(`--name <name>`, `Provider name.`)
|
|
2511
2691
|
.option(`--enabled <enabled>`, `Set as enabled.`, parseBool)
|
|
2512
|
-
.option(`--
|
|
2513
|
-
.option(`--
|
|
2514
|
-
.option(`--
|
|
2692
|
+
.option(`--templateId <templateId>`, `Msg91 template ID.`)
|
|
2693
|
+
.option(`--senderId <senderId>`, `Msg91 sender ID.`)
|
|
2694
|
+
.option(`--authKey <authKey>`, `Msg91 auth key.`)
|
|
2515
2695
|
.action(actionRunner(messagingUpdateMsg91Provider))
|
|
2516
2696
|
|
|
2517
2697
|
messaging
|
|
@@ -2670,6 +2850,7 @@ messaging
|
|
|
2670
2850
|
.command(`getProvider`)
|
|
2671
2851
|
.description(`Get a provider by its unique ID. `)
|
|
2672
2852
|
.requiredOption(`--providerId <providerId>`, `Provider ID.`)
|
|
2853
|
+
.option(`--console`, `Get the resource console url`)
|
|
2673
2854
|
.action(actionRunner(messagingGetProvider))
|
|
2674
2855
|
|
|
2675
2856
|
messaging
|
|
@@ -2697,6 +2878,7 @@ messaging
|
|
|
2697
2878
|
.description(`Get a list of all topics from the current Appwrite project.`)
|
|
2698
2879
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal`)
|
|
2699
2880
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
2881
|
+
.option(`--console`, `Get the resource console url`)
|
|
2700
2882
|
.action(actionRunner(messagingListTopics))
|
|
2701
2883
|
|
|
2702
2884
|
messaging
|
|
@@ -2711,6 +2893,7 @@ messaging
|
|
|
2711
2893
|
.command(`getTopic`)
|
|
2712
2894
|
.description(`Get a topic by its unique ID. `)
|
|
2713
2895
|
.requiredOption(`--topicId <topicId>`, `Topic ID.`)
|
|
2896
|
+
.option(`--console`, `Get the resource console url`)
|
|
2714
2897
|
.action(actionRunner(messagingGetTopic))
|
|
2715
2898
|
|
|
2716
2899
|
messaging
|
|
@@ -2740,6 +2923,7 @@ messaging
|
|
|
2740
2923
|
.requiredOption(`--topicId <topicId>`, `Topic ID. The topic ID subscribed to.`)
|
|
2741
2924
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled`)
|
|
2742
2925
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
2926
|
+
.option(`--console`, `Get the resource console url`)
|
|
2743
2927
|
.action(actionRunner(messagingListSubscribers))
|
|
2744
2928
|
|
|
2745
2929
|
messaging
|
|
@@ -2812,4 +2996,4 @@ module.exports = {
|
|
|
2812
2996
|
messagingCreateSubscriber,
|
|
2813
2997
|
messagingGetSubscriber,
|
|
2814
2998
|
messagingDeleteSubscriber
|
|
2815
|
-
};
|
|
2999
|
+
};
|