appwrite-cli 17.1.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 (56) hide show
  1. package/.github/workflows/ci.yml +1 -1
  2. package/.github/workflows/publish.yml +1 -1
  3. package/CHANGELOG.md +14 -0
  4. package/README.md +2 -2
  5. package/bun.lock +783 -0
  6. package/cli.ts +14 -2
  7. package/dist/bundle-win-arm64.mjs +1137 -733
  8. package/dist/cli.cjs +1137 -733
  9. package/dist/index.cjs +193 -79
  10. package/dist/index.js +193 -79
  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/constants.d.ts +1 -1
  15. package/dist/lib/emulation/docker.d.ts.map +1 -1
  16. package/dist/lib/parser.d.ts.map +1 -1
  17. package/dist/lib/questions.d.ts.map +1 -1
  18. package/dist/lib/types.d.ts +2 -0
  19. package/dist/lib/types.d.ts.map +1 -1
  20. package/dist/lib/utils.d.ts +12 -0
  21. package/dist/lib/utils.d.ts.map +1 -1
  22. package/install.ps1 +2 -2
  23. package/install.sh +1 -1
  24. package/lib/client.ts +12 -0
  25. package/lib/commands/init.ts +109 -2
  26. package/lib/commands/services/account.ts +110 -55
  27. package/lib/commands/services/activities.ts +4 -2
  28. package/lib/commands/services/backups.ts +24 -12
  29. package/lib/commands/services/databases.ts +150 -75
  30. package/lib/commands/services/functions.ts +60 -30
  31. package/lib/commands/services/graphql.ts +4 -2
  32. package/lib/commands/services/health.ts +46 -23
  33. package/lib/commands/services/locale.ts +16 -8
  34. package/lib/commands/services/messaging.ts +96 -48
  35. package/lib/commands/services/migrations.ts +28 -14
  36. package/lib/commands/services/organizations.ts +76 -38
  37. package/lib/commands/services/project.ts +12 -6
  38. package/lib/commands/services/projects.ts +103 -51
  39. package/lib/commands/services/proxy.ts +16 -8
  40. package/lib/commands/services/sites.ts +58 -29
  41. package/lib/commands/services/storage.ts +30 -15
  42. package/lib/commands/services/tables-db.ts +148 -74
  43. package/lib/commands/services/teams.ts +28 -14
  44. package/lib/commands/services/tokens.ts +10 -5
  45. package/lib/commands/services/users.ts +88 -44
  46. package/lib/commands/services/vcs.ts +20 -10
  47. package/lib/commands/services/webhooks.ts +12 -6
  48. package/lib/constants.ts +1 -1
  49. package/lib/emulation/docker.ts +1 -0
  50. package/lib/parser.ts +279 -122
  51. package/lib/questions.ts +8 -3
  52. package/lib/sdks.ts +0 -1
  53. package/lib/types.ts +2 -0
  54. package/lib/utils.ts +234 -0
  55. package/package.json +1 -1
  56. package/scoop/appwrite.config.json +3 -3
@@ -35,7 +35,7 @@ export const teams = new Command("teams")
35
35
  helpWidth: process.stdout.columns || 80,
36
36
  });
37
37
 
38
- teams
38
+ const teamsListCommand = teams
39
39
  .command(`list`)
40
40
  .description(`Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.`)
41
41
  .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, total, billingPlan`)
@@ -53,7 +53,8 @@ teams
53
53
  ),
54
54
  );
55
55
 
56
- teams
56
+
57
+ const teamsCreateCommand = teams
57
58
  .command(`create`)
58
59
  .description(`Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.`)
59
60
  .requiredOption(`--team-id <team-id>`, `Team ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -66,7 +67,8 @@ teams
66
67
  ),
67
68
  );
68
69
 
69
- teams
70
+
71
+ const teamsGetCommand = teams
70
72
  .command(`get`)
71
73
  .description(`Get a team by its ID. All team members have read access for this resource.`)
72
74
  .requiredOption(`--team-id <team-id>`, `Team ID.`)
@@ -77,7 +79,8 @@ teams
77
79
  ),
78
80
  );
79
81
 
80
- teams
82
+
83
+ const teamsUpdateNameCommand = teams
81
84
  .command(`update-name`)
82
85
  .description(`Update the team's name by its unique ID.`)
83
86
  .requiredOption(`--team-id <team-id>`, `Team ID.`)
@@ -89,7 +92,8 @@ teams
89
92
  ),
90
93
  );
91
94
 
92
- teams
95
+
96
+ const teamsDeleteCommand = teams
93
97
  .command(`delete`)
