appwrite-cli 17.0.0 → 17.2.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.
Files changed (98) hide show
  1. package/.github/workflows/ci.yml +1 -1
  2. package/.github/workflows/publish.yml +1 -1
  3. package/CHANGELOG.md +20 -0
  4. package/README.md +2 -2
  5. package/bun.lock +783 -0
  6. package/cli.ts +19 -1
  7. package/dist/bundle-win-arm64.mjs +1515 -744
  8. package/dist/cli.cjs +1515 -744
  9. package/dist/index.cjs +322 -118
  10. package/dist/index.js +322 -118
  11. package/dist/lib/client.d.ts +9 -0
  12. package/dist/lib/client.d.ts.map +1 -1
  13. package/dist/lib/commands/init.d.ts.map +1 -1
  14. package/dist/lib/commands/services/organizations.d.ts +3 -0
  15. package/dist/lib/commands/services/organizations.d.ts.map +1 -0
  16. package/dist/lib/commands/services/teams.d.ts.map +1 -1
  17. package/dist/lib/constants.d.ts +1 -1
  18. package/dist/lib/emulation/docker.d.ts.map +1 -1
  19. package/dist/lib/emulation/utils.d.ts.map +1 -1
  20. package/dist/lib/parser.d.ts.map +1 -1
  21. package/dist/lib/questions.d.ts.map +1 -1
  22. package/dist/lib/types.d.ts +3 -0
  23. package/dist/lib/types.d.ts.map +1 -1
  24. package/dist/lib/utils.d.ts +12 -0
  25. package/dist/lib/utils.d.ts.map +1 -1
  26. package/docs/examples/organizations/add-credit.md +5 -0
  27. package/docs/examples/organizations/cancel-downgrade.md +4 -0
  28. package/docs/examples/organizations/create-downgrade-feedback.md +8 -0
  29. package/docs/examples/organizations/create-invoice-payment.md +6 -0
  30. package/docs/examples/organizations/create-key.md +6 -0
  31. package/docs/examples/organizations/create.md +6 -0
  32. package/docs/examples/organizations/delete-backup-payment-method.md +4 -0
  33. package/docs/examples/organizations/delete-default-payment-method.md +4 -0
  34. package/docs/examples/organizations/delete-key.md +5 -0
  35. package/docs/examples/organizations/delete.md +4 -0
  36. package/docs/examples/organizations/estimation-create-organization.md +4 -0
  37. package/docs/examples/organizations/estimation-delete-organization.md +4 -0
  38. package/docs/examples/organizations/estimation-update-plan.md +5 -0
  39. package/docs/examples/organizations/get-aggregation.md +5 -0
  40. package/docs/examples/organizations/get-available-credits.md +4 -0
  41. package/docs/examples/organizations/get-credit.md +5 -0
  42. package/docs/examples/organizations/get-invoice-download.md +5 -0
  43. package/docs/examples/organizations/get-invoice-view.md +5 -0
  44. package/docs/examples/organizations/get-invoice.md +5 -0
  45. package/docs/examples/organizations/get-key.md +5 -0
  46. package/docs/examples/organizations/get-plan.md +4 -0
  47. package/docs/examples/organizations/get-scopes.md +4 -0
  48. package/docs/examples/organizations/get-usage.md +4 -0
  49. package/docs/examples/organizations/list-aggregations.md +4 -0
  50. package/docs/examples/organizations/list-credits.md +4 -0
  51. package/docs/examples/organizations/list-keys.md +4 -0
  52. package/docs/examples/organizations/list-regions.md +4 -0
  53. package/docs/examples/organizations/list.md +3 -0
  54. package/docs/examples/organizations/set-backup-payment-method.md +5 -0
  55. package/docs/examples/organizations/set-billing-address.md +5 -0
  56. package/docs/examples/organizations/set-billing-email.md +5 -0
  57. package/docs/examples/organizations/set-billing-tax-id.md +5 -0
  58. package/docs/examples/organizations/set-default-payment-method.md +5 -0
  59. package/docs/examples/organizations/update-budget.md +5 -0
  60. package/docs/examples/organizations/update-key.md +7 -0
  61. package/docs/examples/organizations/update-plan.md +5 -0
  62. package/docs/examples/organizations/validate-invoice.md +5 -0
  63. package/docs/examples/organizations/validate-payment.md +4 -0
  64. package/install.ps1 +2 -2
  65. package/install.sh +1 -1
  66. package/lib/client.ts +12 -0
  67. package/lib/commands/init.ts +109 -2
  68. package/lib/commands/services/account.ts +110 -55
  69. package/lib/commands/services/activities.ts +4 -2
  70. package/lib/commands/services/backups.ts +24 -12
  71. package/lib/commands/services/databases.ts +150 -75
  72. package/lib/commands/services/functions.ts +60 -30
  73. package/lib/commands/services/graphql.ts +4 -2
  74. package/lib/commands/services/health.ts +46 -23
  75. package/lib/commands/services/locale.ts +16 -8
  76. package/lib/commands/services/messaging.ts +96 -48
  77. package/lib/commands/services/migrations.ts +30 -16
  78. package/lib/commands/services/organizations.ts +555 -0
  79. package/lib/commands/services/project.ts +12 -6
  80. package/lib/commands/services/projects.ts +105 -53
  81. package/lib/commands/services/proxy.ts +18 -10
  82. package/lib/commands/services/sites.ts +58 -29
  83. package/lib/commands/services/storage.ts +30 -15
  84. package/lib/commands/services/tables-db.ts +148 -74
  85. package/lib/commands/services/teams.ts +38 -15
  86. package/lib/commands/services/tokens.ts +10 -5
  87. package/lib/commands/services/users.ts +88 -44
  88. package/lib/commands/services/vcs.ts +22 -12
  89. package/lib/commands/services/webhooks.ts +12 -6
  90. package/lib/constants.ts +1 -1
  91. package/lib/emulation/docker.ts +1 -0
  92. package/lib/emulation/utils.ts +3 -2
  93. package/lib/parser.ts +356 -77
  94. package/lib/questions.ts +8 -3
  95. package/lib/types.ts +3 -0
  96. package/lib/utils.ts +234 -0
  97. package/package.json +1 -1
  98. package/scoop/appwrite.config.json +3 -3
