appwrite-cli 6.2.0 → 6.2.3

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.
@@ -0,0 +1,48 @@
1
+ const { sdkForProject } = require('../sdks')
2
+ const { parse } = require('../parser')
3
+ const { showConsoleLink } = require('../utils.js');
4
+
5
+ /**
6
+ * @typedef {Object} OrganizationsListRequestParams
7
+ * @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, total, billingPlan
8
+ * @property {string} search Search term to filter your list results. Max length: 256 chars.
9
+ * @property {boolean} parseOutput
10
+ * @property {libClient | undefined} sdk
11
+ */
12
+
13
+ /**
14
+ * @param {OrganizationsListRequestParams} params
15
+ */
16
+ const organizationsList = async ({queries, search, parseOutput = true, sdk = undefined, console}) => {
17
+ let client = !sdk ? await sdkForProject() :
18
+ sdk;
19
+ let apiPath = '/organizations';
20
+ let payload = {};
21
+ if (typeof queries !== 'undefined') {
22
+ payload['queries'] = queries;
23
+ }
24
+ if (typeof search !== 'undefined') {
25
+ payload['search'] = search;
26
+ }
27
+
28
+ let response = undefined;
29
+
30
+ response = await client.call('get', apiPath, {
31
+ 'content-type': 'application/json',
32
+ }, payload);
33
+
34
+ if (parseOutput) {
35
+ if(console) {
36
+ showConsoleLink('organizations', 'list');
37
+ } else {
38
+ parse(response)
39
+ }
40
+ }
41
+
42
+ return response;
43
+
44
+ }
45
+
46
+ module.exports = {
47
+ organizationsList
48
+ }
@@ -252,7 +252,7 @@ const projectDeleteVariable = async ({variableId,parseOutput = true, overrideFor
252
252
 
253
253
  project
254
254
  .command(`get-usage`)
255
- .description(``)
255
+ .description(`Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period.`)
256
256
  .requiredOption(`--start-date <start-date>`, `Starting date for the usage`)
257
257
  .requiredOption(`--end-date <end-date>`, `End date for the usage`)
258
258
  .option(`--period <period>`, `Period used`)
@@ -1939,7 +1939,7 @@ const projectsUpdateWebhookSignature = async ({projectId,webhookId,parseOutput =
1939
1939
 
1940
1940
  projects
1941
1941
  .command(`list`)
1942
- .description(``)
1942
+ .description(`Get a list of all projects. You can use the query params to filter your results. `)
1943
1943
  .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`)
1944
1944
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
1945
1945
  .option(`--console`, `Get the resource console url`)
@@ -1947,7 +1947,7 @@ projects
1947
1947
 
1948
1948
  projects
1949
1949
  .command(`create`)
1950
- .description(``)
1950
+ .description(`Create a new project. You can create a maximum of 100 projects per account. `)
1951
1951
  .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.`)
1952
1952
  .requiredOption(`--name <name>`, `Project name. Max length: 128 chars.`)
1953
1953
  .requiredOption(`--team-id <team-id>`, `Team unique ID.`)
@@ -1965,14 +1965,14 @@ projects
1965
1965
 
1966
1966
  projects
1967
1967
  .command(`get`)
1968
- .description(``)
1968
+ .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. `)
1969
1969
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
1970
1970
  .option(`--console`, `Get the resource console url`)
1971
1971
  .action(actionRunner(projectsGet))
1972
1972
 
1973
1973
  projects
1974
1974
  .command(`update`)
1975
- .description(``)
1975
+ .description(`Update a project by its unique ID.`)
1976
1976
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
1977
1977
  .requiredOption(`--name <name>`, `Project name. Max length: 128 chars.`)
1978
1978
  .option(`--description <description>`, `Project description. Max length: 256 chars.`)
@@ -1988,13 +1988,13 @@ projects
1988
1988
 
1989
1989
  projects
1990
1990
  .command(`delete`)
1991
- .description(``)
1991
+ .description(`Delete a project by its unique ID.`)
1992
1992
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
1993
1993
  .action(actionRunner(projectsDelete))
1994
1994
 
1995
1995
  projects
1996
1996
  .command(`update-api-status`)
1997
- .description(``)
1997
+ .description(`Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.`)
1998
1998
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
1999
1999
  .requiredOption(`--api <api>`, `API name.`)
2000
2000
  .requiredOption(`--status <status>`, `API status.`, parseBool)
@@ -2002,35 +2002,35 @@ projects
2002
2002
 
2003
2003
  projects
2004
2004
  .command(`update-api-status-all`)
2005
- .description(``)
2005
+ .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.`)
2006
2006
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2007
2007
  .requiredOption(`--status <status>`, `API status.`, parseBool)
2008
2008
  .action(actionRunner(projectsUpdateApiStatusAll))
2009
2009
 
2010
2010
  projects
2011
2011
  .command(`update-auth-duration`)
2012
- .description(``)
2012
+ .description(`Update how long sessions created within a project should stay active for.`)
2013
2013
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2014
2014
  .requiredOption(`--duration <duration>`, `Project session length in seconds. Max length: 31536000 seconds.`, parseInteger)
2015
2015
  .action(actionRunner(projectsUpdateAuthDuration))
2016
2016
 
2017
2017
  projects
2018
2018
  .command(`update-auth-limit`)
2019
- .description(``)
2019
+ .description(`Update the maximum number of users allowed in this project. Set to 0 for unlimited users. `)
2020
2020
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2021
2021
  .requiredOption(`--limit <limit>`, `Set the max number of users allowed in this project. Use 0 for unlimited.`, parseInteger)
2022
2022
  .action(actionRunner(projectsUpdateAuthLimit))
2023
2023
 
2024
2024
  projects
2025
2025
  .command(`update-auth-sessions-limit`)
2026
- .description(``)
2026
+ .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.`)
2027
2027
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2028
2028
  .requiredOption(`--limit <limit>`, `Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10`, parseInteger)
2029
2029
  .action(actionRunner(projectsUpdateAuthSessionsLimit))
2030
2030
 
2031
2031
  projects
2032
2032
  .command(`update-memberships-privacy`)
2033
- .description(``)
2033
+ .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. `)
2034
2034
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2035
2035
  .requiredOption(`--user-name <user-name>`, `Set to true to show userName to members of a team.`, parseBool)
2036
2036
  .requiredOption(`--user-email <user-email>`, `Set to true to show email to members of a team.`, parseBool)
@@ -2039,42 +2039,42 @@ projects
2039
2039
 
2040
2040
  projects
2041
2041
  .command(`update-mock-numbers`)
2042
- .description(``)
2042
+ .description(`Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development. `)
2043
2043
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2044
2044
  .requiredOption(`--numbers [numbers...]`, `An array of mock numbers and their corresponding verification codes (OTPs). Each number should be a valid E.164 formatted phone number. Maximum of 10 numbers are allowed.`)
2045
2045
  .action(actionRunner(projectsUpdateMockNumbers))
2046
2046
 
2047
2047
  projects
2048
2048
  .command(`update-auth-password-dictionary`)
2049
- .description(``)
2049
+ .description(`Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords. `)
2050
2050
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2051
2051
  .requiredOption(`--enabled <enabled>`, `Set whether or not to enable checking user's password against most commonly used passwords. Default is false.`, parseBool)
2052
2052
  .action(actionRunner(projectsUpdateAuthPasswordDictionary))
2053
2053
 
2054
2054
  projects
2055
2055
  .command(`update-auth-password-history`)
2056
- .description(``)
2056
+ .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.`)
2057
2057
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2058
2058
  .requiredOption(`--limit <limit>`, `Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0`, parseInteger)
2059
2059
  .action(actionRunner(projectsUpdateAuthPasswordHistory))
2060
2060
 
2061
2061
  projects
2062
2062
  .command(`update-personal-data-check`)
2063
- .description(``)
2063
+ .description(`Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords. `)
2064
2064
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2065
2065
  .requiredOption(`--enabled <enabled>`, `Set whether or not to check a password for similarity with personal data. Default is false.`, parseBool)
2066
2066
  .action(actionRunner(projectsUpdatePersonalDataCheck))
2067
2067
 
2068
2068
  projects
2069
2069
  .command(`update-session-alerts`)
2070
- .description(``)
2070
+ .description(`Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.`)
2071
2071
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2072
2072
  .requiredOption(`--alerts <alerts>`, `Set to true to enable session emails.`, parseBool)
2073
2073
  .action(actionRunner(projectsUpdateSessionAlerts))
2074
2074
 
2075
2075
  projects
2076
2076
  .command(`update-auth-status`)
2077
- .description(``)
2077
+ .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. `)
2078
2078
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2079
2079
  .requiredOption(`--method <method>`, `Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone`)