94
98
  .description(`Delete a team using its ID. Only team members with the owner role can delete the team.`)
95
99
  .requiredOption(`--team-id <team-id>`, `Team ID.`)
@@ -100,7 +104,8 @@ teams
100
104
  ),
101
105
  );
102
106
 
103
- teams
107
+
108
+ const teamsListLogsCommand = teams
104
109
  .command(`list-logs`)
105
110
  .description(`Get the team activity logs list by its unique ID.`)
106
111
  .requiredOption(`--team-id <team-id>`, `Team ID.`)
@@ -118,7 +123,8 @@ teams
118
123
  ),
119
124
  );
120
125
 
121
- teams
126
+
127
+ const teamsListMembershipsCommand = teams
122
128
  .command(`list-memberships`)
123
129
  .description(`Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.`)
124
130
  .requiredOption(`--team-id <team-id>`, `Team ID.`)
@@ -137,7 +143,8 @@ teams
137
143
  ),
138
144
  );
139
145
 
140
- teams
146
+
147
+ const teamsCreateMembershipCommand = teams
141
148
  .command(`create-membership`)
142
149
  .description(`Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.
143
150
 
@@ -161,7 +168,8 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
161
168
  ),
162
169
  );
163
170
 
164
- teams
171
+
172
+ const teamsGetMembershipCommand = teams
165
173
  .command(`get-membership`)
166
174
  .description(`Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.`)
167
175
  .requiredOption(`--team-id <team-id>`, `Team ID.`)
@@ -173,7 +181,8 @@ teams
173
181
  ),
174
182
  );
175
183
 
176
- teams
184
+
185
+ const teamsUpdateMembershipCommand = teams
177
186
  .command(`update-membership`)
178
187
  .description(`Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions).
179
188
  `)
@@ -187,7 +196,8 @@ teams
187
196
  ),
188
197
  );
189
198
 
190
- teams
199
+
200
+ const teamsDeleteMembershipCommand = teams
191
201
  .command(`delete-membership`)
192
202
  .description(`This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.`)
193
203
  .requiredOption(`--team-id <team-id>`, `Team ID.`)
@@ -199,7 +209,8 @@ teams
199
209
  ),
200
210
  );
201
211
 
202
- teams
212
+
213
+ const teamsUpdateMembershipStatusCommand = teams
203
214
  .command(`update-membership-status`)
204
215
  .description(`Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.
205
216
 
@@ -216,7 +227,8 @@ If the request is successful, a session for the user is automatically created.
216
227
  ),
217
228
  );
218
229
 
219
- teams
230
+
231
+ const teamsGetPrefsCommand = teams
220
232
  .command(`get-prefs`)
221
233
  .description(`Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs).`)
222
234
  .requiredOption(`--team-id <team-id>`, `Team ID.`)
@@ -227,7 +239,8 @@ teams
227
239
  ),
228
240
  );
229
241
 
230
- teams
242
+
243
+ const teamsUpdatePrefsCommand = teams
231
244
  .command(`update-prefs`)
232
245
  .description(`Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.`)
233
246
  .requiredOption(`--team-id <team-id>`, `Team ID.`)
@@ -239,3 +252,4 @@ teams
239
252
  ),
240
253
  );
241
254
 
255
+
@@ -26,7 +26,7 @@ export const tokens = new Command("tokens")
26
26
  helpWidth: process.stdout.columns || 80,
27
27
  });
28
28
 
29
- tokens
29
+ const tokensListCommand = tokens
30
30
  .command(`list`)
31
31
  .description(`List all the tokens created for a specific file or bucket. You can use the query params to filter your results.`)
32
32
  .requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).`)
@@ -45,7 +45,8 @@ tokens
45
45
  ),
46
46
  );
47
47
 
48
- tokens
48
+
49
+ const tokensCreateFileTokenCommand = tokens
49
50
  .command(`create-file-token`)
50
51
  .description(`Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.`)
51
52
  .requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).`)
@@ -58,7 +59,8 @@ tokens
58
59
  ),
59
60
  );
60
61
 
61
- tokens
62
+
63
+ const tokensGetCommand = tokens
62
64
  .command(`get`)
63
65
  .description(`Get a token by its unique ID.`)
64
66
  .requiredOption(`--token-id <token-id>`, `Token ID.`)
@@ -69,7 +71,8 @@ tokens
69
71
  ),
70
72
  );
71
73
 
72
- tokens
74
+
75
+ const tokensUpdateCommand = tokens
73
76
  .command(`update`)