@@ -1,5 +1,5 @@
1
1
  import { Command } from "commander";
2
- import { sdkForProject } from "../../sdks.js";
2
+ import { sdkForConsole } from "../../sdks.js";
3
3
  import {
4
4
  actionRunner,
5
5
  commandDescriptions,
@@ -14,7 +14,7 @@ let projectsClient: Projects | null = null;
14
14
 
15
15
  const getProjectsClient = async (): Promise<Projects> => {
16
16
  if (!projectsClient) {
17
- const sdkClient = await sdkForProject();
17
+ const sdkClient = await sdkForConsole();
18
18
  projectsClient = new Projects(sdkClient);
19
19
  }
20
20
  return projectsClient;
@@ -26,7 +26,7 @@ export const projects = new Command("projects")
26
26
  helpWidth: process.stdout.columns || 80,
27
27
  });
28
28
 
29
- projects
29
+ const projectsListCommand = projects
30
30
  .command(`list`)
31
31
  .description(`Get a list of all projects. You can use the query params to filter your results. `)
32
32
  .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, teamId, labels, search`)
@@ -44,7 +44,9 @@ projects
44
44
  ),
45
45
  );
46
46
 
47
- projects
47
+ (projectsListCommand as Command & { outputFields?: string[] }).outputFields = ["name", "$id", "region", "status"];
48
+
49
+ const projectsCreateCommand = projects
48
50
  .command(`create`)
49
51
  .description(`Create a new project. You can create a maximum of 100 projects per account. `)
50
52
  .requiredOption(`--project-id <project-id>`, `Unique Id. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.`)
@@ -67,7 +69,8 @@ projects
67
69
  ),
68
70
  );
69
71
 
70
- projects
72
+
73
+ const projectsGetCommand = projects
71
74
  .command(`get`)
72
75
  .description(`Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata. `)
73
76
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -78,7 +81,8 @@ projects
78
81
  ),
79
82
  );
80
83
 
81
- projects
84
+
85
+ const projectsUpdateCommand = projects
82
86
  .command(`update`)
83
87
  .description(`Update a project by its unique ID.`)
84
88
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -99,7 +103,8 @@ projects
99
103
  ),
100
104
  );
101
105
 
102
- projects
106
+
107
+ const projectsDeleteCommand = projects
103
108
  .command(`delete`)
104
109
  .description(`Delete a project by its unique ID.`)
105
110
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -110,7 +115,8 @@ projects
110
115
  ),
111
116
  );
112
117
 
113
- projects
118
+
119
+ const projectsUpdateApiStatusCommand = projects
114
120
  .command(`update-api-status`)
115
121
  .description(`Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.`)
116
122
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -123,7 +129,8 @@ projects
123
129
  ),
124
130
  );
125
131
 
126
- projects
132
+
133
+ const projectsUpdateApiStatusAllCommand = projects
127
134
  .command(`update-api-status-all`)
128
135
  .description(`Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.`)
129
136
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -135,7 +142,8 @@ projects
135
142
  ),
136
143
  );
137
144
 
138
- projects
145
+
146
+ const projectsUpdateAuthDurationCommand = projects
139
147
  .command(`update-auth-duration`)
140
148
  .description(`Update how long sessions created within a project should stay active for.`)
141
149
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -147,7 +155,8 @@ projects
147
155
  ),
148
156
  );
149
157
 
150
- projects
158
+
159
+ const projectsUpdateAuthLimitCommand = projects
151
160
  .command(`update-auth-limit`)
152
161
  .description(`Update the maximum number of users allowed in this project. Set to 0 for unlimited users. `)
153
162
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -159,7 +168,8 @@ projects
159
168
  ),
160
169
  );
161
170
 
162
- projects
171
+
172
+ const projectsUpdateAuthSessionsLimitCommand = projects
163
173
  .command(`update-auth-sessions-limit`)
164
174
  .description(`Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.`)
165
175
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -171,7 +181,8 @@ projects
171
181
  ),
172
182
  );
173
183
 
174
- projects
184
+
185
+ const projectsUpdateMembershipsPrivacyCommand = projects
175
186
  .command(`update-memberships-privacy`)
176
187
  .description(`Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status. `)
177
188
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -185,7 +196,8 @@ projects
185
196
  ),
186
197
  );
187
198
 
188
- projects
199
+
200
+ const projectsUpdateMockNumbersCommand = projects
189
201
  .command(`update-mock-numbers`)
190
202
  .description(`Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development. `)
191
203
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -197,7 +209,8 @@ projects
197
209
  ),
198
210
  );
199
211
 
200
- projects
212
+
213
+ const projectsUpdateAuthPasswordDictionaryCommand = projects
201
214
  .command(`update-auth-password-dictionary`)
202
215
  .description(`Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords. `)
203
216
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -209,7 +222,8 @@ projects
209
222
  ),
210
223
  );
211
224
 
212
- projects
225
+
226
+ const projectsUpdateAuthPasswordHistoryCommand = projects
213
227
  .command(`update-auth-password-history`)
214
228
  .description(`Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.`)
215
229
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -221,7 +235,8 @@ projects
221
235
  ),
222
236
  );
223
237
 
224
- projects
238
+
239
+ const projectsUpdatePersonalDataCheckCommand = projects
225
240
  .command(`update-personal-data-check`)
226
241
  .description(`Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords. `)
227
242
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -233,7 +248,8 @@ projects
233
248
  ),
234
249
  );
235
250
 
236
- projects
251
+
252
+ const projectsUpdateSessionAlertsCommand = projects
237
253
  .command(`update-session-alerts`)
238
254
  .description(`Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.`)
239
255
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -245,7 +261,8 @@ projects
245
261
  ),
246
262
  );
247
263
 
248
- projects
264
+
265
+ const projectsUpdateSessionInvalidationCommand = projects
249
266
  .command(`update-session-invalidation`)
250
267
  .description(`Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.`)
251
268
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -257,7 +274,8 @@ projects
257
274
  ),
258
275
  );
259
276
 
260
- projects
277
+
278
+ const projectsUpdateAuthStatusCommand = projects
261
279
  .command(`update-auth-status`)
262
280
  .description(`Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project. `)
263
281
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -270,7 +288,8 @@ projects
270
288
  ),
271
289
  );
272
290
 
273
- projects
291
+
292
+ const projectsListDevKeysCommand = projects
274
293
  .command(`list-dev-keys`)
275
294
  .description(`List all the project\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'`)