2080
2080
  .requiredOption(`--status <status>`, `Set the status of this auth method.`, parseBool)
@@ -2082,7 +2082,7 @@ projects
2082
2082
 
2083
2083
  projects
2084
2084
  .command(`create-jwt`)
2085
- .description(``)
2085
+ .description(`Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time. `)
2086
2086
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2087
2087
  .requiredOption(`--scopes [scopes...]`, `List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.`)
2088
2088
  .option(`--duration <duration>`, `Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.`, parseInteger)
@@ -2090,14 +2090,14 @@ projects
2090
2090
 
2091
2091
  projects
2092
2092
  .command(`list-keys`)
2093
- .description(``)
2093
+ .description(`Get a list of all API keys from the current project. `)
2094
2094
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2095
2095
  .option(`--console`, `Get the resource console url`)
2096
2096
  .action(actionRunner(projectsListKeys))
2097
2097
 
2098
2098
  projects
2099
2099
  .command(`create-key`)
2100
- .description(``)
2100
+ .description(`Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.`)
2101
2101
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2102
2102
  .requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
2103
2103
  .requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`)
@@ -2106,7 +2106,7 @@ projects
2106
2106
 
2107
2107
  projects
2108
2108
  .command(`get-key`)
2109
- .description(``)
2109
+ .description(`Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.`)
2110
2110
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2111
2111
  .requiredOption(`--key-id <key-id>`, `Key unique ID.`)
2112
2112
  .option(`--console`, `Get the resource console url`)
@@ -2114,7 +2114,7 @@ projects
2114
2114
 
2115
2115
  projects
2116
2116
  .command(`update-key`)
2117
- .description(``)
2117
+ .description(`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. `)
2118
2118
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2119
2119
  .requiredOption(`--key-id <key-id>`, `Key unique ID.`)
2120
2120
  .requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
@@ -2124,14 +2124,14 @@ projects
2124
2124
 
2125
2125
  projects
2126
2126
  .command(`delete-key`)
2127
- .description(``)
2127
+ .description(`Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. `)
2128
2128
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2129
2129
  .requiredOption(`--key-id <key-id>`, `Key unique ID.`)
2130
2130
  .action(actionRunner(projectsDeleteKey))
2131
2131
 
2132
2132
  projects
2133
2133
  .command(`update-o-auth-2`)
2134
- .description(``)
2134
+ .description(`Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers. `)
2135
2135
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2136
2136
  .requiredOption(`--provider <provider>`, `Provider Name`)
2137
2137
  .option(`--app-id <app-id>`, `Provider app ID. Max length: 256 chars.`)
@@ -2141,14 +2141,14 @@ projects
2141
2141
 
2142
2142
  projects
2143
2143
  .command(`list-platforms`)
2144
- .description(``)
2144
+ .description(`Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations. `)
2145
2145
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2146
2146
  .option(`--console`, `Get the resource console url`)
2147
2147
  .action(actionRunner(projectsListPlatforms))
2148
2148
 
2149
2149
  projects
2150
2150
  .command(`create-platform`)
2151
- .description(``)
2151
+ .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.`)
2152
2152
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2153
2153
  .requiredOption(`--type <type>`, `Platform type.`)