74
77
  .description(`Update a token by its unique ID. Use this endpoint to update a token's expiry date.`)
75
78
  .requiredOption(`--token-id <token-id>`, `Token unique ID.`)
@@ -81,7 +84,8 @@ tokens
81
84
  ),
82
85
  );
83
86
 
84
- tokens
87
+
88
+ const tokensDeleteCommand = tokens
85
89
  .command(`delete`)
86
90
  .description(`Delete a token by its unique ID.`)
87
91
  .requiredOption(`--token-id <token-id>`, `Token ID.`)
@@ -92,3 +96,4 @@ tokens
92
96
  ),
93
97
  );
94
98
 
99
+
@@ -26,7 +26,7 @@ export const users = new Command("users")
26
26
  helpWidth: process.stdout.columns || 80,
27
27
  });
28
28
 
29
- users
29
+ const usersListCommand = users
30
30
  .command(`list`)
31
31
  .description(`Get a list of all the project's users. 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, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator`)
@@ -44,7 +44,8 @@ users
44
44
  ),
45
45
  );
46
46
 
47
- users
47
+
48
+ const usersCreateCommand = users
48
49
  .command(`create`)
49
50
  .description(`Create a new user.`)
50
51
  .requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -59,7 +60,8 @@ users
59
60
  ),
60
61
  );
61
62
 
62
- users
63
+
64
+ const usersCreateArgon2UserCommand = users
63
65
  .command(`create-argon-2-user`)
64
66
  .description(`Create a new user. Password provided must be hashed with the [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`)
65
67
  .requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -73,7 +75,8 @@ users
73
75
  ),
74
76
  );
75
77
 
76
- users
78
+
79
+ const usersCreateBcryptUserCommand = users
77
80
  .command(`create-bcrypt-user`)
78
81
  .description(`Create a new user. Password provided must be hashed with the [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`)
79
82
  .requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -87,7 +90,8 @@ users
87
90
  ),
88
91
  );
89
92
 
90
- users
93
+
94
+ const usersListIdentitiesCommand = users
91
95
  .command(`list-identities`)
92
96
  .description(`Get identities for all users.`)
93
97
  .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: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry`)
@@ -105,7 +109,8 @@ users
105
109
  ),
106
110
  );
107
111
 
108
- users
112
+
113
+ const usersDeleteIdentityCommand = users
109
114
  .command(`delete-identity`)
110
115
  .description(`Delete an identity by its unique ID.`)
111
116
  .requiredOption(`--identity-id <identity-id>`, `Identity ID.`)
@@ -116,7 +121,8 @@ users
116
121
  ),
117
122
  );
118
123
 
119
- users
124
+
125
+ const usersCreateMD5UserCommand = users
120
126
  .command(`create-md-5-user`)
121
127
  .description(`Create a new user. Password provided must be hashed with the [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`)
122
128
  .requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -130,7 +136,8 @@ users
130
136
  ),
131
137
  );
132
138
 
133
- users
139
+
140
+ const usersCreatePHPassUserCommand = users
134
141
  .command(`create-ph-pass-user`)
135
142
  .description(`Create a new user. Password provided must be hashed with the [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`)
136
143
  .requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or pass the string \`ID.unique()\`to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -144,7 +151,8 @@ users
144
151
  ),
145
152
  );
146
153
 
147
- users
154
+
155
+ const usersCreateScryptUserCommand = users
148
156
  .command(`create-scrypt-user`)
149
157
  .description(`Create a new user. Password provided must be hashed with the [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`)
150
158
  .requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -163,7 +171,8 @@ users
163
171
  ),
164
172
  );
165
173
 
166
- users
174
+
175
+ const usersCreateScryptModifiedUserCommand = users
167
176
  .command(`create-scrypt-modified-user`)
168
177
  .description(`Create a new user. Password provided must be hashed with the [Scrypt Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`)
169
178
  .requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -180,7 +189,8 @@ users
180
189
  ),
181
190
  );
182
191
 
183
- users
192
+
193
+ const usersCreateSHAUserCommand = users
184
194
  .command(`create-sha-user`)
185
195
  .description(`Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.`)
186
196
  .requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -195,7 +205,8 @@ users
195
205
  ),
196
206
  );
197
207
 
198
- users
208
+
209
+ const usersGetUsageCommand = users
199
210
  .command(`get-usage`)
200
211
  .description(`Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
201
212
  `)
@@ -207,7 +218,8 @@ users
207
218
  ),
208
219
  );
209
220
 
210
- users
221
+
222
+ const usersGetCommand = users
211
223
  .command(`get`)
212
224
  .description(`Get a user by its unique ID.`)
213
225
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -218,7 +230,8 @@ users
218
230
  ),
219
231
  );
220
232
 
221
- users
233
+
234
+ const usersDeleteCommand = users
222
235
  .command(`delete`)
223
236
  .description(`Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead.`)
224
237
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -229,7 +242,8 @@ users
229
242
  ),
230
243
  );
231
244
 
232
- users
245
+
246
+ const usersUpdateEmailCommand = users
233
247
  .command(`update-email`)
234
248
  .description(`Update the user email by its unique ID.`)
235
249
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -241,7 +255,8 @@ users
241
255
  ),
242
256
  );
243
257
 
244
- users
258
+
259
+ const usersUpdateImpersonatorCommand = users
245
260
  .command(`update-impersonator`)
246
261
  .description(`Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data.
247
262
  `)
@@ -254,7 +269,8 @@ users
254
269
  ),
255
270
  );
256
271
 
257
- users
272
+
273
+ const usersCreateJWTCommand = users
258
274
  .command(`create-jwt`)
259
275
  .description(`Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.`)
260
276
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -267,7 +283,8 @@ users
267
283
  ),
268
284
  );
269
285
 
270
- users
286
+
287
+ const usersUpdateLabelsCommand = users
271
288
  .command(`update-labels`)
272
289
  .description(`Update the user labels by its unique ID.
273
290
 
@@ -281,7 +298,8 @@ Labels can be used to grant access to resources. While teams are a way for user'
281
298
  ),
282
299
  );
283
300
 
284
- users
301
+
302
+ const usersListLogsCommand = users
285
303
  .command(`list-logs`)
286
304
  .description(`Get the user activity logs list by its unique ID.`)
287
305
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -299,7 +317,8 @@ users
299
317
  ),
300
318
  );
