appwrite-cli 0.17.1 → 0.18.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.
- package/README.md +4 -16
- package/docs/examples/account/{create-session.md → create-email-session.md} +1 -1
- package/docs/examples/account/create-phone-session.md +3 -0
- package/docs/examples/account/create-phone-verification.md +1 -0
- package/docs/examples/account/update-phone-session.md +3 -0
- package/docs/examples/account/update-phone-verification.md +3 -0
- package/docs/examples/account/update-phone.md +3 -0
- package/docs/examples/{database → databases}/create-boolean-attribute.md +2 -1
- package/docs/examples/{database → databases}/create-collection.md +2 -1
- package/docs/examples/{database → databases}/create-document.md +2 -1
- package/docs/examples/{database → databases}/create-email-attribute.md +2 -1
- package/docs/examples/{database → databases}/create-enum-attribute.md +2 -1
- package/docs/examples/{database → databases}/create-float-attribute.md +2 -1
- package/docs/examples/{database → databases}/create-index.md +2 -1
- package/docs/examples/{database → databases}/create-integer-attribute.md +2 -1
- package/docs/examples/{database → databases}/create-ip-attribute.md +2 -1
- package/docs/examples/{database → databases}/create-string-attribute.md +2 -1
- package/docs/examples/{database → databases}/create-url-attribute.md +2 -1
- package/docs/examples/databases/create.md +3 -0
- package/docs/examples/databases/delete-attribute.md +4 -0
- package/docs/examples/databases/delete-collection.md +3 -0
- package/docs/examples/{database → databases}/delete-document.md +2 -1
- package/docs/examples/databases/delete-index.md +4 -0
- package/docs/examples/databases/delete.md +2 -0
- package/docs/examples/databases/get-attribute.md +4 -0
- package/docs/examples/databases/get-collection-usage.md +4 -0
- package/docs/examples/databases/get-collection.md +3 -0
- package/docs/examples/databases/get-database-usage.md +3 -0
- package/docs/examples/{database → databases}/get-document.md +2 -1
- package/docs/examples/databases/get-index.md +4 -0
- package/docs/examples/databases/get-usage.md +2 -0
- package/docs/examples/databases/get.md +2 -0
- package/docs/examples/databases/list-attributes.md +3 -0
- package/docs/examples/databases/list-collection-logs.md +5 -0
- package/docs/examples/databases/list-collections.md +8 -0
- package/docs/examples/{database → databases}/list-document-logs.md +2 -1
- package/docs/examples/databases/list-documents.md +10 -0
- package/docs/examples/databases/list-indexes.md +3 -0
- package/docs/examples/databases/list-logs.md +4 -0
- package/docs/examples/databases/list.md +7 -0
- package/docs/examples/{database → databases}/update-collection.md +2 -1
- package/docs/examples/{database → databases}/update-document.md +3 -2
- package/docs/examples/databases/update.md +3 -0
- package/docs/examples/projects/create-key.md +2 -1
- package/docs/examples/projects/update-key.md +2 -1
- package/docs/examples/projects/update-webhook-signature.md +3 -0
- package/docs/examples/users/{update-verification.md → update-email-verification.md} +1 -1
- package/docs/examples/users/update-phone-verification.md +3 -0
- package/docs/examples/users/update-phone.md +3 -0
- package/index.js +2 -2
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.js +3 -3
- package/lib/commands/account.js +202 -31
- package/lib/commands/{database.js → databases.js} +477 -177
- package/lib/commands/deploy.js +153 -71
- package/lib/commands/functions.js +4 -4
- package/lib/commands/generic.js +2 -2
- package/lib/commands/init.js +42 -24
- package/lib/commands/projects.js +43 -4
- package/lib/commands/storage.js +3 -3
- package/lib/commands/teams.js +2 -2
- package/lib/commands/users.js +71 -5
- package/lib/parser.js +1 -1
- package/lib/questions.js +45 -3
- package/package.json +1 -1
- package/docs/examples/account/delete.md +0 -1
- package/docs/examples/database/delete-attribute.md +0 -3
- package/docs/examples/database/delete-collection.md +0 -2
- package/docs/examples/database/delete-index.md +0 -3
- package/docs/examples/database/get-attribute.md +0 -3
- package/docs/examples/database/get-collection-usage.md +0 -3
- package/docs/examples/database/get-collection.md +0 -2
- package/docs/examples/database/get-index.md +0 -3
- package/docs/examples/database/get-usage.md +0 -2
- package/docs/examples/database/list-attributes.md +0 -2
- package/docs/examples/database/list-collection-logs.md +0 -4
- package/docs/examples/database/list-collections.md +0 -7
- package/docs/examples/database/list-documents.md +0 -9
- package/docs/examples/database/list-indexes.md +0 -2
- package/docs/examples/health/get-queue-usage.md +0 -1
|
@@ -10,9 +10,9 @@ const { sdkForProject, sdkForConsole } = require('../sdks')
|
|
|
10
10
|
const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser')
|
|
11
11
|
const { localConfig, globalConfig } = require("../config");
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const databases = new Command("databases").description(commandDescriptions['databases'])
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const databasesList = async ({ search, limit, offset, cursor, cursorDirection, orderType, parseOutput = true, sdk = undefined}) => {
|
|
16
16
|
/* @param {string} search */
|
|
17
17
|
/* @param {number} limit */
|
|
18
18
|
/* @param {number} offset */
|
|
@@ -21,7 +21,7 @@ const databaseListCollections = async ({ search, limit, offset, cursor, cursorDi
|
|
|
21
21
|
/* @param {string} orderType */
|
|
22
22
|
|
|
23
23
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
24
|
-
let path = '/
|
|
24
|
+
let path = '/databases';
|
|
25
25
|
let payload = {};
|
|
26
26
|
|
|
27
27
|
/** Query Params */
|
|
@@ -55,7 +55,165 @@ const databaseListCollections = async ({ search, limit, offset, cursor, cursorDi
|
|
|
55
55
|
return response;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
const
|
|
58
|
+
const databasesCreate = async ({ databaseId, name, parseOutput = true, sdk = undefined}) => {
|
|
59
|
+
/* @param {string} databaseId */
|
|
60
|
+
/* @param {string} name */
|
|
61
|
+
|
|
62
|
+
let client = !sdk ? await sdkForProject() : sdk;
|
|
63
|
+
let path = '/databases';
|
|
64
|
+
let payload = {};
|
|
65
|
+
|
|
66
|
+
/** Body Params */
|
|
67
|
+
if (typeof databaseId !== 'undefined') {
|
|
68
|
+
payload['databaseId'] = databaseId;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (typeof name !== 'undefined') {
|
|
72
|
+
payload['name'] = name;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
let response = undefined;
|
|
76
|
+
response = await client.call('post', path, {
|
|
77
|
+
'content-type': 'application/json',
|
|
78
|
+
}, payload);
|
|
79
|
+
|
|
80
|
+
if (parseOutput) {
|
|
81
|
+
parse(response)
|
|
82
|
+
success()
|
|
83
|
+
}
|
|
84
|
+
return response;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const databasesGetUsage = async ({ range, parseOutput = true, sdk = undefined}) => {
|
|
88
|
+
/* @param {string} range */
|
|
89
|
+
|
|
90
|
+
let client = !sdk ? await sdkForProject() : sdk;
|
|
91
|
+
let path = '/databases/usage';
|
|
92
|
+
let payload = {};
|
|
93
|
+
|
|
94
|
+
/** Query Params */
|
|
95
|
+
if (typeof range !== 'undefined') {
|
|
96
|
+
payload['range'] = range;
|
|
97
|
+
}
|
|
98
|
+
let response = undefined;
|
|
99
|
+
response = await client.call('get', path, {
|
|
100
|
+
'content-type': 'application/json',
|
|
101
|
+
}, payload);
|
|
102
|
+
|
|
103
|
+
if (parseOutput) {
|
|
104
|
+
parse(response)
|
|
105
|
+
success()
|
|
106
|
+
}
|
|
107
|
+
return response;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const databasesGet = async ({ databaseId, parseOutput = true, sdk = undefined}) => {
|
|
111
|
+
/* @param {string} databaseId */
|
|
112
|
+
|
|
113
|
+
let client = !sdk ? await sdkForProject() : sdk;
|
|
114
|
+
let path = '/databases/{databaseId}'.replace('{databaseId}', databaseId);
|
|
115
|
+
let payload = {};
|
|
116
|
+
let response = undefined;
|
|
117
|
+
response = await client.call('get', path, {
|
|
118
|
+
'content-type': 'application/json',
|
|
119
|
+
}, payload);
|
|
120
|
+
|
|
121
|
+
if (parseOutput) {
|
|
122
|
+
parse(response)
|
|
123
|
+
success()
|
|
124
|
+
}
|
|
125
|
+
return response;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const databasesUpdate = async ({ databaseId, name, parseOutput = true, sdk = undefined}) => {
|
|
129
|
+
/* @param {string} databaseId */
|
|
130
|
+
/* @param {string} name */
|
|
131
|
+
|
|
132
|
+
let client = !sdk ? await sdkForProject() : sdk;
|
|
133
|
+
let path = '/databases/{databaseId}'.replace('{databaseId}', databaseId);
|
|
134
|
+
let payload = {};
|
|
135
|
+
|
|
136
|
+
/** Body Params */
|
|
137
|
+
if (typeof name !== 'undefined') {
|
|
138
|
+
payload['name'] = name;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
let response = undefined;
|
|
142
|
+
response = await client.call('put', path, {
|
|
143
|
+
'content-type': 'application/json',
|
|
144
|
+
}, payload);
|
|
145
|
+
|
|
146
|
+
if (parseOutput) {
|
|
147
|
+
parse(response)
|
|
148
|
+
success()
|
|
149
|
+
}
|
|
150
|
+
return response;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const databasesDelete = async ({ databaseId, parseOutput = true, sdk = undefined}) => {
|
|
154
|
+
/* @param {string} databaseId */
|
|
155
|
+
|
|
156
|
+
let client = !sdk ? await sdkForProject() : sdk;
|
|
157
|
+
let path = '/databases/{databaseId}'.replace('{databaseId}', databaseId);
|
|
158
|
+
let payload = {};
|
|
159
|
+
let response = undefined;
|
|
160
|
+
response = await client.call('delete', path, {
|
|
161
|
+
'content-type': 'application/json',
|
|
162
|
+
}, payload);
|
|
163
|
+
|
|
164
|
+
if (parseOutput) {
|
|
165
|
+
parse(response)
|
|
166
|
+
success()
|
|
167
|
+
}
|
|
168
|
+
return response;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const databasesListCollections = async ({ databaseId, search, limit, offset, cursor, cursorDirection, orderType, parseOutput = true, sdk = undefined}) => {
|
|
172
|
+
/* @param {string} databaseId */
|
|
173
|
+
/* @param {string} search */
|
|
174
|
+
/* @param {number} limit */
|
|
175
|
+
/* @param {number} offset */
|
|
176
|
+
/* @param {string} cursor */
|
|
177
|
+
/* @param {string} cursorDirection */
|
|
178
|
+
/* @param {string} orderType */
|
|
179
|
+
|
|
180
|
+
let client = !sdk ? await sdkForProject() : sdk;
|
|
181
|
+
let path = '/databases/{databaseId}/collections'.replace('{databaseId}', databaseId);
|
|
182
|
+
let payload = {};
|
|
183
|
+
|
|
184
|
+
/** Query Params */
|
|
185
|
+
if (typeof search !== 'undefined') {
|
|
186
|
+
payload['search'] = search;
|
|
187
|
+
}
|
|
188
|
+
if (typeof limit !== 'undefined') {
|
|
189
|
+
payload['limit'] = limit;
|
|
190
|
+
}
|
|
191
|
+
if (typeof offset !== 'undefined') {
|
|
192
|
+
payload['offset'] = offset;
|
|
193
|
+
}
|
|
194
|
+
if (typeof cursor !== 'undefined') {
|
|
195
|
+
payload['cursor'] = cursor;
|
|
196
|
+
}
|
|
197
|
+
if (typeof cursorDirection !== 'undefined') {
|
|
198
|
+
payload['cursorDirection'] = cursorDirection;
|
|
199
|
+
}
|
|
200
|
+
if (typeof orderType !== 'undefined') {
|
|
201
|
+
payload['orderType'] = orderType;
|
|
202
|
+
}
|
|
203
|
+
let response = undefined;
|
|
204
|
+
response = await client.call('get', path, {
|
|
205
|
+
'content-type': 'application/json',
|
|
206
|
+
}, payload);
|
|
207
|
+
|
|
208
|
+
if (parseOutput) {
|
|
209
|
+
parse(response)
|
|
210
|
+
success()
|
|
211
|
+
}
|
|
212
|
+
return response;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const databasesCreateCollection = async ({ databaseId, collectionId, name, permission, read, write, parseOutput = true, sdk = undefined}) => {
|
|
216
|
+
/* @param {string} databaseId */
|
|
59
217
|
/* @param {string} collectionId */
|
|
60
218
|
/* @param {string} name */
|
|
61
219
|
/* @param {string} permission */
|
|
@@ -63,7 +221,7 @@ const databaseCreateCollection = async ({ collectionId, name, permission, read,
|
|
|
63
221
|
/* @param {string[]} write */
|
|
64
222
|
|
|
65
223
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
66
|
-
let path = '/
|
|
224
|
+
let path = '/databases/{databaseId}/collections'.replace('{databaseId}', databaseId);
|
|
67
225
|
let payload = {};
|
|
68
226
|
|
|
69
227
|
/** Body Params */
|
|
@@ -99,11 +257,12 @@ const databaseCreateCollection = async ({ collectionId, name, permission, read,
|
|
|
99
257
|
return response;
|
|
100
258
|
}
|
|
101
259
|
|
|
102
|
-
const
|
|
260
|
+
const databasesGetCollection = async ({ databaseId, collectionId, parseOutput = true, sdk = undefined}) => {
|
|
261
|
+
/* @param {string} databaseId */
|
|
103
262
|
/* @param {string} collectionId */
|
|
104
263
|
|
|
105
264
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
106
|
-
let path = '/
|
|
265
|
+
let path = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
107
266
|
let payload = {};
|
|
108
267
|
let response = undefined;
|
|
109
268
|
response = await client.call('get', path, {
|
|
@@ -117,7 +276,8 @@ const databaseGetCollection = async ({ collectionId, parseOutput = true, sdk = u
|
|
|
117
276
|
return response;
|
|
118
277
|
}
|
|
119
278
|
|
|
120
|
-
const
|
|
279
|
+
const databasesUpdateCollection = async ({ databaseId, collectionId, name, permission, read, write, enabled, parseOutput = true, sdk = undefined}) => {
|
|
280
|
+
/* @param {string} databaseId */
|
|
121
281
|
/* @param {string} collectionId */
|
|
122
282
|
/* @param {string} name */
|
|
123
283
|
/* @param {string} permission */
|
|
@@ -126,7 +286,7 @@ const databaseUpdateCollection = async ({ collectionId, name, permission, read,
|
|
|
126
286
|
/* @param {boolean} enabled */
|
|
127
287
|
|
|
128
288
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
129
|
-
let path = '/
|
|
289
|
+
let path = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
130
290
|
let payload = {};
|
|
131
291
|
|
|
132
292
|
/** Body Params */
|
|
@@ -162,11 +322,12 @@ const databaseUpdateCollection = async ({ collectionId, name, permission, read,
|
|
|
162
322
|
return response;
|
|
163
323
|
}
|
|
164
324
|
|
|
165
|
-
const
|
|
325
|
+
const databasesDeleteCollection = async ({ databaseId, collectionId, parseOutput = true, sdk = undefined}) => {
|
|
326
|
+
/* @param {string} databaseId */
|
|
166
327
|
/* @param {string} collectionId */
|
|
167
328
|
|
|
168
329
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
169
|
-
let path = '/
|
|
330
|
+
let path = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
170
331
|
let payload = {};
|
|
171
332
|
let response = undefined;
|
|
172
333
|
response = await client.call('delete', path, {
|
|
@@ -180,11 +341,12 @@ const databaseDeleteCollection = async ({ collectionId, parseOutput = true, sdk
|
|
|
180
341
|
return response;
|
|
181
342
|
}
|
|
182
343
|
|
|
183
|
-
const
|
|
344
|
+
const databasesListAttributes = async ({ databaseId, collectionId, parseOutput = true, sdk = undefined}) => {
|
|
345
|
+
/* @param {string} databaseId */
|
|
184
346
|
/* @param {string} collectionId */
|
|
185
347
|
|
|
186
348
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
187
|
-
let path = '/
|
|
349
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/attributes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
188
350
|
let payload = {};
|
|
189
351
|
let response = undefined;
|
|
190
352
|
response = await client.call('get', path, {
|
|
@@ -198,7 +360,8 @@ const databaseListAttributes = async ({ collectionId, parseOutput = true, sdk =
|
|
|
198
360
|
return response;
|
|
199
361
|
}
|
|
200
362
|
|
|
201
|
-
const
|
|
363
|
+
const databasesCreateBooleanAttribute = async ({ databaseId, collectionId, key, required, xdefault, array, parseOutput = true, sdk = undefined}) => {
|
|
364
|
+
/* @param {string} databaseId */
|
|
202
365
|
/* @param {string} collectionId */
|
|
203
366
|
/* @param {string} key */
|
|
204
367
|
/* @param {boolean} required */
|
|
@@ -206,7 +369,7 @@ const databaseCreateBooleanAttribute = async ({ collectionId, key, required, xde
|
|
|
206
369
|
/* @param {boolean} array */
|
|
207
370
|
|
|
208
371
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
209
|
-
let path = '/
|
|
372
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
210
373
|
let payload = {};
|
|
211
374
|
|
|
212
375
|
/** Body Params */
|
|
@@ -238,7 +401,8 @@ const databaseCreateBooleanAttribute = async ({ collectionId, key, required, xde
|
|
|
238
401
|
return response;
|
|
239
402
|
}
|
|
240
403
|
|
|
241
|
-
const
|
|
404
|
+
const databasesCreateEmailAttribute = async ({ databaseId, collectionId, key, required, xdefault, array, parseOutput = true, sdk = undefined}) => {
|
|
405
|
+
/* @param {string} databaseId */
|
|
242
406
|
/* @param {string} collectionId */
|
|
243
407
|
/* @param {string} key */
|
|
244
408
|
/* @param {boolean} required */
|
|
@@ -246,7 +410,7 @@ const databaseCreateEmailAttribute = async ({ collectionId, key, required, xdefa
|
|
|
246
410
|
/* @param {boolean} array */
|
|
247
411
|
|
|
248
412
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
249
|
-
let path = '/
|
|
413
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/attributes/email'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
250
414
|
let payload = {};
|
|
251
415
|
|
|
252
416
|
/** Body Params */
|
|
@@ -278,7 +442,8 @@ const databaseCreateEmailAttribute = async ({ collectionId, key, required, xdefa
|
|
|
278
442
|
return response;
|
|
279
443
|
}
|
|
280
444
|
|
|
281
|
-
const
|
|
445
|
+
const databasesCreateEnumAttribute = async ({ databaseId, collectionId, key, elements, required, xdefault, array, parseOutput = true, sdk = undefined}) => {
|
|
446
|
+
/* @param {string} databaseId */
|
|
282
447
|
/* @param {string} collectionId */
|
|
283
448
|
/* @param {string} key */
|
|
284
449
|
/* @param {string[]} elements */
|
|
@@ -287,7 +452,7 @@ const databaseCreateEnumAttribute = async ({ collectionId, key, elements, requir
|
|
|
287
452
|
/* @param {boolean} array */
|
|
288
453
|
|
|
289
454
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
290
|
-
let path = '/
|
|
455
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/attributes/enum'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
291
456
|
let payload = {};
|
|
292
457
|
|
|
293
458
|
/** Body Params */
|
|
@@ -323,7 +488,8 @@ const databaseCreateEnumAttribute = async ({ collectionId, key, elements, requir
|
|
|
323
488
|
return response;
|
|
324
489
|
}
|
|
325
490
|
|
|
326
|
-
const
|
|
491
|
+
const databasesCreateFloatAttribute = async ({ databaseId, collectionId, key, required, min, max, xdefault, array, parseOutput = true, sdk = undefined}) => {
|
|
492
|
+
/* @param {string} databaseId */
|
|
327
493
|
/* @param {string} collectionId */
|
|
328
494
|
/* @param {string} key */
|
|
329
495
|
/* @param {boolean} required */
|
|
@@ -333,7 +499,7 @@ const databaseCreateFloatAttribute = async ({ collectionId, key, required, min,
|
|
|
333
499
|
/* @param {boolean} array */
|
|
334
500
|
|
|
335
501
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
336
|
-
let path = '/
|
|
502
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/attributes/float'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
337
503
|
let payload = {};
|
|
338
504
|
|
|
339
505
|
/** Body Params */
|
|
@@ -373,7 +539,8 @@ const databaseCreateFloatAttribute = async ({ collectionId, key, required, min,
|
|
|
373
539
|
return response;
|
|
374
540
|
}
|
|
375
541
|
|
|
376
|
-
const
|
|
542
|
+
const databasesCreateIntegerAttribute = async ({ databaseId, collectionId, key, required, min, max, xdefault, array, parseOutput = true, sdk = undefined}) => {
|
|
543
|
+
/* @param {string} databaseId */
|
|
377
544
|
/* @param {string} collectionId */
|
|
378
545
|
/* @param {string} key */
|
|
379
546
|
/* @param {boolean} required */
|
|
@@ -383,7 +550,7 @@ const databaseCreateIntegerAttribute = async ({ collectionId, key, required, min
|
|
|
383
550
|
/* @param {boolean} array */
|
|
384
551
|
|
|
385
552
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
386
|
-
let path = '/
|
|
553
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/attributes/integer'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
387
554
|
let payload = {};
|
|
388
555
|
|
|
389
556
|
/** Body Params */
|
|
@@ -423,7 +590,8 @@ const databaseCreateIntegerAttribute = async ({ collectionId, key, required, min
|
|
|
423
590
|
return response;
|
|
424
591
|
}
|
|
425
592
|
|
|
426
|
-
const
|
|
593
|
+
const databasesCreateIpAttribute = async ({ databaseId, collectionId, key, required, xdefault, array, parseOutput = true, sdk = undefined}) => {
|
|
594
|
+
/* @param {string} databaseId */
|
|
427
595
|
/* @param {string} collectionId */
|
|
428
596
|
/* @param {string} key */
|
|
429
597
|
/* @param {boolean} required */
|
|
@@ -431,7 +599,7 @@ const databaseCreateIpAttribute = async ({ collectionId, key, required, xdefault
|
|
|
431
599
|
/* @param {boolean} array */
|
|
432
600
|
|
|
433
601
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
434
|
-
let path = '/
|
|
602
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/attributes/ip'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
435
603
|
let payload = {};
|
|
436
604
|
|
|
437
605
|
/** Body Params */
|
|
@@ -463,7 +631,8 @@ const databaseCreateIpAttribute = async ({ collectionId, key, required, xdefault
|
|
|
463
631
|
return response;
|
|
464
632
|
}
|
|
465
633
|
|
|
466
|
-
const
|
|
634
|
+
const databasesCreateStringAttribute = async ({ databaseId, collectionId, key, size, required, xdefault, array, parseOutput = true, sdk = undefined}) => {
|
|
635
|
+
/* @param {string} databaseId */
|
|
467
636
|
/* @param {string} collectionId */
|
|
468
637
|
/* @param {string} key */
|
|
469
638
|
/* @param {number} size */
|
|
@@ -472,7 +641,7 @@ const databaseCreateStringAttribute = async ({ collectionId, key, size, required
|
|
|
472
641
|
/* @param {boolean} array */
|
|
473
642
|
|
|
474
643
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
475
|
-
let path = '/
|
|
644
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/attributes/string'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
476
645
|
let payload = {};
|
|
477
646
|
|
|
478
647
|
/** Body Params */
|
|
@@ -508,7 +677,8 @@ const databaseCreateStringAttribute = async ({ collectionId, key, size, required
|
|
|
508
677
|
return response;
|
|
509
678
|
}
|
|
510
679
|
|
|
511
|
-
const
|
|
680
|
+
const databasesCreateUrlAttribute = async ({ databaseId, collectionId, key, required, xdefault, array, parseOutput = true, sdk = undefined}) => {
|
|
681
|
+
/* @param {string} databaseId */
|
|
512
682
|
/* @param {string} collectionId */
|
|
513
683
|
/* @param {string} key */
|
|
514
684
|
/* @param {boolean} required */
|
|
@@ -516,7 +686,7 @@ const databaseCreateUrlAttribute = async ({ collectionId, key, required, xdefaul
|
|
|
516
686
|
/* @param {boolean} array */
|
|
517
687
|
|
|
518
688
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
519
|
-
let path = '/
|
|
689
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/attributes/url'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
520
690
|
let payload = {};
|
|
521
691
|
|
|
522
692
|
/** Body Params */
|
|
@@ -548,12 +718,13 @@ const databaseCreateUrlAttribute = async ({ collectionId, key, required, xdefaul
|
|
|
548
718
|
return response;
|
|
549
719
|
}
|
|
550
720
|
|
|
551
|
-
const
|
|
721
|
+
const databasesGetAttribute = async ({ databaseId, collectionId, key, parseOutput = true, sdk = undefined}) => {
|
|
722
|
+
/* @param {string} databaseId */
|
|
552
723
|
/* @param {string} collectionId */
|
|
553
724
|
/* @param {string} key */
|
|
554
725
|
|
|
555
726
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
556
|
-
let path = '/
|
|
727
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
557
728
|
let payload = {};
|
|
558
729
|
let response = undefined;
|
|
559
730
|
response = await client.call('get', path, {
|
|
@@ -567,12 +738,13 @@ const databaseGetAttribute = async ({ collectionId, key, parseOutput = true, sdk
|
|
|
567
738
|
return response;
|
|
568
739
|
}
|
|
569
740
|
|
|
570
|
-
const
|
|
741
|
+
const databasesDeleteAttribute = async ({ databaseId, collectionId, key, parseOutput = true, sdk = undefined}) => {
|
|
742
|
+
/* @param {string} databaseId */
|
|
571
743
|
/* @param {string} collectionId */
|
|
572
744
|
/* @param {string} key */
|
|
573
745
|
|
|
574
746
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
575
|
-
let path = '/
|
|
747
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
576
748
|
let payload = {};
|
|
577
749
|
let response = undefined;
|
|
578
750
|
response = await client.call('delete', path, {
|
|
@@ -586,7 +758,8 @@ const databaseDeleteAttribute = async ({ collectionId, key, parseOutput = true,
|
|
|
586
758
|
return response;
|
|
587
759
|
}
|
|
588
760
|
|
|
589
|
-
const
|
|
761
|
+
const databasesListDocuments = async ({ databaseId, collectionId, queries, limit, offset, cursor, cursorDirection, orderAttributes, orderTypes, parseOutput = true, sdk = undefined}) => {
|
|
762
|
+
/* @param {string} databaseId */
|
|
590
763
|
/* @param {string} collectionId */
|
|
591
764
|
/* @param {string[]} queries */
|
|
592
765
|
/* @param {number} limit */
|
|
@@ -597,7 +770,7 @@ const databaseListDocuments = async ({ collectionId, queries, limit, offset, cur
|
|
|
597
770
|
/* @param {string[]} orderTypes */
|
|
598
771
|
|
|
599
772
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
600
|
-
let path = '/
|
|
773
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
601
774
|
let payload = {};
|
|
602
775
|
|
|
603
776
|
/** Query Params */
|
|
@@ -634,7 +807,8 @@ const databaseListDocuments = async ({ collectionId, queries, limit, offset, cur
|
|
|
634
807
|
return response;
|
|
635
808
|
}
|
|
636
809
|
|
|
637
|
-
const
|
|
810
|
+
const databasesCreateDocument = async ({ databaseId, collectionId, documentId, data, read, write, parseOutput = true, sdk = undefined}) => {
|
|
811
|
+
/* @param {string} databaseId */
|
|
638
812
|
/* @param {string} collectionId */
|
|
639
813
|
/* @param {string} documentId */
|
|
640
814
|
/* @param {object} data */
|
|
@@ -642,7 +816,7 @@ const databaseCreateDocument = async ({ collectionId, documentId, data, read, wr
|
|
|
642
816
|
/* @param {string[]} write */
|
|
643
817
|
|
|
644
818
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
645
|
-
let path = '/
|
|
819
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
646
820
|
let payload = {};
|
|
647
821
|
|
|
648
822
|
/** Body Params */
|
|
@@ -674,12 +848,13 @@ const databaseCreateDocument = async ({ collectionId, documentId, data, read, wr
|
|
|
674
848
|
return response;
|
|
675
849
|
}
|
|
676
850
|
|
|
677
|
-
const
|
|
851
|
+
const databasesGetDocument = async ({ databaseId, collectionId, documentId, parseOutput = true, sdk = undefined}) => {
|
|
852
|
+
/* @param {string} databaseId */
|
|
678
853
|
/* @param {string} collectionId */
|
|
679
854
|
/* @param {string} documentId */
|
|
680
855
|
|
|
681
856
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
682
|
-
let path = '/
|
|
857
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
|
|
683
858
|
let payload = {};
|
|
684
859
|
let response = undefined;
|
|
685
860
|
response = await client.call('get', path, {
|
|
@@ -693,7 +868,8 @@ const databaseGetDocument = async ({ collectionId, documentId, parseOutput = tru
|
|
|
693
868
|
return response;
|
|
694
869
|
}
|
|
695
870
|
|
|
696
|
-
const
|
|
871
|
+
const databasesUpdateDocument = async ({ databaseId, collectionId, documentId, data, read, write, parseOutput = true, sdk = undefined}) => {
|
|
872
|
+
/* @param {string} databaseId */
|
|
697
873
|
/* @param {string} collectionId */
|
|
698
874
|
/* @param {string} documentId */
|
|
699
875
|
/* @param {object} data */
|
|
@@ -701,7 +877,7 @@ const databaseUpdateDocument = async ({ collectionId, documentId, data, read, wr
|
|
|
701
877
|
/* @param {string[]} write */
|
|
702
878
|
|
|
703
879
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
704
|
-
let path = '/
|
|
880
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
|
|
705
881
|
let payload = {};
|
|
706
882
|
|
|
707
883
|
/** Body Params */
|
|
@@ -729,12 +905,13 @@ const databaseUpdateDocument = async ({ collectionId, documentId, data, read, wr
|
|
|
729
905
|
return response;
|
|
730
906
|
}
|
|
731
907
|
|
|
732
|
-
const
|
|
908
|
+
const databasesDeleteDocument = async ({ databaseId, collectionId, documentId, parseOutput = true, sdk = undefined}) => {
|
|
909
|
+
/* @param {string} databaseId */
|
|
733
910
|
/* @param {string} collectionId */
|
|
734
911
|
/* @param {string} documentId */
|
|
735
912
|
|
|
736
913
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
737
|
-
let path = '/
|
|
914
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
|
|
738
915
|
let payload = {};
|
|
739
916
|
let response = undefined;
|
|
740
917
|
response = await client.call('delete', path, {
|
|
@@ -748,14 +925,15 @@ const databaseDeleteDocument = async ({ collectionId, documentId, parseOutput =
|
|
|
748
925
|
return response;
|
|
749
926
|
}
|
|
750
927
|
|
|
751
|
-
const
|
|
928
|
+
const databasesListDocumentLogs = async ({ databaseId, collectionId, documentId, limit, offset, parseOutput = true, sdk = undefined}) => {
|
|
929
|
+
/* @param {string} databaseId */
|
|
752
930
|
/* @param {string} collectionId */
|
|
753
931
|
/* @param {string} documentId */
|
|
754
932
|
/* @param {number} limit */
|
|
755
933
|
/* @param {number} offset */
|
|
756
934
|
|
|
757
935
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
758
|
-
let path = '/
|
|
936
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/logs'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
|
|
759
937
|
let payload = {};
|
|
760
938
|
|
|
761
939
|
/** Query Params */
|
|
@@ -777,11 +955,12 @@ const databaseListDocumentLogs = async ({ collectionId, documentId, limit, offse
|
|
|
777
955
|
return response;
|
|
778
956
|
}
|
|
779
957
|
|
|
780
|
-
const
|
|
958
|
+
const databasesListIndexes = async ({ databaseId, collectionId, parseOutput = true, sdk = undefined}) => {
|
|
959
|
+
/* @param {string} databaseId */
|
|
781
960
|
/* @param {string} collectionId */
|
|
782
961
|
|
|
783
962
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
784
|
-
let path = '/
|
|
963
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/indexes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
785
964
|
let payload = {};
|
|
786
965
|
let response = undefined;
|
|
787
966
|
response = await client.call('get', path, {
|
|
@@ -795,7 +974,8 @@ const databaseListIndexes = async ({ collectionId, parseOutput = true, sdk = und
|
|
|
795
974
|
return response;
|
|
796
975
|
}
|
|
797
976
|
|
|
798
|
-
const
|
|
977
|
+
const databasesCreateIndex = async ({ databaseId, collectionId, key, type, attributes, orders, parseOutput = true, sdk = undefined}) => {
|
|
978
|
+
/* @param {string} databaseId */
|
|
799
979
|
/* @param {string} collectionId */
|
|
800
980
|
/* @param {string} key */
|
|
801
981
|
/* @param {string} type */
|
|
@@ -803,7 +983,7 @@ const databaseCreateIndex = async ({ collectionId, key, type, attributes, orders
|
|
|
803
983
|
/* @param {string[]} orders */
|
|
804
984
|
|
|
805
985
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
806
|
-
let path = '/
|
|
986
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/indexes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
807
987
|
let payload = {};
|
|
808
988
|
|
|
809
989
|
/** Body Params */
|
|
@@ -835,12 +1015,13 @@ const databaseCreateIndex = async ({ collectionId, key, type, attributes, orders
|
|
|
835
1015
|
return response;
|
|
836
1016
|
}
|
|
837
1017
|
|
|
838
|
-
const
|
|
1018
|
+
const databasesGetIndex = async ({ databaseId, collectionId, key, parseOutput = true, sdk = undefined}) => {
|
|
1019
|
+
/* @param {string} databaseId */
|
|
839
1020
|
/* @param {string} collectionId */
|
|
840
1021
|
/* @param {string} key */
|
|
841
1022
|
|
|
842
1023
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
843
|
-
let path = '/
|
|
1024
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
844
1025
|
let payload = {};
|
|
845
1026
|
let response = undefined;
|
|
846
1027
|
response = await client.call('get', path, {
|
|
@@ -854,12 +1035,13 @@ const databaseGetIndex = async ({ collectionId, key, parseOutput = true, sdk = u
|
|
|
854
1035
|
return response;
|
|
855
1036
|
}
|
|
856
1037
|
|
|
857
|
-
const
|
|
1038
|
+
const databasesDeleteIndex = async ({ databaseId, collectionId, key, parseOutput = true, sdk = undefined}) => {
|
|
1039
|
+
/* @param {string} databaseId */
|
|
858
1040
|
/* @param {string} collectionId */
|
|
859
1041
|
/* @param {string} key */
|
|
860
1042
|
|
|
861
1043
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
862
|
-
let path = '/
|
|
1044
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
863
1045
|
let payload = {};
|
|
864
1046
|
let response = undefined;
|
|
865
1047
|
response = await client.call('delete', path, {
|
|
@@ -873,13 +1055,14 @@ const databaseDeleteIndex = async ({ collectionId, key, parseOutput = true, sdk
|
|
|
873
1055
|
return response;
|
|
874
1056
|
}
|
|
875
1057
|
|
|
876
|
-
const
|
|
1058
|
+
const databasesListCollectionLogs = async ({ databaseId, collectionId, limit, offset, parseOutput = true, sdk = undefined}) => {
|
|
1059
|
+
/* @param {string} databaseId */
|
|
877
1060
|
/* @param {string} collectionId */
|
|
878
1061
|
/* @param {number} limit */
|
|
879
1062
|
/* @param {number} offset */
|
|
880
1063
|
|
|
881
1064
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
882
|
-
let path = '/
|
|
1065
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/logs'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
883
1066
|
let payload = {};
|
|
884
1067
|
|
|
885
1068
|
/** Query Params */
|
|
@@ -901,11 +1084,13 @@ const databaseListCollectionLogs = async ({ collectionId, limit, offset, parseOu
|
|
|
901
1084
|
return response;
|
|
902
1085
|
}
|
|
903
1086
|
|
|
904
|
-
const
|
|
1087
|
+
const databasesGetCollectionUsage = async ({ databaseId, collectionId, range, parseOutput = true, sdk = undefined}) => {
|
|
1088
|
+
/* @param {string} databaseId */
|
|
1089
|
+
/* @param {string} collectionId */
|
|
905
1090
|
/* @param {string} range */
|
|
906
1091
|
|
|
907
1092
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
908
|
-
let path = '/
|
|
1093
|
+
let path = '/databases/{databaseId}/collections/{collectionId}/usage'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
909
1094
|
let payload = {};
|
|
910
1095
|
|
|
911
1096
|
/** Query Params */
|
|
@@ -924,12 +1109,40 @@ const databaseGetUsage = async ({ range, parseOutput = true, sdk = undefined}) =
|
|
|
924
1109
|
return response;
|
|
925
1110
|
}
|
|
926
1111
|
|
|
927
|
-
const
|
|
928
|
-
/* @param {string}
|
|
1112
|
+
const databasesListLogs = async ({ databaseId, limit, offset, parseOutput = true, sdk = undefined}) => {
|
|
1113
|
+
/* @param {string} databaseId */
|
|
1114
|
+
/* @param {number} limit */
|
|
1115
|
+
/* @param {number} offset */
|
|
1116
|
+
|
|
1117
|
+
let client = !sdk ? await sdkForProject() : sdk;
|
|
1118
|
+
let path = '/databases/{databaseId}/logs'.replace('{databaseId}', databaseId);
|
|
1119
|
+
let payload = {};
|
|
1120
|
+
|
|
1121
|
+
/** Query Params */
|
|
1122
|
+
if (typeof limit !== 'undefined') {
|
|
1123
|
+
payload['limit'] = limit;
|
|
1124
|
+
}
|
|
1125
|
+
if (typeof offset !== 'undefined') {
|
|
1126
|
+
payload['offset'] = offset;
|
|
1127
|
+
}
|
|
1128
|
+
let response = undefined;
|
|
1129
|
+
response = await client.call('get', path, {
|
|
1130
|
+
'content-type': 'application/json',
|
|
1131
|
+
}, payload);
|
|
1132
|
+
|
|
1133
|
+
if (parseOutput) {
|
|
1134
|
+
parse(response)
|
|
1135
|
+
success()
|
|
1136
|
+
}
|
|
1137
|
+
return response;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
const databasesGetDatabaseUsage = async ({ databaseId, range, parseOutput = true, sdk = undefined}) => {
|
|
1141
|
+
/* @param {string} databaseId */
|
|
929
1142
|
/* @param {string} range */
|
|
930
1143
|
|
|
931
1144
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
932
|
-
let path = '/
|
|
1145
|
+
let path = '/databases/{databaseId}/usage'.replace('{databaseId}', databaseId);
|
|
933
1146
|
let payload = {};
|
|
934
1147
|
|
|
935
1148
|
/** Query Params */
|
|
@@ -949,90 +1162,143 @@ const databaseGetCollectionUsage = async ({ collectionId, range, parseOutput = t
|
|
|
949
1162
|
}
|
|
950
1163
|
|
|
951
1164
|
|
|
952
|
-
|
|
1165
|
+
databases
|
|
1166
|
+
.command(`list`)
|
|
1167
|
+
.description(``)
|
|
1168
|
+
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
1169
|
+
.option(`--limit <limit>`, `Maximum number of collection to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.`, parseInteger)
|
|
1170
|
+
.option(`--offset <offset>`, `Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)`, parseInteger)
|
|
1171
|
+
.option(`--cursor <cursor>`, `ID of the collection used as the starting point for the query, excluding the collection itself. Should be used for efficient pagination when working with large sets of data.`)
|
|
1172
|
+
.option(`--cursorDirection <cursorDirection>`, `Direction of the cursor, can be either 'before' or 'after'.`)
|
|
1173
|
+
.option(`--orderType <orderType>`, `Order result by ASC or DESC order.`)
|
|
1174
|
+
.action(actionRunner(databasesList))
|
|
1175
|
+
|
|
1176
|
+
databases
|
|
1177
|
+
.command(`create`)
|
|
1178
|
+
.description(``)
|
|
1179
|
+
.requiredOption(`--databaseId <databaseId>`, `Unique Id. Choose your own unique ID or pass the string "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.`)
|
|
1180
|
+
.requiredOption(`--name <name>`, `Collection name. Max length: 128 chars.`)
|
|
1181
|
+
.action(actionRunner(databasesCreate))
|
|
1182
|
+
|
|
1183
|
+
databases
|
|
1184
|
+
.command(`getUsage`)
|
|
1185
|
+
.description(``)
|
|
1186
|
+
.option(`--range <range>`, `'Date range.`)
|
|
1187
|
+
.action(actionRunner(databasesGetUsage))
|
|
1188
|
+
|
|
1189
|
+
databases
|
|
1190
|
+
.command(`get`)
|
|
1191
|
+
.description(``)
|
|
1192
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1193
|
+
.action(actionRunner(databasesGet))
|
|
1194
|
+
|
|
1195
|
+
databases
|
|
1196
|
+
.command(`update`)
|
|
1197
|
+
.description(``)
|
|
1198
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1199
|
+
.requiredOption(`--name <name>`, `Collection name. Max length: 128 chars.`)
|
|
1200
|
+
.action(actionRunner(databasesUpdate))
|
|
1201
|
+
|
|
1202
|
+
databases
|
|
1203
|
+
.command(`delete`)
|
|
1204
|
+
.description(``)
|
|
1205
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1206
|
+
.action(actionRunner(databasesDelete))
|
|
1207
|
+
|
|
1208
|
+
databases
|
|
953
1209
|
.command(`listCollections`)
|
|
954
|
-
.description(
|
|
1210
|
+
.description(``)
|
|
1211
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
955
1212
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
956
1213
|
.option(`--limit <limit>`, `Maximum number of collection to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.`, parseInteger)
|
|
957
1214
|
.option(`--offset <offset>`, `Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)`, parseInteger)
|
|
958
1215
|
.option(`--cursor <cursor>`, `ID of the collection used as the starting point for the query, excluding the collection itself. Should be used for efficient pagination when working with large sets of data.`)
|
|
959
|
-
.option(`--cursorDirection <cursorDirection>`, `Direction of the cursor.`)
|
|
1216
|
+
.option(`--cursorDirection <cursorDirection>`, `Direction of the cursor, can be either 'before' or 'after'.`)
|
|
960
1217
|
.option(`--orderType <orderType>`, `Order result by ASC or DESC order.`)
|
|
961
|
-
.action(actionRunner(
|
|
1218
|
+
.action(actionRunner(databasesListCollections))
|
|
962
1219
|
|
|
963
|
-
|
|
1220
|
+
databases
|
|
964
1221
|
.command(`createCollection`)
|
|
965
|
-
.description(
|
|
1222
|
+
.description(``)
|
|
1223
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
966
1224
|
.requiredOption(`--collectionId <collectionId>`, `Unique Id. Choose your own unique ID or pass the string "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.`)
|
|
967
1225
|
.requiredOption(`--name <name>`, `Collection name. Max length: 128 chars.`)
|
|
968
1226
|
.requiredOption(`--permission <permission>`, `Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection' level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.`)
|
|
969
1227
|
.requiredOption(`--read <read...>`, `An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.`)
|
|
970
1228
|
.requiredOption(`--write <write...>`, `An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.`)
|
|
971
|
-
.action(actionRunner(
|
|
1229
|
+
.action(actionRunner(databasesCreateCollection))
|
|
972
1230
|
|
|
973
|
-
|
|
1231
|
+
databases
|
|
974
1232
|
.command(`getCollection`)
|
|
975
|
-
.description(
|
|
1233
|
+
.description(``)
|
|
1234
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
976
1235
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID.`)
|
|
977
|
-
.action(actionRunner(
|
|
1236
|
+
.action(actionRunner(databasesGetCollection))
|
|
978
1237
|
|
|
979
|
-
|
|
1238
|
+
databases
|
|
980
1239
|
.command(`updateCollection`)
|
|
981
|
-
.description(
|
|
1240
|
+
.description(``)
|
|
1241
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
982
1242
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID.`)
|
|
983
1243
|
.requiredOption(`--name <name>`, `Collection name. Max length: 128 chars.`)
|
|
984
1244
|
.requiredOption(`--permission <permission>`, `Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the 'read' and 'write' params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.`)
|
|
985
1245
|
.option(`--read <read...>`, `An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.`)
|
|
986
1246
|
.option(`--write <write...>`, `An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.`)
|
|
987
1247
|
.option(`--enabled <enabled>`, `Is collection enabled?`, parseBool)
|
|
988
|
-
.action(actionRunner(
|
|
1248
|
+
.action(actionRunner(databasesUpdateCollection))
|
|
989
1249
|
|
|
990
|
-
|
|
1250
|
+
databases
|
|
991
1251
|
.command(`deleteCollection`)
|
|
992
|
-
.description(
|
|
1252
|
+
.description(``)
|
|
1253
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
993
1254
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID.`)
|
|
994
|
-
.action(actionRunner(
|
|
1255
|
+
.action(actionRunner(databasesDeleteCollection))
|
|
995
1256
|
|
|
996
|
-
|
|
1257
|
+
databases
|
|
997
1258
|
.command(`listAttributes`)
|
|
998
1259
|
.description(``)
|
|
1260
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
999
1261
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1000
|
-
.action(actionRunner(
|
|
1262
|
+
.action(actionRunner(databasesListAttributes))
|
|
1001
1263
|
|
|
1002
|
-
|
|
1264
|
+
databases
|
|
1003
1265
|
.command(`createBooleanAttribute`)
|
|
1004
|
-
.description(
|
|
1266
|
+
.description(``)
|
|
1267
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1005
1268
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1006
1269
|
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
1007
1270
|
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
1008
1271
|
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`, parseBool)
|
|
1009
1272
|
.option(`--array <array>`, `Is attribute an array?`, parseBool)
|
|
1010
|
-
.action(actionRunner(
|
|
1273
|
+
.action(actionRunner(databasesCreateBooleanAttribute))
|
|
1011
1274
|
|
|
1012
|
-
|
|
1275
|
+
databases
|
|
1013
1276
|
.command(`createEmailAttribute`)
|
|
1014
|
-
.description(
|
|
1277
|
+
.description(``)
|
|
1278
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1015
1279
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1016
1280
|
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
1017
1281
|
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
1018
1282
|
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
1019
1283
|
.option(`--array <array>`, `Is attribute an array?`, parseBool)
|
|
1020
|
-
.action(actionRunner(
|
|
1284
|
+
.action(actionRunner(databasesCreateEmailAttribute))
|
|
1021
1285
|
|
|
1022
|
-
|
|
1286
|
+
databases
|
|
1023
1287
|
.command(`createEnumAttribute`)
|
|
1024
1288
|
.description(``)
|
|
1289
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1025
1290
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1026
1291
|
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
1027
|
-
.requiredOption(`--elements <elements...>`, `Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each
|
|
1292
|
+
.requiredOption(`--elements <elements...>`, `Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 4096 characters long.`)
|
|
1028
1293
|
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
1029
1294
|
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
1030
1295
|
.option(`--array <array>`, `Is attribute an array?`, parseBool)
|
|
1031
|
-
.action(actionRunner(
|
|
1296
|
+
.action(actionRunner(databasesCreateEnumAttribute))
|
|
1032
1297
|
|
|
1033
|
-
|
|
1298
|
+
databases
|
|
1034
1299
|
.command(`createFloatAttribute`)
|
|
1035
|
-
.description(
|
|
1300
|
+
.description(``)
|
|
1301
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1036
1302
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1037
1303
|
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
1038
1304
|
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
@@ -1040,11 +1306,12 @@ database
|
|
|
1040
1306
|
.option(`--max <max>`, `Maximum value to enforce on new documents`, parseInteger)
|
|
1041
1307
|
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`, parseInteger)
|
|
1042
1308
|
.option(`--array <array>`, `Is attribute an array?`, parseBool)
|
|
1043
|
-
.action(actionRunner(
|
|
1309
|
+
.action(actionRunner(databasesCreateFloatAttribute))
|
|
1044
1310
|
|
|
1045
|
-
|
|
1311
|
+
databases
|
|
1046
1312
|
.command(`createIntegerAttribute`)
|
|
1047
|
-
.description(
|
|
1313
|
+
.description(``)
|
|
1314
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1048
1315
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1049
1316
|
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
1050
1317
|
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
@@ -1052,190 +1319,223 @@ database
|
|
|
1052
1319
|
.option(`--max <max>`, `Maximum value to enforce on new documents`, parseInteger)
|
|
1053
1320
|
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`, parseInteger)
|
|
1054
1321
|
.option(`--array <array>`, `Is attribute an array?`, parseBool)
|
|
1055
|
-
.action(actionRunner(
|
|
1322
|
+
.action(actionRunner(databasesCreateIntegerAttribute))
|
|
1056
1323
|
|
|
1057
|
-
|
|
1324
|
+
databases
|
|
1058
1325
|
.command(`createIpAttribute`)
|
|
1059
|
-
.description(
|
|
1326
|
+
.description(``)
|
|
1327
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1060
1328
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1061
1329
|
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
1062
1330
|
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
1063
1331
|
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
1064
1332
|
.option(`--array <array>`, `Is attribute an array?`, parseBool)
|
|
1065
|
-
.action(actionRunner(
|
|
1333
|
+
.action(actionRunner(databasesCreateIpAttribute))
|
|
1066
1334
|
|
|
1067
|
-
|
|
1335
|
+
databases
|
|
1068
1336
|
.command(`createStringAttribute`)
|
|
1069
|
-
.description(
|
|
1337
|
+
.description(``)
|
|
1338
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1070
1339
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1071
1340
|
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
1072
1341
|
.requiredOption(`--size <size>`, `Attribute size for text attributes, in number of characters.`, parseInteger)
|
|
1073
1342
|
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
1074
1343
|
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
1075
1344
|
.option(`--array <array>`, `Is attribute an array?`, parseBool)
|
|
1076
|
-
.action(actionRunner(
|
|
1345
|
+
.action(actionRunner(databasesCreateStringAttribute))
|
|
1077
1346
|
|
|
1078
|
-
|
|
1347
|
+
databases
|
|
1079
1348
|
.command(`createUrlAttribute`)
|
|
1080
|
-
.description(
|
|
1349
|
+
.description(``)
|
|
1350
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1081
1351
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1082
1352
|
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
1083
1353
|
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
1084
1354
|
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
1085
1355
|
.option(`--array <array>`, `Is attribute an array?`, parseBool)
|
|
1086
|
-
.action(actionRunner(
|
|
1356
|
+
.action(actionRunner(databasesCreateUrlAttribute))
|
|
1087
1357
|
|
|
1088
|
-
|
|
1358
|
+
databases
|
|
1089
1359
|
.command(`getAttribute`)
|
|
1090
1360
|
.description(``)
|
|
1361
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1091
1362
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1092
1363
|
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
1093
|
-
.action(actionRunner(
|
|
1364
|
+
.action(actionRunner(databasesGetAttribute))
|
|
1094
1365
|
|
|
1095
|
-
|
|
1366
|
+
databases
|
|
1096
1367
|
.command(`deleteAttribute`)
|
|
1097
1368
|
.description(``)
|
|
1369
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1098
1370
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1099
1371
|
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
1100
|
-
.action(actionRunner(
|
|
1372
|
+
.action(actionRunner(databasesDeleteAttribute))
|
|
1101
1373
|
|
|
1102
|
-
|
|
1374
|
+
databases
|
|
1103
1375
|
.command(`listDocuments`)
|
|
1104
|
-
.description(
|
|
1376
|
+
.description(``)
|
|
1377
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1105
1378
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1106
|
-
.option(`--queries <queries...>`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/database#querying-documents). Maximum of 100 queries are allowed, each
|
|
1379
|
+
.option(`--queries <queries...>`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/database#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.`)
|
|
1107
1380
|
.option(`--limit <limit>`, `Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.`, parseInteger)
|
|
1108
1381
|
.option(`--offset <offset>`, `Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)`, parseInteger)
|
|
1109
1382
|
.option(`--cursor <cursor>`, `ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)`)
|
|
1110
|
-
.option(`--cursorDirection <cursorDirection>`, `Direction of the cursor.`)
|
|
1111
|
-
.option(`--orderAttributes <orderAttributes...>`, `Array of attributes used to sort results. Maximum of 100 order attributes are allowed, each
|
|
1383
|
+
.option(`--cursorDirection <cursorDirection>`, `Direction of the cursor, can be either 'before' or 'after'.`)
|
|
1384
|
+
.option(`--orderAttributes <orderAttributes...>`, `Array of attributes used to sort results. Maximum of 100 order attributes are allowed, each 4096 characters long.`)
|
|
1112
1385
|
.option(`--orderTypes <orderTypes...>`, `Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order. Maximum of 100 order types are allowed.`)
|
|
1113
|
-
.action(actionRunner(
|
|
1386
|
+
.action(actionRunner(databasesListDocuments))
|
|
1114
1387
|
|
|
1115
|
-
|
|
1388
|
+
databases
|
|
1116
1389
|
.command(`createDocument`)
|
|
1117
|
-
.description(
|
|
1390
|
+
.description(``)
|
|
1391
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1118
1392
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection). Make sure to define attributes before creating documents.`)
|
|
1119
1393
|
.requiredOption(`--documentId <documentId>`, `Document ID. Choose your own unique ID or pass the string "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.`)
|
|
1120
1394
|
.requiredOption(`--data <data>`, `Document data as JSON object.`)
|
|
1121
1395
|
.option(`--read <read...>`, `An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.`)
|
|
1122
1396
|
.option(`--write <write...>`, `An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.`)
|
|
1123
|
-
.action(actionRunner(
|
|
1397
|
+
.action(actionRunner(databasesCreateDocument))
|
|
1124
1398
|
|
|
1125
|
-
|
|
1399
|
+
databases
|
|
1126
1400
|
.command(`getDocument`)
|
|
1127
|
-
.description(
|
|
1401
|
+
.description(``)
|
|
1402
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1128
1403
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1129
1404
|
.requiredOption(`--documentId <documentId>`, `Document ID.`)
|
|
1130
|
-
.action(actionRunner(
|
|
1405
|
+
.action(actionRunner(databasesGetDocument))
|
|
1131
1406
|
|
|
1132
|
-
|
|
1407
|
+
databases
|
|
1133
1408
|
.command(`updateDocument`)
|
|
1134
|
-
.description(
|
|
1409
|
+
.description(``)
|
|
1410
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1135
1411
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID.`)
|
|
1136
1412
|
.requiredOption(`--documentId <documentId>`, `Document ID.`)
|
|
1137
|
-
.
|
|
1413
|
+
.option(`--data <data>`, `Document data as JSON object. Include only attribute and value pairs to be updated.`)
|
|
1138
1414
|
.option(`--read <read...>`, `An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.`)
|
|
1139
1415
|
.option(`--write <write...>`, `An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.`)
|
|
1140
|
-
.action(actionRunner(
|
|
1416
|
+
.action(actionRunner(databasesUpdateDocument))
|
|
1141
1417
|
|
|
1142
|
-
|
|
1418
|
+
databases
|
|
1143
1419
|
.command(`deleteDocument`)
|
|
1144
|
-
.description(
|
|
1420
|
+
.description(``)
|
|
1421
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1145
1422
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1146
1423
|
.requiredOption(`--documentId <documentId>`, `Document ID.`)
|
|
1147
|
-
.action(actionRunner(
|
|
1424
|
+
.action(actionRunner(databasesDeleteDocument))
|
|
1148
1425
|
|
|
1149
|
-
|
|
1426
|
+
databases
|
|
1150
1427
|
.command(`listDocumentLogs`)
|
|
1151
|
-
.description(
|
|
1428
|
+
.description(``)
|
|
1429
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1152
1430
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID.`)
|
|
1153
1431
|
.requiredOption(`--documentId <documentId>`, `Document ID.`)
|
|
1154
1432
|
.option(`--limit <limit>`, `Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.`, parseInteger)
|
|
1155
1433
|
.option(`--offset <offset>`, `Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)`, parseInteger)
|
|
1156
|
-
.action(actionRunner(
|
|
1434
|
+
.action(actionRunner(databasesListDocumentLogs))
|
|
1157
1435
|
|
|
1158
|
-
|
|
1436
|
+
databases
|
|
1159
1437
|
.command(`listIndexes`)
|
|
1160
1438
|
.description(``)
|
|
1439
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1161
1440
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1162
|
-
.action(actionRunner(
|
|
1441
|
+
.action(actionRunner(databasesListIndexes))
|
|
1163
1442
|
|
|
1164
|
-
|
|
1443
|
+
databases
|
|
1165
1444
|
.command(`createIndex`)
|
|
1166
1445
|
.description(``)
|
|
1446
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1167
1447
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1168
1448
|
.requiredOption(`--key <key>`, `Index Key.`)
|
|
1169
1449
|
.requiredOption(`--type <type>`, `Index type.`)
|
|
1170
1450
|
.requiredOption(`--attributes <attributes...>`, `Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.`)
|
|
1171
1451
|
.option(`--orders <orders...>`, `Array of index orders. Maximum of 100 orders are allowed.`)
|
|
1172
|
-
.action(actionRunner(
|
|
1452
|
+
.action(actionRunner(databasesCreateIndex))
|
|
1173
1453
|
|
|
1174
|
-
|
|
1454
|
+
databases
|
|
1175
1455
|
.command(`getIndex`)
|
|
1176
1456
|
.description(``)
|
|
1457
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1177
1458
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1178
1459
|
.requiredOption(`--key <key>`, `Index Key.`)
|
|
1179
|
-
.action(actionRunner(
|
|
1460
|
+
.action(actionRunner(databasesGetIndex))
|
|
1180
1461
|
|
|
1181
|
-
|
|
1462
|
+
databases
|
|
1182
1463
|
.command(`deleteIndex`)
|
|
1183
1464
|
.description(``)
|
|
1465
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1184
1466
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).`)
|
|
1185
1467
|
.requiredOption(`--key <key>`, `Index Key.`)
|
|
1186
|
-
.action(actionRunner(
|
|
1468
|
+
.action(actionRunner(databasesDeleteIndex))
|
|
1187
1469
|
|
|
1188
|
-
|
|
1470
|
+
databases
|
|
1189
1471
|
.command(`listCollectionLogs`)
|
|
1190
|
-
.description(
|
|
1472
|
+
.description(``)
|
|
1473
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1191
1474
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID.`)
|
|
1192
1475
|
.option(`--limit <limit>`, `Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.`, parseInteger)
|
|
1193
1476
|
.option(`--offset <offset>`, `Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)`, parseInteger)
|
|
1194
|
-
.action(actionRunner(
|
|
1195
|
-
|
|
1196
|
-
database
|
|
1197
|
-
.command(`getUsage`)
|
|
1198
|
-
.description(``)
|
|
1199
|
-
.option(`--range <range>`, `Date range.`)
|
|
1200
|
-
.action(actionRunner(databaseGetUsage))
|
|
1477
|
+
.action(actionRunner(databasesListCollectionLogs))
|
|
1201
1478
|
|
|
1202
|
-
|
|
1479
|
+
databases
|
|
1203
1480
|
.command(`getCollectionUsage`)
|
|
1204
1481
|
.description(``)
|
|
1482
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1205
1483
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID.`)
|
|
1206
1484
|
.option(`--range <range>`, `Date range.`)
|
|
1207
|
-
.action(actionRunner(
|
|
1485
|
+
.action(actionRunner(databasesGetCollectionUsage))
|
|
1486
|
+
|
|
1487
|
+
databases
|
|
1488
|
+
.command(`listLogs`)
|
|
1489
|
+
.description(``)
|
|
1490
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1491
|
+
.option(`--limit <limit>`, `Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.`, parseInteger)
|
|
1492
|
+
.option(`--offset <offset>`, `Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)`, parseInteger)
|
|
1493
|
+
.action(actionRunner(databasesListLogs))
|
|
1494
|
+
|
|
1495
|
+
databases
|
|
1496
|
+
.command(`getDatabaseUsage`)
|
|
1497
|
+
.description(``)
|
|
1498
|
+
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1499
|
+
.option(`--range <range>`, `'Date range.`)
|
|
1500
|
+
.action(actionRunner(databasesGetDatabaseUsage))
|
|
1208
1501
|
|
|
1209
1502
|
|
|
1210
1503
|
module.exports = {
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1504
|
+
databases,
|
|
1505
|
+
databasesList,
|
|
1506
|
+
databasesCreate,
|
|
1507
|
+
databasesGetUsage,
|
|
1508
|
+
databasesGet,
|
|
1509
|
+
databasesUpdate,
|
|
1510
|
+
databasesDelete,
|
|
1511
|
+
databasesListCollections,
|
|
1512
|
+
databasesCreateCollection,
|
|
1513
|
+
databasesGetCollection,
|
|
1514
|
+
databasesUpdateCollection,
|
|
1515
|
+
databasesDeleteCollection,
|
|
1516
|
+
databasesListAttributes,
|
|
1517
|
+
databasesCreateBooleanAttribute,
|
|
1518
|
+
databasesCreateEmailAttribute,
|
|
1519
|
+
databasesCreateEnumAttribute,
|
|
1520
|
+
databasesCreateFloatAttribute,
|
|
1521
|
+
databasesCreateIntegerAttribute,
|
|
1522
|
+
databasesCreateIpAttribute,
|
|
1523
|
+
databasesCreateStringAttribute,
|
|
1524
|
+
databasesCreateUrlAttribute,
|
|
1525
|
+
databasesGetAttribute,
|
|
1526
|
+
databasesDeleteAttribute,
|
|
1527
|
+
databasesListDocuments,
|
|
1528
|
+
databasesCreateDocument,
|
|
1529
|
+
databasesGetDocument,
|
|
1530
|
+
databasesUpdateDocument,
|
|
1531
|
+
databasesDeleteDocument,
|
|
1532
|
+
databasesListDocumentLogs,
|
|
1533
|
+
databasesListIndexes,
|
|
1534
|
+
databasesCreateIndex,
|
|
1535
|
+
databasesGetIndex,
|
|
1536
|
+
databasesDeleteIndex,
|
|
1537
|
+
databasesListCollectionLogs,
|
|
1538
|
+
databasesGetCollectionUsage,
|
|
1539
|
+
databasesListLogs,
|
|
1540
|
+
databasesGetDatabaseUsage
|
|
1241
1541
|
};
|