2154
2154
  .requiredOption(`--name <name>`, `Platform name. Max length: 128 chars.`)
@@ -2159,7 +2159,7 @@ projects
2159
2159
 
2160
2160
  projects
2161
2161
  .command(`get-platform`)
2162
- .description(``)
2162
+ .description(`Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations. `)
2163
2163
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2164
2164
  .requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
2165
2165
  .option(`--console`, `Get the resource console url`)
@@ -2167,7 +2167,7 @@ projects
2167
2167
 
2168
2168
  projects
2169
2169
  .command(`update-platform`)
2170
- .description(``)
2170
+ .description(`Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname. `)
2171
2171
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2172
2172
  .requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
2173
2173
  .requiredOption(`--name <name>`, `Platform name. Max length: 128 chars.`)
@@ -2178,14 +2178,14 @@ projects
2178
2178
 
2179
2179
  projects
2180
2180
  .command(`delete-platform`)
2181
- .description(``)
2181
+ .description(`Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project. `)
2182
2182
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2183
2183
  .requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
2184
2184
  .action(actionRunner(projectsDeletePlatform))
2185
2185
 
2186
2186
  projects
2187
2187
  .command(`update-service-status`)
2188
- .description(``)
2188
+ .description(`Update the status of a specific service. Use this endpoint to enable or disable a service in your project. `)
2189
2189
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2190
2190
  .requiredOption(`--service <service>`, `Service name.`)
