@trycourier/cli 2.7.1 → 3.1.4

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.
Files changed (103) hide show
  1. package/bin/.gitkeep +0 -0
  2. package/install.js +115 -0
  3. package/package.json +22 -87
  4. package/LICENSE +0 -21
  5. package/README.md +0 -105
  6. package/dist/bulk.d.ts +0 -15
  7. package/dist/bulk.js +0 -53
  8. package/dist/cli.d.ts +0 -2
  9. package/dist/cli.js +0 -24
  10. package/dist/commands/AudienceSearch.d.ts +0 -3
  11. package/dist/commands/AudienceSearch.js +0 -113
  12. package/dist/commands/AutomationInvokeBulk.d.ts +0 -3
  13. package/dist/commands/AutomationInvokeBulk.js +0 -139
  14. package/dist/commands/Config.d.ts +0 -4
  15. package/dist/commands/Config.js +0 -45
  16. package/dist/commands/DigestFlush.d.ts +0 -5
  17. package/dist/commands/DigestFlush.js +0 -28
  18. package/dist/commands/Help.d.ts +0 -16
  19. package/dist/commands/Help.js +0 -38
  20. package/dist/commands/Inbox/ArchiveAll.d.ts +0 -8
  21. package/dist/commands/Inbox/ArchiveAll.js +0 -180
  22. package/dist/commands/Inbox/ArchiveAllBulk.d.ts +0 -5
  23. package/dist/commands/Inbox/ArchiveAllBulk.js +0 -99
  24. package/dist/commands/Inbox/MarkAllRead.d.ts +0 -5
  25. package/dist/commands/Inbox/MarkAllRead.js +0 -110
  26. package/dist/commands/MessagesSearch.d.ts +0 -3
  27. package/dist/commands/MessagesSearch.js +0 -120
  28. package/dist/commands/NotYetImplemented.d.ts +0 -3
  29. package/dist/commands/NotYetImplemented.js +0 -5
  30. package/dist/commands/Send.d.ts +0 -5
  31. package/dist/commands/Send.js +0 -144
  32. package/dist/commands/Templates/List.d.ts +0 -3
  33. package/dist/commands/Templates/List.js +0 -114
  34. package/dist/commands/TenantsBulk.d.ts +0 -3
  35. package/dist/commands/TenantsBulk.js +0 -171
  36. package/dist/commands/TenantsGetMembership.d.ts +0 -3
  37. package/dist/commands/TenantsGetMembership.js +0 -127
  38. package/dist/commands/TenantsMembershipBulk.d.ts +0 -3
  39. package/dist/commands/TenantsMembershipBulk.js +0 -203
  40. package/dist/commands/Track.d.ts +0 -5
  41. package/dist/commands/Track.js +0 -40
  42. package/dist/commands/TrackBulk.d.ts +0 -3
  43. package/dist/commands/TrackBulk.js +0 -89
  44. package/dist/commands/TranslationsDownload.d.ts +0 -10
  45. package/dist/commands/TranslationsDownload.js +0 -30
  46. package/dist/commands/TranslationsUpload.d.ts +0 -9
  47. package/dist/commands/TranslationsUpload.js +0 -37
  48. package/dist/commands/Upgrade.d.ts +0 -3
  49. package/dist/commands/Upgrade.js +0 -38
  50. package/dist/commands/UserToken.d.ts +0 -3
  51. package/dist/commands/UserToken.js +0 -78
  52. package/dist/commands/UsersBulk.d.ts +0 -3
  53. package/dist/commands/UsersBulk.js +0 -205
  54. package/dist/commands/UsersGet.d.ts +0 -5
  55. package/dist/commands/UsersGet.js +0 -37
  56. package/dist/commands/UsersPreferences.d.ts +0 -3
  57. package/dist/commands/UsersPreferences.js +0 -73
  58. package/dist/commands/UsersSet.d.ts +0 -5
  59. package/dist/commands/UsersSet.js +0 -34
  60. package/dist/commands/UsersTokensBulk.d.ts +0 -3
  61. package/dist/commands/UsersTokensBulk.js +0 -215
  62. package/dist/commands/WhoAmI.d.ts +0 -3
  63. package/dist/commands/WhoAmI.js +0 -27
  64. package/dist/components/Context.d.ts +0 -55
  65. package/dist/components/Context.js +0 -94
  66. package/dist/components/Elemental.d.ts +0 -13
  67. package/dist/components/Elemental.js +0 -23
  68. package/dist/components/KVP.d.ts +0 -11
  69. package/dist/components/KVP.js +0 -12
  70. package/dist/components/Request.d.ts +0 -23
  71. package/dist/components/Request.js +0 -17
  72. package/dist/components/Response.d.ts +0 -16
  73. package/dist/components/Response.js +0 -29
  74. package/dist/components/Router.d.ts +0 -4
  75. package/dist/components/Router.js +0 -60
  76. package/dist/components/SdkResponse.d.ts +0 -9
  77. package/dist/components/SdkResponse.js +0 -21
  78. package/dist/components/Spinner.d.ts +0 -6
  79. package/dist/components/Spinner.js +0 -41
  80. package/dist/components/Table.d.ts +0 -19
  81. package/dist/components/Table.js +0 -62
  82. package/dist/components/UhOh.d.ts +0 -5
  83. package/dist/components/UhOh.js +0 -10
  84. package/dist/components/Version.d.ts +0 -3
  85. package/dist/components/Version.js +0 -53
  86. package/dist/constants.d.ts +0 -8
  87. package/dist/constants.js +0 -8
  88. package/dist/lib/api.d.ts +0 -17
  89. package/dist/lib/api.js +0 -39
  90. package/dist/lib/args.d.ts +0 -2
  91. package/dist/lib/args.js +0 -13
  92. package/dist/lib/courier.d.ts +0 -3
  93. package/dist/lib/courier.js +0 -7
  94. package/dist/lib/delay.d.ts +0 -2
  95. package/dist/lib/delay.js +0 -7
  96. package/dist/lib/load-env.d.ts +0 -2
  97. package/dist/lib/load-env.js +0 -16
  98. package/dist/lib/uuid.d.ts +0 -2
  99. package/dist/lib/uuid.js +0 -4
  100. package/dist/mappings.d.ts +0 -6
  101. package/dist/mappings.js +0 -559
  102. package/dist/version.d.ts +0 -2
  103. package/dist/version.js +0 -2