301
319
 
302
- users
320
+
321
+ const usersListMembershipsCommand = users
303
322
  .command(`list-memberships`)
304
323
  .description(`Get the user membership list by its unique ID.`)
305
324
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -318,7 +337,8 @@ users
318
337
  ),
319
338
  );
320
339
 
321
- users
340
+
341
+ const usersUpdateMfaCommand = users
322
342
  .command(`update-mfa`)
323
343
  .description(`Enable or disable MFA on a user account.`)
324
344
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -330,7 +350,8 @@ users
330
350
  ),
331
351
  );
332
352
 
333
- users
353
+
354
+ const usersDeleteMfaAuthenticatorCommand = users
334
355
  .command(`delete-mfa-authenticator`)
335
356
  .description(`Delete an authenticator app.`)
336
357
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -342,7 +363,8 @@ users
342
363
  ),
343
364
  );
344
365
 
345
- users
366
+
367
+ const usersListMfaFactorsCommand = users
346
368
  .command(`list-mfa-factors`)
347
369
  .description(`List the factors available on the account to be used as a MFA challange.`)
348
370
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -353,7 +375,8 @@ users
353
375
  ),
354
376
  );
355
377
 
356
- users
378
+
379
+ const usersGetMfaRecoveryCodesCommand = users
357
380
  .command(`get-mfa-recovery-codes`)
358
381
  .description(`Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.`)
359
382
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -364,7 +387,8 @@ users
364
387
  ),
365
388
  );
366
389
 
367
- users
390
+
391
+ const usersUpdateMfaRecoveryCodesCommand = users
368
392
  .command(`update-mfa-recovery-codes`)
369
393
  .description(`Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.`)
370
394
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -375,7 +399,8 @@ users
375
399
  ),
376
400
  );
377
401
 
378
- users
402
+
403
+ const usersCreateMfaRecoveryCodesCommand = users
379
404
  .command(`create-mfa-recovery-codes`)
380
405
  .description(`Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK.`)
381
406
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -386,7 +411,8 @@ users
386
411
  ),
387
412
  );
388
413
 
389
- users
414
+
415
+ const usersUpdateNameCommand = users
390
416
  .command(`update-name`)
391
417
  .description(`Update the user name by its unique ID.`)
392
418
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -398,7 +424,8 @@ users
398
424
  ),
399
425
  );
400
426
 
401
- users
427
+
428
+ const usersUpdatePasswordCommand = users
402
429
  .command(`update-password`)
403
430
  .description(`Update the user password by its unique ID.`)
404
431
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -410,7 +437,8 @@ users
410
437
  ),
411
438
  );
412
439
 