276
295
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -282,7 +301,8 @@ projects
282
301
  ),
283
302
  );
284
303
 
285
- projects
304
+
305
+ const projectsCreateDevKeyCommand = projects
286
306
  .command(`create-dev-key`)
287
307
  .description(`Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.`)
288
308
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -295,7 +315,8 @@ projects
295
315
  ),
296
316
  );
297
317
 
298
- projects
318
+
319
+ const projectsGetDevKeyCommand = projects
299
320
  .command(`get-dev-key`)
300
321
  .description(`Get a project\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.`)
301
322
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -307,7 +328,8 @@ projects
307
328
  ),
308
329
  );
309
330
 
310
- projects
331
+
332
+ const projectsUpdateDevKeyCommand = projects
311
333
  .command(`update-dev-key`)
312
334
  .description(`Update a project\'s dev key by its unique ID. Use this endpoint to update a project\'s dev key name or expiration time.'`)
313
335
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -321,7 +343,8 @@ projects
321
343
  ),
322
344
  );
323
345
 
324
- projects
346
+
347
+ const projectsDeleteDevKeyCommand = projects
325
348
  .command(`delete-dev-key`)
326
349
  .description(`Delete a project\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.`)
327
350
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -333,7 +356,8 @@ projects
333
356
  ),
334
357
  );