2191
2191
  .requiredOption(`--status <status>`, `Service status.`, parseBool)
@@ -2193,14 +2193,14 @@ projects
2193
2193
 
2194
2194
  projects
2195
2195
  .command(`update-service-status-all`)
2196
- .description(``)
2196
+ .description(`Update the status of all services. Use this endpoint to enable or disable all optional services at once. `)
2197
2197
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2198
2198
  .requiredOption(`--status <status>`, `Service status.`, parseBool)
2199
2199
  .action(actionRunner(projectsUpdateServiceStatusAll))
2200
2200
 
2201
2201
  projects
2202
2202
  .command(`update-smtp`)
2203
- .description(``)
2203
+ .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. `)
2204
2204
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2205
2205
  .requiredOption(`--enabled <enabled>`, `Enable custom SMTP service`, parseBool)
2206
2206
  .option(`--sender-name <sender-name>`, `Name of the email sender`)
@@ -2215,7 +2215,7 @@ projects
2215
2215
 
2216
2216
  projects
2217
2217
  .command(`create-smtp-test`)
2218
- .description(``)
2218
+ .description(`Send a test email to verify SMTP configuration. `)
2219
2219
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2220
2220
  .requiredOption(`--emails [emails...]`, `Array of emails to send test email to. Maximum of 10 emails are allowed.`)
2221
2221
  .requiredOption(`--sender-name <sender-name>`, `Name of the email sender`)
@@ -2230,14 +2230,14 @@ projects
2230
2230
 
2231
2231
  projects
2232
2232
  .command(`update-team`)
2233
- .description(``)
2233
+ .description(`Update the team ID of a project allowing for it to be transferred to another team.`)
2234
2234
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2235
2235
  .requiredOption(`--team-id <team-id>`, `Team ID of the team to transfer project to.`)
2236
2236
  .action(actionRunner(projectsUpdateTeam))
2237
2237
 
2238
2238
  projects
2239
2239
  .command(`get-email-template`)
2240
- .description(``)
2240
+ .description(`Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details. `)
2241
2241
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2242
2242
  .requiredOption(`--type <type>`, `Template type`)
2243
2243
  .requiredOption(`--locale <locale>`, `Template locale`)
@@ -2245,7 +2245,7 @@ projects
2245
2245
 
2246
2246
  projects
2247
2247
  .command(`update-email-template`)
2248
- .description(``)
2248
+ .description(`Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.`)
2249
2249
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2250
2250
  .requiredOption(`--type <type>`, `Template type`)
2251
2251
  .requiredOption(`--locale <locale>`, `Template locale`)
@@ -2258,7 +2258,7 @@ projects
2258
2258
 
2259
2259
  projects
2260
2260
  .command(`delete-email-template`)
2261
- .description(``)
2261
+ .description(`Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state. `)
2262
2262
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2263
2263
  .requiredOption(`--type <type>`, `Template type`)
2264
2264
  .requiredOption(`--locale <locale>`, `Template locale`)
@@ -2266,7 +2266,7 @@ projects
2266
2266
 
2267
2267
  projects
2268
2268
  .command(`get-sms-template`)
2269
- .description(``)
2269
+ .description(`Get a custom SMS template for the specified locale and type returning it's contents.`)
2270
2270
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2271
2271
  .requiredOption(`--type <type>`, `Template type`)
2272
2272
  .requiredOption(`--locale <locale>`, `Template locale`)
@@ -2274,7 +2274,7 @@ projects
2274
2274
 
2275
2275
  projects
2276
2276
  .command(`update-sms-template`)
