@appwrite.io/console 7.0.0-rc.1 → 8.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/.github/workflows/autoclose.yml +11 -0
- package/CHANGELOG.md +23 -0
- package/README.md +2 -2
- package/dist/cjs/sdk.js +10580 -13225
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +10709 -13348
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +10304 -12936
- package/docs/examples/domains/create-purchase.md +2 -1
- package/docs/examples/domains/create-transfer-in.md +2 -1
- package/docs/examples/domains/{confirm-purchase.md → update-auto-renewal.md} +2 -2
- package/docs/examples/project/create-variable.md +1 -0
- package/docs/examples/project/list-variables.md +4 -1
- package/docs/examples/project/update-variable.md +1 -1
- package/docs/examples/{documentsdb/delete.md → users/update-impersonator.md} +5 -4
- package/package.json +7 -7
- package/rollup.config.js +2 -1
- package/src/client.ts +50 -2
- package/src/enums/build-runtime.ts +0 -92
- package/src/enums/runtime.ts +0 -92
- package/src/enums/runtimes.ts +0 -92
- package/src/enums/scopes.ts +13 -2
- package/src/enums/template-reference-type.ts +1 -1
- package/src/enums/use-cases.ts +7 -2
- package/src/index.ts +0 -5
- package/src/models.ts +23 -435
- package/src/services/domains.ts +103 -26
- package/src/services/project.ts +76 -33
- package/src/services/users.ts +67 -2
- package/types/channel.d.ts +3 -3
- package/types/client.d.ts +37 -4
- package/types/enums/build-runtime.d.ts +1 -93
- package/types/enums/runtime.d.ts +1 -93
- package/types/enums/runtimes.d.ts +1 -93
- package/types/enums/scopes.d.ts +14 -3
- package/types/enums/template-reference-type.d.ts +1 -1
- package/types/enums/use-cases.d.ts +7 -2
- package/types/index.d.ts +0 -5
- package/types/models.d.ts +23 -423
- package/types/operator.d.ts +3 -3
- package/types/query.d.ts +4 -4
- package/types/services/domains.d.ts +42 -14
- package/types/services/project.d.ts +37 -19
- package/types/services/realtime.d.ts +6 -6
- package/types/services/users.d.ts +26 -2
- package/docs/examples/documentsdb/create-collection.md +0 -22
- package/docs/examples/documentsdb/create-document.md +0 -25
- package/docs/examples/documentsdb/create-documents.md +0 -17
- package/docs/examples/documentsdb/create-index.md +0 -21
- package/docs/examples/documentsdb/create-transaction.md +0 -15
- package/docs/examples/documentsdb/create.md +0 -17
- package/docs/examples/documentsdb/decrement-document-attribute.md +0 -21
- package/docs/examples/documentsdb/delete-collection.md +0 -16
- package/docs/examples/documentsdb/delete-document.md +0 -18
- package/docs/examples/documentsdb/delete-documents.md +0 -18
- package/docs/examples/documentsdb/delete-index.md +0 -17
- package/docs/examples/documentsdb/delete-transaction.md +0 -15
- package/docs/examples/documentsdb/get-collection-usage.md +0 -17
- package/docs/examples/documentsdb/get-collection.md +0 -16
- package/docs/examples/documentsdb/get-document.md +0 -19
- package/docs/examples/documentsdb/get-index.md +0 -17
- package/docs/examples/documentsdb/get-transaction.md +0 -15
- package/docs/examples/documentsdb/get-usage.md +0 -16
- package/docs/examples/documentsdb/get.md +0 -15
- package/docs/examples/documentsdb/increment-document-attribute.md +0 -21
- package/docs/examples/documentsdb/list-collection-logs.md +0 -17
- package/docs/examples/documentsdb/list-collections.md +0 -18
- package/docs/examples/documentsdb/list-document-logs.md +0 -18
- package/docs/examples/documentsdb/list-documents.md +0 -20
- package/docs/examples/documentsdb/list-indexes.md +0 -18
- package/docs/examples/documentsdb/list-transactions.md +0 -15
- package/docs/examples/documentsdb/list-usage.md +0 -15
- package/docs/examples/documentsdb/list.md +0 -17
- package/docs/examples/documentsdb/update-collection.md +0 -20
- package/docs/examples/documentsdb/update-document.md +0 -20
- package/docs/examples/documentsdb/update-documents.md +0 -19
- package/docs/examples/documentsdb/update-transaction.md +0 -17
- package/docs/examples/documentsdb/update.md +0 -17
- package/docs/examples/documentsdb/upsert-document.md +0 -20
- package/docs/examples/documentsdb/upsert-documents.md +0 -18
- package/docs/examples/domains/confirm-transfer-in.md +0 -16
- package/docs/examples/projects/create-webhook.md +0 -22
- package/docs/examples/projects/delete-webhook.md +0 -16
- package/docs/examples/projects/get-webhook.md +0 -16
- package/docs/examples/projects/list-webhooks.md +0 -16
- package/docs/examples/projects/update-webhook-signature.md +0 -16
- package/docs/examples/projects/update-webhook.md +0 -23
- package/docs/examples/vectorsdb/create-collection.md +0 -21
- package/docs/examples/vectorsdb/create-document.md +0 -29
- package/docs/examples/vectorsdb/create-documents.md +0 -17
- package/docs/examples/vectorsdb/create-index.md +0 -21
- package/docs/examples/vectorsdb/create-operations.md +0 -26
- package/docs/examples/vectorsdb/create-text-embeddings.md +0 -16
- package/docs/examples/vectorsdb/create-transaction.md +0 -15
- package/docs/examples/vectorsdb/create.md +0 -17
- package/docs/examples/vectorsdb/delete-collection.md +0 -16
- package/docs/examples/vectorsdb/delete-document.md +0 -18
- package/docs/examples/vectorsdb/delete-documents.md +0 -18
- package/docs/examples/vectorsdb/delete-index.md +0 -17
- package/docs/examples/vectorsdb/delete-transaction.md +0 -15
- package/docs/examples/vectorsdb/delete.md +0 -15
- package/docs/examples/vectorsdb/get-collection-usage.md +0 -17
- package/docs/examples/vectorsdb/get-collection.md +0 -16
- package/docs/examples/vectorsdb/get-document.md +0 -19
- package/docs/examples/vectorsdb/get-index.md +0 -17
- package/docs/examples/vectorsdb/get-transaction.md +0 -15
- package/docs/examples/vectorsdb/get-usage.md +0 -16
- package/docs/examples/vectorsdb/get.md +0 -15
- package/docs/examples/vectorsdb/list-collection-logs.md +0 -17
- package/docs/examples/vectorsdb/list-collections.md +0 -18
- package/docs/examples/vectorsdb/list-documents.md +0 -20
- package/docs/examples/vectorsdb/list-indexes.md +0 -18
- package/docs/examples/vectorsdb/list-transactions.md +0 -15
- package/docs/examples/vectorsdb/list-usage.md +0 -15
- package/docs/examples/vectorsdb/list.md +0 -17
- package/docs/examples/vectorsdb/update-collection.md +0 -21
- package/docs/examples/vectorsdb/update-document.md +0 -20
- package/docs/examples/vectorsdb/update-documents.md +0 -19
- package/docs/examples/vectorsdb/update-transaction.md +0 -17
- package/docs/examples/vectorsdb/update.md +0 -17
- package/docs/examples/vectorsdb/upsert-document.md +0 -20
- package/docs/examples/vectorsdb/upsert-documents.md +0 -18
- package/src/enums/documents-db-index-type.ts +0 -6
- package/src/enums/domain-purchase-payment-status.ts +0 -10
- package/src/enums/domain-transfer-status-status.ts +0 -10
- package/src/enums/model.ts +0 -3
- package/src/enums/vectors-db-index-type.ts +0 -8
- package/src/services/documents-db.ts +0 -2608
- package/src/services/vectors-db.ts +0 -2406
- package/types/enums/documents-db-index-type.d.ts +0 -6
- package/types/enums/domain-purchase-payment-status.d.ts +0 -10
- package/types/enums/domain-transfer-status-status.d.ts +0 -10
- package/types/enums/model.d.ts +0 -3
- package/types/enums/vectors-db-index-type.d.ts +0 -8
- package/types/services/documents-db.d.ts +0 -977
- package/types/services/vectors-db.d.ts +0 -854
|
@@ -1,977 +0,0 @@
|
|
|
1
|
-
import { Client } from '../client';
|
|
2
|
-
import type { Models } from '../models';
|
|
3
|
-
import { UsageRange } from '../enums/usage-range';
|
|
4
|
-
import { DocumentsDBIndexType } from '../enums/documents-db-index-type';
|
|
5
|
-
import { OrderBy } from '../enums/order-by';
|
|
6
|
-
export declare class DocumentsDB {
|
|
7
|
-
client: Client;
|
|
8
|
-
constructor(client: Client);
|
|
9
|
-
/**
|
|
10
|
-
* Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
|
|
11
|
-
*
|
|
12
|
-
* @param {string[]} params.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 columns: name
|
|
13
|
-
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
14
|
-
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
15
|
-
* @throws {AppwriteException}
|
|
16
|
-
* @returns {Promise<Models.DatabaseList>}
|
|
17
|
-
*/
|
|
18
|
-
list(params?: {
|
|
19
|
-
queries?: string[];
|
|
20
|
-
search?: string;
|
|
21
|
-
total?: boolean;
|
|
22
|
-
}): Promise<Models.DatabaseList>;
|
|
23
|
-
/**
|
|
24
|
-
* Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
|
|
25
|
-
*
|
|
26
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name
|
|
27
|
-
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
28
|
-
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
29
|
-
* @throws {AppwriteException}
|
|
30
|
-
* @returns {Promise<Models.DatabaseList>}
|
|
31
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
32
|
-
*/
|
|
33
|
-
list(queries?: string[], search?: string, total?: boolean): Promise<Models.DatabaseList>;
|
|
34
|
-
/**
|
|
35
|
-
* Create a new Database.
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* @param {string} params.databaseId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
39
|
-
* @param {string} params.name - Database name. Max length: 128 chars.
|
|
40
|
-
* @param {boolean} params.enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
41
|
-
* @throws {AppwriteException}
|
|
42
|
-
* @returns {Promise<Models.Database>}
|
|
43
|
-
*/
|
|
44
|
-
create(params: {
|
|
45
|
-
databaseId: string;
|
|
46
|
-
name: string;
|
|
47
|
-
enabled?: boolean;
|
|
48
|
-
}): Promise<Models.Database>;
|
|
49
|
-
/**
|
|
50
|
-
* Create a new Database.
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* @param {string} databaseId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
54
|
-
* @param {string} name - Database name. Max length: 128 chars.
|
|
55
|
-
* @param {boolean} enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
56
|
-
* @throws {AppwriteException}
|
|
57
|
-
* @returns {Promise<Models.Database>}
|
|
58
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
59
|
-
*/
|
|
60
|
-
create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
|
|
64
|
-
* @throws {AppwriteException}
|
|
65
|
-
* @returns {Promise<Models.TransactionList>}
|
|
66
|
-
*/
|
|
67
|
-
listTransactions(params?: {
|
|
68
|
-
queries?: string[];
|
|
69
|
-
}): Promise<Models.TransactionList>;
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
|
|
73
|
-
* @throws {AppwriteException}
|
|
74
|
-
* @returns {Promise<Models.TransactionList>}
|
|
75
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
76
|
-
*/
|
|
77
|
-
listTransactions(queries?: string[]): Promise<Models.TransactionList>;
|
|
78
|
-
/**
|
|
79
|
-
*
|
|
80
|
-
* @param {number} params.ttl - Seconds before the transaction expires.
|
|
81
|
-
* @throws {AppwriteException}
|
|
82
|
-
* @returns {Promise<Models.Transaction>}
|
|
83
|
-
*/
|
|
84
|
-
createTransaction(params?: {
|
|
85
|
-
ttl?: number;
|
|
86
|
-
}): Promise<Models.Transaction>;
|
|
87
|
-
/**
|
|
88
|
-
*
|
|
89
|
-
* @param {number} ttl - Seconds before the transaction expires.
|
|
90
|
-
* @throws {AppwriteException}
|
|
91
|
-
* @returns {Promise<Models.Transaction>}
|
|
92
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
93
|
-
*/
|
|
94
|
-
createTransaction(ttl?: number): Promise<Models.Transaction>;
|
|
95
|
-
/**
|
|
96
|
-
*
|
|
97
|
-
* @param {string} params.transactionId - Transaction ID.
|
|
98
|
-
* @throws {AppwriteException}
|
|
99
|
-
* @returns {Promise<Models.Transaction>}
|
|
100
|
-
*/
|
|
101
|
-
getTransaction(params: {
|
|
102
|
-
transactionId: string;
|
|
103
|
-
}): Promise<Models.Transaction>;
|
|
104
|
-
/**
|
|
105
|
-
*
|
|
106
|
-
* @param {string} transactionId - Transaction ID.
|
|
107
|
-
* @throws {AppwriteException}
|
|
108
|
-
* @returns {Promise<Models.Transaction>}
|
|
109
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
110
|
-
*/
|
|
111
|
-
getTransaction(transactionId: string): Promise<Models.Transaction>;
|
|
112
|
-
/**
|
|
113
|
-
*
|
|
114
|
-
* @param {string} params.transactionId - Transaction ID.
|
|
115
|
-
* @param {boolean} params.commit - Commit transaction?
|
|
116
|
-
* @param {boolean} params.rollback - Rollback transaction?
|
|
117
|
-
* @throws {AppwriteException}
|
|
118
|
-
* @returns {Promise<Models.Transaction>}
|
|
119
|
-
*/
|
|
120
|
-
updateTransaction(params: {
|
|
121
|
-
transactionId: string;
|
|
122
|
-
commit?: boolean;
|
|
123
|
-
rollback?: boolean;
|
|
124
|
-
}): Promise<Models.Transaction>;
|
|
125
|
-
/**
|
|
126
|
-
*
|
|
127
|
-
* @param {string} transactionId - Transaction ID.
|
|
128
|
-
* @param {boolean} commit - Commit transaction?
|
|
129
|
-
* @param {boolean} rollback - Rollback transaction?
|
|
130
|
-
* @throws {AppwriteException}
|
|
131
|
-
* @returns {Promise<Models.Transaction>}
|
|
132
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
133
|
-
*/
|
|
134
|
-
updateTransaction(transactionId: string, commit?: boolean, rollback?: boolean): Promise<Models.Transaction>;
|
|
135
|
-
/**
|
|
136
|
-
*
|
|
137
|
-
* @param {string} params.transactionId - Transaction ID.
|
|
138
|
-
* @throws {AppwriteException}
|
|
139
|
-
* @returns {Promise<{}>}
|
|
140
|
-
*/
|
|
141
|
-
deleteTransaction(params: {
|
|
142
|
-
transactionId: string;
|
|
143
|
-
}): Promise<{}>;
|
|
144
|
-
/**
|
|
145
|
-
*
|
|
146
|
-
* @param {string} transactionId - Transaction ID.
|
|
147
|
-
* @throws {AppwriteException}
|
|
148
|
-
* @returns {Promise<{}>}
|
|
149
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
150
|
-
*/
|
|
151
|
-
deleteTransaction(transactionId: string): Promise<{}>;
|
|
152
|
-
/**
|
|
153
|
-
* List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and 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.
|
|
154
|
-
*
|
|
155
|
-
* @param {UsageRange} params.range - Date range.
|
|
156
|
-
* @throws {AppwriteException}
|
|
157
|
-
* @returns {Promise<Models.UsageDatabases>}
|
|
158
|
-
*/
|
|
159
|
-
listUsage(params?: {
|
|
160
|
-
range?: UsageRange;
|
|
161
|
-
}): Promise<Models.UsageDatabases>;
|
|
162
|
-
/**
|
|
163
|
-
* List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and 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.
|
|
164
|
-
*
|
|
165
|
-
* @param {UsageRange} range - Date range.
|
|
166
|
-
* @throws {AppwriteException}
|
|
167
|
-
* @returns {Promise<Models.UsageDatabases>}
|
|
168
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
169
|
-
*/
|
|
170
|
-
listUsage(range?: UsageRange): Promise<Models.UsageDatabases>;
|
|
171
|
-
/**
|
|
172
|
-
* Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
|
|
173
|
-
*
|
|
174
|
-
* @param {string} params.databaseId - Database ID.
|
|
175
|
-
* @throws {AppwriteException}
|
|
176
|
-
* @returns {Promise<Models.Database>}
|
|
177
|
-
*/
|
|
178
|
-
get(params: {
|
|
179
|
-
databaseId: string;
|
|
180
|
-
}): Promise<Models.Database>;
|
|
181
|
-
/**
|
|
182
|
-
* Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
|
|
183
|
-
*
|
|
184
|
-
* @param {string} databaseId - Database ID.
|
|
185
|
-
* @throws {AppwriteException}
|
|
186
|
-
* @returns {Promise<Models.Database>}
|
|
187
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
188
|
-
*/
|
|
189
|
-
get(databaseId: string): Promise<Models.Database>;
|
|
190
|
-
/**
|
|
191
|
-
* Update a database by its unique ID.
|
|
192
|
-
*
|
|
193
|
-
* @param {string} params.databaseId - Database ID.
|
|
194
|
-
* @param {string} params.name - Database name. Max length: 128 chars.
|
|
195
|
-
* @param {boolean} params.enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
196
|
-
* @throws {AppwriteException}
|
|
197
|
-
* @returns {Promise<Models.Database>}
|
|
198
|
-
*/
|
|
199
|
-
update(params: {
|
|
200
|
-
databaseId: string;
|
|
201
|
-
name: string;
|
|
202
|
-
enabled?: boolean;
|
|
203
|
-
}): Promise<Models.Database>;
|
|
204
|
-
/**
|
|
205
|
-
* Update a database by its unique ID.
|
|
206
|
-
*
|
|
207
|
-
* @param {string} databaseId - Database ID.
|
|
208
|
-
* @param {string} name - Database name. Max length: 128 chars.
|
|
209
|
-
* @param {boolean} enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
210
|
-
* @throws {AppwriteException}
|
|
211
|
-
* @returns {Promise<Models.Database>}
|
|
212
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
213
|
-
*/
|
|
214
|
-
update(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
|
|
215
|
-
/**
|
|
216
|
-
* Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
|
|
217
|
-
*
|
|
218
|
-
* @param {string} params.databaseId - Database ID.
|
|
219
|
-
* @throws {AppwriteException}
|
|
220
|
-
* @returns {Promise<{}>}
|
|
221
|
-
*/
|
|
222
|
-
delete(params: {
|
|
223
|
-
databaseId: string;
|
|
224
|
-
}): Promise<{}>;
|
|
225
|
-
/**
|
|
226
|
-
* Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
|
|
227
|
-
*
|
|
228
|
-
* @param {string} databaseId - Database ID.
|
|
229
|
-
* @throws {AppwriteException}
|
|
230
|
-
* @returns {Promise<{}>}
|
|
231
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
232
|
-
*/
|
|
233
|
-
delete(databaseId: string): Promise<{}>;
|
|
234
|
-
/**
|
|
235
|
-
* Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.
|
|
236
|
-
*
|
|
237
|
-
* @param {string} params.databaseId - Database ID.
|
|
238
|
-
* @param {string[]} params.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, enabled, documentSecurity
|
|
239
|
-
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
240
|
-
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
241
|
-
* @throws {AppwriteException}
|
|
242
|
-
* @returns {Promise<Models.CollectionList>}
|
|
243
|
-
*/
|
|
244
|
-
listCollections(params: {
|
|
245
|
-
databaseId: string;
|
|
246
|
-
queries?: string[];
|
|
247
|
-
search?: string;
|
|
248
|
-
total?: boolean;
|
|
249
|
-
}): Promise<Models.CollectionList>;
|
|
250
|
-
/**
|
|
251
|
-
* Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.
|
|
252
|
-
*
|
|
253
|
-
* @param {string} databaseId - Database ID.
|
|
254
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity
|
|
255
|
-
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
256
|
-
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
257
|
-
* @throws {AppwriteException}
|
|
258
|
-
* @returns {Promise<Models.CollectionList>}
|
|
259
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
260
|
-
*/
|
|
261
|
-
listCollections(databaseId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.CollectionList>;
|
|
262
|
-
/**
|
|
263
|
-
* Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
|
|
264
|
-
*
|
|
265
|
-
* @param {string} params.databaseId - Database ID.
|
|
266
|
-
* @param {string} params.collectionId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
267
|
-
* @param {string} params.name - Collection name. Max length: 128 chars.
|
|
268
|
-
* @param {string[]} params.permissions - An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
269
|
-
* @param {boolean} params.documentSecurity - Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
270
|
-
* @param {boolean} params.enabled - Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
|
|
271
|
-
* @param {object[]} params.attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
|
|
272
|
-
* @param {object[]} params.indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).
|
|
273
|
-
* @throws {AppwriteException}
|
|
274
|
-
* @returns {Promise<Models.Collection>}
|
|
275
|
-
*/
|
|
276
|
-
createCollection(params: {
|
|
277
|
-
databaseId: string;
|
|
278
|
-
collectionId: string;
|
|
279
|
-
name: string;
|
|
280
|
-
permissions?: string[];
|
|
281
|
-
documentSecurity?: boolean;
|
|
282
|
-
enabled?: boolean;
|
|
283
|
-
attributes?: object[];
|
|
284
|
-
indexes?: object[];
|
|
285
|
-
}): Promise<Models.Collection>;
|
|
286
|
-
/**
|
|
287
|
-
* Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
|
|
288
|
-
*
|
|
289
|
-
* @param {string} databaseId - Database ID.
|
|
290
|
-
* @param {string} collectionId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
291
|
-
* @param {string} name - Collection name. Max length: 128 chars.
|
|
292
|
-
* @param {string[]} permissions - An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
293
|
-
* @param {boolean} documentSecurity - Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
294
|
-
* @param {boolean} enabled - Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
|
|
295
|
-
* @param {object[]} attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
|
|
296
|
-
* @param {object[]} indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).
|
|
297
|
-
* @throws {AppwriteException}
|
|
298
|
-
* @returns {Promise<Models.Collection>}
|
|
299
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
300
|
-
*/
|
|
301
|
-
createCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean, attributes?: object[], indexes?: object[]): Promise<Models.Collection>;
|
|
302
|
-
/**
|
|
303
|
-
* Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.
|
|
304
|
-
*
|
|
305
|
-
* @param {string} params.databaseId - Database ID.
|
|
306
|
-
* @param {string} params.collectionId - Collection ID.
|
|
307
|
-
* @throws {AppwriteException}
|
|
308
|
-
* @returns {Promise<Models.Collection>}
|
|
309
|
-
*/
|
|
310
|
-
getCollection(params: {
|
|
311
|
-
databaseId: string;
|
|
312
|
-
collectionId: string;
|
|
313
|
-
}): Promise<Models.Collection>;
|
|
314
|
-
/**
|
|
315
|
-
* Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.
|
|
316
|
-
*
|
|
317
|
-
* @param {string} databaseId - Database ID.
|
|
318
|
-
* @param {string} collectionId - Collection ID.
|
|
319
|
-
* @throws {AppwriteException}
|
|
320
|
-
* @returns {Promise<Models.Collection>}
|
|
321
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
322
|
-
*/
|
|
323
|
-
getCollection(databaseId: string, collectionId: string): Promise<Models.Collection>;
|
|
324
|
-
/**
|
|
325
|
-
* Update a collection by its unique ID.
|
|
326
|
-
*
|
|
327
|
-
* @param {string} params.databaseId - Database ID.
|
|
328
|
-
* @param {string} params.collectionId - Collection ID.
|
|
329
|
-
* @param {string} params.name - Collection name. Max length: 128 chars.
|
|
330
|
-
* @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
331
|
-
* @param {boolean} params.documentSecurity - Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
332
|
-
* @param {boolean} params.enabled - Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
|
|
333
|
-
* @throws {AppwriteException}
|
|
334
|
-
* @returns {Promise<Models.Collection>}
|
|
335
|
-
*/
|
|
336
|
-
updateCollection(params: {
|
|
337
|
-
databaseId: string;
|
|
338
|
-
collectionId: string;
|
|
339
|
-
name: string;
|
|
340
|
-
permissions?: string[];
|
|
341
|
-
documentSecurity?: boolean;
|
|
342
|
-
enabled?: boolean;
|
|
343
|
-
}): Promise<Models.Collection>;
|
|
344
|
-
/**
|
|
345
|
-
* Update a collection by its unique ID.
|
|
346
|
-
*
|
|
347
|
-
* @param {string} databaseId - Database ID.
|
|
348
|
-
* @param {string} collectionId - Collection ID.
|
|
349
|
-
* @param {string} name - Collection name. Max length: 128 chars.
|
|
350
|
-
* @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
351
|
-
* @param {boolean} documentSecurity - Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
352
|
-
* @param {boolean} enabled - Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
|
|
353
|
-
* @throws {AppwriteException}
|
|
354
|
-
* @returns {Promise<Models.Collection>}
|
|
355
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
356
|
-
*/
|
|
357
|
-
updateCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection>;
|
|
358
|
-
/**
|
|
359
|
-
* Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.
|
|
360
|
-
*
|
|
361
|
-
* @param {string} params.databaseId - Database ID.
|
|
362
|
-
* @param {string} params.collectionId - Collection ID.
|
|
363
|
-
* @throws {AppwriteException}
|
|
364
|
-
* @returns {Promise<{}>}
|
|
365
|
-
*/
|
|
366
|
-
deleteCollection(params: {
|
|
367
|
-
databaseId: string;
|
|
368
|
-
collectionId: string;
|
|
369
|
-
}): Promise<{}>;
|
|
370
|
-
/**
|
|
371
|
-
* Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.
|
|
372
|
-
*
|
|
373
|
-
* @param {string} databaseId - Database ID.
|
|
374
|
-
* @param {string} collectionId - Collection ID.
|
|
375
|
-
* @throws {AppwriteException}
|
|
376
|
-
* @returns {Promise<{}>}
|
|
377
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
378
|
-
*/
|
|
379
|
-
deleteCollection(databaseId: string, collectionId: string): Promise<{}>;
|
|
380
|
-
/**
|
|
381
|
-
* Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
|
|
382
|
-
*
|
|
383
|
-
* @param {string} params.databaseId - Database ID.
|
|
384
|
-
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
385
|
-
* @param {string[]} params.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.
|
|
386
|
-
* @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
387
|
-
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
388
|
-
* @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
|
|
389
|
-
* @throws {AppwriteException}
|
|
390
|
-
* @returns {Promise<Models.DocumentList<Document>>}
|
|
391
|
-
*/
|
|
392
|
-
listDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
393
|
-
databaseId: string;
|
|
394
|
-
collectionId: string;
|
|
395
|
-
queries?: string[];
|
|
396
|
-
transactionId?: string;
|
|
397
|
-
total?: boolean;
|
|
398
|
-
ttl?: number;
|
|
399
|
-
}): Promise<Models.DocumentList<Document>>;
|
|
400
|
-
/**
|
|
401
|
-
* Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
|
|
402
|
-
*
|
|
403
|
-
* @param {string} databaseId - Database ID.
|
|
404
|
-
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
405
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
406
|
-
* @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
407
|
-
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
408
|
-
* @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
|
|
409
|
-
* @throws {AppwriteException}
|
|
410
|
-
* @returns {Promise<Models.DocumentList<Document>>}
|
|
411
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
412
|
-
*/
|
|
413
|
-
listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number): Promise<Models.DocumentList<Document>>;
|
|
414
|
-
/**
|
|
415
|
-
* Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
|
|
416
|
-
*
|
|
417
|
-
* @param {string} params.databaseId - Database ID.
|
|
418
|
-
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
|
|
419
|
-
* @param {string} params.documentId - Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
420
|
-
* @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>} params.data - Document data as JSON object.
|
|
421
|
-
* @param {string[]} params.permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
422
|
-
* @throws {AppwriteException}
|
|
423
|
-
* @returns {Promise<Document>}
|
|
424
|
-
*/
|
|
425
|
-
createDocument<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
426
|
-
databaseId: string;
|
|
427
|
-
collectionId: string;
|
|
428
|
-
documentId: string;
|
|
429
|
-
data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>;
|
|
430
|
-
permissions?: string[];
|
|
431
|
-
}): Promise<Document>;
|
|
432
|
-
/**
|
|
433
|
-
* Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
|
|
434
|
-
*
|
|
435
|
-
* @param {string} databaseId - Database ID.
|
|
436
|
-
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
|
|
437
|
-
* @param {string} documentId - Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
438
|
-
* @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>} data - Document data as JSON object.
|
|
439
|
-
* @param {string[]} permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
440
|
-
* @throws {AppwriteException}
|
|
441
|
-
* @returns {Promise<Document>}
|
|
442
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
443
|
-
*/
|
|
444
|
-
createDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>, permissions?: string[]): Promise<Document>;
|
|
445
|
-
/**
|
|
446
|
-
* Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
|
|
447
|
-
*
|
|
448
|
-
* @param {string} params.databaseId - Database ID.
|
|
449
|
-
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
|
|
450
|
-
* @param {object[]} params.documents - Array of documents data as JSON objects.
|
|
451
|
-
* @throws {AppwriteException}
|
|
452
|
-
* @returns {Promise<Models.DocumentList<Document>>}
|
|
453
|
-
*/
|
|
454
|
-
createDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
455
|
-
databaseId: string;
|
|
456
|
-
collectionId: string;
|
|
457
|
-
documents: object[];
|
|
458
|
-
}): Promise<Models.DocumentList<Document>>;
|
|
459
|
-
/**
|
|
460
|
-
* Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
|
|
461
|
-
*
|
|
462
|
-
* @param {string} databaseId - Database ID.
|
|
463
|
-
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
|
|
464
|
-
* @param {object[]} documents - Array of documents data as JSON objects.
|
|
465
|
-
* @throws {AppwriteException}
|
|
466
|
-
* @returns {Promise<Models.DocumentList<Document>>}
|
|
467
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
468
|
-
*/
|
|
469
|
-
createDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[]): Promise<Models.DocumentList<Document>>;
|
|
470
|
-
/**
|
|
471
|
-
* Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
|
|
472
|
-
*
|
|
473
|
-
*
|
|
474
|
-
* @param {string} params.databaseId - Database ID.
|
|
475
|
-
* @param {string} params.collectionId - Collection ID.
|
|
476
|
-
* @param {object[]} params.documents - Array of document data as JSON objects. May contain partial documents.
|
|
477
|
-
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
478
|
-
* @throws {AppwriteException}
|
|
479
|
-
* @returns {Promise<Models.DocumentList<Document>>}
|
|
480
|
-
*/
|
|
481
|
-
upsertDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
482
|
-
databaseId: string;
|
|
483
|
-
collectionId: string;
|
|
484
|
-
documents: object[];
|
|
485
|
-
transactionId?: string;
|
|
486
|
-
}): Promise<Models.DocumentList<Document>>;
|
|
487
|
-
/**
|
|
488
|
-
* Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
* @param {string} databaseId - Database ID.
|
|
492
|
-
* @param {string} collectionId - Collection ID.
|
|
493
|
-
* @param {object[]} documents - Array of document data as JSON objects. May contain partial documents.
|
|
494
|
-
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
495
|
-
* @throws {AppwriteException}
|
|
496
|
-
* @returns {Promise<Models.DocumentList<Document>>}
|
|
497
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
498
|
-
*/
|
|
499
|
-
upsertDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[], transactionId?: string): Promise<Models.DocumentList<Document>>;
|
|
500
|
-
/**
|
|
501
|
-
* Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.
|
|
502
|
-
*
|
|
503
|
-
* @param {string} params.databaseId - Database ID.
|
|
504
|
-
* @param {string} params.collectionId - Collection ID.
|
|
505
|
-
* @param {object} params.data - Document data as JSON object. Include only attribute and value pairs to be updated.
|
|
506
|
-
* @param {string[]} params.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.
|
|
507
|
-
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
508
|
-
* @throws {AppwriteException}
|
|
509
|
-
* @returns {Promise<Models.DocumentList<Document>>}
|
|
510
|
-
*/
|
|
511
|
-
updateDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
512
|
-
databaseId: string;
|
|
513
|
-
collectionId: string;
|
|
514
|
-
data?: object;
|
|
515
|
-
queries?: string[];
|
|
516
|
-
transactionId?: string;
|
|
517
|
-
}): Promise<Models.DocumentList<Document>>;
|
|
518
|
-
/**
|
|
519
|
-
* Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.
|
|
520
|
-
*
|
|
521
|
-
* @param {string} databaseId - Database ID.
|
|
522
|
-
* @param {string} collectionId - Collection ID.
|
|
523
|
-
* @param {object} data - Document data as JSON object. Include only attribute and value pairs to be updated.
|
|
524
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
525
|
-
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
526
|
-
* @throws {AppwriteException}
|
|
527
|
-
* @returns {Promise<Models.DocumentList<Document>>}
|
|
528
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
529
|
-
*/
|
|
530
|
-
updateDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, data?: object, queries?: string[], transactionId?: string): Promise<Models.DocumentList<Document>>;
|
|
531
|
-
/**
|
|
532
|
-
* Bulk delete documents using queries, if no queries are passed then all documents are deleted.
|
|
533
|
-
*
|
|
534
|
-
* @param {string} params.databaseId - Database ID.
|
|
535
|
-
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
536
|
-
* @param {string[]} params.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.
|
|
537
|
-
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
538
|
-
* @throws {AppwriteException}
|
|
539
|
-
* @returns {Promise<Models.DocumentList<Document>>}
|
|
540
|
-
*/
|
|
541
|
-
deleteDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
542
|
-
databaseId: string;
|
|
543
|
-
collectionId: string;
|
|
544
|
-
queries?: string[];
|
|
545
|
-
transactionId?: string;
|
|
546
|
-
}): Promise<Models.DocumentList<Document>>;
|
|
547
|
-
/**
|
|
548
|
-
* Bulk delete documents using queries, if no queries are passed then all documents are deleted.
|
|
549
|
-
*
|
|
550
|
-
* @param {string} databaseId - Database ID.
|
|
551
|
-
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
552
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
553
|
-
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
554
|
-
* @throws {AppwriteException}
|
|
555
|
-
* @returns {Promise<Models.DocumentList<Document>>}
|
|
556
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
557
|
-
*/
|
|
558
|
-
deleteDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string): Promise<Models.DocumentList<Document>>;
|
|
559
|
-
/**
|
|
560
|
-
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
|
|
561
|
-
*
|
|
562
|
-
* @param {string} params.databaseId - Database ID.
|
|
563
|
-
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
564
|
-
* @param {string} params.documentId - Document ID.
|
|
565
|
-
* @param {string[]} params.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.
|
|
566
|
-
* @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
567
|
-
* @throws {AppwriteException}
|
|
568
|
-
* @returns {Promise<Document>}
|
|
569
|
-
*/
|
|
570
|
-
getDocument<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
571
|
-
databaseId: string;
|
|
572
|
-
collectionId: string;
|
|
573
|
-
documentId: string;
|
|
574
|
-
queries?: string[];
|
|
575
|
-
transactionId?: string;
|
|
576
|
-
}): Promise<Document>;
|
|
577
|
-
/**
|
|
578
|
-
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
|
|
579
|
-
*
|
|
580
|
-
* @param {string} databaseId - Database ID.
|
|
581
|
-
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
582
|
-
* @param {string} documentId - Document ID.
|
|
583
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
584
|
-
* @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
585
|
-
* @throws {AppwriteException}
|
|
586
|
-
* @returns {Promise<Document>}
|
|
587
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
588
|
-
*/
|
|
589
|
-
getDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, queries?: string[], transactionId?: string): Promise<Document>;
|
|
590
|
-
/**
|
|
591
|
-
* Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
|
|
592
|
-
*
|
|
593
|
-
* @param {string} params.databaseId - Database ID.
|
|
594
|
-
* @param {string} params.collectionId - Collection ID.
|
|
595
|
-
* @param {string} params.documentId - Document ID.
|
|
596
|
-
* @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>} params.data - Document data as JSON object. Include all required fields of the document to be created or updated.
|
|
597
|
-
* @param {string[]} params.permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
598
|
-
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
599
|
-
* @throws {AppwriteException}
|
|
600
|
-
* @returns {Promise<Document>}
|
|
601
|
-
*/
|
|
602
|
-
upsertDocument<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
603
|
-
databaseId: string;
|
|
604
|
-
collectionId: string;
|
|
605
|
-
documentId: string;
|
|
606
|
-
data?: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>;
|
|
607
|
-
permissions?: string[];
|
|
608
|
-
transactionId?: string;
|
|
609
|
-
}): Promise<Document>;
|
|
610
|
-
/**
|
|
611
|
-
* Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
|
|
612
|
-
*
|
|
613
|
-
* @param {string} databaseId - Database ID.
|
|
614
|
-
* @param {string} collectionId - Collection ID.
|
|
615
|
-
* @param {string} documentId - Document ID.
|
|
616
|
-
* @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>} data - Document data as JSON object. Include all required fields of the document to be created or updated.
|
|
617
|
-
* @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
618
|
-
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
619
|
-
* @throws {AppwriteException}
|
|
620
|
-
* @returns {Promise<Document>}
|
|
621
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
622
|
-
*/
|
|
623
|
-
upsertDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>, permissions?: string[], transactionId?: string): Promise<Document>;
|
|
624
|
-
/**
|
|
625
|
-
* Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
626
|
-
*
|
|
627
|
-
* @param {string} params.databaseId - Database ID.
|
|
628
|
-
* @param {string} params.collectionId - Collection ID.
|
|
629
|
-
* @param {string} params.documentId - Document ID.
|
|
630
|
-
* @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>} params.data - Document data as JSON object. Include only fields and value pairs to be updated.
|
|
631
|
-
* @param {string[]} params.permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
632
|
-
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
633
|
-
* @throws {AppwriteException}
|
|
634
|
-
* @returns {Promise<Document>}
|
|
635
|
-
*/
|
|
636
|
-
updateDocument<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
637
|
-
databaseId: string;
|
|
638
|
-
collectionId: string;
|
|
639
|
-
documentId: string;
|
|
640
|
-
data?: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>;
|
|
641
|
-
permissions?: string[];
|
|
642
|
-
transactionId?: string;
|
|
643
|
-
}): Promise<Document>;
|
|
644
|
-
/**
|
|
645
|
-
* Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
646
|
-
*
|
|
647
|
-
* @param {string} databaseId - Database ID.
|
|
648
|
-
* @param {string} collectionId - Collection ID.
|
|
649
|
-
* @param {string} documentId - Document ID.
|
|
650
|
-
* @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>} data - Document data as JSON object. Include only fields and value pairs to be updated.
|
|
651
|
-
* @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
652
|
-
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
653
|
-
* @throws {AppwriteException}
|
|
654
|
-
* @returns {Promise<Document>}
|
|
655
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
656
|
-
*/
|
|
657
|
-
updateDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>, permissions?: string[], transactionId?: string): Promise<Document>;
|
|
658
|
-
/**
|
|
659
|
-
* Delete a document by its unique ID.
|
|
660
|
-
*
|
|
661
|
-
* @param {string} params.databaseId - Database ID.
|
|
662
|
-
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
663
|
-
* @param {string} params.documentId - Document ID.
|
|
664
|
-
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
665
|
-
* @throws {AppwriteException}
|
|
666
|
-
* @returns {Promise<{}>}
|
|
667
|
-
*/
|
|
668
|
-
deleteDocument(params: {
|
|
669
|
-
databaseId: string;
|
|
670
|
-
collectionId: string;
|
|
671
|
-
documentId: string;
|
|
672
|
-
transactionId?: string;
|
|
673
|
-
}): Promise<{}>;
|
|
674
|
-
/**
|
|
675
|
-
* Delete a document by its unique ID.
|
|
676
|
-
*
|
|
677
|
-
* @param {string} databaseId - Database ID.
|
|
678
|
-
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
679
|
-
* @param {string} documentId - Document ID.
|
|
680
|
-
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
681
|
-
* @throws {AppwriteException}
|
|
682
|
-
* @returns {Promise<{}>}
|
|
683
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
684
|
-
*/
|
|
685
|
-
deleteDocument(databaseId: string, collectionId: string, documentId: string, transactionId?: string): Promise<{}>;
|
|
686
|
-
/**
|
|
687
|
-
* Get the document activity logs list by its unique ID.
|
|
688
|
-
*
|
|
689
|
-
* @param {string} params.databaseId - Database ID.
|
|
690
|
-
* @param {string} params.collectionId - Collection ID.
|
|
691
|
-
* @param {string} params.documentId - Document ID.
|
|
692
|
-
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
693
|
-
* @throws {AppwriteException}
|
|
694
|
-
* @returns {Promise<Models.LogList>}
|
|
695
|
-
*/
|
|
696
|
-
listDocumentLogs(params: {
|
|
697
|
-
databaseId: string;
|
|
698
|
-
collectionId: string;
|
|
699
|
-
documentId: string;
|
|
700
|
-
queries?: string[];
|
|
701
|
-
}): Promise<Models.LogList>;
|
|
702
|
-
/**
|
|
703
|
-
* Get the document activity logs list by its unique ID.
|
|
704
|
-
*
|
|
705
|
-
* @param {string} databaseId - Database ID.
|
|
706
|
-
* @param {string} collectionId - Collection ID.
|
|
707
|
-
* @param {string} documentId - Document ID.
|
|
708
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
709
|
-
* @throws {AppwriteException}
|
|
710
|
-
* @returns {Promise<Models.LogList>}
|
|
711
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
712
|
-
*/
|
|
713
|
-
listDocumentLogs(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Models.LogList>;
|
|
714
|
-
/**
|
|
715
|
-
* Decrement a specific column of a row by a given value.
|
|
716
|
-
*
|
|
717
|
-
* @param {string} params.databaseId - Database ID.
|
|
718
|
-
* @param {string} params.collectionId - Collection ID.
|
|
719
|
-
* @param {string} params.documentId - Document ID.
|
|
720
|
-
* @param {string} params.attribute - Attribute key.
|
|
721
|
-
* @param {number} params.value - Value to decrement the attribute by. The value must be a number.
|
|
722
|
-
* @param {number} params.min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
|
|
723
|
-
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
724
|
-
* @throws {AppwriteException}
|
|
725
|
-
* @returns {Promise<Document>}
|
|
726
|
-
*/
|
|
727
|
-
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
728
|
-
databaseId: string;
|
|
729
|
-
collectionId: string;
|
|
730
|
-
documentId: string;
|
|
731
|
-
attribute: string;
|
|
732
|
-
value?: number;
|
|
733
|
-
min?: number;
|
|
734
|
-
transactionId?: string;
|
|
735
|
-
}): Promise<Document>;
|
|
736
|
-
/**
|
|
737
|
-
* Decrement a specific column of a row by a given value.
|
|
738
|
-
*
|
|
739
|
-
* @param {string} databaseId - Database ID.
|
|
740
|
-
* @param {string} collectionId - Collection ID.
|
|
741
|
-
* @param {string} documentId - Document ID.
|
|
742
|
-
* @param {string} attribute - Attribute key.
|
|
743
|
-
* @param {number} value - Value to decrement the attribute by. The value must be a number.
|
|
744
|
-
* @param {number} min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
|
|
745
|
-
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
746
|
-
* @throws {AppwriteException}
|
|
747
|
-
* @returns {Promise<Document>}
|
|
748
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
749
|
-
*/
|
|
750
|
-
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string): Promise<Document>;
|
|
751
|
-
/**
|
|
752
|
-
* Increment a specific column of a row by a given value.
|
|
753
|
-
*
|
|
754
|
-
* @param {string} params.databaseId - Database ID.
|
|
755
|
-
* @param {string} params.collectionId - Collection ID.
|
|
756
|
-
* @param {string} params.documentId - Document ID.
|
|
757
|
-
* @param {string} params.attribute - Attribute key.
|
|
758
|
-
* @param {number} params.value - Value to increment the attribute by. The value must be a number.
|
|
759
|
-
* @param {number} params.max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
|
|
760
|
-
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
761
|
-
* @throws {AppwriteException}
|
|
762
|
-
* @returns {Promise<Document>}
|
|
763
|
-
*/
|
|
764
|
-
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
765
|
-
databaseId: string;
|
|
766
|
-
collectionId: string;
|
|
767
|
-
documentId: string;
|
|
768
|
-
attribute: string;
|
|
769
|
-
value?: number;
|
|
770
|
-
max?: number;
|
|
771
|
-
transactionId?: string;
|
|
772
|
-
}): Promise<Document>;
|
|
773
|
-
/**
|
|
774
|
-
* Increment a specific column of a row by a given value.
|
|
775
|
-
*
|
|
776
|
-
* @param {string} databaseId - Database ID.
|
|
777
|
-
* @param {string} collectionId - Collection ID.
|
|
778
|
-
* @param {string} documentId - Document ID.
|
|
779
|
-
* @param {string} attribute - Attribute key.
|
|
780
|
-
* @param {number} value - Value to increment the attribute by. The value must be a number.
|
|
781
|
-
* @param {number} max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
|
|
782
|
-
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
783
|
-
* @throws {AppwriteException}
|
|
784
|
-
* @returns {Promise<Document>}
|
|
785
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
786
|
-
*/
|
|
787
|
-
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string): Promise<Document>;
|
|
788
|
-
/**
|
|
789
|
-
* List indexes in the collection.
|
|
790
|
-
*
|
|
791
|
-
* @param {string} params.databaseId - Database ID.
|
|
792
|
-
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
793
|
-
* @param {string[]} params.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: key, type, status, attributes, error
|
|
794
|
-
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
795
|
-
* @throws {AppwriteException}
|
|
796
|
-
* @returns {Promise<Models.IndexList>}
|
|
797
|
-
*/
|
|
798
|
-
listIndexes(params: {
|
|
799
|
-
databaseId: string;
|
|
800
|
-
collectionId: string;
|
|
801
|
-
queries?: string[];
|
|
802
|
-
total?: boolean;
|
|
803
|
-
}): Promise<Models.IndexList>;
|
|
804
|
-
/**
|
|
805
|
-
* List indexes in the collection.
|
|
806
|
-
*
|
|
807
|
-
* @param {string} databaseId - Database ID.
|
|
808
|
-
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
809
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error
|
|
810
|
-
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
811
|
-
* @throws {AppwriteException}
|
|
812
|
-
* @returns {Promise<Models.IndexList>}
|
|
813
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
814
|
-
*/
|
|
815
|
-
listIndexes(databaseId: string, collectionId: string, queries?: string[], total?: boolean): Promise<Models.IndexList>;
|
|
816
|
-
/**
|
|
817
|
-
* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
|
|
818
|
-
* Attributes can be `key`, `fulltext`, and `unique`.
|
|
819
|
-
*
|
|
820
|
-
* @param {string} params.databaseId - Database ID.
|
|
821
|
-
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
822
|
-
* @param {string} params.key - Index Key.
|
|
823
|
-
* @param {DocumentsDBIndexType} params.type - Index type.
|
|
824
|
-
* @param {string[]} params.attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.
|
|
825
|
-
* @param {OrderBy[]} params.orders - Array of index orders. Maximum of 100 orders are allowed.
|
|
826
|
-
* @param {number[]} params.lengths - Length of index. Maximum of 100
|
|
827
|
-
* @throws {AppwriteException}
|
|
828
|
-
* @returns {Promise<Models.Index>}
|
|
829
|
-
*/
|
|
830
|
-
createIndex(params: {
|
|
831
|
-
databaseId: string;
|
|
832
|
-
collectionId: string;
|
|
833
|
-
key: string;
|
|
834
|
-
type: DocumentsDBIndexType;
|
|
835
|
-
attributes: string[];
|
|
836
|
-
orders?: OrderBy[];
|
|
837
|
-
lengths?: number[];
|
|
838
|
-
}): Promise<Models.Index>;
|
|
839
|
-
/**
|
|
840
|
-
* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
|
|
841
|
-
* Attributes can be `key`, `fulltext`, and `unique`.
|
|
842
|
-
*
|
|
843
|
-
* @param {string} databaseId - Database ID.
|
|
844
|
-
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
845
|
-
* @param {string} key - Index Key.
|
|
846
|
-
* @param {DocumentsDBIndexType} type - Index type.
|
|
847
|
-
* @param {string[]} attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.
|
|
848
|
-
* @param {OrderBy[]} orders - Array of index orders. Maximum of 100 orders are allowed.
|
|
849
|
-
* @param {number[]} lengths - Length of index. Maximum of 100
|
|
850
|
-
* @throws {AppwriteException}
|
|
851
|
-
* @returns {Promise<Models.Index>}
|
|
852
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
853
|
-
*/
|
|
854
|
-
createIndex(databaseId: string, collectionId: string, key: string, type: DocumentsDBIndexType, attributes: string[], orders?: OrderBy[], lengths?: number[]): Promise<Models.Index>;
|
|
855
|
-
/**
|
|
856
|
-
* Get index by ID.
|
|
857
|
-
*
|
|
858
|
-
* @param {string} params.databaseId - Database ID.
|
|
859
|
-
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
860
|
-
* @param {string} params.key - Index Key.
|
|
861
|
-
* @throws {AppwriteException}
|
|
862
|
-
* @returns {Promise<Models.Index>}
|
|
863
|
-
*/
|
|
864
|
-
getIndex(params: {
|
|
865
|
-
databaseId: string;
|
|
866
|
-
collectionId: string;
|
|
867
|
-
key: string;
|
|
868
|
-
}): Promise<Models.Index>;
|
|
869
|
-
/**
|
|
870
|
-
* Get index by ID.
|
|
871
|
-
*
|
|
872
|
-
* @param {string} databaseId - Database ID.
|
|
873
|
-
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
874
|
-
* @param {string} key - Index Key.
|
|
875
|
-
* @throws {AppwriteException}
|
|
876
|
-
* @returns {Promise<Models.Index>}
|
|
877
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
878
|
-
*/
|
|
879
|
-
getIndex(databaseId: string, collectionId: string, key: string): Promise<Models.Index>;
|
|
880
|
-
/**
|
|
881
|
-
* Delete an index.
|
|
882
|
-
*
|
|
883
|
-
* @param {string} params.databaseId - Database ID.
|
|
884
|
-
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
885
|
-
* @param {string} params.key - Index Key.
|
|
886
|
-
* @throws {AppwriteException}
|
|
887
|
-
* @returns {Promise<{}>}
|
|
888
|
-
*/
|
|
889
|
-
deleteIndex(params: {
|
|
890
|
-
databaseId: string;
|
|
891
|
-
collectionId: string;
|
|
892
|
-
key: string;
|
|
893
|
-
}): Promise<{}>;
|
|
894
|
-
/**
|
|
895
|
-
* Delete an index.
|
|
896
|
-
*
|
|
897
|
-
* @param {string} databaseId - Database ID.
|
|
898
|
-
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
899
|
-
* @param {string} key - Index Key.
|
|
900
|
-
* @throws {AppwriteException}
|
|
901
|
-
* @returns {Promise<{}>}
|
|
902
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
903
|
-
*/
|
|
904
|
-
deleteIndex(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
905
|
-
/**
|
|
906
|
-
* Get the collection activity logs list by its unique ID.
|
|
907
|
-
*
|
|
908
|
-
* @param {string} params.databaseId - Database ID.
|
|
909
|
-
* @param {string} params.collectionId - Collection ID.
|
|
910
|
-
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
911
|
-
* @throws {AppwriteException}
|
|
912
|
-
* @returns {Promise<Models.LogList>}
|
|
913
|
-
*/
|
|
914
|
-
listCollectionLogs(params: {
|
|
915
|
-
databaseId: string;
|
|
916
|
-
collectionId: string;
|
|
917
|
-
queries?: string[];
|
|
918
|
-
}): Promise<Models.LogList>;
|
|
919
|
-
/**
|
|
920
|
-
* Get the collection activity logs list by its unique ID.
|
|
921
|
-
*
|
|
922
|
-
* @param {string} databaseId - Database ID.
|
|
923
|
-
* @param {string} collectionId - Collection ID.
|
|
924
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
925
|
-
* @throws {AppwriteException}
|
|
926
|
-
* @returns {Promise<Models.LogList>}
|
|
927
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
928
|
-
*/
|
|
929
|
-
listCollectionLogs(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.LogList>;
|
|
930
|
-
/**
|
|
931
|
-
* Get usage metrics and statistics for a collection. Returning the total number of documents. 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.
|
|
932
|
-
*
|
|
933
|
-
* @param {string} params.databaseId - Database ID.
|
|
934
|
-
* @param {string} params.collectionId - Collection ID.
|
|
935
|
-
* @param {UsageRange} params.range - Date range.
|
|
936
|
-
* @throws {AppwriteException}
|
|
937
|
-
* @returns {Promise<Models.UsageCollection>}
|
|
938
|
-
*/
|
|
939
|
-
getCollectionUsage(params: {
|
|
940
|
-
databaseId: string;
|
|
941
|
-
collectionId: string;
|
|
942
|
-
range?: UsageRange;
|
|
943
|
-
}): Promise<Models.UsageCollection>;
|
|
944
|
-
/**
|
|
945
|
-
* Get usage metrics and statistics for a collection. Returning the total number of documents. 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.
|
|
946
|
-
*
|
|
947
|
-
* @param {string} databaseId - Database ID.
|
|
948
|
-
* @param {string} collectionId - Collection ID.
|
|
949
|
-
* @param {UsageRange} range - Date range.
|
|
950
|
-
* @throws {AppwriteException}
|
|
951
|
-
* @returns {Promise<Models.UsageCollection>}
|
|
952
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
953
|
-
*/
|
|
954
|
-
getCollectionUsage(databaseId: string, collectionId: string, range?: UsageRange): Promise<Models.UsageCollection>;
|
|
955
|
-
/**
|
|
956
|
-
* Get usage metrics and statistics for a database. You can view the total number of collections, documents, and 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.
|
|
957
|
-
*
|
|
958
|
-
* @param {string} params.databaseId - Database ID.
|
|
959
|
-
* @param {UsageRange} params.range - Date range.
|
|
960
|
-
* @throws {AppwriteException}
|
|
961
|
-
* @returns {Promise<Models.UsageDocumentsDB>}
|
|
962
|
-
*/
|
|
963
|
-
getUsage(params: {
|
|
964
|
-
databaseId: string;
|
|
965
|
-
range?: UsageRange;
|
|
966
|
-
}): Promise<Models.UsageDocumentsDB>;
|
|
967
|
-
/**
|
|
968
|
-
* Get usage metrics and statistics for a database. You can view the total number of collections, documents, and 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.
|
|
969
|
-
*
|
|
970
|
-
* @param {string} databaseId - Database ID.
|
|
971
|
-
* @param {UsageRange} range - Date range.
|
|
972
|
-
* @throws {AppwriteException}
|
|
973
|
-
* @returns {Promise<Models.UsageDocumentsDB>}
|
|
974
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
975
|
-
*/
|
|
976
|
-
getUsage(databaseId: string, range?: UsageRange): Promise<Models.UsageDocumentsDB>;
|
|
977
|
-
}
|