appwrite-cli 6.1.0 → 6.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/README.md +3 -3
- package/docs/examples/messaging/create-push.md +5 -2
- package/docs/examples/messaging/update-push.md +3 -0
- package/docs/examples/projects/update-memberships-privacy.md +5 -0
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.js +3 -3
- package/lib/commands/account.js +4 -4
- package/lib/commands/assistant.js +1 -1
- package/lib/commands/databases.js +3 -3
- package/lib/commands/functions.js +4 -4
- package/lib/commands/init.js +1 -0
- package/lib/commands/messaging.js +43 -13
- package/lib/commands/migrations.js +14 -179
- package/lib/commands/organizations.js +48 -0
- package/lib/commands/project.js +1 -1
- package/lib/commands/projects.js +98 -45
- package/lib/commands/proxy.js +1 -1
- package/lib/commands/push.js +18 -15
- package/lib/commands/storage.js +2 -2
- package/lib/commands/teams.js +2 -2
- package/lib/commands/users.js +1 -1
- package/lib/commands/vcs.js +10 -10
- package/lib/config.js +1 -1
- package/lib/emulation/utils.js +13 -13
- package/lib/parser.js +1 -1
- package/lib/questions.js +25 -2
- package/lib/utils.js +13 -0
- package/package.json +1 -1
- package/scoop/appwrite.json +3 -3
- package/docs/examples/migrations/create-firebase-o-auth-migration.md +0 -3
- package/docs/examples/migrations/delete-firebase-auth.md +0 -1
- package/docs/examples/migrations/get-firebase-report-o-auth.md +0 -3
- package/docs/examples/migrations/list-firebase-projects.md +0 -1
package/lib/commands/projects.js
CHANGED
|
@@ -479,6 +479,49 @@ const projectsUpdateAuthSessionsLimit = async ({projectId,limit,parseOutput = tr
|
|
|
479
479
|
|
|
480
480
|
}
|
|
481
481
|
|
|
482
|
+
/**
|
|
483
|
+
* @typedef {Object} ProjectsUpdateMembershipsPrivacyRequestParams
|
|
484
|
+
* @property {string} projectId Project unique ID.
|
|
485
|
+
* @property {boolean} userName Set to true to show userName to members of a team.
|
|
486
|
+
* @property {boolean} userEmail Set to true to show email to members of a team.
|
|
487
|
+
* @property {boolean} mfa Set to true to show mfa to members of a team.
|
|
488
|
+
* @property {boolean} overrideForCli
|
|
489
|
+
* @property {boolean} parseOutput
|
|
490
|
+
* @property {libClient | undefined} sdk
|
|
491
|
+
*/
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* @param {ProjectsUpdateMembershipsPrivacyRequestParams} params
|
|
495
|
+
*/
|
|
496
|
+
const projectsUpdateMembershipsPrivacy = async ({projectId,userName,userEmail,mfa,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
497
|
+
let client = !sdk ? await sdkForConsole() :
|
|
498
|
+
sdk;
|
|
499
|
+
let apiPath = '/projects/{projectId}/auth/memberships-privacy'.replace('{projectId}', projectId);
|
|
500
|
+
let payload = {};
|
|
501
|
+
if (typeof userName !== 'undefined') {
|
|
502
|
+
payload['userName'] = userName;
|
|
503
|
+
}
|
|
504
|
+
if (typeof userEmail !== 'undefined') {
|
|
505
|
+
payload['userEmail'] = userEmail;
|
|
506
|
+
}
|
|
507
|
+
if (typeof mfa !== 'undefined') {
|
|
508
|
+
payload['mfa'] = mfa;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
let response = undefined;
|
|
512
|
+
|
|
513
|
+
response = await client.call('patch', apiPath, {
|
|
514
|
+
'content-type': 'application/json',
|
|
515
|
+
}, payload);
|
|
516
|
+
|
|
517
|
+
if (parseOutput) {
|
|
518
|
+
parse(response)
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
return response;
|
|
522
|
+
|
|
523
|
+
}
|
|
524
|
+
|
|
482
525
|
/**
|
|
483
526
|
* @typedef {Object} ProjectsUpdateMockNumbersRequestParams
|
|
484
527
|
* @property {string} projectId Project unique ID.
|
|
@@ -1896,7 +1939,7 @@ const projectsUpdateWebhookSignature = async ({projectId,webhookId,parseOutput =
|
|
|
1896
1939
|
|
|
1897
1940
|
projects
|
|
1898
1941
|
.command(`list`)
|
|
1899
|
-
.description(
|
|
1942
|
+
.description(`Get a list of all projects. You can use the query params to filter your results. `)
|
|
1900
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`)
|
|
1901
1944
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
1902
1945
|
.option(`--console`, `Get the resource console url`)
|
|
@@ -1904,7 +1947,7 @@ projects
|
|
|
1904
1947
|
|
|
1905
1948
|
projects
|
|
1906
1949
|
.command(`create`)
|
|
1907
|
-
.description(
|
|
1950
|
+
.description(`Create a new project. You can create a maximum of 100 projects per account. `)
|
|
1908
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.`)
|
|
1909
1952
|
.requiredOption(`--name <name>`, `Project name. Max length: 128 chars.`)
|
|
1910
1953
|
.requiredOption(`--team-id <team-id>`, `Team unique ID.`)
|
|
@@ -1922,14 +1965,14 @@ projects
|
|
|
1922
1965
|
|
|
1923
1966
|
projects
|
|
1924
1967
|
.command(`get`)
|
|
1925
|
-
.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. `)
|
|
1926
1969
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1927
1970
|
.option(`--console`, `Get the resource console url`)
|
|
1928
1971
|
.action(actionRunner(projectsGet))
|
|
1929
1972
|
|
|
1930
1973
|
projects
|
|
1931
1974
|
.command(`update`)
|
|
1932
|
-
.description(
|
|
1975
|
+
.description(`Update a project by its unique ID.`)
|
|
1933
1976
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1934
1977
|
.requiredOption(`--name <name>`, `Project name. Max length: 128 chars.`)
|
|
1935
1978
|
.option(`--description <description>`, `Project description. Max length: 256 chars.`)
|
|
@@ -1945,13 +1988,13 @@ projects
|
|
|
1945
1988
|
|
|
1946
1989
|
projects
|
|
1947
1990
|
.command(`delete`)
|
|
1948
|
-
.description(
|
|
1991
|
+
.description(`Delete a project by its unique ID.`)
|
|
1949
1992
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1950
1993
|
.action(actionRunner(projectsDelete))
|
|
1951
1994
|
|
|
1952
1995
|
projects
|
|
1953
1996
|
.command(`update-api-status`)
|
|
1954
|
-
.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.`)
|
|
1955
1998
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1956
1999
|
.requiredOption(`--api <api>`, `API name.`)
|
|
1957
2000
|
.requiredOption(`--status <status>`, `API status.`, parseBool)
|
|
@@ -1959,70 +2002,79 @@ projects
|
|
|
1959
2002
|
|
|
1960
2003
|
projects
|
|
1961
2004
|
.command(`update-api-status-all`)
|
|
1962
|
-
.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.`)
|
|
1963
2006
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1964
2007
|
.requiredOption(`--status <status>`, `API status.`, parseBool)
|
|
1965
2008
|
.action(actionRunner(projectsUpdateApiStatusAll))
|
|
1966
2009
|
|
|
1967
2010
|
projects
|
|
1968
2011
|
.command(`update-auth-duration`)
|
|
1969
|
-
.description(
|
|
2012
|
+
.description(`Update how long sessions created within a project should stay active for.`)
|
|
1970
2013
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1971
2014
|
.requiredOption(`--duration <duration>`, `Project session length in seconds. Max length: 31536000 seconds.`, parseInteger)
|
|
1972
2015
|
.action(actionRunner(projectsUpdateAuthDuration))
|
|
1973
2016
|
|
|
1974
2017
|
projects
|
|
1975
2018
|
.command(`update-auth-limit`)
|
|
1976
|
-
.description(
|
|
2019
|
+
.description(`Update the maximum number of users allowed in this project. Set to 0 for unlimited users. `)
|
|
1977
2020
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1978
2021
|
.requiredOption(`--limit <limit>`, `Set the max number of users allowed in this project. Use 0 for unlimited.`, parseInteger)
|
|
1979
2022
|
.action(actionRunner(projectsUpdateAuthLimit))
|
|
1980
2023
|
|
|
1981
2024
|
projects
|
|
1982
2025
|
.command(`update-auth-sessions-limit`)
|
|
1983
|
-
.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.`)
|
|
1984
2027
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1985
2028
|
.requiredOption(`--limit <limit>`, `Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10`, parseInteger)
|
|
1986
2029
|
.action(actionRunner(projectsUpdateAuthSessionsLimit))
|
|
1987
2030
|
|
|
2031
|
+
projects
|
|
2032
|
+
.command(`update-memberships-privacy`)
|
|
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
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2035
|
+
.requiredOption(`--user-name <user-name>`, `Set to true to show userName to members of a team.`, parseBool)
|
|
2036
|
+
.requiredOption(`--user-email <user-email>`, `Set to true to show email to members of a team.`, parseBool)
|
|
2037
|
+
.requiredOption(`--mfa <mfa>`, `Set to true to show mfa to members of a team.`, parseBool)
|
|
2038
|
+
.action(actionRunner(projectsUpdateMembershipsPrivacy))
|
|
2039
|
+
|
|
1988
2040
|
projects
|
|
1989
2041
|
.command(`update-mock-numbers`)
|
|
1990
|
-
.description(
|
|
2042
|
+
.description(`Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development. `)
|
|
1991
2043
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1992
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.`)
|
|
1993
2045
|
.action(actionRunner(projectsUpdateMockNumbers))
|
|
1994
2046
|
|
|
1995
2047
|
projects
|
|
1996
2048
|
.command(`update-auth-password-dictionary`)
|
|
1997
|
-
.description(
|
|
2049
|
+
.description(`Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords. `)
|
|
1998
2050
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1999
2051
|
.requiredOption(`--enabled <enabled>`, `Set whether or not to enable checking user's password against most commonly used passwords. Default is false.`, parseBool)
|
|
2000
2052
|
.action(actionRunner(projectsUpdateAuthPasswordDictionary))
|
|
2001
2053
|
|
|
2002
2054
|
projects
|
|
2003
2055
|
.command(`update-auth-password-history`)
|
|
2004
|
-
.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.`)
|
|
2005
2057
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2006
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)
|
|
2007
2059
|
.action(actionRunner(projectsUpdateAuthPasswordHistory))
|
|
2008
2060
|
|
|
2009
2061
|
projects
|
|
2010
2062
|
.command(`update-personal-data-check`)
|
|
2011
|
-
.description(
|
|
2063
|
+
.description(`Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords. `)
|
|
2012
2064
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2013
2065
|
.requiredOption(`--enabled <enabled>`, `Set whether or not to check a password for similarity with personal data. Default is false.`, parseBool)
|
|
2014
2066
|
.action(actionRunner(projectsUpdatePersonalDataCheck))
|
|
2015
2067
|
|
|
2016
2068
|
projects
|
|
2017
2069
|
.command(`update-session-alerts`)
|
|
2018
|
-
.description(
|
|
2070
|
+
.description(`Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.`)
|
|
2019
2071
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2020
2072
|
.requiredOption(`--alerts <alerts>`, `Set to true to enable session emails.`, parseBool)
|
|
2021
2073
|
.action(actionRunner(projectsUpdateSessionAlerts))
|
|
2022
2074
|
|
|
2023
2075
|
projects
|
|
2024
2076
|
.command(`update-auth-status`)
|
|
2025
|
-
.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. `)
|
|
2026
2078
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2027
2079
|
.requiredOption(`--method <method>`, `Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone`)
|
|
2028
2080
|
.requiredOption(`--status <status>`, `Set the status of this auth method.`, parseBool)
|
|
@@ -2030,7 +2082,7 @@ projects
|
|
|
2030
2082
|
|
|
2031
2083
|
projects
|
|
2032
2084
|
.command(`create-jwt`)
|
|
2033
|
-
.description(
|
|
2085
|
+
.description(`Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time. `)
|
|
2034
2086
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2035
2087
|
.requiredOption(`--scopes [scopes...]`, `List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.`)
|
|
2036
2088
|
.option(`--duration <duration>`, `Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.`, parseInteger)
|
|
@@ -2038,14 +2090,14 @@ projects
|
|
|
2038
2090
|
|
|
2039
2091
|
projects
|
|
2040
2092
|
.command(`list-keys`)
|
|
2041
|
-
.description(
|
|
2093
|
+
.description(`Get a list of all API keys from the current project. `)
|
|
2042
2094
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2043
2095
|
.option(`--console`, `Get the resource console url`)
|
|
2044
2096
|
.action(actionRunner(projectsListKeys))
|
|
2045
2097
|
|
|
2046
2098
|
projects
|
|
2047
2099
|
.command(`create-key`)
|
|
2048
|
-
.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.`)
|
|
2049
2101
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2050
2102
|
.requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
|
|
2051
2103
|
.requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`)
|
|
@@ -2054,7 +2106,7 @@ projects
|
|
|
2054
2106
|
|
|
2055
2107
|
projects
|
|
2056
2108
|
.command(`get-key`)
|
|
2057
|
-
.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.`)
|
|
2058
2110
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2059
2111
|
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
2060
2112
|
.option(`--console`, `Get the resource console url`)
|
|
@@ -2062,7 +2114,7 @@ projects
|
|
|
2062
2114
|
|
|
2063
2115
|
projects
|
|
2064
2116
|
.command(`update-key`)
|
|
2065
|
-
.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. `)
|
|
2066
2118
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2067
2119
|
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
2068
2120
|
.requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
|
|
@@ -2072,14 +2124,14 @@ projects
|
|
|
2072
2124
|
|
|
2073
2125
|
projects
|
|
2074
2126
|
.command(`delete-key`)
|
|
2075
|
-
.description(
|
|
2127
|
+
.description(`Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. `)
|
|
2076
2128
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2077
2129
|
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
2078
2130
|
.action(actionRunner(projectsDeleteKey))
|
|
2079
2131
|
|
|
2080
2132
|
projects
|
|
2081
2133
|
.command(`update-o-auth-2`)
|
|
2082
|
-
.description(
|
|
2134
|
+
.description(`Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers. `)
|
|
2083
2135
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2084
2136
|
.requiredOption(`--provider <provider>`, `Provider Name`)
|
|
2085
2137
|
.option(`--app-id <app-id>`, `Provider app ID. Max length: 256 chars.`)
|
|
@@ -2089,14 +2141,14 @@ projects
|
|
|
2089
2141
|
|
|
2090
2142
|
projects
|
|
2091
2143
|
.command(`list-platforms`)
|
|
2092
|
-
.description(
|
|
2144
|
+
.description(`Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations. `)
|
|
2093
2145
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2094
2146
|
.option(`--console`, `Get the resource console url`)
|
|
2095
2147
|
.action(actionRunner(projectsListPlatforms))
|
|
2096
2148
|
|
|
2097
2149
|
projects
|
|
2098
2150
|
.command(`create-platform`)
|
|
2099
|
-
.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.`)
|
|
2100
2152
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2101
2153
|
.requiredOption(`--type <type>`, `Platform type.`)
|
|
2102
2154
|
.requiredOption(`--name <name>`, `Platform name. Max length: 128 chars.`)
|
|
@@ -2107,7 +2159,7 @@ projects
|
|
|
2107
2159
|
|
|
2108
2160
|
projects
|
|
2109
2161
|
.command(`get-platform`)
|
|
2110
|
-
.description(
|
|
2162
|
+
.description(`Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations. `)
|
|
2111
2163
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2112
2164
|
.requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
|
|
2113
2165
|
.option(`--console`, `Get the resource console url`)
|
|
@@ -2115,7 +2167,7 @@ projects
|
|
|
2115
2167
|
|
|
2116
2168
|
projects
|
|
2117
2169
|
.command(`update-platform`)
|
|
2118
|
-
.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. `)
|
|
2119
2171
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2120
2172
|
.requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
|
|
2121
2173
|
.requiredOption(`--name <name>`, `Platform name. Max length: 128 chars.`)
|
|
@@ -2126,14 +2178,14 @@ projects
|
|
|
2126
2178
|
|
|
2127
2179
|
projects
|
|
2128
2180
|
.command(`delete-platform`)
|
|
2129
|
-
.description(
|
|
2181
|
+
.description(`Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project. `)
|
|
2130
2182
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2131
2183
|
.requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
|
|
2132
2184
|
.action(actionRunner(projectsDeletePlatform))
|
|
2133
2185
|
|
|
2134
2186
|
projects
|
|
2135
2187
|
.command(`update-service-status`)
|
|
2136
|
-
.description(
|
|
2188
|
+
.description(`Update the status of a specific service. Use this endpoint to enable or disable a service in your project. `)
|
|
2137
2189
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2138
2190
|
.requiredOption(`--service <service>`, `Service name.`)
|
|
2139
2191
|
.requiredOption(`--status <status>`, `Service status.`, parseBool)
|
|
@@ -2141,14 +2193,14 @@ projects
|
|
|
2141
2193
|
|
|
2142
2194
|
projects
|
|
2143
2195
|
.command(`update-service-status-all`)
|
|
2144
|
-
.description(
|
|
2196
|
+
.description(`Update the status of all services. Use this endpoint to enable or disable all optional services at once. `)
|
|
2145
2197
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2146
2198
|
.requiredOption(`--status <status>`, `Service status.`, parseBool)
|
|
2147
2199
|
.action(actionRunner(projectsUpdateServiceStatusAll))
|
|
2148
2200
|
|
|
2149
2201
|
projects
|
|
2150
2202
|
.command(`update-smtp`)
|
|
2151
|
-
.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. `)
|
|
2152
2204
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2153
2205
|
.requiredOption(`--enabled <enabled>`, `Enable custom SMTP service`, parseBool)
|
|
2154
2206
|
.option(`--sender-name <sender-name>`, `Name of the email sender`)
|
|
@@ -2163,7 +2215,7 @@ projects
|
|
|
2163
2215
|
|
|
2164
2216
|
projects
|
|
2165
2217
|
.command(`create-smtp-test`)
|
|
2166
|
-
.description(
|
|
2218
|
+
.description(`Send a test email to verify SMTP configuration. `)
|
|
2167
2219
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2168
2220
|
.requiredOption(`--emails [emails...]`, `Array of emails to send test email to. Maximum of 10 emails are allowed.`)
|
|
2169
2221
|
.requiredOption(`--sender-name <sender-name>`, `Name of the email sender`)
|
|
@@ -2178,14 +2230,14 @@ projects
|
|
|
2178
2230
|
|
|
2179
2231
|
projects
|
|
2180
2232
|
.command(`update-team`)
|
|
2181
|
-
.description(
|
|
2233
|
+
.description(`Update the team ID of a project allowing for it to be transferred to another team.`)
|
|
2182
2234
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2183
2235
|
.requiredOption(`--team-id <team-id>`, `Team ID of the team to transfer project to.`)
|
|
2184
2236
|
.action(actionRunner(projectsUpdateTeam))
|
|
2185
2237
|
|
|
2186
2238
|
projects
|
|
2187
2239
|
.command(`get-email-template`)
|
|
2188
|
-
.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. `)
|
|
2189
2241
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2190
2242
|
.requiredOption(`--type <type>`, `Template type`)
|
|
2191
2243
|
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
@@ -2193,7 +2245,7 @@ projects
|
|
|
2193
2245
|
|
|
2194
2246
|
projects
|
|
2195
2247
|
.command(`update-email-template`)
|
|
2196
|
-
.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.`)
|
|
2197
2249
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2198
2250
|
.requiredOption(`--type <type>`, `Template type`)
|
|
2199
2251
|
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
@@ -2206,7 +2258,7 @@ projects
|
|
|
2206
2258
|
|
|
2207
2259
|
projects
|
|
2208
2260
|
.command(`delete-email-template`)
|
|
2209
|
-
.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. `)
|
|
2210
2262
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2211
2263
|
.requiredOption(`--type <type>`, `Template type`)
|
|
2212
2264
|
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
@@ -2214,7 +2266,7 @@ projects
|
|
|
2214
2266
|
|
|
2215
2267
|
projects
|
|
2216
2268
|
.command(`get-sms-template`)
|
|
2217
|
-
.description(
|
|
2269
|
+
.description(`Get a custom SMS template for the specified locale and type returning it's contents.`)
|
|
2218
2270
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2219
2271
|
.requiredOption(`--type <type>`, `Template type`)
|
|
2220
2272
|
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
@@ -2222,7 +2274,7 @@ projects
|
|
|
2222
2274
|
|
|
2223
2275
|
projects
|
|
2224
2276
|
.command(`update-sms-template`)
|
|
2225
|
-
.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. `)
|
|
2226
2278
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2227
2279
|
.requiredOption(`--type <type>`, `Template type`)
|
|
2228
2280
|
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
@@ -2231,7 +2283,7 @@ projects
|
|
|
2231
2283
|
|
|
2232
2284
|
projects
|
|
2233
2285
|
.command(`delete-sms-template`)
|
|
2234
|
-
.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. `)
|
|
2235
2287
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2236
2288
|
.requiredOption(`--type <type>`, `Template type`)
|
|
2237
2289
|
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
@@ -2239,14 +2291,14 @@ projects
|
|
|
2239
2291
|
|
|
2240
2292
|
projects
|
|
2241
2293
|
.command(`list-webhooks`)
|
|
2242
|
-
.description(
|
|
2294
|
+
.description(`Get a list of all webhooks belonging to the project. You can use the query params to filter your results. `)
|
|
2243
2295
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2244
2296
|
.option(`--console`, `Get the resource console url`)
|
|
2245
2297
|
.action(actionRunner(projectsListWebhooks))
|
|
2246
2298
|
|
|
2247
2299
|
projects
|
|
2248
2300
|
.command(`create-webhook`)
|
|
2249
|
-
.description(
|
|
2301
|
+
.description(`Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. `)
|
|
2250
2302
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2251
2303
|
.requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
|
|
2252
2304
|
.requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
|
|
@@ -2259,7 +2311,7 @@ projects
|
|
|
2259
2311
|
|
|
2260
2312
|
projects
|
|
2261
2313
|
.command(`get-webhook`)
|
|
2262
|
-
.description(
|
|
2314
|
+
.description(`Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. `)
|
|
2263
2315
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2264
2316
|
.requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
|
|
2265
2317
|
.option(`--console`, `Get the resource console url`)
|
|
@@ -2267,7 +2319,7 @@ projects
|
|
|
2267
2319
|
|
|
2268
2320
|
projects
|
|
2269
2321
|
.command(`update-webhook`)
|
|
2270
|
-
.description(
|
|
2322
|
+
.description(`Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. `)
|
|
2271
2323
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2272
2324
|
.requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
|
|
2273
2325
|
.requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
|
|
@@ -2281,14 +2333,14 @@ projects
|
|
|
2281
2333
|
|
|
2282
2334
|
projects
|
|
2283
2335
|
.command(`delete-webhook`)
|
|
2284
|
-
.description(
|
|
2336
|
+
.description(`Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. `)
|
|
2285
2337
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2286
2338
|
.requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
|
|
2287
2339
|
.action(actionRunner(projectsDeleteWebhook))
|
|
2288
2340
|
|
|
2289
2341
|
projects
|
|
2290
2342
|
.command(`update-webhook-signature`)
|
|
2291
|
-
.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. `)
|
|
2292
2344
|
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
2293
2345
|
.requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
|
|
2294
2346
|
.action(actionRunner(projectsUpdateWebhookSignature))
|
|
@@ -2305,6 +2357,7 @@ module.exports = {
|
|
|
2305
2357
|
projectsUpdateAuthDuration,
|
|
2306
2358
|
projectsUpdateAuthLimit,
|
|
2307
2359
|
projectsUpdateAuthSessionsLimit,
|
|
2360
|
+
projectsUpdateMembershipsPrivacy,
|
|
2308
2361
|
projectsUpdateMockNumbers,
|
|
2309
2362
|
projectsUpdateAuthPasswordDictionary,
|
|
2310
2363
|
projectsUpdateAuthPasswordHistory,
|
package/lib/commands/proxy.js
CHANGED
|
@@ -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
|
|
package/lib/commands/push.js
CHANGED
|
@@ -450,12 +450,12 @@ const getObjectChanges = (remote, local, index, what) => {
|
|
|
450
450
|
return changes;
|
|
451
451
|
}
|
|
452
452
|
|
|
453
|
-
const createAttribute =
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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) {
|
|
@@ -1095,6 +1095,7 @@ const pushFunction = async ({ functionId, async, code, withVariables } = { retur
|
|
|
1095
1095
|
response = await functionsUpdate({
|
|
1096
1096
|
functionId: func['$id'],
|
|
1097
1097
|
name: func.name,
|
|
1098
|
+
specification: func.specification,
|
|
1098
1099
|
execute: func.execute,
|
|
1099
1100
|
events: func.events,
|
|
1100
1101
|
schedule: func.schedule,
|
|
@@ -1126,6 +1127,7 @@ const pushFunction = async ({ functionId, async, code, withVariables } = { retur
|
|
|
1126
1127
|
functionId: func.$id,
|
|
1127
1128
|
name: func.name,
|
|
1128
1129
|
runtime: func.runtime,
|
|
1130
|
+
specification: func.specification,
|
|
1129
1131
|
execute: func.execute,
|
|
1130
1132
|
events: func.events,
|
|
1131
1133
|
schedule: func.schedule,
|
|
@@ -1134,6 +1136,7 @@ const pushFunction = async ({ functionId, async, code, withVariables } = { retur
|
|
|
1134
1136
|
logging: func.logging,
|
|
1135
1137
|
entrypoint: func.entrypoint,
|
|
1136
1138
|
commands: func.commands,
|
|
1139
|
+
scopes: func.scopes,
|
|
1137
1140
|
vars: JSON.stringify(func.vars),
|
|
1138
1141
|
parseOutput: false
|
|
1139
1142
|
});
|
package/lib/commands/storage.js
CHANGED
|
@@ -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`)
|
package/lib/commands/teams.js
CHANGED
|
@@ -607,7 +607,7 @@ teams
|
|
|
607
607
|
|
|
608
608
|
teams
|
|
609
609
|
.command(`list-memberships`)
|
|
610
|
-
.description(`Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.`)
|
|
610
|
+
.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.`)
|
|
611
611
|
.requiredOption(`--team-id <team-id>`, `Team ID.`)
|
|
612
612
|
.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, teamId, invited, joined, confirm`)
|
|
613
613
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
@@ -627,7 +627,7 @@ teams
|
|
|
627
627
|
|
|
628
628
|
teams
|
|
629
629
|
.command(`get-membership`)
|
|
630
|
-
.description(`Get a team member by the membership unique id. All team members have read access for this resource.`)
|
|
630
|
+
.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.`)
|
|
631
631
|
.requiredOption(`--team-id <team-id>`, `Team ID.`)
|
|
632
632
|
.requiredOption(`--membership-id <membership-id>`, `Membership ID.`)
|
|
633
633
|
.action(actionRunner(teamsGetMembership))
|
package/lib/commands/users.js
CHANGED
|
@@ -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
|
|