appwrite-cli 2.0.1 → 3.0.0
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/README.md +11 -6
- package/docs/examples/account/delete-identity.md +2 -0
- package/docs/examples/account/list-identities.md +2 -0
- package/docs/examples/assistant/chat.md +2 -0
- package/docs/examples/databases/create-collection.md +1 -0
- package/docs/examples/databases/create-string-attribute.md +1 -0
- package/docs/examples/databases/create.md +2 -1
- package/docs/examples/databases/list-attributes.md +2 -1
- package/docs/examples/databases/list-indexes.md +2 -1
- package/docs/examples/databases/update.md +2 -1
- package/docs/examples/functions/create-deployment.md +3 -2
- package/docs/examples/functions/create-execution.md +3 -0
- package/docs/examples/functions/create.md +12 -0
- package/docs/examples/functions/download-deployment.md +3 -0
- package/docs/examples/functions/update.md +9 -0
- package/docs/examples/health/get-pub-sub.md +1 -0
- package/docs/examples/health/get-queue.md +1 -0
- package/docs/examples/locale/list-codes.md +1 -0
- package/docs/examples/migrations/create-appwrite-migration.md +5 -0
- package/docs/examples/migrations/create-firebase-migration.md +3 -0
- package/docs/examples/migrations/create-firebase-o-auth-migration.md +3 -0
- package/docs/examples/migrations/create-n-host-migration.md +9 -0
- package/docs/examples/migrations/create-supabase-migration.md +8 -0
- package/docs/examples/migrations/delete-firebase-auth.md +1 -0
- package/docs/examples/migrations/delete.md +2 -0
- package/docs/examples/migrations/get-appwrite-report.md +5 -0
- package/docs/examples/migrations/get-firebase-report-o-auth.md +3 -0
- package/docs/examples/migrations/get-firebase-report.md +3 -0
- package/docs/examples/migrations/get-n-host-report.md +9 -0
- package/docs/examples/migrations/get-supabase-report.md +8 -0
- package/docs/examples/migrations/get.md +2 -0
- package/docs/examples/migrations/list-firebase-projects.md +1 -0
- package/docs/examples/migrations/list.md +3 -0
- package/docs/examples/migrations/retry.md +2 -0
- package/docs/examples/project/create-variable.md +3 -0
- package/docs/examples/project/delete-variable.md +2 -0
- package/docs/examples/project/get-usage.md +2 -0
- package/docs/examples/project/get-variable.md +2 -0
- package/docs/examples/project/list-variables.md +1 -0
- package/docs/examples/project/update-variable.md +4 -0
- package/docs/examples/projects/create.md +1 -1
- package/docs/examples/projects/delete-email-template.md +4 -0
- package/docs/examples/projects/delete-sms-template.md +4 -0
- package/docs/examples/projects/delete.md +1 -2
- package/docs/examples/projects/get-email-template.md +4 -0
- package/docs/examples/projects/get-sms-template.md +4 -0
- package/docs/examples/projects/update-email-template.md +9 -0
- package/docs/examples/projects/update-personal-data-check.md +3 -0
- package/docs/examples/projects/update-service-status-all.md +3 -0
- package/docs/examples/projects/update-sms-template.md +5 -0
- package/docs/examples/projects/update-smtp-configuration.md +11 -0
- package/docs/examples/projects/update-team.md +3 -0
- package/docs/examples/proxy/create-rule.md +4 -0
- package/docs/examples/proxy/delete-rule.md +2 -0
- package/docs/examples/proxy/get-rule.md +2 -0
- package/docs/examples/proxy/list-rules.md +3 -0
- package/docs/examples/proxy/update-rule-verification.md +2 -0
- package/docs/examples/storage/update-file.md +1 -0
- package/docs/examples/teams/{update-membership-roles.md → update-membership.md} +1 -1
- package/docs/examples/users/delete-identity.md +2 -0
- package/docs/examples/users/list-identities.md +3 -0
- package/docs/examples/users/update-labels.md +3 -0
- package/docs/examples/vcs/create-repository-detection.md +4 -0
- package/docs/examples/vcs/create-repository.md +4 -0
- package/docs/examples/vcs/delete-installation.md +2 -0
- package/docs/examples/vcs/get-installation.md +2 -0
- package/docs/examples/vcs/get-repository.md +3 -0
- package/docs/examples/vcs/list-installations.md +3 -0
- package/docs/examples/vcs/list-repositories.md +3 -0
- package/docs/examples/vcs/list-repository-branches.md +3 -0
- package/docs/examples/vcs/update-external-deployments.md +4 -0
- package/index.js +10 -0
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.js +3 -3
- package/lib/commands/account.js +122 -67
- package/lib/commands/assistant.js +53 -0
- package/lib/commands/avatars.js +21 -21
- package/lib/commands/console.js +2 -2
- package/lib/commands/databases.js +146 -104
- package/lib/commands/functions.js +277 -70
- package/lib/commands/generic.js +1 -0
- package/lib/commands/graphql.js +4 -4
- package/lib/commands/health.js +68 -22
- package/lib/commands/locale.js +37 -14
- package/lib/commands/migrations.js +708 -0
- package/lib/commands/project.js +204 -0
- package/lib/commands/projects.js +459 -196
- package/lib/commands/proxy.js +177 -0
- package/lib/commands/storage.js +47 -40
- package/lib/commands/teams.js +33 -33
- package/lib/commands/users.js +147 -52
- package/lib/commands/vcs.js +305 -0
- package/lib/config.js +1 -2
- package/lib/parser.js +2 -2
- package/package.json +1 -1
- package/scoop/appwrite.json +30 -0
- package/docs/examples/projects/create-domain.md +0 -3
- package/docs/examples/projects/delete-domain.md +0 -3
- package/docs/examples/projects/get-domain.md +0 -3
- package/docs/examples/projects/list-domains.md +0 -2
- package/docs/examples/projects/update-domain-verification.md +0 -3
package/lib/commands/avatars.js
CHANGED
|
@@ -21,7 +21,7 @@ const avatarsGetBrowser = async ({ code, width, height, quality, parseOutput = t
|
|
|
21
21
|
/* @param {number} quality */
|
|
22
22
|
|
|
23
23
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
24
|
-
let
|
|
24
|
+
let apiPath = '/avatars/browsers/{code}'.replace('{code}', code);
|
|
25
25
|
let payload = {};
|
|
26
26
|
|
|
27
27
|
/** Query Params */
|
|
@@ -37,9 +37,9 @@ const avatarsGetBrowser = async ({ code, width, height, quality, parseOutput = t
|
|
|
37
37
|
payload['project'] = localConfig.getProject().projectId
|
|
38
38
|
payload['key'] = globalConfig.getKey();
|
|
39
39
|
const queryParams = new URLSearchParams(payload);
|
|
40
|
-
|
|
40
|
+
apiPath = `${globalConfig.getEndpoint()}${apiPath}?${queryParams.toString()}`;
|
|
41
41
|
|
|
42
|
-
const response = await client.call('get',
|
|
42
|
+
const response = await client.call('get', apiPath, {
|
|
43
43
|
'content-type': 'application/json',
|
|
44
44
|
}, payload, 'arraybuffer');
|
|
45
45
|
|
|
@@ -58,7 +58,7 @@ const avatarsGetCreditCard = async ({ code, width, height, quality, parseOutput
|
|
|
58
58
|
/* @param {number} quality */
|
|
59
59
|
|
|
60
60
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
61
|
-
let
|
|
61
|
+
let apiPath = '/avatars/credit-cards/{code}'.replace('{code}', code);
|
|
62
62
|
let payload = {};
|
|
63
63
|
|
|
64
64
|
/** Query Params */
|
|
@@ -74,9 +74,9 @@ const avatarsGetCreditCard = async ({ code, width, height, quality, parseOutput
|
|
|
74
74
|
payload['project'] = localConfig.getProject().projectId
|
|
75
75
|
payload['key'] = globalConfig.getKey();
|
|
76
76
|
const queryParams = new URLSearchParams(payload);
|
|
77
|
-
|
|
77
|
+
apiPath = `${globalConfig.getEndpoint()}${apiPath}?${queryParams.toString()}`;
|
|
78
78
|
|
|
79
|
-
const response = await client.call('get',
|
|
79
|
+
const response = await client.call('get', apiPath, {
|
|
80
80
|
'content-type': 'application/json',
|
|
81
81
|
}, payload, 'arraybuffer');
|
|
82
82
|
|
|
@@ -92,7 +92,7 @@ const avatarsGetFavicon = async ({ url, parseOutput = true, sdk = undefined, des
|
|
|
92
92
|
/* @param {string} url */
|
|
93
93
|
|
|
94
94
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
95
|
-
let
|
|
95
|
+
let apiPath = '/avatars/favicon';
|
|
96
96
|
let payload = {};
|
|
97
97
|
|
|
98
98
|
/** Query Params */
|
|
@@ -102,9 +102,9 @@ const avatarsGetFavicon = async ({ url, parseOutput = true, sdk = undefined, des
|
|
|
102
102
|
payload['project'] = localConfig.getProject().projectId
|
|
103
103
|
payload['key'] = globalConfig.getKey();
|
|
104
104
|
const queryParams = new URLSearchParams(payload);
|
|
105
|
-
|
|
105
|
+
apiPath = `${globalConfig.getEndpoint()}${apiPath}?${queryParams.toString()}`;
|
|
106
106
|
|
|
107
|
-
const response = await client.call('get',
|
|
107
|
+
const response = await client.call('get', apiPath, {
|
|
108
108
|
'content-type': 'application/json',
|
|
109
109
|
}, payload, 'arraybuffer');
|
|
110
110
|
|
|
@@ -123,7 +123,7 @@ const avatarsGetFlag = async ({ code, width, height, quality, parseOutput = true
|
|
|
123
123
|
/* @param {number} quality */
|
|
124
124
|
|
|
125
125
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
126
|
-
let
|
|
126
|
+
let apiPath = '/avatars/flags/{code}'.replace('{code}', code);
|
|
127
127
|
let payload = {};
|
|
128
128
|
|
|
129
129
|
/** Query Params */
|
|
@@ -139,9 +139,9 @@ const avatarsGetFlag = async ({ code, width, height, quality, parseOutput = true
|
|
|
139
139
|
payload['project'] = localConfig.getProject().projectId
|
|
140
140
|
payload['key'] = globalConfig.getKey();
|
|
141
141
|
const queryParams = new URLSearchParams(payload);
|
|
142
|
-
|
|
142
|
+
apiPath = `${globalConfig.getEndpoint()}${apiPath}?${queryParams.toString()}`;
|
|
143
143
|
|
|
144
|
-
const response = await client.call('get',
|
|
144
|
+
const response = await client.call('get', apiPath, {
|
|
145
145
|
'content-type': 'application/json',
|
|
146
146
|
}, payload, 'arraybuffer');
|
|
147
147
|
|
|
@@ -159,7 +159,7 @@ const avatarsGetImage = async ({ url, width, height, parseOutput = true, sdk = u
|
|
|
159
159
|
/* @param {number} height */
|
|
160
160
|
|
|
161
161
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
162
|
-
let
|
|
162
|
+
let apiPath = '/avatars/image';
|
|
163
163
|
let payload = {};
|
|
164
164
|
|
|
165
165
|
/** Query Params */
|
|
@@ -175,9 +175,9 @@ const avatarsGetImage = async ({ url, width, height, parseOutput = true, sdk = u
|
|
|
175
175
|
payload['project'] = localConfig.getProject().projectId
|
|
176
176
|
payload['key'] = globalConfig.getKey();
|
|
177
177
|
const queryParams = new URLSearchParams(payload);
|
|
178
|
-
|
|
178
|
+
apiPath = `${globalConfig.getEndpoint()}${apiPath}?${queryParams.toString()}`;
|
|
179
179
|
|
|
180
|
-
const response = await client.call('get',
|
|
180
|
+
const response = await client.call('get', apiPath, {
|
|
181
181
|
'content-type': 'application/json',
|
|
182
182
|
}, payload, 'arraybuffer');
|
|
183
183
|
|
|
@@ -196,7 +196,7 @@ const avatarsGetInitials = async ({ name, width, height, background, parseOutput
|
|
|
196
196
|
/* @param {string} background */
|
|
197
197
|
|
|
198
198
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
199
|
-
let
|
|
199
|
+
let apiPath = '/avatars/initials';
|
|
200
200
|
let payload = {};
|
|
201
201
|
|
|
202
202
|
/** Query Params */
|
|
@@ -215,9 +215,9 @@ const avatarsGetInitials = async ({ name, width, height, background, parseOutput
|
|
|
215
215
|
payload['project'] = localConfig.getProject().projectId
|
|
216
216
|
payload['key'] = globalConfig.getKey();
|
|
217
217
|
const queryParams = new URLSearchParams(payload);
|
|
218
|
-
|
|
218
|
+
apiPath = `${globalConfig.getEndpoint()}${apiPath}?${queryParams.toString()}`;
|
|
219
219
|
|
|
220
|
-
const response = await client.call('get',
|
|
220
|
+
const response = await client.call('get', apiPath, {
|
|
221
221
|
'content-type': 'application/json',
|
|
222
222
|
}, payload, 'arraybuffer');
|
|
223
223
|
|
|
@@ -236,7 +236,7 @@ const avatarsGetQR = async ({ text, size, margin, download, parseOutput = true,
|
|
|
236
236
|
/* @param {boolean} download */
|
|
237
237
|
|
|
238
238
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
239
|
-
let
|
|
239
|
+
let apiPath = '/avatars/qr';
|
|
240
240
|
let payload = {};
|
|
241
241
|
|
|
242
242
|
/** Query Params */
|
|
@@ -255,9 +255,9 @@ const avatarsGetQR = async ({ text, size, margin, download, parseOutput = true,
|
|
|
255
255
|
payload['project'] = localConfig.getProject().projectId
|
|
256
256
|
payload['key'] = globalConfig.getKey();
|
|
257
257
|
const queryParams = new URLSearchParams(payload);
|
|
258
|
-
|
|
258
|
+
apiPath = `${globalConfig.getEndpoint()}${apiPath}?${queryParams.toString()}`;
|
|
259
259
|
|
|
260
|
-
const response = await client.call('get',
|
|
260
|
+
const response = await client.call('get', apiPath, {
|
|
261
261
|
'content-type': 'application/json',
|
|
262
262
|
}, payload, 'arraybuffer');
|
|
263
263
|
|
package/lib/commands/console.js
CHANGED
|
@@ -17,10 +17,10 @@ const console = new Command("console").description(commandDescriptions['console'
|
|
|
17
17
|
const consoleVariables = async ({ parseOutput = true, sdk = undefined}) => {
|
|
18
18
|
|
|
19
19
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
20
|
-
let
|
|
20
|
+
let apiPath = '/console/variables';
|
|
21
21
|
let payload = {};
|
|
22
22
|
let response = undefined;
|
|
23
|
-
response = await client.call('get',
|
|
23
|
+
response = await client.call('get', apiPath, {
|
|
24
24
|
'content-type': 'application/json',
|
|
25
25
|
}, payload);
|
|
26
26
|
|