335
358
 
336
- projects
359
+
360
+ const projectsCreateJWTCommand = projects
337
361
  .command(`create-jwt`)
338
362
  .description(`Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time. `)
339
363
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -346,7 +370,8 @@ projects
346
370
  ),
347
371
  );
348
372
 
349
- projects
373
+
374
+ const projectsListKeysCommand = projects
350
375
  .command(`list-keys`)
351
376
  .description(`Get a list of all API keys from the current project. `)
352
377
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -364,7 +389,8 @@ projects
364
389
  ),
365
390
  );
366
391
 
367
- projects
392
+
393
+ const projectsCreateKeyCommand = projects
368
394
  .command(`create-key`)
369
395
  .description(`Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.`)
370
396
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -379,7 +405,8 @@ projects
379
405
  ),
380
406
  );
381
407
 
382
- projects
408
+
409
+ const projectsGetKeyCommand = projects
383
410
  .command(`get-key`)
384
411
  .description(`Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.`)
385
412
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -391,7 +418,8 @@ projects
391
418
  ),
392
419
  );
393
420
 
394
- projects
421
+
422
+ const projectsUpdateKeyCommand = projects
395
423
  .command(`update-key`)
396
424
  .description(`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. `)
397
425
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -406,7 +434,8 @@ projects
406
434
  ),
407
435
  );
408
436
 
409
- projects
437
+
438
+ const projectsDeleteKeyCommand = projects
410
439
  .command(`delete-key`)
411
440
  .description(`Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. `)
412
441
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -418,7 +447,8 @@ projects
418
447
  ),
419
448
  );
420
449
 
421
- projects
450
+
451
+ const projectsUpdateLabelsCommand = projects
422
452
  .command(`update-labels`)
423
453
  .description(`Update the project labels by its unique ID. Labels can be used to easily filter projects in an organization.`)
424
454
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -430,7 +460,8 @@ projects
430
460
  ),
431
461
  );
432
462
 
433
- projects
463
+
464
+ const projectsUpdateOAuth2Command = projects
434
465
  .command(`update-o-auth-2`)
435
466
  .description(`Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers. `)
436
467
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -450,7 +481,8 @@ projects
450
481
  ),
451
482
  );
452
483
 
453
- projects
484
+
485
+ const projectsListPlatformsCommand = projects
454
486
  .command(`list-platforms`)
455
487
  .description(`Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations. `)
456
488
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -467,7 +499,8 @@ projects
467
499
  ),
468
500
  );
469
501
 
470
- projects
502
+
503
+ const projectsCreatePlatformCommand = projects
471
504
  .command(`create-platform`)
472
505
  .description(`Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.`)
473
506
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -483,7 +516,8 @@ projects
483
516
  ),
484
517
  );
485
518
 
486
- projects
519
+
520
+ const projectsGetPlatformCommand = projects
487
521
  .command(`get-platform`)
488
522
  .description(`Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations. `)
489
523
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -495,7 +529,8 @@ projects
495
529
  ),
496
530
  );
497
531
 
498
- projects
532
+
533
+ const projectsUpdatePlatformCommand = projects
499
534
  .command(`update-platform`)
500
535
  .description(`Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname. `)
501
536
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -511,7 +546,8 @@ projects
511
546
  ),
512
547
  );
513
548
 
514
- projects
549
+
550
+ const projectsDeletePlatformCommand = projects
515
551
  .command(`delete-platform`)
516
552
  .description(`Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project. `)
517
553
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -523,7 +559,8 @@ projects
523
559
  ),
524
560
  );
525
561
 
526
- projects
562
+
563
+ const projectsListSchedulesCommand = projects
527
564
  .command(`list-schedules`)