2277
- .description(``)
2277
+ .description(`Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. `)
2278
2278
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2279
2279
  .requiredOption(`--type <type>`, `Template type`)
2280
2280
  .requiredOption(`--locale <locale>`, `Template locale`)
@@ -2283,7 +2283,7 @@ projects
2283
2283
 
2284
2284
  projects
2285
2285
  .command(`delete-sms-template`)
2286
- .description(``)
2286
+ .description(`Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. `)
2287
2287
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2288
2288
  .requiredOption(`--type <type>`, `Template type`)
2289
2289
  .requiredOption(`--locale <locale>`, `Template locale`)
@@ -2291,14 +2291,14 @@ projects
2291
2291
 
2292
2292
  projects
2293
2293
  .command(`list-webhooks`)
2294
- .description(``)
2294
+ .description(`Get a list of all webhooks belonging to the project. You can use the query params to filter your results. `)
2295
2295
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2296
2296
  .option(`--console`, `Get the resource console url`)
2297
2297
  .action(actionRunner(projectsListWebhooks))
2298
2298
 
2299
2299
  projects
2300
2300
  .command(`create-webhook`)
2301
- .description(``)
2301
+ .description(`Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. `)
2302
2302
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2303
2303
  .requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
2304
2304
  .requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
@@ -2311,7 +2311,7 @@ projects
2311
2311
 
2312
2312
  projects
2313
2313
  .command(`get-webhook`)
2314
- .description(``)
2314
+ .description(`Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. `)
2315
2315
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2316
2316
  .requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
2317
2317
  .option(`--console`, `Get the resource console url`)
@@ -2319,7 +2319,7 @@ projects
2319
2319
 
2320
2320
  projects
2321
2321
  .command(`update-webhook`)
2322
- .description(``)
2322
+ .description(`Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. `)
2323
2323
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2324
2324
  .requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
2325
2325
  .requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
@@ -2333,14 +2333,14 @@ projects
2333
2333
 
2334
2334
  projects
2335
2335
  .command(`delete-webhook`)
2336
- .description(``)
2336
+ .description(`Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. `)
2337
2337
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2338
2338
  .requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
2339
2339
  .action(actionRunner(projectsDeleteWebhook))
2340
2340
 
2341
2341
  projects
2342
2342
  .command(`update-webhook-signature`)
2343
- .description(``)
2343
+ .description(`Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook. `)
2344
2344
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2345
2345
  .requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
2346
2346
  .action(actionRunner(projectsUpdateWebhookSignature))
@@ -241,7 +241,7 @@ proxy
241
241
 
242
242
  proxy
243
243
  .command(`update-rule-verification`)