package/dist/mappings.js DELETED
@@ -1,559 +0,0 @@
1
- import React from 'react';
2
- import Help from './commands/Help.js';
3
- import Config from './commands/Config.js';
4
- import WhoAmI from './commands/WhoAmI.js';
5
- import Track from './commands/Track.js';
6
- import UsersGet from './commands/UsersGet.js';
7
- import UsersSet from './commands/UsersSet.js';
8
- import Send from './commands/Send.js';
9
- import TranslationsDownload from './commands/TranslationsDownload.js';
10
- import TranslationsUpload from './commands/TranslationsUpload.js';
11
- import UsersBulk from './commands/UsersBulk.js';
12
- import UsersPreferences from './commands/UsersPreferences.js';
13
- import Upgrade from './commands/Upgrade.js';
14
- import TenantsBulk from './commands/TenantsBulk.js';
15
- import MarkAllRead from './commands/Inbox/MarkAllRead.js';
16
- import ArchiveAll from './commands/Inbox/ArchiveAll.js';
17
- import ArchiveAllBulk from './commands/Inbox/ArchiveAllBulk.js';
18
- import TemplatesList from './commands/Templates/List.js';
19
- import TrackBulk from './commands/TrackBulk.js';
20
- import AutomationInvokeBulk from './commands/AutomationInvokeBulk.js';
21
- import MessagesSearch from './commands/MessagesSearch.js';
22
- import TenantsMembershipBulk from './commands/TenantsMembershipBulk.js';
23
- import AudienceSearch from './commands/AudienceSearch.js';
24
- import UsersTokensBulk from './commands/UsersTokensBulk.js';
25
- import TenantsGetMembership from './commands/TenantsGetMembership.js';
26
- import UserToken from './commands/UserToken.js';
27
- const mappings = new Map();
28
- export const COMMON_OPTIONS = [
29
- {
30
- option: '-M --mock',
31
- value: 'Use the API key that simulates sending using the simulating routing',
32
- },
33
- {
34
- option: '-P --production',
35
- value: 'Use the production environment API key',
36
- },
37
- {
38
- option: '-D --draft',
39
- value: 'Use the draft document scope API key. Use draft or submitted, will default to published key if neither are provided',
40
- },
41
- {
42
- option: '-S --submitted',
43
- value: 'Use the submitted document scope API key',
44
- },
45
- {
46
- option: '--apikey <Courier API Key>',
47
- value: 'Use the provided Courier API key, otherwise use the approprate environment variable',
48
- },
49
- {
50
- option: '--apiurl <Courier API URL>',
51
- value: 'Use the provided Courier API URL, otherwise use COURIER_API_URL environment variable. Default is https://api.courier.com',
52
- },
53
- ];
54
- const OUTPUT_OPTIONS = [
55
- {
56
- option: '--csv',
57
- value: 'Output the templates in CSV format',
58
- },
59
- {
60
- option: '--json',
61
- value: 'Output the templates in JSON format',
62
- },
63
- {
64
- option: '--webhook <webhook_url>',
65
- value: 'Where to send the JSON output',
66
- },
67
- {
68
- option: '--filename <filename>',
69
- value: 'Name of the file to save the output',
70
- },
71
- ];
72
- mappings.set('help', {
73
- component: () => {
74
- return React.createElement(Help, { mappings: mappings });
75
- },
76
- noApiKeyRequired: true,
77
- });
78
- mappings.set('upgrade', {
79
- instructions: `Upgrade the Courier CLI to the latest version`,
80
- component: () => React.createElement(Upgrade, null),
81
- });
82
- mappings.set('config', {
83
- instructions: 'Persist your Courier API key into a .courier file in your current working directory',
84
- component: () => {
85
- return React.createElement(Config, null);
86
- },
87
- options: [
88
- {
89
- option: '--overwrite',
90
- value: 'Overwrite this apikey in the existing .courier file',
91
- },
92
- ],
93
- example: [
94
- `courier config --apikey MY_API_KEY -P --override`,
95
- `courier config --apikey MY_API_KEY --mock`,
96
- `courier config --apikey MY_API_KEY --draft`,
97
- ],
98
- noApiKeyRequired: true,
99
- });
100
- mappings.set('whoami', {
101
- instructions: 'Display the currently authenticated workspace',
102
- component: () => {
103
- return React.createElement(WhoAmI, null);
104
- },
105
- });
106
- mappings.set('send', {
107
- instructions: 'Send a notification to a user, list, or audience. Unrecognized parameters will be sent as message data.',
108
- options: [
109
- {
110
- option: '--email <email address>',
111
- value: '',
112
- },
113
- {
114
- option: '--tel <phone number>',
115
- value: '',
116
- },
117
- {
118
- option: '--apn <Apple push token>',
119
- value: '',
120
- },
121
- {
122
- option: '--fcm <Firebase push token>',
123
- value: '',
124
- },
125
- {
126
- option: '--user <user ID>',
127
- value: 'ID of a Courier User in your workspace',
128
- },
129
- {
130
- option: '--list <list ID>',
131
- value: 'ID of a Courier List in your workspace',
132
- },
133
- {
134
- option: '--audience <audience ID>',
135
- value: 'ID of a Courier Audience in your workspace',
136
- },
137
- {
138
- option: '--tenant <tenant ID>',
139
- value: 'ID of a Courier Tenant in your workspace. Will be used to send',
140
- },
141
- {
142
- option: '--include-children',
143
- value: 'When sending to a tenant, include all the children of the tenant',
144
- },
145
- {
146
- option: '--tenant-context <tenant ID>',
147
- value: 'ID of a Courier Tenant in your workspace. Applies the tenant context to the message',
148
- },
149
- {
150
- option: '--body <message body>',
151
- value: '',
152
- },
153
- {
154
- option: '--title <message title/subject>',
155
- value: '',
156
- },
157
- {
158
- option: '--elemental <filepath>',
159
- value: 'path to Courier Elemental JSON file',
160
- },
161
- {
162
- option: '--template <template ID or alias>',
163
- value: 'ID or alias of a template stored in Courier',
164
- },
165
- {
166
- option: '--channels <channel>',
167
- value: 'comma-delimted list of channels to send to',
168
- },
169
- {
170
- option: '--all',
171
- value: 'send to all channels for each recipient (default is "single")',
172
- },
173
- ],
174
- example: [
175
- `courier send --tel 555-867-5309 --body "Hey Jenny\\!"`,
176
- `courier send --user user123 --template my-template-id --foo bar`,
177
- `courier send -P --user=test123 --body "hello world" --title="hello" --channels=inbox`,
178
- `courier send --tenant=kewl --title=hello --body="hello world" --channel=inbox`,
179
- `courier send --user="1" --tenant-context=kewl --title=hello --body="hello world" --channel=inbox`,
180
- ],
181
- component: params => {
182
- return React.createElement(Send, { params: params });
183
- },
184
- });
185
- mappings.set('track', {
186
- params: '<event> <user>',
187
- instructions: 'Send a track event to trigger a Courier Automations',
188
- options: [
189
- {
190
- option: '--<key> <value>',
191
- value: 'arbitrary key/value properties for your event',
192
- },
193
- ],
194
- example: `courier track EXAMPLE_EVENT user123 --name "Pip the Pigeon"`,
195
- component: params => {
196
- return React.createElement(Track, { params: params });
197
- },
198
- });
199
- mappings.set('track:bulk', {
200
- params: '<event> <filename>',
201
- instructions: 'Bulk import track events from a file (csv, json, etc). user_id and recipient are mapped to recipient, all other additional fields are placed in properties',
202
- example: 'courier track "example event" examples/events.csv',
203
- component: () => {
204
- return React.createElement(TrackBulk, null);
205
- },
206
- });
207
- mappings.set('automation:invoke:bulk', {
208
- params: '<automation_template_id> <filename>',
209
- options: [...OUTPUT_OPTIONS],
210
- instructions: 'Bulk invoke automations from a file (csv, json, etc). user_id and recipient are mapped to recipient, fields starting with profile. are routed to profile key. The rest is placed in data key',
211
- example: [
212
- 'courier automation:invoke:bulk 7ee13494-478e-4140-83bd-79143ebce02f examples/events.csv',
213
- 'courier automation:invoke:bulk aliasABC examples/events.csv --json --filename output.json',
214
- ],
215
- component: () => {
216
- return React.createElement(AutomationInvokeBulk, null);
217
- },
218
- });
219
- mappings.set('users:get', {
220
- params: '<user>',
221
- instructions: 'Fetch the data for a given user ID',
222
- example: `courier users:get user123`,
223
- component: params => {
224
- return React.createElement(UsersGet, { params: params });
225
- },
226
- });
227
- mappings.set('users:set', {
228
- params: '<user>',
229
- instructions: "Overwrite a user's profile with the provided data",
230
- options: [
231
- {
232
- option: '--email <email address>',
233
- value: '',
234
- },
235
- {
236
- option: '--tel <phone number>',
237
- value: '',
238
- },
239
- {
240
- option: '--<key> <value>',
241
- value: 'arbitrary key/value properties for your user',
242
- },
243
- ],
244
- example: `courier users:set user123 --email user@example.com`,
245
- component: params => {
246
- return React.createElement(UsersSet, { params: params });
247
- },
248
- });
249
- mappings.set('users:bulk', {
250
- params: '<filename>',
251
- instructions: 'Bulk import users from a file (csv, json, jsonl, xls, xlsx, .parquet)." For CSVs, we will unpack nested objects based on the header. E.g., "address.city" becomes {"address": {"city": "value"}}. Lodash path syntax is used for created the nested object. Supports wildcard syntax for multiple files, must surround with quotes (see examples)',
252
- options: [
253
- {
254
- option: '--replace',
255
- value: 'Replace existing users with the same ID, if not set, will do a merge based on key',
256
- },
257
- {
258
- option: '--keep-flat',
259
- value: 'When using a CSV, do not unpack nested objects based on the header. E.g., "address.city" stays as {"address.city": "value"}',
260
- },
261
- {
262
- option: '--remove-nulls',
263
- value: 'Remove null values from the object before updating the profile',
264
- },
265
- {
266
- option: '--list <List ID>',
267
- value: 'Add all users to the specified list. Accepts comma-separated list',
268
- },
269
- {
270
- option: '--tenant <Tenant ID>',
271
- value: 'Add all users to the specified tenant. Accepts comma-separated list. Note this will not automatically create the tenant, but the tenant memberships will exist and sending to this tenant_id will still succeed. ',
272
- },
273
- {
274
- option: '--errors',
275
- value: 'Output errors to a json file',
276
- },
277
- ],
278
- example: [
279
- `courier users:bulk examples/users.csv --replace`,
280
- `courier users:bulk "examples/users/*.csv" --keep-flat`,
281
- `courier users:bulk "examples/*.json" --remove-nulls`,
282
- 'courier users:bulk examples/users.parquet --list new-list-id',
283
- 'courier users:bulk examples/users.xlsx --tenant new-tenant-id',
284
- ],
285
- component: () => React.createElement(UsersBulk, null),
286
- });
287
- mappings.set('users:tokens:bulk', {
288
- params: '<filename>',
289
- instructions: 'Bulk import user tokens from a file (csv, json, jsonl, xls, xlsx, .parquet)." For CSVs, we will unpack nested objects into based on the header. E.g., "address.city" becomes {"address": {"city": "value"}}. Lodash path syntax is used for created the nested object. Supports wildcard syntax for multiple files, must surround with quotes (see examples).',
290
- options: [
291
- {
292
- option: '--replace',
293
- value: 'Replace existing users with the same ID, if not set, will do a merge based on key',
294
- },
295
- ],
296
- example: ['courier users:tokens:bulk examples/users-tokens.csv'],
297
- component: () => React.createElement(UsersTokensBulk, null),
298
- });
299
- mappings.set('users:preferences', {
300
- params: '<user>',
301
- instructions: 'Fetch the preferences for a given user ID',
302
- example: `courier users:preferences user123`,
303
- options: [
304
- {
305
- option: '--verbose',
306
- value: 'Show the full preference object',
307
- },
308
- {
309
- option: '--url',
310
- value: 'Generate the Courier Hosted Preference Page URL',
311
- },
312
- {
313
- option: '--brand <brand ID>',
314
- value: 'Only used with --url, optionally specify the brand_id. Generate the Courier Hosted Preference Page URL',
315
- },
316
- // TODO - add tenants when API is ready
317
- ],
318
- component: () => {
319
- return React.createElement(UsersPreferences, null);
320
- },
321
- });
322
- // NOT IMPLEMENTED YET
323
- // mappings.set('digests:flush', {
324
- // params: '<user> <digest>',
325
- // instructions: 'Flush any currently queued events for a given user + digest',
326
- // example: `courier digests:flush user123 MY_DIGEST_TOPIC`,
327
- // component: params => {
328
- // return <DigestFlush params={params} />;
329
- // },
330
- // });
331
- mappings.set('translations:upload', {
332
- params: '<locale> <filepath>',
333
- instructions: 'Upload a .PO file to Courier for a given locale',
334
- options: [
335
- {
336
- option: '--domain <domain>',
337
- value: 'a custom language domain (default is "default")',
338
- },
339
- ],
340
- example: `courier translations:upload en-US ./translations/en-US.po`,
341
- component: params => {
342
- return React.createElement(TranslationsUpload, { params: params });
343
- },
344
- });
345
- mappings.set('translations:download', {
346
- params: '<locale>',
347
- instructions: 'Download a .PO file to Courier for a given locale',
348
- options: [
349
- {
350
- option: '--domain <domain>',
351
- value: 'a custom language domain (default is "default")',
352
- },
353
- {
354
- option: '--text',
355
- value: 'only return plain text (e.g. for piping into a file)',
356
- },
357
- ],
358
- example: `courier translations:download en-US --text > example.en-US.po`,
359
- component: params => {
360
- return React.createElement(TranslationsDownload, { params: params });
361
- },
362
- });
363
- mappings.set('tenants:bulk', {
364
- params: '<filename>',
365
- instructions: 'Bulk import tenants from a file (csv, json, jsonl, xls, xlsx, .parquet). Supports wildcard syntax for multiple files, must surround with quotes (see examples)',
366
- component: () => React.createElement(TenantsBulk, null),
367
- options: [
368
- {
369
- option: '--merge',
370
- value: 'Create or merge existing tenants with the same ID. If the tenant exists, this will get the current values and merge the new values into the existing tenant',
371
- },
372
- ],
373
- });
374
- mappings.set('tenants:get:membership', {
375
- params: '<tenant_id>',
376
- instructions: 'Retrieve the users in the tenant',
377
- component: () => React.createElement(TenantsGetMembership, null),
378
- options: [...OUTPUT_OPTIONS],
379
- example: [
380
- 'courier tenants:membership tenant123 --json --filename=tenant123.json',
381
- ],
382
- });
383
- mappings.set('tenants:membership:bulk', {
384
- params: '<filename>',
385
- instructions: 'Bulk add or remove tenant memberships from file(s). Requires at a minumum a user_id column. You can provide the tenant as a column (tenant_id) or via, other columns are merged into the users tenant specific profile. Supports csv, json, jsonl, xls, xlsx, .parquet. Supports wildcard syntax for multiple files, must surround with quotes (see examples)',
386
- component: () => React.createElement(TenantsMembershipBulk, null),
387
- options: [
388
- {
389
- option: '--remove-membership',
390
- value: 'Create or merge existing tenants with the same ID. If the tenant exists, this will get the current values and merge the new values into the existing tenant',
391
- },
392
- {
393
- option: '--tenant <tenant_id>',
394
- value: 'Optionally provider the tenant_id for all rows',
395
- },
396
- {
397
- option: '--remove-nulls',
398
- value: 'Remove null values from the object before updating the profile',
399
- },
400
- ],
401
- });
402
- mappings.set('inbox:mark-all-read', {
403
- params: '<user_id>',
404
- instructions: 'Mark all messages in the inbox as read for a given user',
405
- example: [`courier inbox:mark-all-read user123`],
406
- options: [
407
- // TODO - coming soon when mark all read with tags/tenants is ready
408
- // {
409
- // option: '--tenant <tenant_id>',
410
- // value: 'The tenant_id to mark all messages as read',
411
- // },
412
- // {
413
- // option: '--tag <tag>',
414
- // value: 'The tag to mark all messages as read. Can provide multiple',
415
- // },
416
- ],
417
- component: () => {
418
- return React.createElement(MarkAllRead, null);
419
- },
420
- });
421
- mappings.set('inbox:archive-all', {
422
- params: '<user_id>',
423
- instructions: 'Archive all messages in the inbox for a given user',
424
- example: [
425
- `courier inbox:archive-all user123 --before="7 day"`,
426
- `courier inbox:archive-all user123 --tenant=workspace123`,
427
- `courier inbox:archive-all user123 --tag product --tag marketing"`,
428
- ],
429
- options: [
430
- {
431
- option: '--tenant <tenant_id>',
432
- value: 'The tenant_id to mark all messages as read',
433
- },
434
- {
435
- option: '--tag <tag>',
436
- value: 'The tag to mark all messages as read. Can provide multiple tags',
437
- },
438
- {
439
- option: '--before',
440
- value: 'Archive all messages before a given duration using ms: https://www.npmjs.com/package/ms',
441
- },
442
- {
443
- option: '--batch-size',
444
- value: 'Control the batch size of the archive operation',
445
- },
446
- {
447
- option: '--include-pinned',
448
- value: 'Include pinned messages in the archive operation',
449
- },
450
- ],
451
- component: () => {
452
- return React.createElement(ArchiveAll, null);
453
- },
454
- });
455
- mappings.set('inbox:archive-all:bulk', {
456
- params: '<filename>',
457
- instructions: 'Archive all messages in the inbox for each user in the file',
458
- example: [
459
- `courier inbox:archive-all:bulk archive-inbox.csv --before="7 day"`,
460
- `courier inbox:archive-all user123 --tenant=workspace123`,
461
- `courier inbox:archive-all user123 --tag product --tag marketing"`,
462
- ],
463
- options: mappings.get('inbox:archive-all').options,
464
- component: () => {
465
- return React.createElement(ArchiveAllBulk, null);
466
- },
467
- });
468
- mappings.set('templates:list', {
469
- instructions: 'List all templates in your workspace and export it',
470
- options: OUTPUT_OPTIONS,
471
- component: () => {
472
- return React.createElement(TemplatesList, null);
473
- },
474
- });
475
- mappings.set('messages:search', {
476
- instructions: 'Search for messages in your workspace',
477
- options: [
478
- {
479
- option: '--user <user_id>',
480
- value: 'Filter by user_id',
481
- },
482
- {
483
- option: '--tag <tag>',
484
- value: 'Filter by tag. Allows multiple tags',
485
- },
486
- {
487
- option: '--status <status>',
488
- value: 'Filter by tag. Allows multiple tags',
489
- },
490
- {
491
- option: '--from <date>, --enqueued_after <date>',
492
- value: 'Filter by date after',
493
- },
494
- {
495
- option: '--template <template>',
496
- value: 'Filter by Template Id',
497
- },
498
- {
499
- option: '--max-pages <number>',
500
- value: 'Cut off the search after this many pages',
501
- },
502
- ...OUTPUT_OPTIONS,
503
- ],
504
- component: () => {
505
- return React.createElement(MessagesSearch, null);
506
- },
507
- });
508
- mappings.set('audiences:search', {
509
- instructions: 'Search for audiences in your workspace',
510
- options: [
511
- {
512
- option: '--name <name>',
513
- value: 'Filter by audience name, does a fuzzy match *<name>*',
514
- },
515
- {
516
- option: '--id <id>',
517
- value: 'Filter by audience id, does a fuzzy match *<id>*',
518
- },
519
- {
520
- option: '--max-pages <number>',
521
- value: 'Cut off the search after this many pages',
522
- },
523
- ...OUTPUT_OPTIONS,
524
- ],
525
- component: () => {
526
- return React.createElement(AudienceSearch, null);
527
- },
528
- example: [
529
- "courier audiences:search --name 'my audience'",
530
- 'courier audiences:search --id 1234 --json --filename=audience1234.json',
531
- ],
532
- });
533
- mappings.set('users:jwt', {
534
- params: '<user_id>',
535
- instructions: 'Create a JWT for a user',
536
- options: [
537
- {
538
- option: '--scopes',
539
- value: 'Required if not using all. The scopes to attach to the JWT. We will provide the user_id scope automatically, all others will be comma seperated (https://www.courier.com/docs/reference/auth/issue-token/#available-scopes).',
540
- },
541
- {
542
- option: '--all',
543
- value: 'Include all scopes besides brand scopes.',
544
- },
545
- {
546
- option: '--expiration',
547
- value: 'How long in minutes this JWT is valid for? Default is 5 minutes',
548
- },
549
- ],
550
- example: [
551
- 'courier test-user123 --scopes=inbox:read:messages,inbox:write:events',
552
- 'courier test-user123 --scopes=read:user-tokens,write:user-tokens --expiration=5',
553
- 'courier test-user123 --scopes=inbox:read:messages,inbox:write:events,read:preferences,write:preferences,read:user-tokens,write:user-tokens',
554
- ],
555
- component: () => {
556
- return React.createElement(UserToken, null);
557
- },
558
- });
559
- export default mappings;
package/dist/version.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare let VERSION: string;
2
- export default VERSION;
package/dist/version.js DELETED
@@ -1,2 +0,0 @@
1
- let VERSION = '2.7.1';
2
- export default VERSION;