528
565
  .description(`Get a list of all the project's schedules. You can use the query params to filter your results.`)
529
566
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -541,7 +578,8 @@ projects
541
578
  ),
542
579
  );
543
580
 
544
- projects
581
+
582
+ const projectsCreateScheduleCommand = projects
545
583
  .command(`create-schedule`)
546
584
  .description(`Create a new schedule for a resource.`)
547
585
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -562,7 +600,8 @@ projects
562
600
  ),
563
601
  );
564
602
 
565
- projects
603
+
604
+ const projectsGetScheduleCommand = projects
566
605
  .command(`get-schedule`)
567
606
  .description(`Get a schedule by its unique ID.`)
568
607
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -574,7 +613,8 @@ projects
574
613
  ),
575
614
  );
576
615
 
577
- projects
616
+
617
+ const projectsUpdateServiceStatusCommand = projects
578
618
  .command(`update-service-status`)
579
619
  .description(`Update the status of a specific service. Use this endpoint to enable or disable a service in your project. `)
580
620
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -587,7 +627,8 @@ projects
587
627
  ),
588
628
  );
589
629
 
590
- projects
630
+
631
+ const projectsUpdateServiceStatusAllCommand = projects
591
632
  .command(`update-service-status-all`)
592
633
  .description(`Update the status of all services. Use this endpoint to enable or disable all optional services at once. `)
593
634
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -599,7 +640,8 @@ projects
599
640
  ),
600
641
  );
601
642
 
602
- projects
643
+
644
+ const projectsUpdateSmtpCommand = projects
603
645
  .command(`update-smtp`)
604
646
  .description(`Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. `)
605
647
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -619,7 +661,8 @@ projects
619
661
  ),
620
662
  );
621
663
 
622
- projects
664
+
665
+ const projectsCreateSmtpTestCommand = projects
623
666
  .command(`create-smtp-test`)
624
667
  .description(`Send a test email to verify SMTP configuration. `)
625
668
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -639,7 +682,8 @@ projects
639
682
  ),
640
683
  );
641
684
 
642
- projects
685
+
686
+ const projectsUpdateStatusCommand = projects
643
687
  .command(`update-status`)
644
688
  .description(`Update the status of a project. Can be used to archive/restore projects, and to restore paused projects. When restoring a paused project, the console fingerprint header must be provided and the project must not be blocked for any reason other than inactivity.
645
689
  `)
@@ -652,7 +696,8 @@ projects
652
696
  ),
653
697
  );
654
698
 
655
- projects
699
+
700
+ const projectsUpdateTeamCommand = projects
656
701
  .command(`update-team`)
657
702
  .description(`Update the team ID of a project allowing for it to be transferred to another team.`)
658
703
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -664,7 +709,8 @@ projects
664
709
  ),
665
710
  );
666
711
 
667
- projects
712
+
713
+ const projectsGetEmailTemplateCommand = projects
668
714
  .command(`get-email-template`)
669
715
  .description(`Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details. `)
670
716
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -677,7 +723,8 @@ projects
677
723
  ),
678
724
  );
679
725
 
680
- projects
726
+
727
+ const projectsUpdateEmailTemplateCommand = projects
681
728
  .command(`update-email-template`)
682
729
  .description(`Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.`)
683
730
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -695,7 +742,8 @@ projects
695
742
  ),
696
743
  );
697
744
 
698
- projects
745
+
746
+ const projectsDeleteEmailTemplateCommand = projects
699
747
  .command(`delete-email-template`)
700
748
  .description(`Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state. `)
701
749
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -708,7 +756,8 @@ projects
708
756
  ),
709
757
  );
710
758
 
711
- projects
759
+
760
+ const projectsGetSmsTemplateCommand = projects
712
761
  .command(`get-sms-template`)
713
762
  .description(`Get a custom SMS template for the specified locale and type returning it's contents.`)
714
763
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -721,7 +770,8 @@ projects
721
770
  ),
722
771
  );
723
772
 
724
- projects
773
+
774
+ const projectsUpdateSmsTemplateCommand = projects
725
775
  .command(`update-sms-template`)
726
776
  .description(`Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. `)
727
777
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -735,7 +785,8 @@ projects
735
785
  ),
736
786
  );
737
787
 
738
- projects
788
+
789
+ const projectsDeleteSmsTemplateCommand = projects
739
790
  .command(`delete-sms-template`)
740
791
  .description(`Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. `)