244
- .description(``)
244
+ .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.`)
245
245
  .requiredOption(`--rule-id <rule-id>`, `Rule ID.`)
246
246
  .action(actionRunner(proxyUpdateRuleVerification))
247
247
 
@@ -450,12 +450,12 @@ const getObjectChanges = (remote, local, index, what) => {
450
450
  return changes;
451
451
  }
452
452
 
453
- const createAttribute = async (databaseId, collectionId, attribute) => {
453
+ const createAttribute = (databaseId, collectionId, attribute) => {
454
454
  switch (attribute.type) {
455
455
  case 'string':
456
456
  switch (attribute.format) {
457
457
  case 'email':
458
- return await databasesCreateEmailAttribute({
458
+ return databasesCreateEmailAttribute({
459
459
  databaseId,
460
460
  collectionId,
461
461
  key: attribute.key,
@@ -465,7 +465,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
465
465
  parseOutput: false
466
466
  })
467
467
  case 'url':
468
- return await databasesCreateUrlAttribute({
468
+ return databasesCreateUrlAttribute({
469
469
  databaseId,
470
470
  collectionId,
471
471
  key: attribute.key,
@@ -475,7 +475,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
475
475
  parseOutput: false
476
476
  })
477
477
  case 'ip':
478
- return await databasesCreateIpAttribute({
478
+ return databasesCreateIpAttribute({
479
479
  databaseId,
480
480
  collectionId,
481
481
  key: attribute.key,
@@ -485,7 +485,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
485
485
  parseOutput: false
486
486
  })
487
487
  case 'enum':
488
- return await databasesCreateEnumAttribute({
488
+ return databasesCreateEnumAttribute({
489
489
  databaseId,
490
490
  collectionId,
491
491
  key: attribute.key,
@@ -496,7 +496,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
496
496
  parseOutput: false
497
497
  })
498
498
  default:
499
- return await databasesCreateStringAttribute({
499
+ return databasesCreateStringAttribute({
500
500
  databaseId,
501
501
  collectionId,
502
502
  key: attribute.key,
@@ -509,7 +509,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
509
509
 
510
510
  }
511
511
  case 'integer':
512
- return await databasesCreateIntegerAttribute({
512
+ return databasesCreateIntegerAttribute({
513
513
  databaseId,
514
514
  collectionId,
515
515
  key: attribute.key,
@@ -567,12 +567,12 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
567
567
  }
568
568
  }
569
569
 
570
- const updateAttribute = async (databaseId, collectionId, attribute) => {
570
+ const updateAttribute = (databaseId, collectionId, attribute) => {
571
571
  switch (attribute.type) {
572
572
  case 'string':
573
573
  switch (attribute.format) {
574
574
  case 'email':
575
- return await databasesUpdateEmailAttribute({
575
+ return databasesUpdateEmailAttribute({
576
576
  databaseId,
577
577
  collectionId,
578
578
  key: attribute.key,
@@ -582,7 +582,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => {
582
582
  parseOutput: false
583
583
  })
584
584
  case 'url':
585
- return await databasesUpdateUrlAttribute({
585
+ return databasesUpdateUrlAttribute({
586
586
  databaseId,
587
587
  collectionId,
588
588
  key: attribute.key,
@@ -592,7 +592,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => {
592
592
  parseOutput: false
593
593
  })
594
594
  case 'ip':
595
- return await databasesUpdateIpAttribute({
595
+ return databasesUpdateIpAttribute({
596
596
  databaseId,
597
597
  collectionId,
598
598
  key: attribute.key,
@@ -602,7 +602,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => {
602
602
  parseOutput: false
603
603
  })
604
604
  case 'enum':
605
- return await databasesUpdateEnumAttribute({
605
+ return databasesUpdateEnumAttribute({
606
606
  databaseId,
607
607
  collectionId,
608
608
  key: attribute.key,
@@ -613,7 +613,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => {
613
613
  parseOutput: false
614
614
  })
615
615
  default:
616
- return await databasesUpdateStringAttribute({
616
+ return databasesUpdateStringAttribute({
617
617
  databaseId,
618
618
  collectionId,
619
619
  key: attribute.key,
@@ -626,7 +626,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => {
626
626
 
627
627
  }
628
628
  case 'integer':
629
- return await databasesUpdateIntegerAttribute({
629
+ return databasesUpdateIntegerAttribute({
630
630
  databaseId,
631
631
  collectionId,
632
632
  key: attribute.key,
@@ -882,7 +882,7 @@ const createAttributes = async (attributes, collection) => {
882
882
  const result = await awaitPools.expectAttributes(
883
883
  collection['databaseId'],
884
884
  collection['$id'],
885
- collection.attributes.map(attribute => attribute.key)
885
+ collection.attributes.filter(attribute => attribute.side !== 'child').map(attribute => attribute.key)
886
886
  );
887
887
 
888
888
  if (!result) {
@@ -952,13 +952,13 @@ storage
952
952
 
953
953
  storage
954
954
  .command(`get-usage`)
955
- .description(``)
955
+ .description(`Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. 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. `)
956
956
  .option(`--range <range>`, `Date range.`)
957
957
  .action(actionRunner(storageGetUsage))
958
958
 
959
959
  storage
960
960
  .command(`get-bucket-usage`)
961
- .description(``)
961
+ .description(`Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. 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. `)
962
962
  .requiredOption(`--bucket-id <bucket-id>`, `Bucket ID.`)
963
963
  .option(`--range <range>`, `Date range.`)
964
964
  .option(`--console`, `Get the resource console url`)
@@ -1768,7 +1768,7 @@ users
1768
1768
 
1769
1769
  users
1770
1770
  .command(`get-usage`)
1771
- .description(``)
1771
+ .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. `)
1772
1772
  .option(`--range <range>`, `Date range.`)
1773
1773
  .action(actionRunner(usersGetUsage))
1774
1774