node-appwrite 17.2.0 → 18.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -2
- package/dist/client.js +3 -3
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +3 -3
- package/dist/client.mjs.map +1 -1
- package/dist/enums/{v-c-s-deployment-type.js → vcs-deployment-type.js} +1 -1
- package/dist/enums/vcs-deployment-type.js.map +1 -0
- package/dist/enums/{v-c-s-deployment-type.mjs → vcs-deployment-type.mjs} +2 -2
- package/dist/enums/vcs-deployment-type.mjs.map +1 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/models.d.mts +717 -58
- package/dist/models.d.ts +717 -58
- package/dist/query.d.mts +70 -0
- package/dist/query.d.ts +70 -0
- package/dist/query.js +70 -0
- package/dist/query.js.map +1 -1
- package/dist/query.mjs +70 -0
- package/dist/query.mjs.map +1 -1
- package/dist/services/account.d.mts +625 -70
- package/dist/services/account.d.ts +625 -70
- package/dist/services/account.js +592 -292
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +592 -292
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/avatars.d.mts +157 -26
- package/dist/services/avatars.d.ts +157 -26
- package/dist/services/avatars.js +104 -93
- package/dist/services/avatars.js.map +1 -1
- package/dist/services/avatars.mjs +104 -93
- package/dist/services/avatars.mjs.map +1 -1
- package/dist/services/databases.d.mts +1224 -248
- package/dist/services/databases.d.ts +1224 -248
- package/dist/services/databases.js +877 -611
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +877 -611
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/functions.d.mts +530 -107
- package/dist/services/functions.d.ts +530 -107
- package/dist/services/functions.js +393 -276
- package/dist/services/functions.js.map +1 -1
- package/dist/services/functions.mjs +393 -276
- package/dist/services/functions.mjs.map +1 -1
- package/dist/services/graphql.d.mts +24 -2
- package/dist/services/graphql.d.ts +24 -2
- package/dist/services/graphql.js +20 -16
- package/dist/services/graphql.js.map +1 -1
- package/dist/services/graphql.mjs +20 -16
- package/dist/services/graphql.mjs.map +1 -1
- package/dist/services/health.d.mts +175 -16
- package/dist/services/health.d.ts +175 -16
- package/dist/services/health.js +144 -115
- package/dist/services/health.js.map +1 -1
- package/dist/services/health.mjs +144 -115
- package/dist/services/health.mjs.map +1 -1
- package/dist/services/locale.js.map +1 -1
- package/dist/services/locale.mjs.map +1 -1
- package/dist/services/messaging.d.mts +1544 -262
- package/dist/services/messaging.d.ts +1544 -262
- package/dist/services/messaging.js +1417 -592
- package/dist/services/messaging.js.map +1 -1
- package/dist/services/messaging.mjs +1417 -592
- package/dist/services/messaging.mjs.map +1 -1
- package/dist/services/sites.d.mts +495 -99
- package/dist/services/sites.d.ts +495 -99
- package/dist/services/sites.js +371 -258
- package/dist/services/sites.js.map +1 -1
- package/dist/services/sites.mjs +371 -258
- package/dist/services/sites.mjs.map +1 -1
- package/dist/services/storage.d.mts +306 -63
- package/dist/services/storage.d.ts +306 -63
- package/dist/services/storage.js +225 -158
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs +225 -158
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/tables-db.d.mts +1549 -0
- package/dist/services/tables-db.d.ts +1549 -0
- package/dist/services/tables-db.js +2374 -0
- package/dist/services/tables-db.js.map +1 -0
- package/dist/services/tables-db.mjs +2373 -0
- package/dist/services/tables-db.mjs.map +1 -0
- package/dist/services/teams.d.mts +233 -39
- package/dist/services/teams.d.ts +233 -39
- package/dist/services/teams.js +170 -135
- package/dist/services/teams.js.map +1 -1
- package/dist/services/teams.mjs +170 -135
- package/dist/services/teams.mjs.map +1 -1
- package/dist/services/tokens.d.mts +76 -11
- package/dist/services/tokens.d.ts +76 -11
- package/dist/services/tokens.js +60 -45
- package/dist/services/tokens.js.map +1 -1
- package/dist/services/tokens.mjs +60 -45
- package/dist/services/tokens.mjs.map +1 -1
- package/dist/services/users.d.mts +842 -115
- package/dist/services/users.d.ts +842 -115
- package/dist/services/users.js +719 -408
- package/dist/services/users.js.map +1 -1
- package/dist/services/users.mjs +719 -408
- package/dist/services/users.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/enums/v-c-s-deployment-type.js.map +0 -1
- package/dist/enums/v-c-s-deployment-type.mjs.map +0 -1
- /package/dist/enums/{v-c-s-deployment-type.d.mts → vcs-deployment-type.d.mts} +0 -0
- /package/dist/enums/{v-c-s-deployment-type.d.ts → vcs-deployment-type.d.ts} +0 -0
|
@@ -11,612 +11,1588 @@ declare class Databases {
|
|
|
11
11
|
/**
|
|
12
12
|
* Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
|
|
13
13
|
*
|
|
14
|
-
* @param {string[]} queries
|
|
15
|
-
* @param {string} search
|
|
14
|
+
* @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
|
|
15
|
+
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
16
16
|
* @throws {AppwriteException}
|
|
17
17
|
* @returns {Promise<Models.DatabaseList>}
|
|
18
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.list` instead.
|
|
19
|
+
*/
|
|
20
|
+
list(params?: {
|
|
21
|
+
queries?: string[];
|
|
22
|
+
search?: string;
|
|
23
|
+
}): Promise<Models.DatabaseList>;
|
|
24
|
+
/**
|
|
25
|
+
* Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
|
|
26
|
+
*
|
|
27
|
+
* @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
|
|
28
|
+
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
29
|
+
* @throws {AppwriteException}
|
|
30
|
+
* @returns {Promise<Models.DatabaseList>}
|
|
31
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
18
32
|
*/
|
|
19
33
|
list(queries?: string[], search?: string): Promise<Models.DatabaseList>;
|
|
20
34
|
/**
|
|
21
35
|
* Create a new Database.
|
|
22
36
|
*
|
|
23
37
|
*
|
|
24
|
-
* @param {string} databaseId
|
|
25
|
-
* @param {string} name
|
|
26
|
-
* @param {boolean} enabled
|
|
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
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createDatabase` instead.
|
|
44
|
+
*/
|
|
45
|
+
create(params: {
|
|
46
|
+
databaseId: string;
|
|
47
|
+
name: string;
|
|
48
|
+
enabled?: boolean;
|
|
49
|
+
}): Promise<Models.Database>;
|
|
50
|
+
/**
|
|
51
|
+
* Create a new Database.
|
|
52
|
+
*
|
|
53
|
+
*
|
|
54
|
+
* @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.
|
|
55
|
+
* @param {string} name - Database name. Max length: 128 chars.
|
|
56
|
+
* @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.
|
|
27
57
|
* @throws {AppwriteException}
|
|
28
58
|
* @returns {Promise<Models.Database>}
|
|
59
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
29
60
|
*/
|
|
30
61
|
create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
|
|
31
62
|
/**
|
|
32
63
|
* Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
|
|
33
64
|
*
|
|
34
|
-
* @param {string} databaseId
|
|
65
|
+
* @param {string} params.databaseId - Database ID.
|
|
66
|
+
* @throws {AppwriteException}
|
|
67
|
+
* @returns {Promise<Models.Database>}
|
|
68
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.get` instead.
|
|
69
|
+
*/
|
|
70
|
+
get(params: {
|
|
71
|
+
databaseId: string;
|
|
72
|
+
}): Promise<Models.Database>;
|
|
73
|
+
/**
|
|
74
|
+
* Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
|
|
75
|
+
*
|
|
76
|
+
* @param {string} databaseId - Database ID.
|
|
35
77
|
* @throws {AppwriteException}
|
|
36
78
|
* @returns {Promise<Models.Database>}
|
|
79
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
37
80
|
*/
|
|
38
81
|
get(databaseId: string): Promise<Models.Database>;
|
|
39
82
|
/**
|
|
40
83
|
* Update a database by its unique ID.
|
|
41
84
|
*
|
|
42
|
-
* @param {string} databaseId
|
|
43
|
-
* @param {string} name
|
|
44
|
-
* @param {boolean} enabled
|
|
85
|
+
* @param {string} params.databaseId - Database ID.
|
|
86
|
+
* @param {string} params.name - Database name. Max length: 128 chars.
|
|
87
|
+
* @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.
|
|
45
88
|
* @throws {AppwriteException}
|
|
46
89
|
* @returns {Promise<Models.Database>}
|
|
90
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.update` instead.
|
|
91
|
+
*/
|
|
92
|
+
update(params: {
|
|
93
|
+
databaseId: string;
|
|
94
|
+
name: string;
|
|
95
|
+
enabled?: boolean;
|
|
96
|
+
}): Promise<Models.Database>;
|
|
97
|
+
/**
|
|
98
|
+
* Update a database by its unique ID.
|
|
99
|
+
*
|
|
100
|
+
* @param {string} databaseId - Database ID.
|
|
101
|
+
* @param {string} name - Database name. Max length: 128 chars.
|
|
102
|
+
* @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.
|
|
103
|
+
* @throws {AppwriteException}
|
|
104
|
+
* @returns {Promise<Models.Database>}
|
|
105
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
47
106
|
*/
|
|
48
107
|
update(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
|
|
49
108
|
/**
|
|
50
109
|
* Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
|
|
51
110
|
*
|
|
52
|
-
* @param {string} databaseId
|
|
111
|
+
* @param {string} params.databaseId - Database ID.
|
|
53
112
|
* @throws {AppwriteException}
|
|
54
113
|
* @returns {Promise<{}>}
|
|
114
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.delete` instead.
|
|
115
|
+
*/
|
|
116
|
+
delete(params: {
|
|
117
|
+
databaseId: string;
|
|
118
|
+
}): Promise<{}>;
|
|
119
|
+
/**
|
|
120
|
+
* Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
|
|
121
|
+
*
|
|
122
|
+
* @param {string} databaseId - Database ID.
|
|
123
|
+
* @throws {AppwriteException}
|
|
124
|
+
* @returns {Promise<{}>}
|
|
125
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
55
126
|
*/
|
|
56
127
|
delete(databaseId: string): Promise<{}>;
|
|
57
128
|
/**
|
|
58
129
|
* Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.
|
|
59
130
|
*
|
|
60
|
-
* @param {string} databaseId
|
|
61
|
-
* @param {string[]} queries
|
|
62
|
-
* @param {string} search
|
|
131
|
+
* @param {string} params.databaseId - Database ID.
|
|
132
|
+
* @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
|
|
133
|
+
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
63
134
|
* @throws {AppwriteException}
|
|
64
135
|
* @returns {Promise<Models.CollectionList>}
|
|
136
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listTables` instead.
|
|
137
|
+
*/
|
|
138
|
+
listCollections(params: {
|
|
139
|
+
databaseId: string;
|
|
140
|
+
queries?: string[];
|
|
141
|
+
search?: string;
|
|
142
|
+
}): Promise<Models.CollectionList>;
|
|
143
|
+
/**
|
|
144
|
+
* Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.
|
|
145
|
+
*
|
|
146
|
+
* @param {string} databaseId - Database ID.
|
|
147
|
+
* @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
|
|
148
|
+
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
149
|
+
* @throws {AppwriteException}
|
|
150
|
+
* @returns {Promise<Models.CollectionList>}
|
|
151
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
65
152
|
*/
|
|
66
153
|
listCollections(databaseId: string, queries?: string[], search?: string): Promise<Models.CollectionList>;
|
|
67
154
|
/**
|
|
68
155
|
* 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#databasesCreateCollection) API or directly from your database console.
|
|
69
156
|
*
|
|
70
|
-
* @param {string} databaseId
|
|
71
|
-
* @param {string} collectionId
|
|
72
|
-
* @param {string} name
|
|
73
|
-
* @param {string[]} permissions
|
|
74
|
-
* @param {boolean} documentSecurity
|
|
75
|
-
* @param {boolean} enabled
|
|
157
|
+
* @param {string} params.databaseId - Database ID.
|
|
158
|
+
* @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.
|
|
159
|
+
* @param {string} params.name - Collection name. Max length: 128 chars.
|
|
160
|
+
* @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).
|
|
161
|
+
* @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).
|
|
162
|
+
* @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.
|
|
76
163
|
* @throws {AppwriteException}
|
|
77
164
|
* @returns {Promise<Models.Collection>}
|
|
165
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createTable` instead.
|
|
166
|
+
*/
|
|
167
|
+
createCollection(params: {
|
|
168
|
+
databaseId: string;
|
|
169
|
+
collectionId: string;
|
|
170
|
+
name: string;
|
|
171
|
+
permissions?: string[];
|
|
172
|
+
documentSecurity?: boolean;
|
|
173
|
+
enabled?: boolean;
|
|
174
|
+
}): Promise<Models.Collection>;
|
|
175
|
+
/**
|
|
176
|
+
* 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#databasesCreateCollection) API or directly from your database console.
|
|
177
|
+
*
|
|
178
|
+
* @param {string} databaseId - Database ID.
|
|
179
|
+
* @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.
|
|
180
|
+
* @param {string} name - Collection name. Max length: 128 chars.
|
|
181
|
+
* @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).
|
|
182
|
+
* @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).
|
|
183
|
+
* @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.
|
|
184
|
+
* @throws {AppwriteException}
|
|
185
|
+
* @returns {Promise<Models.Collection>}
|
|
186
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
78
187
|
*/
|
|
79
188
|
createCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection>;
|
|
80
189
|
/**
|
|
81
190
|
* Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.
|
|
82
191
|
*
|
|
83
|
-
* @param {string} databaseId
|
|
84
|
-
* @param {string} collectionId
|
|
192
|
+
* @param {string} params.databaseId - Database ID.
|
|
193
|
+
* @param {string} params.collectionId - Collection ID.
|
|
194
|
+
* @throws {AppwriteException}
|
|
195
|
+
* @returns {Promise<Models.Collection>}
|
|
196
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getTable` instead.
|
|
197
|
+
*/
|
|
198
|
+
getCollection(params: {
|
|
199
|
+
databaseId: string;
|
|
200
|
+
collectionId: string;
|
|
201
|
+
}): Promise<Models.Collection>;
|
|
202
|
+
/**
|
|
203
|
+
* Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.
|
|
204
|
+
*
|
|
205
|
+
* @param {string} databaseId - Database ID.
|
|
206
|
+
* @param {string} collectionId - Collection ID.
|
|
85
207
|
* @throws {AppwriteException}
|
|
86
208
|
* @returns {Promise<Models.Collection>}
|
|
209
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
87
210
|
*/
|
|
88
211
|
getCollection(databaseId: string, collectionId: string): Promise<Models.Collection>;
|
|
89
212
|
/**
|
|
90
213
|
* Update a collection by its unique ID.
|
|
91
214
|
*
|
|
92
|
-
* @param {string} databaseId
|
|
93
|
-
* @param {string} collectionId
|
|
94
|
-
* @param {string} name
|
|
95
|
-
* @param {string[]} permissions
|
|
96
|
-
* @param {boolean} documentSecurity
|
|
97
|
-
* @param {boolean} enabled
|
|
215
|
+
* @param {string} params.databaseId - Database ID.
|
|
216
|
+
* @param {string} params.collectionId - Collection ID.
|
|
217
|
+
* @param {string} params.name - Collection name. Max length: 128 chars.
|
|
218
|
+
* @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).
|
|
219
|
+
* @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).
|
|
220
|
+
* @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.
|
|
98
221
|
* @throws {AppwriteException}
|
|
99
222
|
* @returns {Promise<Models.Collection>}
|
|
223
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateTable` instead.
|
|
224
|
+
*/
|
|
225
|
+
updateCollection(params: {
|
|
226
|
+
databaseId: string;
|
|
227
|
+
collectionId: string;
|
|
228
|
+
name: string;
|
|
229
|
+
permissions?: string[];
|
|
230
|
+
documentSecurity?: boolean;
|
|
231
|
+
enabled?: boolean;
|
|
232
|
+
}): Promise<Models.Collection>;
|
|
233
|
+
/**
|
|
234
|
+
* Update a collection by its unique ID.
|
|
235
|
+
*
|
|
236
|
+
* @param {string} databaseId - Database ID.
|
|
237
|
+
* @param {string} collectionId - Collection ID.
|
|
238
|
+
* @param {string} name - Collection name. Max length: 128 chars.
|
|
239
|
+
* @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
240
|
+
* @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).
|
|
241
|
+
* @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.
|
|
242
|
+
* @throws {AppwriteException}
|
|
243
|
+
* @returns {Promise<Models.Collection>}
|
|
244
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
100
245
|
*/
|
|
101
246
|
updateCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection>;
|
|
102
247
|
/**
|
|
103
248
|
* Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.
|
|
104
249
|
*
|
|
105
|
-
* @param {string} databaseId
|
|
106
|
-
* @param {string} collectionId
|
|
250
|
+
* @param {string} params.databaseId - Database ID.
|
|
251
|
+
* @param {string} params.collectionId - Collection ID.
|
|
252
|
+
* @throws {AppwriteException}
|
|
253
|
+
* @returns {Promise<{}>}
|
|
254
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteTable` instead.
|
|
255
|
+
*/
|
|
256
|
+
deleteCollection(params: {
|
|
257
|
+
databaseId: string;
|
|
258
|
+
collectionId: string;
|
|
259
|
+
}): Promise<{}>;
|
|
260
|
+
/**
|
|
261
|
+
* Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.
|
|
262
|
+
*
|
|
263
|
+
* @param {string} databaseId - Database ID.
|
|
264
|
+
* @param {string} collectionId - Collection ID.
|
|
107
265
|
* @throws {AppwriteException}
|
|
108
266
|
* @returns {Promise<{}>}
|
|
267
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
109
268
|
*/
|
|
110
269
|
deleteCollection(databaseId: string, collectionId: string): Promise<{}>;
|
|
111
270
|
/**
|
|
112
271
|
* List attributes in the collection.
|
|
113
272
|
*
|
|
114
|
-
* @param {string} databaseId
|
|
115
|
-
* @param {string} collectionId
|
|
116
|
-
* @param {string[]} queries
|
|
273
|
+
* @param {string} params.databaseId - Database ID.
|
|
274
|
+
* @param {string} params.collectionId - Collection ID.
|
|
275
|
+
* @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, size, required, array, status, error
|
|
276
|
+
* @throws {AppwriteException}
|
|
277
|
+
* @returns {Promise<Models.AttributeList>}
|
|
278
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listColumns` instead.
|
|
279
|
+
*/
|
|
280
|
+
listAttributes(params: {
|
|
281
|
+
databaseId: string;
|
|
282
|
+
collectionId: string;
|
|
283
|
+
queries?: string[];
|
|
284
|
+
}): Promise<Models.AttributeList>;
|
|
285
|
+
/**
|
|
286
|
+
* List attributes in the collection.
|
|
287
|
+
*
|
|
288
|
+
* @param {string} databaseId - Database ID.
|
|
289
|
+
* @param {string} collectionId - Collection ID.
|
|
290
|
+
* @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, size, required, array, status, error
|
|
117
291
|
* @throws {AppwriteException}
|
|
118
292
|
* @returns {Promise<Models.AttributeList>}
|
|
293
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
119
294
|
*/
|
|
120
295
|
listAttributes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.AttributeList>;
|
|
121
296
|
/**
|
|
122
297
|
* Create a boolean attribute.
|
|
123
298
|
*
|
|
124
299
|
*
|
|
125
|
-
* @param {string} databaseId
|
|
126
|
-
* @param {string} collectionId
|
|
127
|
-
* @param {string} key
|
|
128
|
-
* @param {boolean} required
|
|
129
|
-
* @param {boolean} xdefault
|
|
130
|
-
* @param {boolean} array
|
|
300
|
+
* @param {string} params.databaseId - Database ID.
|
|
301
|
+
* @param {string} params.collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
302
|
+
* @param {string} params.key - Attribute Key.
|
|
303
|
+
* @param {boolean} params.required - Is attribute required?
|
|
304
|
+
* @param {boolean} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
305
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
131
306
|
* @throws {AppwriteException}
|
|
132
307
|
* @returns {Promise<Models.AttributeBoolean>}
|
|
308
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createBooleanColumn` instead.
|
|
309
|
+
*/
|
|
310
|
+
createBooleanAttribute(params: {
|
|
311
|
+
databaseId: string;
|
|
312
|
+
collectionId: string;
|
|
313
|
+
key: string;
|
|
314
|
+
required: boolean;
|
|
315
|
+
xdefault?: boolean;
|
|
316
|
+
array?: boolean;
|
|
317
|
+
}): Promise<Models.AttributeBoolean>;
|
|
318
|
+
/**
|
|
319
|
+
* Create a boolean attribute.
|
|
320
|
+
*
|
|
321
|
+
*
|
|
322
|
+
* @param {string} databaseId - Database ID.
|
|
323
|
+
* @param {string} collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
324
|
+
* @param {string} key - Attribute Key.
|
|
325
|
+
* @param {boolean} required - Is attribute required?
|
|
326
|
+
* @param {boolean} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
327
|
+
* @param {boolean} array - Is attribute an array?
|
|
328
|
+
* @throws {AppwriteException}
|
|
329
|
+
* @returns {Promise<Models.AttributeBoolean>}
|
|
330
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
133
331
|
*/
|
|
134
332
|
createBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, array?: boolean): Promise<Models.AttributeBoolean>;
|
|
135
333
|
/**
|
|
136
334
|
* Update a boolean attribute. Changing the `default` value will not update already existing documents.
|
|
137
335
|
*
|
|
138
|
-
* @param {string} databaseId
|
|
139
|
-
* @param {string} collectionId
|
|
140
|
-
* @param {string} key
|
|
141
|
-
* @param {boolean} required
|
|
142
|
-
* @param {boolean} xdefault
|
|
143
|
-
* @param {string} newKey
|
|
336
|
+
* @param {string} params.databaseId - Database ID.
|
|
337
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
|
338
|
+
* @param {string} params.key - Attribute Key.
|
|
339
|
+
* @param {boolean} params.required - Is attribute required?
|
|
340
|
+
* @param {boolean} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
341
|
+
* @param {string} params.newKey - New attribute key.
|
|
342
|
+
* @throws {AppwriteException}
|
|
343
|
+
* @returns {Promise<Models.AttributeBoolean>}
|
|
344
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateBooleanColumn` instead.
|
|
345
|
+
*/
|
|
346
|
+
updateBooleanAttribute(params: {
|
|
347
|
+
databaseId: string;
|
|
348
|
+
collectionId: string;
|
|
349
|
+
key: string;
|
|
350
|
+
required: boolean;
|
|
351
|
+
xdefault?: boolean;
|
|
352
|
+
newKey?: string;
|
|
353
|
+
}): Promise<Models.AttributeBoolean>;
|
|
354
|
+
/**
|
|
355
|
+
* Update a boolean attribute. Changing the `default` value will not update already existing documents.
|
|
356
|
+
*
|
|
357
|
+
* @param {string} databaseId - Database ID.
|
|
358
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
|
359
|
+
* @param {string} key - Attribute Key.
|
|
360
|
+
* @param {boolean} required - Is attribute required?
|
|
361
|
+
* @param {boolean} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
362
|
+
* @param {string} newKey - New attribute key.
|
|
144
363
|
* @throws {AppwriteException}
|
|
145
364
|
* @returns {Promise<Models.AttributeBoolean>}
|
|
365
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
146
366
|
*/
|
|
147
367
|
updateBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, newKey?: string): Promise<Models.AttributeBoolean>;
|
|
148
368
|
/**
|
|
149
369
|
* Create a date time attribute according to the ISO 8601 standard.
|
|
150
370
|
*
|
|
151
|
-
* @param {string} databaseId
|
|
152
|
-
* @param {string} collectionId
|
|
153
|
-
* @param {string} key
|
|
154
|
-
* @param {boolean} required
|
|
155
|
-
* @param {string} xdefault
|
|
156
|
-
* @param {boolean} array
|
|
371
|
+
* @param {string} params.databaseId - Database ID.
|
|
372
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
|
373
|
+
* @param {string} params.key - Attribute Key.
|
|
374
|
+
* @param {boolean} params.required - Is attribute required?
|
|
375
|
+
* @param {string} params.xdefault - Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.
|
|
376
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
377
|
+
* @throws {AppwriteException}
|
|
378
|
+
* @returns {Promise<Models.AttributeDatetime>}
|
|
379
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createDatetimeColumn` instead.
|
|
380
|
+
*/
|
|
381
|
+
createDatetimeAttribute(params: {
|
|
382
|
+
databaseId: string;
|
|
383
|
+
collectionId: string;
|
|
384
|
+
key: string;
|
|
385
|
+
required: boolean;
|
|
386
|
+
xdefault?: string;
|
|
387
|
+
array?: boolean;
|
|
388
|
+
}): Promise<Models.AttributeDatetime>;
|
|
389
|
+
/**
|
|
390
|
+
* Create a date time attribute according to the ISO 8601 standard.
|
|
391
|
+
*
|
|
392
|
+
* @param {string} databaseId - Database ID.
|
|
393
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
|
394
|
+
* @param {string} key - Attribute Key.
|
|
395
|
+
* @param {boolean} required - Is attribute required?
|
|
396
|
+
* @param {string} xdefault - Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.
|
|
397
|
+
* @param {boolean} array - Is attribute an array?
|
|
157
398
|
* @throws {AppwriteException}
|
|
158
399
|
* @returns {Promise<Models.AttributeDatetime>}
|
|
400
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
159
401
|
*/
|
|
160
402
|
createDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeDatetime>;
|
|
161
403
|
/**
|
|
162
404
|
* Update a date time attribute. Changing the `default` value will not update already existing documents.
|
|
163
405
|
*
|
|
164
|
-
* @param {string} databaseId
|
|
165
|
-
* @param {string} collectionId
|
|
166
|
-
* @param {string} key
|
|
167
|
-
* @param {boolean} required
|
|
168
|
-
* @param {string} xdefault
|
|
169
|
-
* @param {string} newKey
|
|
406
|
+
* @param {string} params.databaseId - Database ID.
|
|
407
|
+
* @param {string} params.collectionId - Collection ID.
|
|
408
|
+
* @param {string} params.key - Attribute Key.
|
|
409
|
+
* @param {boolean} params.required - Is attribute required?
|
|
410
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
411
|
+
* @param {string} params.newKey - New attribute key.
|
|
412
|
+
* @throws {AppwriteException}
|
|
413
|
+
* @returns {Promise<Models.AttributeDatetime>}
|
|
414
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateDatetimeColumn` instead.
|
|
415
|
+
*/
|
|
416
|
+
updateDatetimeAttribute(params: {
|
|
417
|
+
databaseId: string;
|
|
418
|
+
collectionId: string;
|
|
419
|
+
key: string;
|
|
420
|
+
required: boolean;
|
|
421
|
+
xdefault?: string;
|
|
422
|
+
newKey?: string;
|
|
423
|
+
}): Promise<Models.AttributeDatetime>;
|
|
424
|
+
/**
|
|
425
|
+
* Update a date time attribute. Changing the `default` value will not update already existing documents.
|
|
426
|
+
*
|
|
427
|
+
* @param {string} databaseId - Database ID.
|
|
428
|
+
* @param {string} collectionId - Collection ID.
|
|
429
|
+
* @param {string} key - Attribute Key.
|
|
430
|
+
* @param {boolean} required - Is attribute required?
|
|
431
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
432
|
+
* @param {string} newKey - New attribute key.
|
|
170
433
|
* @throws {AppwriteException}
|
|
171
434
|
* @returns {Promise<Models.AttributeDatetime>}
|
|
435
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
172
436
|
*/
|
|
173
437
|
updateDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeDatetime>;
|
|
174
438
|
/**
|
|
175
439
|
* Create an email attribute.
|
|
176
440
|
*
|
|
177
441
|
*
|
|
178
|
-
* @param {string} databaseId
|
|
179
|
-
* @param {string} collectionId
|
|
180
|
-
* @param {string} key
|
|
181
|
-
* @param {boolean} required
|
|
182
|
-
* @param {string} xdefault
|
|
183
|
-
* @param {boolean} array
|
|
442
|
+
* @param {string} params.databaseId - Database ID.
|
|
443
|
+
* @param {string} params.collectionId - Collection ID.
|
|
444
|
+
* @param {string} params.key - Attribute Key.
|
|
445
|
+
* @param {boolean} params.required - Is attribute required?
|
|
446
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
447
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
184
448
|
* @throws {AppwriteException}
|
|
185
449
|
* @returns {Promise<Models.AttributeEmail>}
|
|
450
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createEmailColumn` instead.
|
|
451
|
+
*/
|
|
452
|
+
createEmailAttribute(params: {
|
|
453
|
+
databaseId: string;
|
|
454
|
+
collectionId: string;
|
|
455
|
+
key: string;
|
|
456
|
+
required: boolean;
|
|
457
|
+
xdefault?: string;
|
|
458
|
+
array?: boolean;
|
|
459
|
+
}): Promise<Models.AttributeEmail>;
|
|
460
|
+
/**
|
|
461
|
+
* Create an email attribute.
|
|
462
|
+
*
|
|
463
|
+
*
|
|
464
|
+
* @param {string} databaseId - Database ID.
|
|
465
|
+
* @param {string} collectionId - Collection ID.
|
|
466
|
+
* @param {string} key - Attribute Key.
|
|
467
|
+
* @param {boolean} required - Is attribute required?
|
|
468
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
469
|
+
* @param {boolean} array - Is attribute an array?
|
|
470
|
+
* @throws {AppwriteException}
|
|
471
|
+
* @returns {Promise<Models.AttributeEmail>}
|
|
472
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
186
473
|
*/
|
|
187
474
|
createEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEmail>;
|
|
188
475
|
/**
|
|
189
476
|
* Update an email attribute. Changing the `default` value will not update already existing documents.
|
|
190
477
|
*
|
|
191
478
|
*
|
|
192
|
-
* @param {string} databaseId
|
|
193
|
-
* @param {string} collectionId
|
|
194
|
-
* @param {string} key
|
|
195
|
-
* @param {boolean} required
|
|
196
|
-
* @param {string} xdefault
|
|
197
|
-
* @param {string} newKey
|
|
479
|
+
* @param {string} params.databaseId - Database ID.
|
|
480
|
+
* @param {string} params.collectionId - Collection ID.
|
|
481
|
+
* @param {string} params.key - Attribute Key.
|
|
482
|
+
* @param {boolean} params.required - Is attribute required?
|
|
483
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
484
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
485
|
+
* @throws {AppwriteException}
|
|
486
|
+
* @returns {Promise<Models.AttributeEmail>}
|
|
487
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateEmailColumn` instead.
|
|
488
|
+
*/
|
|
489
|
+
updateEmailAttribute(params: {
|
|
490
|
+
databaseId: string;
|
|
491
|
+
collectionId: string;
|
|
492
|
+
key: string;
|
|
493
|
+
required: boolean;
|
|
494
|
+
xdefault?: string;
|
|
495
|
+
newKey?: string;
|
|
496
|
+
}): Promise<Models.AttributeEmail>;
|
|
497
|
+
/**
|
|
498
|
+
* Update an email attribute. Changing the `default` value will not update already existing documents.
|
|
499
|
+
*
|
|
500
|
+
*
|
|
501
|
+
* @param {string} databaseId - Database ID.
|
|
502
|
+
* @param {string} collectionId - Collection ID.
|
|
503
|
+
* @param {string} key - Attribute Key.
|
|
504
|
+
* @param {boolean} required - Is attribute required?
|
|
505
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
506
|
+
* @param {string} newKey - New Attribute Key.
|
|
198
507
|
* @throws {AppwriteException}
|
|
199
508
|
* @returns {Promise<Models.AttributeEmail>}
|
|
509
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
200
510
|
*/
|
|
201
511
|
updateEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeEmail>;
|
|
202
512
|
/**
|
|
203
|
-
* Create an
|
|
513
|
+
* Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute.
|
|
204
514
|
*
|
|
205
515
|
*
|
|
206
|
-
* @param {string} databaseId
|
|
207
|
-
* @param {string} collectionId
|
|
208
|
-
* @param {string} key
|
|
209
|
-
* @param {string[]} elements
|
|
210
|
-
* @param {boolean} required
|
|
211
|
-
* @param {string} xdefault
|
|
212
|
-
* @param {boolean} array
|
|
516
|
+
* @param {string} params.databaseId - Database ID.
|
|
517
|
+
* @param {string} params.collectionId - Collection ID.
|
|
518
|
+
* @param {string} params.key - Attribute Key.
|
|
519
|
+
* @param {string[]} params.elements - Array of enum values.
|
|
520
|
+
* @param {boolean} params.required - Is attribute required?
|
|
521
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
522
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
213
523
|
* @throws {AppwriteException}
|
|
214
524
|
* @returns {Promise<Models.AttributeEnum>}
|
|
525
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createEnumColumn` instead.
|
|
526
|
+
*/
|
|
527
|
+
createEnumAttribute(params: {
|
|
528
|
+
databaseId: string;
|
|
529
|
+
collectionId: string;
|
|
530
|
+
key: string;
|
|
531
|
+
elements: string[];
|
|
532
|
+
required: boolean;
|
|
533
|
+
xdefault?: string;
|
|
534
|
+
array?: boolean;
|
|
535
|
+
}): Promise<Models.AttributeEnum>;
|
|
536
|
+
/**
|
|
537
|
+
* Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute.
|
|
538
|
+
*
|
|
539
|
+
*
|
|
540
|
+
* @param {string} databaseId - Database ID.
|
|
541
|
+
* @param {string} collectionId - Collection ID.
|
|
542
|
+
* @param {string} key - Attribute Key.
|
|
543
|
+
* @param {string[]} elements - Array of enum values.
|
|
544
|
+
* @param {boolean} required - Is attribute required?
|
|
545
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
546
|
+
* @param {boolean} array - Is attribute an array?
|
|
547
|
+
* @throws {AppwriteException}
|
|
548
|
+
* @returns {Promise<Models.AttributeEnum>}
|
|
549
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
215
550
|
*/
|
|
216
551
|
createEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEnum>;
|
|
217
552
|
/**
|
|
218
553
|
* Update an enum attribute. Changing the `default` value will not update already existing documents.
|
|
219
554
|
*
|
|
220
555
|
*
|
|
221
|
-
* @param {string} databaseId
|
|
222
|
-
* @param {string} collectionId
|
|
223
|
-
* @param {string} key
|
|
224
|
-
* @param {string[]} elements
|
|
225
|
-
* @param {boolean} required
|
|
226
|
-
* @param {string} xdefault
|
|
227
|
-
* @param {string} newKey
|
|
556
|
+
* @param {string} params.databaseId - Database ID.
|
|
557
|
+
* @param {string} params.collectionId - Collection ID.
|
|
558
|
+
* @param {string} params.key - Attribute Key.
|
|
559
|
+
* @param {string[]} params.elements - Updated list of enum values.
|
|
560
|
+
* @param {boolean} params.required - Is attribute required?
|
|
561
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
562
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
228
563
|
* @throws {AppwriteException}
|
|
229
564
|
* @returns {Promise<Models.AttributeEnum>}
|
|
565
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateEnumColumn` instead.
|
|
566
|
+
*/
|
|
567
|
+
updateEnumAttribute(params: {
|
|
568
|
+
databaseId: string;
|
|
569
|
+
collectionId: string;
|
|
570
|
+
key: string;
|
|
571
|
+
elements: string[];
|
|
572
|
+
required: boolean;
|
|
573
|
+
xdefault?: string;
|
|
574
|
+
newKey?: string;
|
|
575
|
+
}): Promise<Models.AttributeEnum>;
|
|
576
|
+
/**
|
|
577
|
+
* Update an enum attribute. Changing the `default` value will not update already existing documents.
|
|
578
|
+
*
|
|
579
|
+
*
|
|
580
|
+
* @param {string} databaseId - Database ID.
|
|
581
|
+
* @param {string} collectionId - Collection ID.
|
|
582
|
+
* @param {string} key - Attribute Key.
|
|
583
|
+
* @param {string[]} elements - Updated list of enum values.
|
|
584
|
+
* @param {boolean} required - Is attribute required?
|
|
585
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
586
|
+
* @param {string} newKey - New Attribute Key.
|
|
587
|
+
* @throws {AppwriteException}
|
|
588
|
+
* @returns {Promise<Models.AttributeEnum>}
|
|
589
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
230
590
|
*/
|
|
231
591
|
updateEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeEnum>;
|
|
232
592
|
/**
|
|
233
593
|
* Create a float attribute. Optionally, minimum and maximum values can be provided.
|
|
234
594
|
*
|
|
235
595
|
*
|
|
236
|
-
* @param {string} databaseId
|
|
237
|
-
* @param {string} collectionId
|
|
238
|
-
* @param {string} key
|
|
239
|
-
* @param {boolean} required
|
|
240
|
-
* @param {number} min
|
|
241
|
-
* @param {number} max
|
|
242
|
-
* @param {number} xdefault
|
|
243
|
-
* @param {boolean} array
|
|
596
|
+
* @param {string} params.databaseId - Database ID.
|
|
597
|
+
* @param {string} params.collectionId - Collection ID.
|
|
598
|
+
* @param {string} params.key - Attribute Key.
|
|
599
|
+
* @param {boolean} params.required - Is attribute required?
|
|
600
|
+
* @param {number} params.min - Minimum value.
|
|
601
|
+
* @param {number} params.max - Maximum value.
|
|
602
|
+
* @param {number} params.xdefault - Default value. Cannot be set when required.
|
|
603
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
604
|
+
* @throws {AppwriteException}
|
|
605
|
+
* @returns {Promise<Models.AttributeFloat>}
|
|
606
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createFloatColumn` instead.
|
|
607
|
+
*/
|
|
608
|
+
createFloatAttribute(params: {
|
|
609
|
+
databaseId: string;
|
|
610
|
+
collectionId: string;
|
|
611
|
+
key: string;
|
|
612
|
+
required: boolean;
|
|
613
|
+
min?: number;
|
|
614
|
+
max?: number;
|
|
615
|
+
xdefault?: number;
|
|
616
|
+
array?: boolean;
|
|
617
|
+
}): Promise<Models.AttributeFloat>;
|
|
618
|
+
/**
|
|
619
|
+
* Create a float attribute. Optionally, minimum and maximum values can be provided.
|
|
620
|
+
*
|
|
621
|
+
*
|
|
622
|
+
* @param {string} databaseId - Database ID.
|
|
623
|
+
* @param {string} collectionId - Collection ID.
|
|
624
|
+
* @param {string} key - Attribute Key.
|
|
625
|
+
* @param {boolean} required - Is attribute required?
|
|
626
|
+
* @param {number} min - Minimum value.
|
|
627
|
+
* @param {number} max - Maximum value.
|
|
628
|
+
* @param {number} xdefault - Default value. Cannot be set when required.
|
|
629
|
+
* @param {boolean} array - Is attribute an array?
|
|
244
630
|
* @throws {AppwriteException}
|
|
245
631
|
* @returns {Promise<Models.AttributeFloat>}
|
|
632
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
246
633
|
*/
|
|
247
634
|
createFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeFloat>;
|
|
248
635
|
/**
|
|
249
636
|
* Update a float attribute. Changing the `default` value will not update already existing documents.
|
|
250
637
|
*
|
|
251
638
|
*
|
|
252
|
-
* @param {string} databaseId
|
|
253
|
-
* @param {string} collectionId
|
|
254
|
-
* @param {string} key
|
|
255
|
-
* @param {boolean} required
|
|
256
|
-
* @param {number} xdefault
|
|
257
|
-
* @param {number} min
|
|
258
|
-
* @param {number} max
|
|
259
|
-
* @param {string} newKey
|
|
639
|
+
* @param {string} params.databaseId - Database ID.
|
|
640
|
+
* @param {string} params.collectionId - Collection ID.
|
|
641
|
+
* @param {string} params.key - Attribute Key.
|
|
642
|
+
* @param {boolean} params.required - Is attribute required?
|
|
643
|
+
* @param {number} params.xdefault - Default value. Cannot be set when required.
|
|
644
|
+
* @param {number} params.min - Minimum value.
|
|
645
|
+
* @param {number} params.max - Maximum value.
|
|
646
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
260
647
|
* @throws {AppwriteException}
|
|
261
648
|
* @returns {Promise<Models.AttributeFloat>}
|
|
649
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateFloatColumn` instead.
|
|
650
|
+
*/
|
|
651
|
+
updateFloatAttribute(params: {
|
|
652
|
+
databaseId: string;
|
|
653
|
+
collectionId: string;
|
|
654
|
+
key: string;
|
|
655
|
+
required: boolean;
|
|
656
|
+
xdefault?: number;
|
|
657
|
+
min?: number;
|
|
658
|
+
max?: number;
|
|
659
|
+
newKey?: string;
|
|
660
|
+
}): Promise<Models.AttributeFloat>;
|
|
661
|
+
/**
|
|
662
|
+
* Update a float attribute. Changing the `default` value will not update already existing documents.
|
|
663
|
+
*
|
|
664
|
+
*
|
|
665
|
+
* @param {string} databaseId - Database ID.
|
|
666
|
+
* @param {string} collectionId - Collection ID.
|
|
667
|
+
* @param {string} key - Attribute Key.
|
|
668
|
+
* @param {boolean} required - Is attribute required?
|
|
669
|
+
* @param {number} xdefault - Default value. Cannot be set when required.
|
|
670
|
+
* @param {number} min - Minimum value.
|
|
671
|
+
* @param {number} max - Maximum value.
|
|
672
|
+
* @param {string} newKey - New Attribute Key.
|
|
673
|
+
* @throws {AppwriteException}
|
|
674
|
+
* @returns {Promise<Models.AttributeFloat>}
|
|
675
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
262
676
|
*/
|
|
263
677
|
updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeFloat>;
|
|
264
678
|
/**
|
|
265
679
|
* Create an integer attribute. Optionally, minimum and maximum values can be provided.
|
|
266
680
|
*
|
|
267
681
|
*
|
|
268
|
-
* @param {string} databaseId
|
|
269
|
-
* @param {string} collectionId
|
|
270
|
-
* @param {string} key
|
|
271
|
-
* @param {boolean} required
|
|
272
|
-
* @param {number} min
|
|
273
|
-
* @param {number} max
|
|
274
|
-
* @param {number} xdefault
|
|
275
|
-
* @param {boolean} array
|
|
682
|
+
* @param {string} params.databaseId - Database ID.
|
|
683
|
+
* @param {string} params.collectionId - Collection ID.
|
|
684
|
+
* @param {string} params.key - Attribute Key.
|
|
685
|
+
* @param {boolean} params.required - Is attribute required?
|
|
686
|
+
* @param {number} params.min - Minimum value
|
|
687
|
+
* @param {number} params.max - Maximum value
|
|
688
|
+
* @param {number} params.xdefault - Default value. Cannot be set when attribute is required.
|
|
689
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
690
|
+
* @throws {AppwriteException}
|
|
691
|
+
* @returns {Promise<Models.AttributeInteger>}
|
|
692
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIntegerColumn` instead.
|
|
693
|
+
*/
|
|
694
|
+
createIntegerAttribute(params: {
|
|
695
|
+
databaseId: string;
|
|
696
|
+
collectionId: string;
|
|
697
|
+
key: string;
|
|
698
|
+
required: boolean;
|
|
699
|
+
min?: number;
|
|
700
|
+
max?: number;
|
|
701
|
+
xdefault?: number;
|
|
702
|
+
array?: boolean;
|
|
703
|
+
}): Promise<Models.AttributeInteger>;
|
|
704
|
+
/**
|
|
705
|
+
* Create an integer attribute. Optionally, minimum and maximum values can be provided.
|
|
706
|
+
*
|
|
707
|
+
*
|
|
708
|
+
* @param {string} databaseId - Database ID.
|
|
709
|
+
* @param {string} collectionId - Collection ID.
|
|
710
|
+
* @param {string} key - Attribute Key.
|
|
711
|
+
* @param {boolean} required - Is attribute required?
|
|
712
|
+
* @param {number} min - Minimum value
|
|
713
|
+
* @param {number} max - Maximum value
|
|
714
|
+
* @param {number} xdefault - Default value. Cannot be set when attribute is required.
|
|
715
|
+
* @param {boolean} array - Is attribute an array?
|
|
276
716
|
* @throws {AppwriteException}
|
|
277
717
|
* @returns {Promise<Models.AttributeInteger>}
|
|
718
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
278
719
|
*/
|
|
279
720
|
createIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeInteger>;
|
|
280
721
|
/**
|
|
281
722
|
* Update an integer attribute. Changing the `default` value will not update already existing documents.
|
|
282
723
|
*
|
|
283
724
|
*
|
|
284
|
-
* @param {string} databaseId
|
|
285
|
-
* @param {string} collectionId
|
|
286
|
-
* @param {string} key
|
|
287
|
-
* @param {boolean} required
|
|
288
|
-
* @param {number} xdefault
|
|
289
|
-
* @param {number} min
|
|
290
|
-
* @param {number} max
|
|
291
|
-
* @param {string} newKey
|
|
725
|
+
* @param {string} params.databaseId - Database ID.
|
|
726
|
+
* @param {string} params.collectionId - Collection ID.
|
|
727
|
+
* @param {string} params.key - Attribute Key.
|
|
728
|
+
* @param {boolean} params.required - Is attribute required?
|
|
729
|
+
* @param {number} params.xdefault - Default value. Cannot be set when attribute is required.
|
|
730
|
+
* @param {number} params.min - Minimum value
|
|
731
|
+
* @param {number} params.max - Maximum value
|
|
732
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
292
733
|
* @throws {AppwriteException}
|
|
293
734
|
* @returns {Promise<Models.AttributeInteger>}
|
|
735
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateIntegerColumn` instead.
|
|
736
|
+
*/
|
|
737
|
+
updateIntegerAttribute(params: {
|
|
738
|
+
databaseId: string;
|
|
739
|
+
collectionId: string;
|
|
740
|
+
key: string;
|
|
741
|
+
required: boolean;
|
|
742
|
+
xdefault?: number;
|
|
743
|
+
min?: number;
|
|
744
|
+
max?: number;
|
|
745
|
+
newKey?: string;
|
|
746
|
+
}): Promise<Models.AttributeInteger>;
|
|
747
|
+
/**
|
|
748
|
+
* Update an integer attribute. Changing the `default` value will not update already existing documents.
|
|
749
|
+
*
|
|
750
|
+
*
|
|
751
|
+
* @param {string} databaseId - Database ID.
|
|
752
|
+
* @param {string} collectionId - Collection ID.
|
|
753
|
+
* @param {string} key - Attribute Key.
|
|
754
|
+
* @param {boolean} required - Is attribute required?
|
|
755
|
+
* @param {number} xdefault - Default value. Cannot be set when attribute is required.
|
|
756
|
+
* @param {number} min - Minimum value
|
|
757
|
+
* @param {number} max - Maximum value
|
|
758
|
+
* @param {string} newKey - New Attribute Key.
|
|
759
|
+
* @throws {AppwriteException}
|
|
760
|
+
* @returns {Promise<Models.AttributeInteger>}
|
|
761
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
294
762
|
*/
|
|
295
763
|
updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeInteger>;
|
|
296
764
|
/**
|
|
297
765
|
* Create IP address attribute.
|
|
298
766
|
*
|
|
299
767
|
*
|
|
300
|
-
* @param {string} databaseId
|
|
301
|
-
* @param {string} collectionId
|
|
302
|
-
* @param {string} key
|
|
303
|
-
* @param {boolean} required
|
|
304
|
-
* @param {string} xdefault
|
|
305
|
-
* @param {boolean} array
|
|
768
|
+
* @param {string} params.databaseId - Database ID.
|
|
769
|
+
* @param {string} params.collectionId - Collection ID.
|
|
770
|
+
* @param {string} params.key - Attribute Key.
|
|
771
|
+
* @param {boolean} params.required - Is attribute required?
|
|
772
|
+
* @param {string} params.xdefault - Default value. Cannot be set when attribute is required.
|
|
773
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
774
|
+
* @throws {AppwriteException}
|
|
775
|
+
* @returns {Promise<Models.AttributeIp>}
|
|
776
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIpColumn` instead.
|
|
777
|
+
*/
|
|
778
|
+
createIpAttribute(params: {
|
|
779
|
+
databaseId: string;
|
|
780
|
+
collectionId: string;
|
|
781
|
+
key: string;
|
|
782
|
+
required: boolean;
|
|
783
|
+
xdefault?: string;
|
|
784
|
+
array?: boolean;
|
|
785
|
+
}): Promise<Models.AttributeIp>;
|
|
786
|
+
/**
|
|
787
|
+
* Create IP address attribute.
|
|
788
|
+
*
|
|
789
|
+
*
|
|
790
|
+
* @param {string} databaseId - Database ID.
|
|
791
|
+
* @param {string} collectionId - Collection ID.
|
|
792
|
+
* @param {string} key - Attribute Key.
|
|
793
|
+
* @param {boolean} required - Is attribute required?
|
|
794
|
+
* @param {string} xdefault - Default value. Cannot be set when attribute is required.
|
|
795
|
+
* @param {boolean} array - Is attribute an array?
|
|
306
796
|
* @throws {AppwriteException}
|
|
307
797
|
* @returns {Promise<Models.AttributeIp>}
|
|
798
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
308
799
|
*/
|
|
309
800
|
createIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeIp>;
|
|
310
801
|
/**
|
|
311
802
|
* Update an ip attribute. Changing the `default` value will not update already existing documents.
|
|
312
803
|
*
|
|
313
804
|
*
|
|
314
|
-
* @param {string} databaseId
|
|
315
|
-
* @param {string} collectionId
|
|
316
|
-
* @param {string} key
|
|
317
|
-
* @param {boolean} required
|
|
318
|
-
* @param {string} xdefault
|
|
319
|
-
* @param {string} newKey
|
|
805
|
+
* @param {string} params.databaseId - Database ID.
|
|
806
|
+
* @param {string} params.collectionId - Collection ID.
|
|
807
|
+
* @param {string} params.key - Attribute Key.
|
|
808
|
+
* @param {boolean} params.required - Is attribute required?
|
|
809
|
+
* @param {string} params.xdefault - Default value. Cannot be set when attribute is required.
|
|
810
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
320
811
|
* @throws {AppwriteException}
|
|
321
812
|
* @returns {Promise<Models.AttributeIp>}
|
|
813
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateIpColumn` instead.
|
|
814
|
+
*/
|
|
815
|
+
updateIpAttribute(params: {
|
|
816
|
+
databaseId: string;
|
|
817
|
+
collectionId: string;
|
|
818
|
+
key: string;
|
|
819
|
+
required: boolean;
|
|
820
|
+
xdefault?: string;
|
|
821
|
+
newKey?: string;
|
|
822
|
+
}): Promise<Models.AttributeIp>;
|
|
823
|
+
/**
|
|
824
|
+
* Update an ip attribute. Changing the `default` value will not update already existing documents.
|
|
825
|
+
*
|
|
826
|
+
*
|
|
827
|
+
* @param {string} databaseId - Database ID.
|
|
828
|
+
* @param {string} collectionId - Collection ID.
|
|
829
|
+
* @param {string} key - Attribute Key.
|
|
830
|
+
* @param {boolean} required - Is attribute required?
|
|
831
|
+
* @param {string} xdefault - Default value. Cannot be set when attribute is required.
|
|
832
|
+
* @param {string} newKey - New Attribute Key.
|
|
833
|
+
* @throws {AppwriteException}
|
|
834
|
+
* @returns {Promise<Models.AttributeIp>}
|
|
835
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
322
836
|
*/
|
|
323
837
|
updateIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeIp>;
|
|
324
838
|
/**
|
|
325
839
|
* Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
326
840
|
*
|
|
327
841
|
*
|
|
328
|
-
* @param {string} databaseId
|
|
329
|
-
* @param {string} collectionId
|
|
330
|
-
* @param {string} relatedCollectionId
|
|
331
|
-
* @param {RelationshipType} type
|
|
332
|
-
* @param {boolean} twoWay
|
|
333
|
-
* @param {string} key
|
|
334
|
-
* @param {string} twoWayKey
|
|
335
|
-
* @param {RelationMutate} onDelete
|
|
842
|
+
* @param {string} params.databaseId - Database ID.
|
|
843
|
+
* @param {string} params.collectionId - Collection ID.
|
|
844
|
+
* @param {string} params.relatedCollectionId - Related Collection ID.
|
|
845
|
+
* @param {RelationshipType} params.type - Relation type
|
|
846
|
+
* @param {boolean} params.twoWay - Is Two Way?
|
|
847
|
+
* @param {string} params.key - Attribute Key.
|
|
848
|
+
* @param {string} params.twoWayKey - Two Way Attribute Key.
|
|
849
|
+
* @param {RelationMutate} params.onDelete - Constraints option
|
|
850
|
+
* @throws {AppwriteException}
|
|
851
|
+
* @returns {Promise<Models.AttributeRelationship>}
|
|
852
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRelationshipColumn` instead.
|
|
853
|
+
*/
|
|
854
|
+
createRelationshipAttribute(params: {
|
|
855
|
+
databaseId: string;
|
|
856
|
+
collectionId: string;
|
|
857
|
+
relatedCollectionId: string;
|
|
858
|
+
type: RelationshipType;
|
|
859
|
+
twoWay?: boolean;
|
|
860
|
+
key?: string;
|
|
861
|
+
twoWayKey?: string;
|
|
862
|
+
onDelete?: RelationMutate;
|
|
863
|
+
}): Promise<Models.AttributeRelationship>;
|
|
864
|
+
/**
|
|
865
|
+
* Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
866
|
+
*
|
|
867
|
+
*
|
|
868
|
+
* @param {string} databaseId - Database ID.
|
|
869
|
+
* @param {string} collectionId - Collection ID.
|
|
870
|
+
* @param {string} relatedCollectionId - Related Collection ID.
|
|
871
|
+
* @param {RelationshipType} type - Relation type
|
|
872
|
+
* @param {boolean} twoWay - Is Two Way?
|
|
873
|
+
* @param {string} key - Attribute Key.
|
|
874
|
+
* @param {string} twoWayKey - Two Way Attribute Key.
|
|
875
|
+
* @param {RelationMutate} onDelete - Constraints option
|
|
336
876
|
* @throws {AppwriteException}
|
|
337
877
|
* @returns {Promise<Models.AttributeRelationship>}
|
|
878
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
338
879
|
*/
|
|
339
880
|
createRelationshipAttribute(databaseId: string, collectionId: string, relatedCollectionId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate): Promise<Models.AttributeRelationship>;
|
|
340
881
|
/**
|
|
341
882
|
* Create a string attribute.
|
|
342
883
|
*
|
|
343
884
|
*
|
|
344
|
-
* @param {string} databaseId
|
|
345
|
-
* @param {string} collectionId
|
|
346
|
-
* @param {string} key
|
|
347
|
-
* @param {number} size
|
|
348
|
-
* @param {boolean} required
|
|
349
|
-
* @param {string} xdefault
|
|
350
|
-
* @param {boolean} array
|
|
351
|
-
* @param {boolean} encrypt
|
|
885
|
+
* @param {string} params.databaseId - Database ID.
|
|
886
|
+
* @param {string} params.collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
887
|
+
* @param {string} params.key - Attribute Key.
|
|
888
|
+
* @param {number} params.size - Attribute size for text attributes, in number of characters.
|
|
889
|
+
* @param {boolean} params.required - Is attribute required?
|
|
890
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
891
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
892
|
+
* @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
352
893
|
* @throws {AppwriteException}
|
|
353
894
|
* @returns {Promise<Models.AttributeString>}
|
|
895
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createStringColumn` instead.
|
|
896
|
+
*/
|
|
897
|
+
createStringAttribute(params: {
|
|
898
|
+
databaseId: string;
|
|
899
|
+
collectionId: string;
|
|
900
|
+
key: string;
|
|
901
|
+
size: number;
|
|
902
|
+
required: boolean;
|
|
903
|
+
xdefault?: string;
|
|
904
|
+
array?: boolean;
|
|
905
|
+
encrypt?: boolean;
|
|
906
|
+
}): Promise<Models.AttributeString>;
|
|
907
|
+
/**
|
|
908
|
+
* Create a string attribute.
|
|
909
|
+
*
|
|
910
|
+
*
|
|
911
|
+
* @param {string} databaseId - Database ID.
|
|
912
|
+
* @param {string} collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
913
|
+
* @param {string} key - Attribute Key.
|
|
914
|
+
* @param {number} size - Attribute size for text attributes, in number of characters.
|
|
915
|
+
* @param {boolean} required - Is attribute required?
|
|
916
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
917
|
+
* @param {boolean} array - Is attribute an array?
|
|
918
|
+
* @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
919
|
+
* @throws {AppwriteException}
|
|
920
|
+
* @returns {Promise<Models.AttributeString>}
|
|
921
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
354
922
|
*/
|
|
355
923
|
createStringAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeString>;
|
|
356
924
|
/**
|
|
357
925
|
* Update a string attribute. Changing the `default` value will not update already existing documents.
|
|
358
926
|
*
|
|
359
927
|
*
|
|
360
|
-
* @param {string} databaseId
|
|
361
|
-
* @param {string} collectionId
|
|
362
|
-
* @param {string} key
|
|
363
|
-
* @param {boolean} required
|
|
364
|
-
* @param {string} xdefault
|
|
365
|
-
* @param {number} size
|
|
366
|
-
* @param {string} newKey
|
|
928
|
+
* @param {string} params.databaseId - Database ID.
|
|
929
|
+
* @param {string} params.collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
930
|
+
* @param {string} params.key - Attribute Key.
|
|
931
|
+
* @param {boolean} params.required - Is attribute required?
|
|
932
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
933
|
+
* @param {number} params.size - Maximum size of the string attribute.
|
|
934
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
935
|
+
* @throws {AppwriteException}
|
|
936
|
+
* @returns {Promise<Models.AttributeString>}
|
|
937
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateStringColumn` instead.
|
|
938
|
+
*/
|
|
939
|
+
updateStringAttribute(params: {
|
|
940
|
+
databaseId: string;
|
|
941
|
+
collectionId: string;
|
|
942
|
+
key: string;
|
|
943
|
+
required: boolean;
|
|
944
|
+
xdefault?: string;
|
|
945
|
+
size?: number;
|
|
946
|
+
newKey?: string;
|
|
947
|
+
}): Promise<Models.AttributeString>;
|
|
948
|
+
/**
|
|
949
|
+
* Update a string attribute. Changing the `default` value will not update already existing documents.
|
|
950
|
+
*
|
|
951
|
+
*
|
|
952
|
+
* @param {string} databaseId - Database ID.
|
|
953
|
+
* @param {string} collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
954
|
+
* @param {string} key - Attribute Key.
|
|
955
|
+
* @param {boolean} required - Is attribute required?
|
|
956
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
957
|
+
* @param {number} size - Maximum size of the string attribute.
|
|
958
|
+
* @param {string} newKey - New Attribute Key.
|
|
367
959
|
* @throws {AppwriteException}
|
|
368
960
|
* @returns {Promise<Models.AttributeString>}
|
|
961
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
369
962
|
*/
|
|
370
963
|
updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string): Promise<Models.AttributeString>;
|
|
371
964
|
/**
|
|
372
965
|
* Create a URL attribute.
|
|
373
966
|
*
|
|
374
967
|
*
|
|
375
|
-
* @param {string} databaseId
|
|
376
|
-
* @param {string} collectionId
|
|
377
|
-
* @param {string} key
|
|
378
|
-
* @param {boolean} required
|
|
379
|
-
* @param {string} xdefault
|
|
380
|
-
* @param {boolean} array
|
|
968
|
+
* @param {string} params.databaseId - Database ID.
|
|
969
|
+
* @param {string} params.collectionId - Collection ID.
|
|
970
|
+
* @param {string} params.key - Attribute Key.
|
|
971
|
+
* @param {boolean} params.required - Is attribute required?
|
|
972
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
973
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
381
974
|
* @throws {AppwriteException}
|
|
382
975
|
* @returns {Promise<Models.AttributeUrl>}
|
|
976
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createUrlColumn` instead.
|
|
977
|
+
*/
|
|
978
|
+
createUrlAttribute(params: {
|
|
979
|
+
databaseId: string;
|
|
980
|
+
collectionId: string;
|
|
981
|
+
key: string;
|
|
982
|
+
required: boolean;
|
|
983
|
+
xdefault?: string;
|
|
984
|
+
array?: boolean;
|
|
985
|
+
}): Promise<Models.AttributeUrl>;
|
|
986
|
+
/**
|
|
987
|
+
* Create a URL attribute.
|
|
988
|
+
*
|
|
989
|
+
*
|
|
990
|
+
* @param {string} databaseId - Database ID.
|
|
991
|
+
* @param {string} collectionId - Collection ID.
|
|
992
|
+
* @param {string} key - Attribute Key.
|
|
993
|
+
* @param {boolean} required - Is attribute required?
|
|
994
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
995
|
+
* @param {boolean} array - Is attribute an array?
|
|
996
|
+
* @throws {AppwriteException}
|
|
997
|
+
* @returns {Promise<Models.AttributeUrl>}
|
|
998
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
383
999
|
*/
|
|
384
1000
|
createUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeUrl>;
|
|
385
1001
|
/**
|
|
386
1002
|
* Update an url attribute. Changing the `default` value will not update already existing documents.
|
|
387
1003
|
*
|
|
388
1004
|
*
|
|
389
|
-
* @param {string} databaseId
|
|
390
|
-
* @param {string} collectionId
|
|
391
|
-
* @param {string} key
|
|
392
|
-
* @param {boolean} required
|
|
393
|
-
* @param {string} xdefault
|
|
394
|
-
* @param {string} newKey
|
|
1005
|
+
* @param {string} params.databaseId - Database ID.
|
|
1006
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1007
|
+
* @param {string} params.key - Attribute Key.
|
|
1008
|
+
* @param {boolean} params.required - Is attribute required?
|
|
1009
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1010
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
395
1011
|
* @throws {AppwriteException}
|
|
396
1012
|
* @returns {Promise<Models.AttributeUrl>}
|
|
1013
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateUrlColumn` instead.
|
|
1014
|
+
*/
|
|
1015
|
+
updateUrlAttribute(params: {
|
|
1016
|
+
databaseId: string;
|
|
1017
|
+
collectionId: string;
|
|
1018
|
+
key: string;
|
|
1019
|
+
required: boolean;
|
|
1020
|
+
xdefault?: string;
|
|
1021
|
+
newKey?: string;
|
|
1022
|
+
}): Promise<Models.AttributeUrl>;
|
|
1023
|
+
/**
|
|
1024
|
+
* Update an url attribute. Changing the `default` value will not update already existing documents.
|
|
1025
|
+
*
|
|
1026
|
+
*
|
|
1027
|
+
* @param {string} databaseId - Database ID.
|
|
1028
|
+
* @param {string} collectionId - Collection ID.
|
|
1029
|
+
* @param {string} key - Attribute Key.
|
|
1030
|
+
* @param {boolean} required - Is attribute required?
|
|
1031
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1032
|
+
* @param {string} newKey - New Attribute Key.
|
|
1033
|
+
* @throws {AppwriteException}
|
|
1034
|
+
* @returns {Promise<Models.AttributeUrl>}
|
|
1035
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
397
1036
|
*/
|
|
398
1037
|
updateUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeUrl>;
|
|
399
1038
|
/**
|
|
400
1039
|
* Get attribute by ID.
|
|
401
1040
|
*
|
|
402
|
-
* @param {string} databaseId
|
|
403
|
-
* @param {string} collectionId
|
|
404
|
-
* @param {string} key
|
|
1041
|
+
* @param {string} params.databaseId - Database ID.
|
|
1042
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1043
|
+
* @param {string} params.key - Attribute Key.
|
|
1044
|
+
* @throws {AppwriteException}
|
|
1045
|
+
* @returns {Promise<{}>}
|
|
1046
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getColumn` instead.
|
|
1047
|
+
*/
|
|
1048
|
+
getAttribute(params: {
|
|
1049
|
+
databaseId: string;
|
|
1050
|
+
collectionId: string;
|
|
1051
|
+
key: string;
|
|
1052
|
+
}): Promise<{}>;
|
|
1053
|
+
/**
|
|
1054
|
+
* Get attribute by ID.
|
|
1055
|
+
*
|
|
1056
|
+
* @param {string} databaseId - Database ID.
|
|
1057
|
+
* @param {string} collectionId - Collection ID.
|
|
1058
|
+
* @param {string} key - Attribute Key.
|
|
405
1059
|
* @throws {AppwriteException}
|
|
406
1060
|
* @returns {Promise<{}>}
|
|
1061
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
407
1062
|
*/
|
|
408
1063
|
getAttribute(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
409
1064
|
/**
|
|
410
1065
|
* Deletes an attribute.
|
|
411
1066
|
*
|
|
412
|
-
* @param {string} databaseId
|
|
413
|
-
* @param {string} collectionId
|
|
414
|
-
* @param {string} key
|
|
1067
|
+
* @param {string} params.databaseId - Database ID.
|
|
1068
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1069
|
+
* @param {string} params.key - Attribute Key.
|
|
415
1070
|
* @throws {AppwriteException}
|
|
416
1071
|
* @returns {Promise<{}>}
|
|
1072
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteColumn` instead.
|
|
1073
|
+
*/
|
|
1074
|
+
deleteAttribute(params: {
|
|
1075
|
+
databaseId: string;
|
|
1076
|
+
collectionId: string;
|
|
1077
|
+
key: string;
|
|
1078
|
+
}): Promise<{}>;
|
|
1079
|
+
/**
|
|
1080
|
+
* Deletes an attribute.
|
|
1081
|
+
*
|
|
1082
|
+
* @param {string} databaseId - Database ID.
|
|
1083
|
+
* @param {string} collectionId - Collection ID.
|
|
1084
|
+
* @param {string} key - Attribute Key.
|
|
1085
|
+
* @throws {AppwriteException}
|
|
1086
|
+
* @returns {Promise<{}>}
|
|
1087
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
417
1088
|
*/
|
|
418
1089
|
deleteAttribute(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
419
1090
|
/**
|
|
420
1091
|
* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
421
1092
|
*
|
|
422
1093
|
*
|
|
423
|
-
* @param {string} databaseId
|
|
424
|
-
* @param {string} collectionId
|
|
425
|
-
* @param {string} key
|
|
426
|
-
* @param {RelationMutate} onDelete
|
|
427
|
-
* @param {string} newKey
|
|
1094
|
+
* @param {string} params.databaseId - Database ID.
|
|
1095
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1096
|
+
* @param {string} params.key - Attribute Key.
|
|
1097
|
+
* @param {RelationMutate} params.onDelete - Constraints option
|
|
1098
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
1099
|
+
* @throws {AppwriteException}
|
|
1100
|
+
* @returns {Promise<Models.AttributeRelationship>}
|
|
1101
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRelationshipColumn` instead.
|
|
1102
|
+
*/
|
|
1103
|
+
updateRelationshipAttribute(params: {
|
|
1104
|
+
databaseId: string;
|
|
1105
|
+
collectionId: string;
|
|
1106
|
+
key: string;
|
|
1107
|
+
onDelete?: RelationMutate;
|
|
1108
|
+
newKey?: string;
|
|
1109
|
+
}): Promise<Models.AttributeRelationship>;
|
|
1110
|
+
/**
|
|
1111
|
+
* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
1112
|
+
*
|
|
1113
|
+
*
|
|
1114
|
+
* @param {string} databaseId - Database ID.
|
|
1115
|
+
* @param {string} collectionId - Collection ID.
|
|
1116
|
+
* @param {string} key - Attribute Key.
|
|
1117
|
+
* @param {RelationMutate} onDelete - Constraints option
|
|
1118
|
+
* @param {string} newKey - New Attribute Key.
|
|
428
1119
|
* @throws {AppwriteException}
|
|
429
1120
|
* @returns {Promise<Models.AttributeRelationship>}
|
|
1121
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
430
1122
|
*/
|
|
431
1123
|
updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string): Promise<Models.AttributeRelationship>;
|
|
432
1124
|
/**
|
|
433
|
-
* Get a list of all the user
|
|
1125
|
+
* Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
|
|
1126
|
+
*
|
|
1127
|
+
* @param {string} params.databaseId - Database ID.
|
|
1128
|
+
* @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).
|
|
1129
|
+
* @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.
|
|
1130
|
+
* @throws {AppwriteException}
|
|
1131
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1132
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.
|
|
1133
|
+
*/
|
|
1134
|
+
listDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1135
|
+
databaseId: string;
|
|
1136
|
+
collectionId: string;
|
|
1137
|
+
queries?: string[];
|
|
1138
|
+
}): Promise<Models.DocumentList<Document>>;
|
|
1139
|
+
/**
|
|
1140
|
+
* Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
|
|
434
1141
|
*
|
|
435
|
-
* @param {string} databaseId
|
|
436
|
-
* @param {string} collectionId
|
|
437
|
-
* @param {string[]} queries
|
|
1142
|
+
* @param {string} databaseId - Database ID.
|
|
1143
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1144
|
+
* @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.
|
|
438
1145
|
* @throws {AppwriteException}
|
|
439
1146
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1147
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
440
1148
|
*/
|
|
441
1149
|
listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>>;
|
|
442
1150
|
/**
|
|
443
1151
|
* 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#databasesCreateCollection) API or directly from your database console.
|
|
444
1152
|
*
|
|
445
|
-
* @param {string} databaseId
|
|
446
|
-
* @param {string} collectionId
|
|
447
|
-
* @param {string} documentId
|
|
448
|
-
* @param {Document extends Models.DefaultDocument ? Models.
|
|
449
|
-
* @param {string[]} permissions
|
|
1153
|
+
* @param {string} params.databaseId - Database ID.
|
|
1154
|
+
* @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.
|
|
1155
|
+
* @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.
|
|
1156
|
+
* @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.
|
|
1157
|
+
* @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).
|
|
450
1158
|
* @throws {AppwriteException}
|
|
451
1159
|
* @returns {Promise<Document>}
|
|
1160
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRow` instead.
|
|
452
1161
|
*/
|
|
453
|
-
createDocument<Document extends Models.Document = Models.DefaultDocument>(
|
|
1162
|
+
createDocument<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1163
|
+
databaseId: string;
|
|
1164
|
+
collectionId: string;
|
|
1165
|
+
documentId: string;
|
|
1166
|
+
data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>;
|
|
1167
|
+
permissions?: string[];
|
|
1168
|
+
}): Promise<Document>;
|
|
454
1169
|
/**
|
|
455
|
-
*
|
|
1170
|
+
* 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#databasesCreateCollection) API or directly from your database console.
|
|
456
1171
|
*
|
|
1172
|
+
* @param {string} databaseId - Database ID.
|
|
1173
|
+
* @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.
|
|
1174
|
+
* @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.
|
|
1175
|
+
* @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.
|
|
1176
|
+
* @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).
|
|
1177
|
+
* @throws {AppwriteException}
|
|
1178
|
+
* @returns {Promise<Document>}
|
|
1179
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1180
|
+
*/
|
|
1181
|
+
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>;
|
|
1182
|
+
/**
|
|
1183
|
+
* 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#databasesCreateCollection) API or directly from your database console.
|
|
1184
|
+
*
|
|
1185
|
+
* @param {string} params.databaseId - Database ID.
|
|
1186
|
+
* @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.
|
|
1187
|
+
* @param {object[]} params.documents - Array of documents data as JSON objects.
|
|
1188
|
+
* @throws {AppwriteException}
|
|
1189
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1190
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRows` instead.
|
|
1191
|
+
*/
|
|
1192
|
+
createDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1193
|
+
databaseId: string;
|
|
1194
|
+
collectionId: string;
|
|
1195
|
+
documents: object[];
|
|
1196
|
+
}): Promise<Models.DocumentList<Document>>;
|
|
1197
|
+
/**
|
|
457
1198
|
* 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#databasesCreateCollection) API or directly from your database console.
|
|
458
1199
|
*
|
|
459
|
-
* @param {string} databaseId
|
|
460
|
-
* @param {string} collectionId
|
|
461
|
-
* @param {object[]} documents
|
|
1200
|
+
* @param {string} databaseId - Database ID.
|
|
1201
|
+
* @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.
|
|
1202
|
+
* @param {object[]} documents - Array of documents data as JSON objects.
|
|
462
1203
|
* @throws {AppwriteException}
|
|
463
1204
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1205
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
464
1206
|
*/
|
|
465
1207
|
createDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[]): Promise<Models.DocumentList<Document>>;
|
|
466
1208
|
/**
|
|
467
|
-
*
|
|
1209
|
+
* 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#databasesCreateCollection) API or directly from your database console.
|
|
1210
|
+
*
|
|
468
1211
|
*
|
|
1212
|
+
* @param {string} params.databaseId - Database ID.
|
|
1213
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1214
|
+
* @param {object[]} params.documents - Array of document data as JSON objects. May contain partial documents.
|
|
1215
|
+
* @throws {AppwriteException}
|
|
1216
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1217
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.upsertRows` instead.
|
|
1218
|
+
*/
|
|
1219
|
+
upsertDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1220
|
+
databaseId: string;
|
|
1221
|
+
collectionId: string;
|
|
1222
|
+
documents: object[];
|
|
1223
|
+
}): Promise<Models.DocumentList<Document>>;
|
|
1224
|
+
/**
|
|
469
1225
|
* 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#databasesCreateCollection) API or directly from your database console.
|
|
470
1226
|
*
|
|
471
1227
|
*
|
|
472
|
-
* @param {string} databaseId
|
|
473
|
-
* @param {string} collectionId
|
|
474
|
-
* @param {object[]} documents
|
|
1228
|
+
* @param {string} databaseId - Database ID.
|
|
1229
|
+
* @param {string} collectionId - Collection ID.
|
|
1230
|
+
* @param {object[]} documents - Array of document data as JSON objects. May contain partial documents.
|
|
475
1231
|
* @throws {AppwriteException}
|
|
476
1232
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1233
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
477
1234
|
*/
|
|
478
1235
|
upsertDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[]): Promise<Models.DocumentList<Document>>;
|
|
479
1236
|
/**
|
|
480
|
-
*
|
|
1237
|
+
* 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.
|
|
481
1238
|
*
|
|
1239
|
+
* @param {string} params.databaseId - Database ID.
|
|
1240
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1241
|
+
* @param {object} params.data - Document data as JSON object. Include only attribute and value pairs to be updated.
|
|
1242
|
+
* @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.
|
|
1243
|
+
* @throws {AppwriteException}
|
|
1244
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1245
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRows` instead.
|
|
1246
|
+
*/
|
|
1247
|
+
updateDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1248
|
+
databaseId: string;
|
|
1249
|
+
collectionId: string;
|
|
1250
|
+
data?: object;
|
|
1251
|
+
queries?: string[];
|
|
1252
|
+
}): Promise<Models.DocumentList<Document>>;
|
|
1253
|
+
/**
|
|
482
1254
|
* 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.
|
|
483
1255
|
*
|
|
484
|
-
* @param {string} databaseId
|
|
485
|
-
* @param {string} collectionId
|
|
486
|
-
* @param {object} data
|
|
487
|
-
* @param {string[]} queries
|
|
1256
|
+
* @param {string} databaseId - Database ID.
|
|
1257
|
+
* @param {string} collectionId - Collection ID.
|
|
1258
|
+
* @param {object} data - Document data as JSON object. Include only attribute and value pairs to be updated.
|
|
1259
|
+
* @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.
|
|
488
1260
|
* @throws {AppwriteException}
|
|
489
1261
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1262
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
490
1263
|
*/
|
|
491
1264
|
updateDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, data?: object, queries?: string[]): Promise<Models.DocumentList<Document>>;
|
|
492
1265
|
/**
|
|
493
|
-
*
|
|
1266
|
+
* Bulk delete documents using queries, if no queries are passed then all documents are deleted.
|
|
494
1267
|
*
|
|
1268
|
+
* @param {string} params.databaseId - Database ID.
|
|
1269
|
+
* @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).
|
|
1270
|
+
* @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.
|
|
1271
|
+
* @throws {AppwriteException}
|
|
1272
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1273
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteRows` instead.
|
|
1274
|
+
*/
|
|
1275
|
+
deleteDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1276
|
+
databaseId: string;
|
|
1277
|
+
collectionId: string;
|
|
1278
|
+
queries?: string[];
|
|
1279
|
+
}): Promise<Models.DocumentList<Document>>;
|
|
1280
|
+
/**
|
|
495
1281
|
* Bulk delete documents using queries, if no queries are passed then all documents are deleted.
|
|
496
1282
|
*
|
|
497
|
-
* @param {string} databaseId
|
|
498
|
-
* @param {string} collectionId
|
|
499
|
-
* @param {string[]} queries
|
|
1283
|
+
* @param {string} databaseId - Database ID.
|
|
1284
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1285
|
+
* @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.
|
|
500
1286
|
* @throws {AppwriteException}
|
|
501
1287
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1288
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
502
1289
|
*/
|
|
503
1290
|
deleteDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>>;
|
|
504
1291
|
/**
|
|
505
1292
|
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
|
|
506
1293
|
*
|
|
507
|
-
* @param {string} databaseId
|
|
508
|
-
* @param {string} collectionId
|
|
509
|
-
* @param {string} documentId
|
|
510
|
-
* @param {string[]} queries
|
|
1294
|
+
* @param {string} params.databaseId - Database ID.
|
|
1295
|
+
* @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).
|
|
1296
|
+
* @param {string} params.documentId - Document ID.
|
|
1297
|
+
* @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.
|
|
1298
|
+
* @throws {AppwriteException}
|
|
1299
|
+
* @returns {Promise<Document>}
|
|
1300
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getRow` instead.
|
|
1301
|
+
*/
|
|
1302
|
+
getDocument<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1303
|
+
databaseId: string;
|
|
1304
|
+
collectionId: string;
|
|
1305
|
+
documentId: string;
|
|
1306
|
+
queries?: string[];
|
|
1307
|
+
}): Promise<Document>;
|
|
1308
|
+
/**
|
|
1309
|
+
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
|
|
1310
|
+
*
|
|
1311
|
+
* @param {string} databaseId - Database ID.
|
|
1312
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1313
|
+
* @param {string} documentId - Document ID.
|
|
1314
|
+
* @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.
|
|
511
1315
|
* @throws {AppwriteException}
|
|
512
1316
|
* @returns {Promise<Document>}
|
|
1317
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
513
1318
|
*/
|
|
514
1319
|
getDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Document>;
|
|
515
1320
|
/**
|
|
516
|
-
*
|
|
1321
|
+
* 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#databasesCreateCollection) API or directly from your database console.
|
|
517
1322
|
*
|
|
1323
|
+
* @param {string} params.databaseId - Database ID.
|
|
1324
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1325
|
+
* @param {string} params.documentId - Document ID.
|
|
1326
|
+
* @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 attributes of the document to be created or updated.
|
|
1327
|
+
* @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).
|
|
1328
|
+
* @throws {AppwriteException}
|
|
1329
|
+
* @returns {Promise<Document>}
|
|
1330
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.upsertRow` instead.
|
|
1331
|
+
*/
|
|
1332
|
+
upsertDocument<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1333
|
+
databaseId: string;
|
|
1334
|
+
collectionId: string;
|
|
1335
|
+
documentId: string;
|
|
1336
|
+
data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>;
|
|
1337
|
+
permissions?: string[];
|
|
1338
|
+
}): Promise<Document>;
|
|
1339
|
+
/**
|
|
518
1340
|
* 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#databasesCreateCollection) API or directly from your database console.
|
|
519
1341
|
*
|
|
520
|
-
* @param {string} databaseId
|
|
521
|
-
* @param {string} collectionId
|
|
522
|
-
* @param {string} documentId
|
|
523
|
-
* @param {
|
|
524
|
-
* @param {string[]} permissions
|
|
1342
|
+
* @param {string} databaseId - Database ID.
|
|
1343
|
+
* @param {string} collectionId - Collection ID.
|
|
1344
|
+
* @param {string} documentId - Document ID.
|
|
1345
|
+
* @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 attributes of the document to be created or updated.
|
|
1346
|
+
* @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
525
1347
|
* @throws {AppwriteException}
|
|
526
1348
|
* @returns {Promise<Document>}
|
|
1349
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
527
1350
|
*/
|
|
528
|
-
upsertDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data:
|
|
1351
|
+
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[]): Promise<Document>;
|
|
529
1352
|
/**
|
|
530
1353
|
* Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
531
1354
|
*
|
|
532
|
-
* @param {string} databaseId
|
|
533
|
-
* @param {string} collectionId
|
|
534
|
-
* @param {string} documentId
|
|
535
|
-
* @param {
|
|
536
|
-
* @param {string[]} permissions
|
|
1355
|
+
* @param {string} params.databaseId - Database ID.
|
|
1356
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1357
|
+
* @param {string} params.documentId - Document ID.
|
|
1358
|
+
* @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 attribute and value pairs to be updated.
|
|
1359
|
+
* @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).
|
|
537
1360
|
* @throws {AppwriteException}
|
|
538
1361
|
* @returns {Promise<Document>}
|
|
1362
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRow` instead.
|
|
1363
|
+
*/
|
|
1364
|
+
updateDocument<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1365
|
+
databaseId: string;
|
|
1366
|
+
collectionId: string;
|
|
1367
|
+
documentId: string;
|
|
1368
|
+
data?: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>;
|
|
1369
|
+
permissions?: string[];
|
|
1370
|
+
}): Promise<Document>;
|
|
1371
|
+
/**
|
|
1372
|
+
* Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
1373
|
+
*
|
|
1374
|
+
* @param {string} databaseId - Database ID.
|
|
1375
|
+
* @param {string} collectionId - Collection ID.
|
|
1376
|
+
* @param {string} documentId - Document ID.
|
|
1377
|
+
* @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 attribute and value pairs to be updated.
|
|
1378
|
+
* @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
1379
|
+
* @throws {AppwriteException}
|
|
1380
|
+
* @returns {Promise<Document>}
|
|
1381
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1382
|
+
*/
|
|
1383
|
+
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[]): Promise<Document>;
|
|
1384
|
+
/**
|
|
1385
|
+
* Delete a document by its unique ID.
|
|
1386
|
+
*
|
|
1387
|
+
* @param {string} params.databaseId - Database ID.
|
|
1388
|
+
* @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).
|
|
1389
|
+
* @param {string} params.documentId - Document ID.
|
|
1390
|
+
* @throws {AppwriteException}
|
|
1391
|
+
* @returns {Promise<{}>}
|
|
1392
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteRow` instead.
|
|
539
1393
|
*/
|
|
540
|
-
|
|
1394
|
+
deleteDocument(params: {
|
|
1395
|
+
databaseId: string;
|
|
1396
|
+
collectionId: string;
|
|
1397
|
+
documentId: string;
|
|
1398
|
+
}): Promise<{}>;
|
|
541
1399
|
/**
|
|
542
1400
|
* Delete a document by its unique ID.
|
|
543
1401
|
*
|
|
544
|
-
* @param {string} databaseId
|
|
545
|
-
* @param {string} collectionId
|
|
546
|
-
* @param {string} documentId
|
|
1402
|
+
* @param {string} databaseId - Database ID.
|
|
1403
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1404
|
+
* @param {string} documentId - Document ID.
|
|
547
1405
|
* @throws {AppwriteException}
|
|
548
1406
|
* @returns {Promise<{}>}
|
|
1407
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
549
1408
|
*/
|
|
550
1409
|
deleteDocument(databaseId: string, collectionId: string, documentId: string): Promise<{}>;
|
|
551
1410
|
/**
|
|
552
1411
|
* Decrement a specific attribute of a document by a given value.
|
|
553
1412
|
*
|
|
554
|
-
* @param {string} databaseId
|
|
555
|
-
* @param {string} collectionId
|
|
556
|
-
* @param {string} documentId
|
|
557
|
-
* @param {string} attribute
|
|
558
|
-
* @param {number} value
|
|
559
|
-
* @param {number} min
|
|
1413
|
+
* @param {string} params.databaseId - Database ID.
|
|
1414
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1415
|
+
* @param {string} params.documentId - Document ID.
|
|
1416
|
+
* @param {string} params.attribute - Attribute key.
|
|
1417
|
+
* @param {number} params.value - Value to increment the attribute by. The value must be a number.
|
|
1418
|
+
* @param {number} params.min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
|
|
1419
|
+
* @throws {AppwriteException}
|
|
1420
|
+
* @returns {Promise<Document>}
|
|
1421
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.decrementRowColumn` instead.
|
|
1422
|
+
*/
|
|
1423
|
+
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1424
|
+
databaseId: string;
|
|
1425
|
+
collectionId: string;
|
|
1426
|
+
documentId: string;
|
|
1427
|
+
attribute: string;
|
|
1428
|
+
value?: number;
|
|
1429
|
+
min?: number;
|
|
1430
|
+
}): Promise<Document>;
|
|
1431
|
+
/**
|
|
1432
|
+
* Decrement a specific attribute of a document by a given value.
|
|
1433
|
+
*
|
|
1434
|
+
* @param {string} databaseId - Database ID.
|
|
1435
|
+
* @param {string} collectionId - Collection ID.
|
|
1436
|
+
* @param {string} documentId - Document ID.
|
|
1437
|
+
* @param {string} attribute - Attribute key.
|
|
1438
|
+
* @param {number} value - Value to increment the attribute by. The value must be a number.
|
|
1439
|
+
* @param {number} min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
|
|
560
1440
|
* @throws {AppwriteException}
|
|
561
1441
|
* @returns {Promise<Document>}
|
|
1442
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
562
1443
|
*/
|
|
563
1444
|
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number): Promise<Document>;
|
|
564
1445
|
/**
|
|
565
1446
|
* Increment a specific attribute of a document by a given value.
|
|
566
1447
|
*
|
|
567
|
-
* @param {string} databaseId
|
|
568
|
-
* @param {string} collectionId
|
|
569
|
-
* @param {string} documentId
|
|
570
|
-
* @param {string} attribute
|
|
571
|
-
* @param {number} value
|
|
572
|
-
* @param {number} max
|
|
1448
|
+
* @param {string} params.databaseId - Database ID.
|
|
1449
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1450
|
+
* @param {string} params.documentId - Document ID.
|
|
1451
|
+
* @param {string} params.attribute - Attribute key.
|
|
1452
|
+
* @param {number} params.value - Value to increment the attribute by. The value must be a number.
|
|
1453
|
+
* @param {number} params.max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
|
|
573
1454
|
* @throws {AppwriteException}
|
|
574
1455
|
* @returns {Promise<Document>}
|
|
1456
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.incrementRowColumn` instead.
|
|
1457
|
+
*/
|
|
1458
|
+
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1459
|
+
databaseId: string;
|
|
1460
|
+
collectionId: string;
|
|
1461
|
+
documentId: string;
|
|
1462
|
+
attribute: string;
|
|
1463
|
+
value?: number;
|
|
1464
|
+
max?: number;
|
|
1465
|
+
}): Promise<Document>;
|
|
1466
|
+
/**
|
|
1467
|
+
* Increment a specific attribute of a document by a given value.
|
|
1468
|
+
*
|
|
1469
|
+
* @param {string} databaseId - Database ID.
|
|
1470
|
+
* @param {string} collectionId - Collection ID.
|
|
1471
|
+
* @param {string} documentId - Document ID.
|
|
1472
|
+
* @param {string} attribute - Attribute key.
|
|
1473
|
+
* @param {number} value - Value to increment the attribute by. The value must be a number.
|
|
1474
|
+
* @param {number} max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
|
|
1475
|
+
* @throws {AppwriteException}
|
|
1476
|
+
* @returns {Promise<Document>}
|
|
1477
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
575
1478
|
*/
|
|
576
1479
|
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number): Promise<Document>;
|
|
577
1480
|
/**
|
|
578
1481
|
* List indexes in the collection.
|
|
579
1482
|
*
|
|
580
|
-
* @param {string} databaseId
|
|
581
|
-
* @param {string} collectionId
|
|
582
|
-
* @param {string[]} queries
|
|
1483
|
+
* @param {string} params.databaseId - Database ID.
|
|
1484
|
+
* @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).
|
|
1485
|
+
* @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
|
|
1486
|
+
* @throws {AppwriteException}
|
|
1487
|
+
* @returns {Promise<Models.IndexList>}
|
|
1488
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listIndexes` instead.
|
|
1489
|
+
*/
|
|
1490
|
+
listIndexes(params: {
|
|
1491
|
+
databaseId: string;
|
|
1492
|
+
collectionId: string;
|
|
1493
|
+
queries?: string[];
|
|
1494
|
+
}): Promise<Models.IndexList>;
|
|
1495
|
+
/**
|
|
1496
|
+
* List indexes in the collection.
|
|
1497
|
+
*
|
|
1498
|
+
* @param {string} databaseId - Database ID.
|
|
1499
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1500
|
+
* @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
|
|
583
1501
|
* @throws {AppwriteException}
|
|
584
1502
|
* @returns {Promise<Models.IndexList>}
|
|
1503
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
585
1504
|
*/
|
|
586
1505
|
listIndexes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.IndexList>;
|
|
587
1506
|
/**
|
|
588
1507
|
* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
|
|
589
1508
|
* Attributes can be `key`, `fulltext`, and `unique`.
|
|
590
1509
|
*
|
|
591
|
-
* @param {string} databaseId
|
|
592
|
-
* @param {string} collectionId
|
|
593
|
-
* @param {string} key
|
|
594
|
-
* @param {IndexType} type
|
|
595
|
-
* @param {string[]} attributes
|
|
596
|
-
* @param {string[]} orders
|
|
597
|
-
* @param {number[]} lengths
|
|
1510
|
+
* @param {string} params.databaseId - Database ID.
|
|
1511
|
+
* @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).
|
|
1512
|
+
* @param {string} params.key - Index Key.
|
|
1513
|
+
* @param {IndexType} params.type - Index type.
|
|
1514
|
+
* @param {string[]} params.attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.
|
|
1515
|
+
* @param {string[]} params.orders - Array of index orders. Maximum of 100 orders are allowed.
|
|
1516
|
+
* @param {number[]} params.lengths - Length of index. Maximum of 100
|
|
598
1517
|
* @throws {AppwriteException}
|
|
599
1518
|
* @returns {Promise<Models.Index>}
|
|
1519
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIndex` instead.
|
|
1520
|
+
*/
|
|
1521
|
+
createIndex(params: {
|
|
1522
|
+
databaseId: string;
|
|
1523
|
+
collectionId: string;
|
|
1524
|
+
key: string;
|
|
1525
|
+
type: IndexType;
|
|
1526
|
+
attributes: string[];
|
|
1527
|
+
orders?: string[];
|
|
1528
|
+
lengths?: number[];
|
|
1529
|
+
}): Promise<Models.Index>;
|
|
1530
|
+
/**
|
|
1531
|
+
* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
|
|
1532
|
+
* Attributes can be `key`, `fulltext`, and `unique`.
|
|
1533
|
+
*
|
|
1534
|
+
* @param {string} databaseId - Database ID.
|
|
1535
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1536
|
+
* @param {string} key - Index Key.
|
|
1537
|
+
* @param {IndexType} type - Index type.
|
|
1538
|
+
* @param {string[]} attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.
|
|
1539
|
+
* @param {string[]} orders - Array of index orders. Maximum of 100 orders are allowed.
|
|
1540
|
+
* @param {number[]} lengths - Length of index. Maximum of 100
|
|
1541
|
+
* @throws {AppwriteException}
|
|
1542
|
+
* @returns {Promise<Models.Index>}
|
|
1543
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
600
1544
|
*/
|
|
601
1545
|
createIndex(databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number[]): Promise<Models.Index>;
|
|
602
1546
|
/**
|
|
603
1547
|
* Get index by ID.
|
|
604
1548
|
*
|
|
605
|
-
* @param {string} databaseId
|
|
606
|
-
* @param {string} collectionId
|
|
607
|
-
* @param {string} key
|
|
1549
|
+
* @param {string} params.databaseId - Database ID.
|
|
1550
|
+
* @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).
|
|
1551
|
+
* @param {string} params.key - Index Key.
|
|
608
1552
|
* @throws {AppwriteException}
|
|
609
1553
|
* @returns {Promise<Models.Index>}
|
|
1554
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getIndex` instead.
|
|
1555
|
+
*/
|
|
1556
|
+
getIndex(params: {
|
|
1557
|
+
databaseId: string;
|
|
1558
|
+
collectionId: string;
|
|
1559
|
+
key: string;
|
|
1560
|
+
}): Promise<Models.Index>;
|
|
1561
|
+
/**
|
|
1562
|
+
* Get index by ID.
|
|
1563
|
+
*
|
|
1564
|
+
* @param {string} databaseId - Database ID.
|
|
1565
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1566
|
+
* @param {string} key - Index Key.
|
|
1567
|
+
* @throws {AppwriteException}
|
|
1568
|
+
* @returns {Promise<Models.Index>}
|
|
1569
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
610
1570
|
*/
|
|
611
1571
|
getIndex(databaseId: string, collectionId: string, key: string): Promise<Models.Index>;
|
|
612
1572
|
/**
|
|
613
1573
|
* Delete an index.
|
|
614
1574
|
*
|
|
615
|
-
* @param {string} databaseId
|
|
616
|
-
* @param {string} collectionId
|
|
617
|
-
* @param {string} key
|
|
1575
|
+
* @param {string} params.databaseId - Database ID.
|
|
1576
|
+
* @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).
|
|
1577
|
+
* @param {string} params.key - Index Key.
|
|
1578
|
+
* @throws {AppwriteException}
|
|
1579
|
+
* @returns {Promise<{}>}
|
|
1580
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteIndex` instead.
|
|
1581
|
+
*/
|
|
1582
|
+
deleteIndex(params: {
|
|
1583
|
+
databaseId: string;
|
|
1584
|
+
collectionId: string;
|
|
1585
|
+
key: string;
|
|
1586
|
+
}): Promise<{}>;
|
|
1587
|
+
/**
|
|
1588
|
+
* Delete an index.
|
|
1589
|
+
*
|
|
1590
|
+
* @param {string} databaseId - Database ID.
|
|
1591
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1592
|
+
* @param {string} key - Index Key.
|
|
618
1593
|
* @throws {AppwriteException}
|
|
619
1594
|
* @returns {Promise<{}>}
|
|
1595
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
620
1596
|
*/
|
|
621
1597
|
deleteIndex(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
622
1598
|
}
|