741
792
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
@@ -748,3 +799,4 @@ projects
748
799
  ),
749
800
  );
750
801
 
802
+
@@ -1,5 +1,5 @@
1
1
  import { Command } from "commander";
2
- import { sdkForProject } from "../../sdks.js";
2
+ import { sdkForConsole } from "../../sdks.js";
3
3
  import {
4
4
  actionRunner,
5
5
  commandDescriptions,
@@ -14,7 +14,7 @@ let proxyClient: Proxy | null = null;
14
14
 
15
15
  const getProxyClient = async (): Promise<Proxy> => {
16
16
  if (!proxyClient) {
17
- const sdkClient = await sdkForProject();
17
+ const sdkClient = await sdkForConsole();
18
18
  proxyClient = new Proxy(sdkClient);
19
19
  }
20
20
  return proxyClient;
@@ -26,7 +26,7 @@ export const proxy = new Command("proxy")
26
26
  helpWidth: process.stdout.columns || 80,
27
27
  });
28
28
 
29
- proxy
29
+ const proxyListRulesCommand = proxy
30
30
  .command(`list-rules`)
31
31
  .description(`Get a list of all the proxy rules. You can use the query params to filter your results.`)
32
32
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: domain, type, trigger, deploymentResourceType, deploymentResourceId, deploymentId, deploymentVcsProviderBranch`)
@@ -44,7 +44,8 @@ proxy
44
44
  ),
45
45
  );
46
46
 
47
- proxy
47
+
48
+ const proxyCreateAPIRuleCommand = proxy
48
49
  .command(`create-api-rule`)
49
50
  .description(`Create a new proxy rule for serving Appwrite's API on custom domain.`)
50
51
  .requiredOption(`--domain <domain>`, `Domain name.`)
@@ -55,7 +56,8 @@ proxy
55
56
  ),
56
57
  );
57
58
 
58
- proxy
59
+
60
+ const proxyCreateFunctionRuleCommand = proxy
59
61
  .command(`create-function-rule`)
60
62
  .description(`Create a new proxy rule for executing Appwrite Function on custom domain.`)
61
63
  .requiredOption(`--domain <domain>`, `Domain name.`)
@@ -68,7 +70,8 @@ proxy
68
70
  ),
69
71
  );
70
72
 
71
- proxy
73
+
74
+ const proxyCreateRedirectRuleCommand = proxy
72
75
  .command(`create-redirect-rule`)
73
76
  .description(`Create a new proxy rule for to redirect from custom domain to another domain.`)
74
77
  .requiredOption(`--domain <domain>`, `Domain name.`)
@@ -83,7 +86,8 @@ proxy
83
86
  ),
84
87
  );
85
88
 
86
- proxy
89
+
90
+ const proxyCreateSiteRuleCommand = proxy
87
91
  .command(`create-site-rule`)
88
92
  .description(`Create a new proxy rule for serving Appwrite Site on custom domain.`)
89
93
  .requiredOption(`--domain <domain>`, `Domain name.`)
@@ -96,7 +100,8 @@ proxy
96
100
  ),
97
101
  );
98
102
 
99
- proxy
103
+
104
+ const proxyGetRuleCommand = proxy
100
105
  .command(`get-rule`)
101
106
  .description(`Get a proxy rule by its unique ID.`)
102
107
  .requiredOption(`--rule-id <rule-id>`, `Rule ID.`)
@@ -107,7 +112,8 @@ proxy
107
112
  ),
108
113
  );
109
114
 
110
- proxy
115
+
116
+ const proxyDeleteRuleCommand = proxy
111
117
  .command(`delete-rule`)
112
118
  .description(`Delete a proxy rule by its unique ID.`)
113
119
  .requiredOption(`--rule-id <rule-id>`, `Rule ID.`)
@@ -118,7 +124,8 @@ proxy
118
124
  ),
119
125
  );
120
126
 
121
- proxy
127
+
128
+ const proxyUpdateRuleVerificationCommand = proxy
122
129
  .command(`update-rule-verification`)
123
130
  .description(`Retry getting verification process of a proxy rule. This endpoint triggers domain verification by checking DNS records (CNAME) against the configured target domain. If verification is successful, a TLS certificate will be automatically provisioned for the domain.`)
124
131
  .requiredOption(`--rule-id <rule-id>`, `Rule ID.`)
@@ -129,3 +136,4 @@ proxy
129
136
  ),
130
137
  );
131
138
 
139
+