413
- users
440
+
441
+ const usersUpdatePhoneCommand = users
414
442
  .command(`update-phone`)
415
443
  .description(`Update the user phone by its unique ID.`)
416
444
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -422,7 +450,8 @@ users
422
450
  ),
423
451
  );
424
452
 
425
- users
453
+
454
+ const usersGetPrefsCommand = users
426
455
  .command(`get-prefs`)
427
456
  .description(`Get the user preferences by its unique ID.`)
428
457
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -433,7 +462,8 @@ users
433
462
  ),
434
463
  );
435
464
 
436
- users
465
+
466
+ const usersUpdatePrefsCommand = users
437
467
  .command(`update-prefs`)
438
468
  .description(`Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.`)
439
469
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -445,7 +475,8 @@ users
445
475
  ),
446
476
  );
447
477
 
448
- users
478
+
479
+ const usersListSessionsCommand = users
449
480
  .command(`list-sessions`)
450
481
  .description(`Get the user sessions list by its unique ID.`)
451
482
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -462,7 +493,8 @@ users
462
493
  ),
463
494
  );
464
495
 
465
- users
496
+
497
+ const usersCreateSessionCommand = users
466
498
  .command(`create-session`)
467
499
  .description(`Creates a session for a user. Returns an immediately usable session object.
468
500
 
@@ -475,7 +507,8 @@ If you want to generate a token for a custom authentication flow, use the [POST
475
507
  ),
476
508
  );
477
509
 
478
- users
510
+
511
+ const usersDeleteSessionsCommand = users
479
512
  .command(`delete-sessions`)
480
513
  .description(`Delete all user's sessions by using the user's unique ID.`)
481
514
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -486,7 +519,8 @@ users
486
519
  ),
487
520
  );
488
521
 
489
- users
522
+
523
+ const usersDeleteSessionCommand = users
490
524
  .command(`delete-session`)
491
525
  .description(`Delete a user sessions by its unique ID.`)
492
526
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -498,7 +532,8 @@ users
498
532
  ),
499
533
  );
500
534
 
501
- users
535
+
536
+ const usersUpdateStatusCommand = users
502
537
  .command(`update-status`)
503
538
  .description(`Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.`)
504
539
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -510,7 +545,8 @@ users
510
545
  ),
511
546
  );
512
547
 
513
- users
548
+
549
+ const usersListTargetsCommand = users
514
550
  .command(`list-targets`)
515
551
  .description(`List the messaging targets that are associated with a user.`)
516
552
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -528,7 +564,8 @@ users
528
564
  ),
529
565
  );
530
566
 
531
- users
567
+
568
+ const usersCreateTargetCommand = users
532
569
  .command(`create-target`)
533
570
  .description(`Create a messaging target.`)
534
571
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -544,7 +581,8 @@ users
544
581
  ),
545
582
  );
546
583
 
547
- users
584
+
585
+ const usersGetTargetCommand = users
548
586
  .command(`get-target`)
549
587
  .description(`Get a user's push notification target by ID.`)
550
588
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -556,7 +594,8 @@ users
556
594
  ),
557
595
  );
558
596
 
559
- users
597
+
598
+ const usersUpdateTargetCommand = users
560
599
  .command(`update-target`)
561
600
  .description(`Update a messaging target.`)
562
601
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -571,7 +610,8 @@ users
571
610
  ),
572
611
  );
573
612
 
574
- users
613
+
614
+ const usersDeleteTargetCommand = users
575
615
  .command(`delete-target`)
576
616
  .description(`Delete a messaging target.`)
577
617
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -583,7 +623,8 @@ users
583
623
  ),
584
624
  );
585
625
 
586
- users
626
+
627
+ const usersCreateTokenCommand = users
587
628
  .command(`create-token`)
588
629
  .description(`Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process.
589
630
  `)
@@ -597,7 +638,8 @@ users
597
638
  ),
598
639
  );
599
640
 
600
- users
641
+
642
+ const usersUpdateEmailVerificationCommand = users
601
643
  .command(`update-email-verification`)
602
644
  .description(`Update the user email verification status by its unique ID.`)
603
645
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -609,7 +651,8 @@ users
609
651
  ),
610
652
  );
611
653
 
612
- users
654
+
655
+ const usersUpdatePhoneVerificationCommand = users
613
656
  .command(`update-phone-verification`)
614
657
  .description(`Update the user phone verification status by its unique ID.`)
615
658
  .requiredOption(`--user-id <user-id>`, `User ID.`)
@@ -621,3 +664,4 @@ users
621
664
  ),
622
665
  );
623
666
 
667
+