appwrite-cli 5.0.5 → 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/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 +17 -3
- package/lib/commands/account.js +306 -152
- package/lib/commands/assistant.js +8 -5
- package/lib/commands/avatars.js +114 -58
- 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 +334 -156
- 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 +324 -134
- 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 +452 -80
- package/lib/sdks.js +1 -1
- package/lib/spinner.js +103 -0
- package/lib/utils.js +242 -4
- package/lib/validations.js +17 -0
- package/package.json +6 -2
- package/scoop/appwrite.json +3 -3
- package/lib/commands/deploy.js +0 -940
|
@@ -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
|
/**
|
|
@@ -89,6 +96,7 @@ const messagingListMessages = async ({ queries, search, parseOutput = true, sdk
|
|
|
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
|
/**
|
|
@@ -171,6 +181,7 @@ const messagingCreateEmail = async ({ messageId, subject, content, topics, users
|
|
|
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.
|
|
173
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
|
|
174
185
|
* @property {boolean} parseOutput
|
|
175
186
|
* @property {libClient | undefined} sdk
|
|
176
187
|
*/
|
|
@@ -178,8 +189,9 @@ const messagingCreateEmail = async ({ messageId, subject, content, topics, users
|
|
|
178
189
|
/**
|
|
179
190
|
* @param {MessagingUpdateEmailRequestParams} params
|
|
180
191
|
*/
|
|
181
|
-
const messagingUpdateEmail = async ({
|
|
182
|
-
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;
|
|
183
195
|
let apiPath = '/messaging/messages/email/{messageId}'.replace('{messageId}', messageId);
|
|
184
196
|
let payload = {};
|
|
185
197
|
topics = topics === true ? [] : topics;
|
|
@@ -232,8 +244,9 @@ const messagingUpdateEmail = async ({ messageId, topics, users, targets, subject
|
|
|
232
244
|
parse(response)
|
|
233
245
|
success()
|
|
234
246
|
}
|
|
235
|
-
|
|
247
|
+
|
|
236
248
|
return response;
|
|
249
|
+
|
|
237
250
|
}
|
|
238
251
|
|
|
239
252
|
/**
|
|
@@ -254,6 +267,7 @@ const messagingUpdateEmail = async ({ messageId, topics, users, targets, subject
|
|
|
254
267
|
* @property {string} badge Badge for push notification. Available only for IOS Platform.
|
|
255
268
|
* @property {boolean} draft Is message a draft
|
|
256
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
|
|
257
271
|
* @property {boolean} parseOutput
|
|
258
272
|
* @property {libClient | undefined} sdk
|
|
259
273
|
*/
|
|
@@ -261,8 +275,9 @@ const messagingUpdateEmail = async ({ messageId, topics, users, targets, subject
|
|
|
261
275
|
/**
|
|
262
276
|
* @param {MessagingCreatePushRequestParams} params
|
|
263
277
|
*/
|
|
264
|
-
const messagingCreatePush = async ({
|
|
265
|
-
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;
|
|
266
281
|
let apiPath = '/messaging/messages/push';
|
|
267
282
|
let payload = {};
|
|
268
283
|
if (typeof messageId !== 'undefined') {
|
|
@@ -327,8 +342,9 @@ const messagingCreatePush = async ({ messageId, title, body, topics, users, targ
|
|
|
327
342
|
parse(response)
|
|
328
343
|
success()
|
|
329
344
|
}
|
|
330
|
-
|
|
345
|
+
|
|
331
346
|
return response;
|
|
347
|
+
|
|
332
348
|
}
|
|
333
349
|
|
|
334
350
|
/**
|
|
@@ -349,6 +365,7 @@ const messagingCreatePush = async ({ messageId, title, body, topics, users, targ
|
|
|
349
365
|
* @property {number} badge Badge for push notification. Available only for iOS platforms.
|
|
350
366
|
* @property {boolean} draft Is message a draft
|
|
351
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
|
|
352
369
|
* @property {boolean} parseOutput
|
|
353
370
|
* @property {libClient | undefined} sdk
|
|
354
371
|
*/
|
|
@@ -356,8 +373,9 @@ const messagingCreatePush = async ({ messageId, title, body, topics, users, targ
|
|
|
356
373
|
/**
|
|
357
374
|
* @param {MessagingUpdatePushRequestParams} params
|
|
358
375
|
*/
|
|
359
|
-
const messagingUpdatePush = async ({
|
|
360
|
-
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;
|
|
361
379
|
let apiPath = '/messaging/messages/push/{messageId}'.replace('{messageId}', messageId);
|
|
362
380
|
let payload = {};
|
|
363
381
|
topics = topics === true ? [] : topics;
|
|
@@ -419,8 +437,9 @@ const messagingUpdatePush = async ({ messageId, topics, users, targets, title, b
|
|
|
419
437
|
parse(response)
|
|
420
438
|
success()
|
|
421
439
|
}
|
|
422
|
-
|
|
440
|
+
|
|
423
441
|
return response;
|
|
442
|
+
|
|
424
443
|
}
|
|
425
444
|
|
|
426
445
|
/**
|
|
@@ -432,6 +451,7 @@ const messagingUpdatePush = async ({ messageId, topics, users, targets, title, b
|
|
|
432
451
|
* @property {string[]} targets List of Targets IDs.
|
|
433
452
|
* @property {boolean} draft Is message a draft
|
|
434
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
|
|
435
455
|
* @property {boolean} parseOutput
|
|
436
456
|
* @property {libClient | undefined} sdk
|
|
437
457
|
*/
|
|
@@ -439,8 +459,9 @@ const messagingUpdatePush = async ({ messageId, topics, users, targets, title, b
|
|
|
439
459
|
/**
|
|
440
460
|
* @param {MessagingCreateSmsRequestParams} params
|
|
441
461
|
*/
|
|
442
|
-
const messagingCreateSms = async ({
|
|
443
|
-
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;
|
|
444
465
|
let apiPath = '/messaging/messages/sms';
|
|
445
466
|
let payload = {};
|
|
446
467
|
if (typeof messageId !== 'undefined') {
|
|
@@ -478,8 +499,9 @@ const messagingCreateSms = async ({ messageId, content, topics, users, targets,
|
|
|
478
499
|
parse(response)
|
|
479
500
|
success()
|
|
480
501
|
}
|
|
481
|
-
|
|
502
|
+
|
|
482
503
|
return response;
|
|
504
|
+
|
|
483
505
|
}
|
|
484
506
|
|
|
485
507
|
/**
|
|
@@ -491,6 +513,7 @@ const messagingCreateSms = async ({ messageId, content, topics, users, targets,
|
|
|
491
513
|
* @property {string} content Email Content.
|
|
492
514
|
* @property {boolean} draft Is message a draft
|
|
493
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
|
|
494
517
|
* @property {boolean} parseOutput
|
|
495
518
|
* @property {libClient | undefined} sdk
|
|
496
519
|
*/
|
|
@@ -498,8 +521,9 @@ const messagingCreateSms = async ({ messageId, content, topics, users, targets,
|
|
|
498
521
|
/**
|
|
499
522
|
* @param {MessagingUpdateSmsRequestParams} params
|
|
500
523
|
*/
|
|
501
|
-
const messagingUpdateSms = async ({
|
|
502
|
-
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;
|
|
503
527
|
let apiPath = '/messaging/messages/sms/{messageId}'.replace('{messageId}', messageId);
|
|
504
528
|
let payload = {};
|
|
505
529
|
topics = topics === true ? [] : topics;
|
|
@@ -534,13 +558,15 @@ const messagingUpdateSms = async ({ messageId, topics, users, targets, content,
|
|
|
534
558
|
parse(response)
|
|
535
559
|
success()
|
|
536
560
|
}
|
|
537
|
-
|
|
561
|
+
|
|
538
562
|
return response;
|
|
563
|
+
|
|
539
564
|
}
|
|
540
565
|
|
|
541
566
|
/**
|
|
542
567
|
* @typedef {Object} MessagingGetMessageRequestParams
|
|
543
568
|
* @property {string} messageId Message ID.
|
|
569
|
+
* @property {boolean} overrideForCli
|
|
544
570
|
* @property {boolean} parseOutput
|
|
545
571
|
* @property {libClient | undefined} sdk
|
|
546
572
|
*/
|
|
@@ -548,8 +574,9 @@ const messagingUpdateSms = async ({ messageId, topics, users, targets, content,
|
|
|
548
574
|
/**
|
|
549
575
|
* @param {MessagingGetMessageRequestParams} params
|
|
550
576
|
*/
|
|
551
|
-
const messagingGetMessage = async ({
|
|
552
|
-
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;
|
|
553
580
|
let apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', messageId);
|
|
554
581
|
let payload = {};
|
|
555
582
|
|
|
@@ -560,16 +587,22 @@ const messagingGetMessage = async ({ messageId, parseOutput = true, sdk = undefi
|
|
|
560
587
|
}, payload);
|
|
561
588
|
|
|
562
589
|
if (parseOutput) {
|
|
563
|
-
|
|
564
|
-
|
|
590
|
+
if(console) {
|
|
591
|
+
showConsoleLink('messaging', 'getMessage', messageId);
|
|
592
|
+
} else {
|
|
593
|
+
parse(response)
|
|
594
|
+
success()
|
|
595
|
+
}
|
|
565
596
|
}
|
|
566
|
-
|
|
597
|
+
|
|
567
598
|
return response;
|
|
599
|
+
|
|
568
600
|
}
|
|
569
601
|
|
|
570
602
|
/**
|
|
571
603
|
* @typedef {Object} MessagingDeleteRequestParams
|
|
572
604
|
* @property {string} messageId Message ID.
|
|
605
|
+
* @property {boolean} overrideForCli
|
|
573
606
|
* @property {boolean} parseOutput
|
|
574
607
|
* @property {libClient | undefined} sdk
|
|
575
608
|
*/
|
|
@@ -577,8 +610,9 @@ const messagingGetMessage = async ({ messageId, parseOutput = true, sdk = undefi
|
|
|
577
610
|
/**
|
|
578
611
|
* @param {MessagingDeleteRequestParams} params
|
|
579
612
|
*/
|
|
580
|
-
const messagingDelete = async ({
|
|
581
|
-
let client = !sdk ? await sdkForProject() :
|
|
613
|
+
const messagingDelete = async ({messageId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
614
|
+
let client = !sdk ? await sdkForProject() :
|
|
615
|
+
sdk;
|
|
582
616
|
let apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', messageId);
|
|
583
617
|
let payload = {};
|
|
584
618
|
|
|
@@ -592,14 +626,16 @@ const messagingDelete = async ({ messageId, parseOutput = true, sdk = undefined}
|
|
|
592
626
|
parse(response)
|
|
593
627
|
success()
|
|
594
628
|
}
|
|
595
|
-
|
|
629
|
+
|
|
596
630
|
return response;
|
|
631
|
+
|
|
597
632
|
}
|
|
598
633
|
|
|
599
634
|
/**
|
|
600
635
|
* @typedef {Object} MessagingListMessageLogsRequestParams
|
|
601
636
|
* @property {string} messageId Message ID.
|
|
602
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
|
|
603
639
|
* @property {boolean} parseOutput
|
|
604
640
|
* @property {libClient | undefined} sdk
|
|
605
641
|
*/
|
|
@@ -607,8 +643,9 @@ const messagingDelete = async ({ messageId, parseOutput = true, sdk = undefined}
|
|
|
607
643
|
/**
|
|
608
644
|
* @param {MessagingListMessageLogsRequestParams} params
|
|
609
645
|
*/
|
|
610
|
-
const messagingListMessageLogs = async ({
|
|
611
|
-
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;
|
|
612
649
|
let apiPath = '/messaging/messages/{messageId}/logs'.replace('{messageId}', messageId);
|
|
613
650
|
let payload = {};
|
|
614
651
|
if (typeof queries !== 'undefined') {
|
|
@@ -622,17 +659,23 @@ const messagingListMessageLogs = async ({ messageId, queries, parseOutput = true
|
|
|
622
659
|
}, payload);
|
|
623
660
|
|
|
624
661
|
if (parseOutput) {
|
|
625
|
-
|
|
626
|
-
|
|
662
|
+
if(console) {
|
|
663
|
+
showConsoleLink('messaging', 'listMessageLogs', messageId);
|
|
664
|
+
} else {
|
|
665
|
+
parse(response)
|
|
666
|
+
success()
|
|
667
|
+
}
|
|
627
668
|
}
|
|
628
|
-
|
|
669
|
+
|
|
629
670
|
return response;
|
|
671
|
+
|
|
630
672
|
}
|
|
631
673
|
|
|
632
674
|
/**
|
|
633
675
|
* @typedef {Object} MessagingListTargetsRequestParams
|
|
634
676
|
* @property {string} messageId Message ID.
|
|
635
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
|
|
636
679
|
* @property {boolean} parseOutput
|
|
637
680
|
* @property {libClient | undefined} sdk
|
|
638
681
|
*/
|
|
@@ -640,8 +683,9 @@ const messagingListMessageLogs = async ({ messageId, queries, parseOutput = true
|
|
|
640
683
|
/**
|
|
641
684
|
* @param {MessagingListTargetsRequestParams} params
|
|
642
685
|
*/
|
|
643
|
-
const messagingListTargets = async ({
|
|
644
|
-
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;
|
|
645
689
|
let apiPath = '/messaging/messages/{messageId}/targets'.replace('{messageId}', messageId);
|
|
646
690
|
let payload = {};
|
|
647
691
|
if (typeof queries !== 'undefined') {
|
|
@@ -658,14 +702,16 @@ const messagingListTargets = async ({ messageId, queries, parseOutput = true, sd
|
|
|
658
702
|
parse(response)
|
|
659
703
|
success()
|
|
660
704
|
}
|
|
661
|
-
|
|
705
|
+
|
|
662
706
|
return response;
|
|
707
|
+
|
|
663
708
|
}
|
|
664
709
|
|
|
665
710
|
/**
|
|
666
711
|
* @typedef {Object} MessagingListProvidersRequestParams
|
|
667
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
|
|
668
713
|
* @property {string} search Search term to filter your list results. Max length: 256 chars.
|
|
714
|
+
* @property {boolean} overrideForCli
|
|
669
715
|
* @property {boolean} parseOutput
|
|
670
716
|
* @property {libClient | undefined} sdk
|
|
671
717
|
*/
|
|
@@ -673,8 +719,9 @@ const messagingListTargets = async ({ messageId, queries, parseOutput = true, sd
|
|
|
673
719
|
/**
|
|
674
720
|
* @param {MessagingListProvidersRequestParams} params
|
|
675
721
|
*/
|
|
676
|
-
const messagingListProviders = async ({
|
|
677
|
-
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;
|
|
678
725
|
let apiPath = '/messaging/providers';
|
|
679
726
|
let payload = {};
|
|
680
727
|
if (typeof queries !== 'undefined') {
|
|
@@ -691,11 +738,16 @@ const messagingListProviders = async ({ queries, search, parseOutput = true, sdk
|
|
|
691
738
|
}, payload);
|
|
692
739
|
|
|
693
740
|
if (parseOutput) {
|
|
694
|
-
|
|
695
|
-
|
|
741
|
+
if(console) {
|
|
742
|
+
showConsoleLink('messaging', 'listProviders');
|
|
743
|
+
} else {
|
|
744
|
+
parse(response)
|
|
745
|
+
success()
|
|
746
|
+
}
|
|
696
747
|
}
|
|
697
|
-
|
|
748
|
+
|
|
698
749
|
return response;
|
|
750
|
+
|
|
699
751
|
}
|
|
700
752
|
|
|
701
753
|
/**
|
|
@@ -708,6 +760,7 @@ const messagingListProviders = async ({ queries, search, parseOutput = true, sdk
|
|
|
708
760
|
* @property {string} bundleId APNS bundle ID.
|
|
709
761
|
* @property {boolean} sandbox Use APNS sandbox environment.
|
|
710
762
|
* @property {boolean} enabled Set as enabled.
|
|
763
|
+
* @property {boolean} overrideForCli
|
|
711
764
|
* @property {boolean} parseOutput
|
|
712
765
|
* @property {libClient | undefined} sdk
|
|
713
766
|
*/
|
|
@@ -715,8 +768,9 @@ const messagingListProviders = async ({ queries, search, parseOutput = true, sdk
|
|
|
715
768
|
/**
|
|
716
769
|
* @param {MessagingCreateApnsProviderRequestParams} params
|
|
717
770
|
*/
|
|
718
|
-
const messagingCreateApnsProvider = async ({
|
|
719
|
-
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;
|
|
720
774
|
let apiPath = '/messaging/providers/apns';
|
|
721
775
|
let payload = {};
|
|
722
776
|
if (typeof providerId !== 'undefined') {
|
|
@@ -754,8 +808,9 @@ const messagingCreateApnsProvider = async ({ providerId, name, authKey, authKeyI
|
|
|
754
808
|
parse(response)
|
|
755
809
|
success()
|
|
756
810
|
}
|
|
757
|
-
|
|
811
|
+
|
|
758
812
|
return response;
|
|
813
|
+
|
|
759
814
|
}
|
|
760
815
|
|
|
761
816
|
/**
|
|
@@ -768,6 +823,7 @@ const messagingCreateApnsProvider = async ({ providerId, name, authKey, authKeyI
|
|
|
768
823
|
* @property {string} teamId APNS team ID.
|
|
769
824
|
* @property {string} bundleId APNS bundle ID.
|
|
770
825
|
* @property {boolean} sandbox Use APNS sandbox environment.
|
|
826
|
+
* @property {boolean} overrideForCli
|
|
771
827
|
* @property {boolean} parseOutput
|
|
772
828
|
* @property {libClient | undefined} sdk
|
|
773
829
|
*/
|
|
@@ -775,8 +831,9 @@ const messagingCreateApnsProvider = async ({ providerId, name, authKey, authKeyI
|
|
|
775
831
|
/**
|
|
776
832
|
* @param {MessagingUpdateApnsProviderRequestParams} params
|
|
777
833
|
*/
|
|
778
|
-
const messagingUpdateApnsProvider = async ({
|
|
779
|
-
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;
|
|
780
837
|
let apiPath = '/messaging/providers/apns/{providerId}'.replace('{providerId}', providerId);
|
|
781
838
|
let payload = {};
|
|
782
839
|
if (typeof name !== 'undefined') {
|
|
@@ -811,8 +868,9 @@ const messagingUpdateApnsProvider = async ({ providerId, name, enabled, authKey,
|
|
|
811
868
|
parse(response)
|
|
812
869
|
success()
|
|
813
870
|
}
|
|
814
|
-
|
|
871
|
+
|
|
815
872
|
return response;
|
|
873
|
+
|
|
816
874
|
}
|
|
817
875
|
|
|
818
876
|
/**
|
|
@@ -821,6 +879,7 @@ const messagingUpdateApnsProvider = async ({ providerId, name, enabled, authKey,
|
|
|
821
879
|
* @property {string} name Provider name.
|
|
822
880
|
* @property {object} serviceAccountJSON FCM service account JSON.
|
|
823
881
|
* @property {boolean} enabled Set as enabled.
|
|
882
|
+
* @property {boolean} overrideForCli
|
|
824
883
|
* @property {boolean} parseOutput
|
|
825
884
|
* @property {libClient | undefined} sdk
|
|
826
885
|
*/
|
|
@@ -828,8 +887,9 @@ const messagingUpdateApnsProvider = async ({ providerId, name, enabled, authKey,
|
|
|
828
887
|
/**
|
|
829
888
|
* @param {MessagingCreateFcmProviderRequestParams} params
|
|
830
889
|
*/
|
|
831
|
-
const messagingCreateFcmProvider = async ({
|
|
832
|
-
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;
|
|
833
893
|
let apiPath = '/messaging/providers/fcm';
|
|
834
894
|
let payload = {};
|
|
835
895
|
if (typeof providerId !== 'undefined') {
|
|
@@ -855,8 +915,9 @@ const messagingCreateFcmProvider = async ({ providerId, name, serviceAccountJSON
|
|
|
855
915
|
parse(response)
|
|
856
916
|
success()
|
|
857
917
|
}
|
|
858
|
-
|
|
918
|
+
|
|
859
919
|
return response;
|
|
920
|
+
|
|
860
921
|
}
|
|
861
922
|
|
|
862
923
|
/**
|
|
@@ -865,6 +926,7 @@ const messagingCreateFcmProvider = async ({ providerId, name, serviceAccountJSON
|
|
|
865
926
|
* @property {string} name Provider name.
|
|
866
927
|
* @property {boolean} enabled Set as enabled.
|
|
867
928
|
* @property {object} serviceAccountJSON FCM service account JSON.
|
|
929
|
+
* @property {boolean} overrideForCli
|
|
868
930
|
* @property {boolean} parseOutput
|
|
869
931
|
* @property {libClient | undefined} sdk
|
|
870
932
|
*/
|
|
@@ -872,8 +934,9 @@ const messagingCreateFcmProvider = async ({ providerId, name, serviceAccountJSON
|
|
|
872
934
|
/**
|
|
873
935
|
* @param {MessagingUpdateFcmProviderRequestParams} params
|
|
874
936
|
*/
|
|
875
|
-
const messagingUpdateFcmProvider = async ({
|
|
876
|
-
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;
|
|
877
940
|
let apiPath = '/messaging/providers/fcm/{providerId}'.replace('{providerId}', providerId);
|
|
878
941
|
let payload = {};
|
|
879
942
|
if (typeof name !== 'undefined') {
|
|
@@ -896,8 +959,9 @@ const messagingUpdateFcmProvider = async ({ providerId, name, enabled, serviceAc
|
|
|
896
959
|
parse(response)
|
|
897
960
|
success()
|
|
898
961
|
}
|
|
899
|
-
|
|
962
|
+
|
|
900
963
|
return response;
|
|
964
|
+
|
|
901
965
|
}
|
|
902
966
|
|
|
903
967
|
/**
|
|
@@ -912,6 +976,7 @@ const messagingUpdateFcmProvider = async ({ providerId, name, enabled, serviceAc
|
|
|
912
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.
|
|
913
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.
|
|
914
978
|
* @property {boolean} enabled Set as enabled.
|
|
979
|
+
* @property {boolean} overrideForCli
|
|
915
980
|
* @property {boolean} parseOutput
|
|
916
981
|
* @property {libClient | undefined} sdk
|
|
917
982
|
*/
|
|
@@ -919,8 +984,9 @@ const messagingUpdateFcmProvider = async ({ providerId, name, enabled, serviceAc
|
|
|
919
984
|
/**
|
|
920
985
|
* @param {MessagingCreateMailgunProviderRequestParams} params
|
|
921
986
|
*/
|
|
922
|
-
const messagingCreateMailgunProvider = async ({
|
|
923
|
-
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;
|
|
924
990
|
let apiPath = '/messaging/providers/mailgun';
|
|
925
991
|
let payload = {};
|
|
926
992
|
if (typeof providerId !== 'undefined') {
|
|
@@ -964,8 +1030,9 @@ const messagingCreateMailgunProvider = async ({ providerId, name, apiKey, domain
|
|
|
964
1030
|
parse(response)
|
|
965
1031
|
success()
|
|
966
1032
|
}
|
|
967
|
-
|
|
1033
|
+
|
|
968
1034
|
return response;
|
|
1035
|
+
|
|
969
1036
|
}
|
|
970
1037
|
|
|
971
1038
|
/**
|
|
@@ -980,6 +1047,7 @@ const messagingCreateMailgunProvider = async ({ providerId, name, apiKey, domain
|
|
|
980
1047
|
* @property {string} fromEmail Sender email address.
|
|
981
1048
|
* @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name.
|
|
982
1049
|
* @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email.
|
|
1050
|
+
* @property {boolean} overrideForCli
|
|
983
1051
|
* @property {boolean} parseOutput
|
|
984
1052
|
* @property {libClient | undefined} sdk
|
|
985
1053
|
*/
|
|
@@ -987,8 +1055,9 @@ const messagingCreateMailgunProvider = async ({ providerId, name, apiKey, domain
|
|
|
987
1055
|
/**
|
|
988
1056
|
* @param {MessagingUpdateMailgunProviderRequestParams} params
|
|
989
1057
|
*/
|
|
990
|
-
const messagingUpdateMailgunProvider = async ({
|
|
991
|
-
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;
|
|
992
1061
|
let apiPath = '/messaging/providers/mailgun/{providerId}'.replace('{providerId}', providerId);
|
|
993
1062
|
let payload = {};
|
|
994
1063
|
if (typeof name !== 'undefined') {
|
|
@@ -1029,8 +1098,9 @@ const messagingUpdateMailgunProvider = async ({ providerId, name, apiKey, domain
|
|
|
1029
1098
|
parse(response)
|
|
1030
1099
|
success()
|
|
1031
1100
|
}
|
|
1032
|
-
|
|
1101
|
+
|
|
1033
1102
|
return response;
|
|
1103
|
+
|
|
1034
1104
|
}
|
|
1035
1105
|
|
|
1036
1106
|
/**
|
|
@@ -1041,6 +1111,7 @@ const messagingUpdateMailgunProvider = async ({ providerId, name, apiKey, domain
|
|
|
1041
1111
|
* @property {string} senderId Msg91 sender ID.
|
|
1042
1112
|
* @property {string} authKey Msg91 auth key.
|
|
1043
1113
|
* @property {boolean} enabled Set as enabled.
|
|
1114
|
+
* @property {boolean} overrideForCli
|
|
1044
1115
|
* @property {boolean} parseOutput
|
|
1045
1116
|
* @property {libClient | undefined} sdk
|
|
1046
1117
|
*/
|
|
@@ -1048,8 +1119,9 @@ const messagingUpdateMailgunProvider = async ({ providerId, name, apiKey, domain
|
|
|
1048
1119
|
/**
|
|
1049
1120
|
* @param {MessagingCreateMsg91ProviderRequestParams} params
|
|
1050
1121
|
*/
|
|
1051
|
-
const messagingCreateMsg91Provider = async ({
|
|
1052
|
-
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;
|
|
1053
1125
|
let apiPath = '/messaging/providers/msg91';
|
|
1054
1126
|
let payload = {};
|
|
1055
1127
|
if (typeof providerId !== 'undefined') {
|
|
@@ -1081,8 +1153,9 @@ const messagingCreateMsg91Provider = async ({ providerId, name, templateId, send
|
|
|
1081
1153
|
parse(response)
|
|
1082
1154
|
success()
|
|
1083
1155
|
}
|
|
1084
|
-
|
|
1156
|
+
|
|
1085
1157
|
return response;
|
|
1158
|
+
|
|
1086
1159
|
}
|
|
1087
1160
|
|
|
1088
1161
|
/**
|
|
@@ -1093,6 +1166,7 @@ const messagingCreateMsg91Provider = async ({ providerId, name, templateId, send
|
|
|
1093
1166
|
* @property {string} templateId Msg91 template ID.
|
|
1094
1167
|
* @property {string} senderId Msg91 sender ID.
|
|
1095
1168
|
* @property {string} authKey Msg91 auth key.
|
|
1169
|
+
* @property {boolean} overrideForCli
|
|
1096
1170
|
* @property {boolean} parseOutput
|
|
1097
1171
|
* @property {libClient | undefined} sdk
|
|
1098
1172
|
*/
|
|
@@ -1100,8 +1174,9 @@ const messagingCreateMsg91Provider = async ({ providerId, name, templateId, send
|
|
|
1100
1174
|
/**
|
|
1101
1175
|
* @param {MessagingUpdateMsg91ProviderRequestParams} params
|
|
1102
1176
|
*/
|
|
1103
|
-
const messagingUpdateMsg91Provider = async ({
|
|
1104
|
-
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;
|
|
1105
1180
|
let apiPath = '/messaging/providers/msg91/{providerId}'.replace('{providerId}', providerId);
|
|
1106
1181
|
let payload = {};
|
|
1107
1182
|
if (typeof name !== 'undefined') {
|
|
@@ -1130,8 +1205,9 @@ const messagingUpdateMsg91Provider = async ({ providerId, name, enabled, templat
|
|
|
1130
1205
|
parse(response)
|
|
1131
1206
|
success()
|
|
1132
1207
|
}
|
|
1133
|
-
|
|
1208
|
+
|
|
1134
1209
|
return response;
|
|
1210
|
+
|
|
1135
1211
|
}
|
|
1136
1212
|
|
|
1137
1213
|
/**
|
|
@@ -1144,6 +1220,7 @@ const messagingUpdateMsg91Provider = async ({ providerId, name, enabled, templat
|
|
|
1144
1220
|
* @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name.
|
|
1145
1221
|
* @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email.
|
|
1146
1222
|
* @property {boolean} enabled Set as enabled.
|
|
1223
|
+
* @property {boolean} overrideForCli
|
|
1147
1224
|
* @property {boolean} parseOutput
|
|
1148
1225
|
* @property {libClient | undefined} sdk
|
|
1149
1226
|
*/
|
|
@@ -1151,8 +1228,9 @@ const messagingUpdateMsg91Provider = async ({ providerId, name, enabled, templat
|
|
|
1151
1228
|
/**
|
|
1152
1229
|
* @param {MessagingCreateSendgridProviderRequestParams} params
|
|
1153
1230
|
*/
|
|
1154
|
-
const messagingCreateSendgridProvider = async ({
|
|
1155
|
-
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;
|
|
1156
1234
|
let apiPath = '/messaging/providers/sendgrid';
|
|
1157
1235
|
let payload = {};
|
|
1158
1236
|
if (typeof providerId !== 'undefined') {
|
|
@@ -1190,8 +1268,9 @@ const messagingCreateSendgridProvider = async ({ providerId, name, apiKey, fromN
|
|
|
1190
1268
|
parse(response)
|
|
1191
1269
|
success()
|
|
1192
1270
|
}
|
|
1193
|
-
|
|
1271
|
+
|
|
1194
1272
|
return response;
|
|
1273
|
+
|
|
1195
1274
|
}
|
|
1196
1275
|
|
|
1197
1276
|
/**
|
|
@@ -1204,6 +1283,7 @@ const messagingCreateSendgridProvider = async ({ providerId, name, apiKey, fromN
|
|
|
1204
1283
|
* @property {string} fromEmail Sender email address.
|
|
1205
1284
|
* @property {string} replyToName Name set in the Reply To field for the mail. Default value is Sender Name.
|
|
1206
1285
|
* @property {string} replyToEmail Email set in the Reply To field for the mail. Default value is Sender Email.
|
|
1286
|
+
* @property {boolean} overrideForCli
|
|
1207
1287
|
* @property {boolean} parseOutput
|
|
1208
1288
|
* @property {libClient | undefined} sdk
|
|
1209
1289
|
*/
|
|
@@ -1211,8 +1291,9 @@ const messagingCreateSendgridProvider = async ({ providerId, name, apiKey, fromN
|
|
|
1211
1291
|
/**
|
|
1212
1292
|
* @param {MessagingUpdateSendgridProviderRequestParams} params
|
|
1213
1293
|
*/
|
|
1214
|
-
const messagingUpdateSendgridProvider = async ({
|
|
1215
|
-
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;
|
|
1216
1297
|
let apiPath = '/messaging/providers/sendgrid/{providerId}'.replace('{providerId}', providerId);
|
|
1217
1298
|
let payload = {};
|
|
1218
1299
|
if (typeof name !== 'undefined') {
|
|
@@ -1247,8 +1328,9 @@ const messagingUpdateSendgridProvider = async ({ providerId, name, enabled, apiK
|
|
|
1247
1328
|
parse(response)
|
|
1248
1329
|
success()
|
|
1249
1330
|
}
|
|
1250
|
-
|
|
1331
|
+
|
|
1251
1332
|
return response;
|
|
1333
|
+
|
|
1252
1334
|
}
|
|
1253
1335
|
|
|
1254
1336
|
/**
|
|
@@ -1267,6 +1349,7 @@ const messagingUpdateSendgridProvider = async ({ providerId, name, enabled, apiK
|
|
|
1267
1349
|
* @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name.
|
|
1268
1350
|
* @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email.
|
|
1269
1351
|
* @property {boolean} enabled Set as enabled.
|
|
1352
|
+
* @property {boolean} overrideForCli
|
|
1270
1353
|
* @property {boolean} parseOutput
|
|
1271
1354
|
* @property {libClient | undefined} sdk
|
|
1272
1355
|
*/
|
|
@@ -1274,8 +1357,9 @@ const messagingUpdateSendgridProvider = async ({ providerId, name, enabled, apiK
|
|
|
1274
1357
|
/**
|
|
1275
1358
|
* @param {MessagingCreateSmtpProviderRequestParams} params
|
|
1276
1359
|
*/
|
|
1277
|
-
const messagingCreateSmtpProvider = async ({
|
|
1278
|
-
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;
|
|
1279
1363
|
let apiPath = '/messaging/providers/smtp';
|
|
1280
1364
|
let payload = {};
|
|
1281
1365
|
if (typeof providerId !== 'undefined') {
|
|
@@ -1331,8 +1415,9 @@ const messagingCreateSmtpProvider = async ({ providerId, name, host, port, usern
|
|
|
1331
1415
|
parse(response)
|
|
1332
1416
|
success()
|
|
1333
1417
|
}
|
|
1334
|
-
|
|
1418
|
+
|
|
1335
1419
|
return response;
|
|
1420
|
+
|
|
1336
1421
|
}
|
|
1337
1422
|
|
|
1338
1423
|
/**
|
|
@@ -1351,6 +1436,7 @@ const messagingCreateSmtpProvider = async ({ providerId, name, host, port, usern
|
|
|
1351
1436
|
* @property {string} replyToName Name set in the Reply To field for the mail. Default value is Sender Name.
|
|
1352
1437
|
* @property {string} replyToEmail Email set in the Reply To field for the mail. Default value is Sender Email.
|
|
1353
1438
|
* @property {boolean} enabled Set as enabled.
|
|
1439
|
+
* @property {boolean} overrideForCli
|
|
1354
1440
|
* @property {boolean} parseOutput
|
|
1355
1441
|
* @property {libClient | undefined} sdk
|
|
1356
1442
|
*/
|
|
@@ -1358,8 +1444,9 @@ const messagingCreateSmtpProvider = async ({ providerId, name, host, port, usern
|
|
|
1358
1444
|
/**
|
|
1359
1445
|
* @param {MessagingUpdateSmtpProviderRequestParams} params
|
|
1360
1446
|
*/
|
|
1361
|
-
const messagingUpdateSmtpProvider = async ({
|
|
1362
|
-
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;
|
|
1363
1450
|
let apiPath = '/messaging/providers/smtp/{providerId}'.replace('{providerId}', providerId);
|
|
1364
1451
|
let payload = {};
|
|
1365
1452
|
if (typeof name !== 'undefined') {
|
|
@@ -1412,8 +1499,9 @@ const messagingUpdateSmtpProvider = async ({ providerId, name, host, port, usern
|
|
|
1412
1499
|
parse(response)
|
|
1413
1500
|
success()
|
|
1414
1501
|
}
|
|
1415
|
-
|
|
1502
|
+
|
|
1416
1503
|
return response;
|
|
1504
|
+
|
|
1417
1505
|
}
|
|
1418
1506
|
|
|
1419
1507
|
/**
|
|
@@ -1424,6 +1512,7 @@ const messagingUpdateSmtpProvider = async ({ providerId, name, host, port, usern
|
|
|
1424
1512
|
* @property {string} customerId Telesign customer ID.
|
|
1425
1513
|
* @property {string} apiKey Telesign API key.
|
|
1426
1514
|
* @property {boolean} enabled Set as enabled.
|
|
1515
|
+
* @property {boolean} overrideForCli
|
|
1427
1516
|
* @property {boolean} parseOutput
|
|
1428
1517
|
* @property {libClient | undefined} sdk
|
|
1429
1518
|
*/
|
|
@@ -1431,8 +1520,9 @@ const messagingUpdateSmtpProvider = async ({ providerId, name, host, port, usern
|
|
|
1431
1520
|
/**
|
|
1432
1521
|
* @param {MessagingCreateTelesignProviderRequestParams} params
|
|
1433
1522
|
*/
|
|
1434
|
-
const messagingCreateTelesignProvider = async ({
|
|
1435
|
-
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;
|
|
1436
1526
|
let apiPath = '/messaging/providers/telesign';
|
|
1437
1527
|
let payload = {};
|
|
1438
1528
|
if (typeof providerId !== 'undefined') {
|
|
@@ -1464,8 +1554,9 @@ const messagingCreateTelesignProvider = async ({ providerId, name, from, custome
|
|
|
1464
1554
|
parse(response)
|
|
1465
1555
|
success()
|
|
1466
1556
|
}
|
|
1467
|
-
|
|
1557
|
+
|
|
1468
1558
|
return response;
|
|
1559
|
+
|
|
1469
1560
|
}
|
|
1470
1561
|
|
|
1471
1562
|
/**
|
|
@@ -1476,6 +1567,7 @@ const messagingCreateTelesignProvider = async ({ providerId, name, from, custome
|
|
|
1476
1567
|
* @property {string} customerId Telesign customer ID.
|
|
1477
1568
|
* @property {string} apiKey Telesign API key.
|
|
1478
1569
|
* @property {string} from Sender number.
|
|
1570
|
+
* @property {boolean} overrideForCli
|
|
1479
1571
|
* @property {boolean} parseOutput
|
|
1480
1572
|
* @property {libClient | undefined} sdk
|
|
1481
1573
|
*/
|
|
@@ -1483,8 +1575,9 @@ const messagingCreateTelesignProvider = async ({ providerId, name, from, custome
|
|
|
1483
1575
|
/**
|
|
1484
1576
|
* @param {MessagingUpdateTelesignProviderRequestParams} params
|
|
1485
1577
|
*/
|
|
1486
|
-
const messagingUpdateTelesignProvider = async ({
|
|
1487
|
-
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;
|
|
1488
1581
|
let apiPath = '/messaging/providers/telesign/{providerId}'.replace('{providerId}', providerId);
|
|
1489
1582
|
let payload = {};
|
|
1490
1583
|
if (typeof name !== 'undefined') {
|
|
@@ -1513,8 +1606,9 @@ const messagingUpdateTelesignProvider = async ({ providerId, name, enabled, cust
|
|
|
1513
1606
|
parse(response)
|
|
1514
1607
|
success()
|
|
1515
1608
|
}
|
|
1516
|
-
|
|
1609
|
+
|
|
1517
1610
|
return response;
|
|
1611
|
+
|
|
1518
1612
|
}
|
|
1519
1613
|
|
|
1520
1614
|
/**
|
|
@@ -1525,6 +1619,7 @@ const messagingUpdateTelesignProvider = async ({ providerId, name, enabled, cust
|
|
|
1525
1619
|
* @property {string} username Textmagic username.
|
|
1526
1620
|
* @property {string} apiKey Textmagic apiKey.
|
|
1527
1621
|
* @property {boolean} enabled Set as enabled.
|
|
1622
|
+
* @property {boolean} overrideForCli
|
|
1528
1623
|
* @property {boolean} parseOutput
|
|
1529
1624
|
* @property {libClient | undefined} sdk
|
|
1530
1625
|
*/
|
|
@@ -1532,8 +1627,9 @@ const messagingUpdateTelesignProvider = async ({ providerId, name, enabled, cust
|
|
|
1532
1627
|
/**
|
|
1533
1628
|
* @param {MessagingCreateTextmagicProviderRequestParams} params
|
|
1534
1629
|
*/
|
|
1535
|
-
const messagingCreateTextmagicProvider = async ({
|
|
1536
|
-
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;
|
|
1537
1633
|
let apiPath = '/messaging/providers/textmagic';
|
|
1538
1634
|
let payload = {};
|
|
1539
1635
|
if (typeof providerId !== 'undefined') {
|
|
@@ -1565,8 +1661,9 @@ const messagingCreateTextmagicProvider = async ({ providerId, name, from, userna
|
|
|
1565
1661
|
parse(response)
|
|
1566
1662
|
success()
|
|
1567
1663
|
}
|
|
1568
|
-
|
|
1664
|
+
|
|
1569
1665
|
return response;
|
|
1666
|
+
|
|
1570
1667
|
}
|
|
1571
1668
|
|
|
1572
1669
|
/**
|
|
@@ -1577,6 +1674,7 @@ const messagingCreateTextmagicProvider = async ({ providerId, name, from, userna
|
|
|
1577
1674
|
* @property {string} username Textmagic username.
|
|
1578
1675
|
* @property {string} apiKey Textmagic apiKey.
|
|
1579
1676
|
* @property {string} from Sender number.
|
|
1677
|
+
* @property {boolean} overrideForCli
|
|
1580
1678
|
* @property {boolean} parseOutput
|
|
1581
1679
|
* @property {libClient | undefined} sdk
|
|
1582
1680
|
*/
|
|
@@ -1584,8 +1682,9 @@ const messagingCreateTextmagicProvider = async ({ providerId, name, from, userna
|
|
|
1584
1682
|
/**
|
|
1585
1683
|
* @param {MessagingUpdateTextmagicProviderRequestParams} params
|
|
1586
1684
|
*/
|
|
1587
|
-
const messagingUpdateTextmagicProvider = async ({
|
|
1588
|
-
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;
|
|
1589
1688
|
let apiPath = '/messaging/providers/textmagic/{providerId}'.replace('{providerId}', providerId);
|
|
1590
1689
|
let payload = {};
|
|
1591
1690
|
if (typeof name !== 'undefined') {
|
|
@@ -1614,8 +1713,9 @@ const messagingUpdateTextmagicProvider = async ({ providerId, name, enabled, use
|
|
|
1614
1713
|
parse(response)
|
|
1615
1714
|
success()
|
|
1616
1715
|
}
|
|
1617
|
-
|
|
1716
|
+
|
|
1618
1717
|
return response;
|
|
1718
|
+
|
|
1619
1719
|
}
|
|
1620
1720
|
|
|
1621
1721
|
/**
|
|
@@ -1626,6 +1726,7 @@ const messagingUpdateTextmagicProvider = async ({ providerId, name, enabled, use
|
|
|
1626
1726
|
* @property {string} accountSid Twilio account secret ID.
|
|
1627
1727
|
* @property {string} authToken Twilio authentication token.
|
|
1628
1728
|
* @property {boolean} enabled Set as enabled.
|
|
1729
|
+
* @property {boolean} overrideForCli
|
|
1629
1730
|
* @property {boolean} parseOutput
|
|
1630
1731
|
* @property {libClient | undefined} sdk
|
|
1631
1732
|
*/
|
|
@@ -1633,8 +1734,9 @@ const messagingUpdateTextmagicProvider = async ({ providerId, name, enabled, use
|
|
|
1633
1734
|
/**
|
|
1634
1735
|
* @param {MessagingCreateTwilioProviderRequestParams} params
|
|
1635
1736
|
*/
|
|
1636
|
-
const messagingCreateTwilioProvider = async ({
|
|
1637
|
-
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;
|
|
1638
1740
|
let apiPath = '/messaging/providers/twilio';
|
|
1639
1741
|
let payload = {};
|
|
1640
1742
|
if (typeof providerId !== 'undefined') {
|
|
@@ -1666,8 +1768,9 @@ const messagingCreateTwilioProvider = async ({ providerId, name, from, accountSi
|
|
|
1666
1768
|
parse(response)
|
|
1667
1769
|
success()
|
|
1668
1770
|
}
|
|
1669
|
-
|
|
1771
|
+
|
|
1670
1772
|
return response;
|
|
1773
|
+
|
|
1671
1774
|
}
|
|
1672
1775
|
|
|
1673
1776
|
/**
|
|
@@ -1678,6 +1781,7 @@ const messagingCreateTwilioProvider = async ({ providerId, name, from, accountSi
|
|
|
1678
1781
|
* @property {string} accountSid Twilio account secret ID.
|
|
1679
1782
|
* @property {string} authToken Twilio authentication token.
|
|
1680
1783
|
* @property {string} from Sender number.
|
|
1784
|
+
* @property {boolean} overrideForCli
|
|
1681
1785
|
* @property {boolean} parseOutput
|
|
1682
1786
|
* @property {libClient | undefined} sdk
|
|
1683
1787
|
*/
|
|
@@ -1685,8 +1789,9 @@ const messagingCreateTwilioProvider = async ({ providerId, name, from, accountSi
|
|
|
1685
1789
|
/**
|
|
1686
1790
|
* @param {MessagingUpdateTwilioProviderRequestParams} params
|
|
1687
1791
|
*/
|
|
1688
|
-
const messagingUpdateTwilioProvider = async ({
|
|
1689
|
-
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;
|
|
1690
1795
|
let apiPath = '/messaging/providers/twilio/{providerId}'.replace('{providerId}', providerId);
|
|
1691
1796
|
let payload = {};
|
|
1692
1797
|
if (typeof name !== 'undefined') {
|
|
@@ -1715,8 +1820,9 @@ const messagingUpdateTwilioProvider = async ({ providerId, name, enabled, accoun
|
|
|
1715
1820
|
parse(response)
|
|
1716
1821
|
success()
|
|
1717
1822
|
}
|
|
1718
|
-
|
|
1823
|
+
|
|
1719
1824
|
return response;
|
|
1825
|
+
|
|
1720
1826
|
}
|
|
1721
1827
|
|
|
1722
1828
|
/**
|
|
@@ -1727,6 +1833,7 @@ const messagingUpdateTwilioProvider = async ({ providerId, name, enabled, accoun
|
|
|
1727
1833
|
* @property {string} apiKey Vonage API key.
|
|
1728
1834
|
* @property {string} apiSecret Vonage API secret.
|
|
1729
1835
|
* @property {boolean} enabled Set as enabled.
|
|
1836
|
+
* @property {boolean} overrideForCli
|
|
1730
1837
|
* @property {boolean} parseOutput
|
|
1731
1838
|
* @property {libClient | undefined} sdk
|
|
1732
1839
|
*/
|
|
@@ -1734,8 +1841,9 @@ const messagingUpdateTwilioProvider = async ({ providerId, name, enabled, accoun
|
|
|
1734
1841
|
/**
|
|
1735
1842
|
* @param {MessagingCreateVonageProviderRequestParams} params
|
|
1736
1843
|
*/
|
|
1737
|
-
const messagingCreateVonageProvider = async ({
|
|
1738
|
-
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;
|
|
1739
1847
|
let apiPath = '/messaging/providers/vonage';
|
|
1740
1848
|
let payload = {};
|
|
1741
1849
|
if (typeof providerId !== 'undefined') {
|
|
@@ -1767,8 +1875,9 @@ const messagingCreateVonageProvider = async ({ providerId, name, from, apiKey, a
|
|
|
1767
1875
|
parse(response)
|
|
1768
1876
|
success()
|
|
1769
1877
|
}
|
|
1770
|
-
|
|
1878
|
+
|
|
1771
1879
|
return response;
|
|
1880
|
+
|
|
1772
1881
|
}
|
|
1773
1882
|
|
|
1774
1883
|
/**
|
|
@@ -1779,6 +1888,7 @@ const messagingCreateVonageProvider = async ({ providerId, name, from, apiKey, a
|
|
|
1779
1888
|
* @property {string} apiKey Vonage API key.
|
|
1780
1889
|
* @property {string} apiSecret Vonage API secret.
|
|
1781
1890
|
* @property {string} from Sender number.
|
|
1891
|
+
* @property {boolean} overrideForCli
|
|
1782
1892
|
* @property {boolean} parseOutput
|
|
1783
1893
|
* @property {libClient | undefined} sdk
|
|
1784
1894
|
*/
|
|
@@ -1786,8 +1896,9 @@ const messagingCreateVonageProvider = async ({ providerId, name, from, apiKey, a
|
|
|
1786
1896
|
/**
|
|
1787
1897
|
* @param {MessagingUpdateVonageProviderRequestParams} params
|
|
1788
1898
|
*/
|
|
1789
|
-
const messagingUpdateVonageProvider = async ({
|
|
1790
|
-
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;
|
|
1791
1902
|
let apiPath = '/messaging/providers/vonage/{providerId}'.replace('{providerId}', providerId);
|
|
1792
1903
|
let payload = {};
|
|
1793
1904
|
if (typeof name !== 'undefined') {
|
|
@@ -1816,13 +1927,15 @@ const messagingUpdateVonageProvider = async ({ providerId, name, enabled, apiKey
|
|
|
1816
1927
|
parse(response)
|
|
1817
1928
|
success()
|
|
1818
1929
|
}
|
|
1819
|
-
|
|
1930
|
+
|
|
1820
1931
|
return response;
|
|
1932
|
+
|
|
1821
1933
|
}
|
|
1822
1934
|
|
|
1823
1935
|
/**
|
|
1824
1936
|
* @typedef {Object} MessagingGetProviderRequestParams
|
|
1825
1937
|
* @property {string} providerId Provider ID.
|
|
1938
|
+
* @property {boolean} overrideForCli
|
|
1826
1939
|
* @property {boolean} parseOutput
|
|
1827
1940
|
* @property {libClient | undefined} sdk
|
|
1828
1941
|
*/
|
|
@@ -1830,8 +1943,9 @@ const messagingUpdateVonageProvider = async ({ providerId, name, enabled, apiKey
|
|
|
1830
1943
|
/**
|
|
1831
1944
|
* @param {MessagingGetProviderRequestParams} params
|
|
1832
1945
|
*/
|
|
1833
|
-
const messagingGetProvider = async ({
|
|
1834
|
-
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;
|
|
1835
1949
|
let apiPath = '/messaging/providers/{providerId}'.replace('{providerId}', providerId);
|
|
1836
1950
|
let payload = {};
|
|
1837
1951
|
|
|
@@ -1842,16 +1956,22 @@ const messagingGetProvider = async ({ providerId, parseOutput = true, sdk = unde
|
|
|
1842
1956
|
}, payload);
|
|
1843
1957
|
|
|
1844
1958
|
if (parseOutput) {
|
|
1845
|
-
|
|
1846
|
-
|
|
1959
|
+
if(console) {
|
|
1960
|
+
showConsoleLink('messaging', 'getProvider', providerId);
|
|
1961
|
+
} else {
|
|
1962
|
+
parse(response)
|
|
1963
|
+
success()
|
|
1964
|
+
}
|
|
1847
1965
|
}
|
|
1848
|
-
|
|
1966
|
+
|
|
1849
1967
|
return response;
|
|
1968
|
+
|
|
1850
1969
|
}
|
|
1851
1970
|
|
|
1852
1971
|
/**
|
|
1853
1972
|
* @typedef {Object} MessagingDeleteProviderRequestParams
|
|
1854
1973
|
* @property {string} providerId Provider ID.
|
|
1974
|
+
* @property {boolean} overrideForCli
|
|
1855
1975
|
* @property {boolean} parseOutput
|
|
1856
1976
|
* @property {libClient | undefined} sdk
|
|
1857
1977
|
*/
|
|
@@ -1859,8 +1979,9 @@ const messagingGetProvider = async ({ providerId, parseOutput = true, sdk = unde
|
|
|
1859
1979
|
/**
|
|
1860
1980
|
* @param {MessagingDeleteProviderRequestParams} params
|
|
1861
1981
|
*/
|
|
1862
|
-
const messagingDeleteProvider = async ({
|
|
1863
|
-
let client = !sdk ? await sdkForProject() :
|
|
1982
|
+
const messagingDeleteProvider = async ({providerId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1983
|
+
let client = !sdk ? await sdkForProject() :
|
|
1984
|
+
sdk;
|
|
1864
1985
|
let apiPath = '/messaging/providers/{providerId}'.replace('{providerId}', providerId);
|
|
1865
1986
|
let payload = {};
|
|
1866
1987
|
|
|
@@ -1874,14 +1995,16 @@ const messagingDeleteProvider = async ({ providerId, parseOutput = true, sdk = u
|
|
|
1874
1995
|
parse(response)
|
|
1875
1996
|
success()
|
|
1876
1997
|
}
|
|
1877
|
-
|
|
1998
|
+
|
|
1878
1999
|
return response;
|
|
2000
|
+
|
|
1879
2001
|
}
|
|
1880
2002
|
|
|
1881
2003
|
/**
|
|
1882
2004
|
* @typedef {Object} MessagingListProviderLogsRequestParams
|
|
1883
2005
|
* @property {string} providerId Provider ID.
|
|
1884
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
|
|
1885
2008
|
* @property {boolean} parseOutput
|
|
1886
2009
|
* @property {libClient | undefined} sdk
|
|
1887
2010
|
*/
|
|
@@ -1889,8 +2012,9 @@ const messagingDeleteProvider = async ({ providerId, parseOutput = true, sdk = u
|
|
|
1889
2012
|
/**
|
|
1890
2013
|
* @param {MessagingListProviderLogsRequestParams} params
|
|
1891
2014
|
*/
|
|
1892
|
-
const messagingListProviderLogs = async ({
|
|
1893
|
-
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;
|
|
1894
2018
|
let apiPath = '/messaging/providers/{providerId}/logs'.replace('{providerId}', providerId);
|
|
1895
2019
|
let payload = {};
|
|
1896
2020
|
if (typeof queries !== 'undefined') {
|
|
@@ -1907,14 +2031,16 @@ const messagingListProviderLogs = async ({ providerId, queries, parseOutput = tr
|
|
|
1907
2031
|
parse(response)
|
|
1908
2032
|
success()
|
|
1909
2033
|
}
|
|
1910
|
-
|
|
2034
|
+
|
|
1911
2035
|
return response;
|
|
2036
|
+
|
|
1912
2037
|
}
|
|
1913
2038
|
|
|
1914
2039
|
/**
|
|
1915
2040
|
* @typedef {Object} MessagingListSubscriberLogsRequestParams
|
|
1916
2041
|
* @property {string} subscriberId Subscriber ID.
|
|
1917
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
|
|
1918
2044
|
* @property {boolean} parseOutput
|
|
1919
2045
|
* @property {libClient | undefined} sdk
|
|
1920
2046
|
*/
|
|
@@ -1922,8 +2048,9 @@ const messagingListProviderLogs = async ({ providerId, queries, parseOutput = tr
|
|
|
1922
2048
|
/**
|
|
1923
2049
|
* @param {MessagingListSubscriberLogsRequestParams} params
|
|
1924
2050
|
*/
|
|
1925
|
-
const messagingListSubscriberLogs = async ({
|
|
1926
|
-
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;
|
|
1927
2054
|
let apiPath = '/messaging/subscribers/{subscriberId}/logs'.replace('{subscriberId}', subscriberId);
|
|
1928
2055
|
let payload = {};
|
|
1929
2056
|
if (typeof queries !== 'undefined') {
|
|
@@ -1940,14 +2067,16 @@ const messagingListSubscriberLogs = async ({ subscriberId, queries, parseOutput
|
|
|
1940
2067
|
parse(response)
|
|
1941
2068
|
success()
|
|
1942
2069
|
}
|
|
1943
|
-
|
|
2070
|
+
|
|
1944
2071
|
return response;
|
|
2072
|
+
|
|
1945
2073
|
}
|
|
1946
2074
|
|
|
1947
2075
|
/**
|
|
1948
2076
|
* @typedef {Object} MessagingListTopicsRequestParams
|
|
1949
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
|
|
1950
2078
|
* @property {string} search Search term to filter your list results. Max length: 256 chars.
|
|
2079
|
+
* @property {boolean} overrideForCli
|
|
1951
2080
|
* @property {boolean} parseOutput
|
|
1952
2081
|
* @property {libClient | undefined} sdk
|
|
1953
2082
|
*/
|
|
@@ -1955,8 +2084,9 @@ const messagingListSubscriberLogs = async ({ subscriberId, queries, parseOutput
|
|
|
1955
2084
|
/**
|
|
1956
2085
|
* @param {MessagingListTopicsRequestParams} params
|
|
1957
2086
|
*/
|
|
1958
|
-
const messagingListTopics = async ({
|
|
1959
|
-
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;
|
|
1960
2090
|
let apiPath = '/messaging/topics';
|
|
1961
2091
|
let payload = {};
|
|
1962
2092
|
if (typeof queries !== 'undefined') {
|
|
@@ -1973,11 +2103,16 @@ const messagingListTopics = async ({ queries, search, parseOutput = true, sdk =
|
|
|
1973
2103
|
}, payload);
|
|
1974
2104
|
|
|
1975
2105
|
if (parseOutput) {
|
|
1976
|
-
|
|
1977
|
-
|
|
2106
|
+
if(console) {
|
|
2107
|
+
showConsoleLink('messaging', 'listTopics');
|
|
2108
|
+
} else {
|
|
2109
|
+
parse(response)
|
|
2110
|
+
success()
|
|
2111
|
+
}
|
|
1978
2112
|
}
|
|
1979
|
-
|
|
2113
|
+
|
|
1980
2114
|
return response;
|
|
2115
|
+
|
|
1981
2116
|
}
|
|
1982
2117
|
|
|
1983
2118
|
/**
|
|
@@ -1985,6 +2120,7 @@ const messagingListTopics = async ({ queries, search, parseOutput = true, sdk =
|
|
|
1985
2120
|
* @property {string} topicId Topic ID. Choose a custom Topic ID or a new Topic ID.
|
|
1986
2121
|
* @property {string} name Topic Name.
|
|
1987
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
|
|
1988
2124
|
* @property {boolean} parseOutput
|
|
1989
2125
|
* @property {libClient | undefined} sdk
|
|
1990
2126
|
*/
|
|
@@ -1992,8 +2128,9 @@ const messagingListTopics = async ({ queries, search, parseOutput = true, sdk =
|
|
|
1992
2128
|
/**
|
|
1993
2129
|
* @param {MessagingCreateTopicRequestParams} params
|
|
1994
2130
|
*/
|
|
1995
|
-
const messagingCreateTopic = async ({
|
|
1996
|
-
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;
|
|
1997
2134
|
let apiPath = '/messaging/topics';
|
|
1998
2135
|
let payload = {};
|
|
1999
2136
|
if (typeof topicId !== 'undefined') {
|
|
@@ -2017,13 +2154,15 @@ const messagingCreateTopic = async ({ topicId, name, subscribe, parseOutput = tr
|
|
|
2017
2154
|
parse(response)
|
|
2018
2155
|
success()
|
|
2019
2156
|
}
|
|
2020
|
-
|
|
2157
|
+
|
|
2021
2158
|
return response;
|
|
2159
|
+
|
|
2022
2160
|
}
|
|
2023
2161
|
|
|
2024
2162
|
/**
|
|
2025
2163
|
* @typedef {Object} MessagingGetTopicRequestParams
|
|
2026
2164
|
* @property {string} topicId Topic ID.
|
|
2165
|
+
* @property {boolean} overrideForCli
|
|
2027
2166
|
* @property {boolean} parseOutput
|
|
2028
2167
|
* @property {libClient | undefined} sdk
|
|
2029
2168
|
*/
|
|
@@ -2031,8 +2170,9 @@ const messagingCreateTopic = async ({ topicId, name, subscribe, parseOutput = tr
|
|
|
2031
2170
|
/**
|
|
2032
2171
|
* @param {MessagingGetTopicRequestParams} params
|
|
2033
2172
|
*/
|
|
2034
|
-
const messagingGetTopic = async ({
|
|
2035
|
-
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;
|
|
2036
2176
|
let apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId);
|
|
2037
2177
|
let payload = {};
|
|
2038
2178
|
|
|
@@ -2043,11 +2183,16 @@ const messagingGetTopic = async ({ topicId, parseOutput = true, sdk = undefined}
|
|
|
2043
2183
|
}, payload);
|
|
2044
2184
|
|
|
2045
2185
|
if (parseOutput) {
|
|
2046
|
-
|
|
2047
|
-
|
|
2186
|
+
if(console) {
|
|
2187
|
+
showConsoleLink('messaging', 'getTopic', topicId);
|
|
2188
|
+
} else {
|
|
2189
|
+
parse(response)
|
|
2190
|
+
success()
|
|
2191
|
+
}
|
|
2048
2192
|
}
|
|
2049
|
-
|
|
2193
|
+
|
|
2050
2194
|
return response;
|
|
2195
|
+
|
|
2051
2196
|
}
|
|
2052
2197
|
|
|
2053
2198
|
/**
|
|
@@ -2055,6 +2200,7 @@ const messagingGetTopic = async ({ topicId, parseOutput = true, sdk = undefined}
|
|
|
2055
2200
|
* @property {string} topicId Topic ID.
|
|
2056
2201
|
* @property {string} name Topic Name.
|
|
2057
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
|
|
2058
2204
|
* @property {boolean} parseOutput
|
|
2059
2205
|
* @property {libClient | undefined} sdk
|
|
2060
2206
|
*/
|
|
@@ -2062,8 +2208,9 @@ const messagingGetTopic = async ({ topicId, parseOutput = true, sdk = undefined}
|
|
|
2062
2208
|
/**
|
|
2063
2209
|
* @param {MessagingUpdateTopicRequestParams} params
|
|
2064
2210
|
*/
|
|
2065
|
-
const messagingUpdateTopic = async ({
|
|
2066
|
-
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;
|
|
2067
2214
|
let apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId);
|
|
2068
2215
|
let payload = {};
|
|
2069
2216
|
if (typeof name !== 'undefined') {
|
|
@@ -2084,13 +2231,15 @@ const messagingUpdateTopic = async ({ topicId, name, subscribe, parseOutput = tr
|
|
|
2084
2231
|
parse(response)
|
|
2085
2232
|
success()
|
|
2086
2233
|
}
|
|
2087
|
-
|
|
2234
|
+
|
|
2088
2235
|
return response;
|
|
2236
|
+
|
|
2089
2237
|
}
|
|
2090
2238
|
|
|
2091
2239
|
/**
|
|
2092
2240
|
* @typedef {Object} MessagingDeleteTopicRequestParams
|
|
2093
2241
|
* @property {string} topicId Topic ID.
|
|
2242
|
+
* @property {boolean} overrideForCli
|
|
2094
2243
|
* @property {boolean} parseOutput
|
|
2095
2244
|
* @property {libClient | undefined} sdk
|
|
2096
2245
|
*/
|
|
@@ -2098,8 +2247,9 @@ const messagingUpdateTopic = async ({ topicId, name, subscribe, parseOutput = tr
|
|
|
2098
2247
|
/**
|
|
2099
2248
|
* @param {MessagingDeleteTopicRequestParams} params
|
|
2100
2249
|
*/
|
|
2101
|
-
const messagingDeleteTopic = async ({
|
|
2102
|
-
let client = !sdk ? await sdkForProject() :
|
|
2250
|
+
const messagingDeleteTopic = async ({topicId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2251
|
+
let client = !sdk ? await sdkForProject() :
|
|
2252
|
+
sdk;
|
|
2103
2253
|
let apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId);
|
|
2104
2254
|
let payload = {};
|
|
2105
2255
|
|
|
@@ -2113,14 +2263,16 @@ const messagingDeleteTopic = async ({ topicId, parseOutput = true, sdk = undefin
|
|
|
2113
2263
|
parse(response)
|
|
2114
2264
|
success()
|
|
2115
2265
|
}
|
|
2116
|
-
|
|
2266
|
+
|
|
2117
2267
|
return response;
|
|
2268
|
+
|
|
2118
2269
|
}
|
|
2119
2270
|
|
|
2120
2271
|
/**
|
|
2121
2272
|
* @typedef {Object} MessagingListTopicLogsRequestParams
|
|
2122
2273
|
* @property {string} topicId Topic ID.
|
|
2123
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
|
|
2124
2276
|
* @property {boolean} parseOutput
|
|
2125
2277
|
* @property {libClient | undefined} sdk
|
|
2126
2278
|
*/
|
|
@@ -2128,8 +2280,9 @@ const messagingDeleteTopic = async ({ topicId, parseOutput = true, sdk = undefin
|
|
|
2128
2280
|
/**
|
|
2129
2281
|
* @param {MessagingListTopicLogsRequestParams} params
|
|
2130
2282
|
*/
|
|
2131
|
-
const messagingListTopicLogs = async ({
|
|
2132
|
-
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;
|
|
2133
2286
|
let apiPath = '/messaging/topics/{topicId}/logs'.replace('{topicId}', topicId);
|
|
2134
2287
|
let payload = {};
|
|
2135
2288
|
if (typeof queries !== 'undefined') {
|
|
@@ -2146,8 +2299,9 @@ const messagingListTopicLogs = async ({ topicId, queries, parseOutput = true, sd
|
|
|
2146
2299
|
parse(response)
|
|
2147
2300
|
success()
|
|
2148
2301
|
}
|
|
2149
|
-
|
|
2302
|
+
|
|
2150
2303
|
return response;
|
|
2304
|
+
|
|
2151
2305
|
}
|
|
2152
2306
|
|
|
2153
2307
|
/**
|
|
@@ -2155,6 +2309,7 @@ const messagingListTopicLogs = async ({ topicId, queries, parseOutput = true, sd
|
|
|
2155
2309
|
* @property {string} topicId Topic ID. The topic ID subscribed to.
|
|
2156
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
|
|
2157
2311
|
* @property {string} search Search term to filter your list results. Max length: 256 chars.
|
|
2312
|
+
* @property {boolean} overrideForCli
|
|
2158
2313
|
* @property {boolean} parseOutput
|
|
2159
2314
|
* @property {libClient | undefined} sdk
|
|
2160
2315
|
*/
|
|
@@ -2162,8 +2317,9 @@ const messagingListTopicLogs = async ({ topicId, queries, parseOutput = true, sd
|
|
|
2162
2317
|
/**
|
|
2163
2318
|
* @param {MessagingListSubscribersRequestParams} params
|
|
2164
2319
|
*/
|
|
2165
|
-
const messagingListSubscribers = async ({
|
|
2166
|
-
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;
|
|
2167
2323
|
let apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', topicId);
|
|
2168
2324
|
let payload = {};
|
|
2169
2325
|
if (typeof queries !== 'undefined') {
|
|
@@ -2180,11 +2336,16 @@ const messagingListSubscribers = async ({ topicId, queries, search, parseOutput
|
|
|
2180
2336
|
}, payload);
|
|
2181
2337
|
|
|
2182
2338
|
if (parseOutput) {
|
|
2183
|
-
|
|
2184
|
-
|
|
2339
|
+
if(console) {
|
|
2340
|
+
showConsoleLink('messaging', 'listSubscribers', topicId);
|
|
2341
|
+
} else {
|
|
2342
|
+
parse(response)
|
|
2343
|
+
success()
|
|
2344
|
+
}
|
|
2185
2345
|
}
|
|
2186
|
-
|
|
2346
|
+
|
|
2187
2347
|
return response;
|
|
2348
|
+
|
|
2188
2349
|
}
|
|
2189
2350
|
|
|
2190
2351
|
/**
|
|
@@ -2192,6 +2353,7 @@ const messagingListSubscribers = async ({ topicId, queries, search, parseOutput
|
|
|
2192
2353
|
* @property {string} topicId Topic ID. The topic ID to subscribe to.
|
|
2193
2354
|
* @property {string} subscriberId Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.
|
|
2194
2355
|
* @property {string} targetId Target ID. The target ID to link to the specified Topic ID.
|
|
2356
|
+
* @property {boolean} overrideForCli
|
|
2195
2357
|
* @property {boolean} parseOutput
|
|
2196
2358
|
* @property {libClient | undefined} sdk
|
|
2197
2359
|
*/
|
|
@@ -2199,8 +2361,9 @@ const messagingListSubscribers = async ({ topicId, queries, search, parseOutput
|
|
|
2199
2361
|
/**
|
|
2200
2362
|
* @param {MessagingCreateSubscriberRequestParams} params
|
|
2201
2363
|
*/
|
|
2202
|
-
const messagingCreateSubscriber = async ({
|
|
2203
|
-
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;
|
|
2204
2367
|
let apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', topicId);
|
|
2205
2368
|
let payload = {};
|
|
2206
2369
|
if (typeof subscriberId !== 'undefined') {
|
|
@@ -2220,14 +2383,16 @@ const messagingCreateSubscriber = async ({ topicId, subscriberId, targetId, pars
|
|
|
2220
2383
|
parse(response)
|
|
2221
2384
|
success()
|
|
2222
2385
|
}
|
|
2223
|
-
|
|
2386
|
+
|
|
2224
2387
|
return response;
|
|
2388
|
+
|
|
2225
2389
|
}
|
|
2226
2390
|
|
|
2227
2391
|
/**
|
|
2228
2392
|
* @typedef {Object} MessagingGetSubscriberRequestParams
|
|
2229
2393
|
* @property {string} topicId Topic ID. The topic ID subscribed to.
|
|
2230
2394
|
* @property {string} subscriberId Subscriber ID.
|
|
2395
|
+
* @property {boolean} overrideForCli
|
|
2231
2396
|
* @property {boolean} parseOutput
|
|
2232
2397
|
* @property {libClient | undefined} sdk
|
|
2233
2398
|
*/
|
|
@@ -2235,8 +2400,9 @@ const messagingCreateSubscriber = async ({ topicId, subscriberId, targetId, pars
|
|
|
2235
2400
|
/**
|
|
2236
2401
|
* @param {MessagingGetSubscriberRequestParams} params
|
|
2237
2402
|
*/
|
|
2238
|
-
const messagingGetSubscriber = async ({
|
|
2239
|
-
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;
|
|
2240
2406
|
let apiPath = '/messaging/topics/{topicId}/subscribers/{subscriberId}'.replace('{topicId}', topicId).replace('{subscriberId}', subscriberId);
|
|
2241
2407
|
let payload = {};
|
|
2242
2408
|
|
|
@@ -2250,14 +2416,16 @@ const messagingGetSubscriber = async ({ topicId, subscriberId, parseOutput = tru
|
|
|
2250
2416
|
parse(response)
|
|
2251
2417
|
success()
|
|
2252
2418
|
}
|
|
2253
|
-
|
|
2419
|
+
|
|
2254
2420
|
return response;
|
|
2421
|
+
|
|
2255
2422
|
}
|
|
2256
2423
|
|
|
2257
2424
|
/**
|
|
2258
2425
|
* @typedef {Object} MessagingDeleteSubscriberRequestParams
|
|
2259
2426
|
* @property {string} topicId Topic ID. The topic ID subscribed to.
|
|
2260
2427
|
* @property {string} subscriberId Subscriber ID.
|
|
2428
|
+
* @property {boolean} overrideForCli
|
|
2261
2429
|
* @property {boolean} parseOutput
|
|
2262
2430
|
* @property {libClient | undefined} sdk
|
|
2263
2431
|
*/
|
|
@@ -2265,8 +2433,9 @@ const messagingGetSubscriber = async ({ topicId, subscriberId, parseOutput = tru
|
|
|
2265
2433
|
/**
|
|
2266
2434
|
* @param {MessagingDeleteSubscriberRequestParams} params
|
|
2267
2435
|
*/
|
|
2268
|
-
const messagingDeleteSubscriber = async ({
|
|
2269
|
-
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;
|
|
2270
2439
|
let apiPath = '/messaging/topics/{topicId}/subscribers/{subscriberId}'.replace('{topicId}', topicId).replace('{subscriberId}', subscriberId);
|
|
2271
2440
|
let payload = {};
|
|
2272
2441
|
|
|
@@ -2280,8 +2449,9 @@ const messagingDeleteSubscriber = async ({ topicId, subscriberId, parseOutput =
|
|
|
2280
2449
|
parse(response)
|
|
2281
2450
|
success()
|
|
2282
2451
|
}
|
|
2283
|
-
|
|
2452
|
+
|
|
2284
2453
|
return response;
|
|
2454
|
+
|
|
2285
2455
|
}
|
|
2286
2456
|
|
|
2287
2457
|
messaging
|
|
@@ -2289,6 +2459,7 @@ messaging
|
|
|
2289
2459
|
.description(`Get a list of all messages from the current Appwrite project.`)
|
|
2290
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`)
|
|
2291
2461
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
2462
|
+
.option(`--console`, `Get the resource console url`)
|
|
2292
2463
|
.action(actionRunner(messagingListMessages))
|
|
2293
2464
|
|
|
2294
2465
|
messaging
|
|
@@ -2395,6 +2566,7 @@ messaging
|
|
|
2395
2566
|
.command(`getMessage`)
|
|
2396
2567
|
.description(`Get a message by its unique ID. `)
|
|
2397
2568
|
.requiredOption(`--messageId <messageId>`, `Message ID.`)
|
|
2569
|
+
.option(`--console`, `Get the resource console url`)
|
|
2398
2570
|
.action(actionRunner(messagingGetMessage))
|
|
2399
2571
|
|
|
2400
2572
|
messaging
|
|
@@ -2408,6 +2580,7 @@ messaging
|
|
|
2408
2580
|
.description(`Get the message activity logs listed by its unique ID.`)
|
|
2409
2581
|
.requiredOption(`--messageId <messageId>`, `Message ID.`)
|
|
2410
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`)
|
|
2411
2584
|
.action(actionRunner(messagingListMessageLogs))
|
|
2412
2585
|
|
|
2413
2586
|
messaging
|
|
@@ -2422,6 +2595,7 @@ messaging
|
|
|
2422
2595
|
.description(`Get a list of all providers from the current Appwrite project.`)
|
|
2423
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`)
|
|
2424
2597
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
2598
|
+
.option(`--console`, `Get the resource console url`)
|
|
2425
2599
|
.action(actionRunner(messagingListProviders))
|
|
2426
2600
|
|
|
2427
2601
|
messaging
|
|
@@ -2676,6 +2850,7 @@ messaging
|
|
|
2676
2850
|
.command(`getProvider`)
|
|
2677
2851
|
.description(`Get a provider by its unique ID. `)
|
|
2678
2852
|
.requiredOption(`--providerId <providerId>`, `Provider ID.`)
|
|
2853
|
+
.option(`--console`, `Get the resource console url`)
|
|
2679
2854
|
.action(actionRunner(messagingGetProvider))
|
|
2680
2855
|
|
|
2681
2856
|
messaging
|
|
@@ -2703,6 +2878,7 @@ messaging
|
|
|
2703
2878
|
.description(`Get a list of all topics from the current Appwrite project.`)
|
|
2704
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`)
|
|
2705
2880
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
2881
|
+
.option(`--console`, `Get the resource console url`)
|
|
2706
2882
|
.action(actionRunner(messagingListTopics))
|
|
2707
2883
|
|
|
2708
2884
|
messaging
|
|
@@ -2717,6 +2893,7 @@ messaging
|
|
|
2717
2893
|
.command(`getTopic`)
|
|
2718
2894
|
.description(`Get a topic by its unique ID. `)
|
|
2719
2895
|
.requiredOption(`--topicId <topicId>`, `Topic ID.`)
|
|
2896
|
+
.option(`--console`, `Get the resource console url`)
|
|
2720
2897
|
.action(actionRunner(messagingGetTopic))
|
|
2721
2898
|
|
|
2722
2899
|
messaging
|
|
@@ -2746,6 +2923,7 @@ messaging
|
|
|
2746
2923
|
.requiredOption(`--topicId <topicId>`, `Topic ID. The topic ID subscribed to.`)
|
|
2747
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`)
|
|
2748
2925
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
2926
|
+
.option(`--console`, `Get the resource console url`)
|
|
2749
2927
|
.action(actionRunner(messagingListSubscribers))
|
|
2750
2928
|
|
|
2751
2929
|
messaging
|
|
@@ -2818,4 +2996,4 @@ module.exports = {
|
|
|
2818
2996
|
messagingCreateSubscriber,
|
|
2819
2997
|
messagingGetSubscriber,
|
|
2820
2998
|
messagingDeleteSubscriber
|
|
2821
|
-
};
|
|
2999
|
+
};
|