node-appwrite 17.2.0 → 19.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/credit-card.d.mts +1 -1
- package/dist/enums/credit-card.d.ts +1 -1
- package/dist/enums/credit-card.js +1 -1
- package/dist/enums/credit-card.js.map +1 -1
- package/dist/enums/credit-card.mjs +1 -1
- package/dist/enums/credit-card.mjs.map +1 -1
- package/dist/enums/execution-method.d.mts +2 -1
- package/dist/enums/execution-method.d.ts +2 -1
- package/dist/enums/execution-method.js +1 -0
- package/dist/enums/execution-method.js.map +1 -1
- package/dist/enums/execution-method.mjs +1 -0
- package/dist/enums/execution-method.mjs.map +1 -1
- package/dist/enums/index-type.d.mts +2 -1
- package/dist/enums/index-type.d.ts +2 -1
- package/dist/enums/index-type.js +1 -0
- package/dist/enums/index-type.js.map +1 -1
- package/dist/enums/index-type.mjs +1 -0
- package/dist/enums/index-type.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 +1058 -153
- package/dist/models.d.ts +1058 -153
- package/dist/query.d.mts +196 -6
- package/dist/query.d.ts +196 -6
- package/dist/query.js +192 -2
- package/dist/query.js.map +1 -1
- package/dist/query.mjs +192 -2
- 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 +1425 -248
- package/dist/services/databases.d.ts +1425 -248
- package/dist/services/databases.js +1186 -611
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +1186 -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 +1744 -0
- package/dist/services/tables-db.d.ts +1744 -0
- package/dist/services/tables-db.js +2692 -0
- package/dist/services/tables-db.js.map +1 -0
- package/dist/services/tables-db.mjs +2691 -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,1789 @@ 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.create` 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.
|
|
35
66
|
* @throws {AppwriteException}
|
|
36
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.
|
|
77
|
+
* @throws {AppwriteException}
|
|
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.
|
|
88
|
+
* @throws {AppwriteException}
|
|
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.
|
|
45
103
|
* @throws {AppwriteException}
|
|
46
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.
|
|
134
|
+
* @throws {AppwriteException}
|
|
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.
|
|
63
149
|
* @throws {AppwriteException}
|
|
64
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.
|
|
221
|
+
* @throws {AppwriteException}
|
|
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.
|
|
98
242
|
* @throws {AppwriteException}
|
|
99
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.
|
|
107
252
|
* @throws {AppwriteException}
|
|
108
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.
|
|
265
|
+
* @throws {AppwriteException}
|
|
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?
|
|
157
377
|
* @throws {AppwriteException}
|
|
158
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?
|
|
398
|
+
* @throws {AppwriteException}
|
|
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.
|
|
170
412
|
* @throws {AppwriteException}
|
|
171
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.
|
|
433
|
+
* @throws {AppwriteException}
|
|
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?
|
|
448
|
+
* @throws {AppwriteException}
|
|
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?
|
|
184
470
|
* @throws {AppwriteException}
|
|
185
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.
|
|
198
485
|
* @throws {AppwriteException}
|
|
199
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.
|
|
507
|
+
* @throws {AppwriteException}
|
|
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.
|
|
514
|
+
*
|
|
515
|
+
*
|
|
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?
|
|
523
|
+
* @throws {AppwriteException}
|
|
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.
|
|
204
538
|
*
|
|
205
539
|
*
|
|
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
|
|
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?
|
|
213
547
|
* @throws {AppwriteException}
|
|
214
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?
|
|
276
690
|
* @throws {AppwriteException}
|
|
277
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?
|
|
716
|
+
* @throws {AppwriteException}
|
|
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.
|
|
733
|
+
* @throws {AppwriteException}
|
|
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.
|
|
292
759
|
* @throws {AppwriteException}
|
|
293
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>;
|
|
838
|
+
/**
|
|
839
|
+
* Create a geometric line attribute.
|
|
840
|
+
*
|
|
841
|
+
* @param {string} params.databaseId - Database ID.
|
|
842
|
+
* @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).
|
|
843
|
+
* @param {string} params.key - Attribute Key.
|
|
844
|
+
* @param {boolean} params.required - Is attribute required?
|
|
845
|
+
* @param {any[]} params.xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
|
|
846
|
+
* @throws {AppwriteException}
|
|
847
|
+
* @returns {Promise<Models.AttributeLine>}
|
|
848
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createLineColumn` instead.
|
|
849
|
+
*/
|
|
850
|
+
createLineAttribute(params: {
|
|
851
|
+
databaseId: string;
|
|
852
|
+
collectionId: string;
|
|
853
|
+
key: string;
|
|
854
|
+
required: boolean;
|
|
855
|
+
xdefault?: any[];
|
|
856
|
+
}): Promise<Models.AttributeLine>;
|
|
857
|
+
/**
|
|
858
|
+
* Create a geometric line attribute.
|
|
859
|
+
*
|
|
860
|
+
* @param {string} databaseId - Database ID.
|
|
861
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
862
|
+
* @param {string} key - Attribute Key.
|
|
863
|
+
* @param {boolean} required - Is attribute required?
|
|
864
|
+
* @param {any[]} xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
|
|
865
|
+
* @throws {AppwriteException}
|
|
866
|
+
* @returns {Promise<Models.AttributeLine>}
|
|
867
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
868
|
+
*/
|
|
869
|
+
createLineAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[]): Promise<Models.AttributeLine>;
|
|
870
|
+
/**
|
|
871
|
+
* Update a line attribute. Changing the `default` value will not update already existing documents.
|
|
872
|
+
*
|
|
873
|
+
* @param {string} params.databaseId - Database ID.
|
|
874
|
+
* @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).
|
|
875
|
+
* @param {string} params.key - Attribute Key.
|
|
876
|
+
* @param {boolean} params.required - Is attribute required?
|
|
877
|
+
* @param {any[]} params.xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
|
|
878
|
+
* @param {string} params.newKey - New attribute key.
|
|
879
|
+
* @throws {AppwriteException}
|
|
880
|
+
* @returns {Promise<Models.AttributeLine>}
|
|
881
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateLineColumn` instead.
|
|
882
|
+
*/
|
|
883
|
+
updateLineAttribute(params: {
|
|
884
|
+
databaseId: string;
|
|
885
|
+
collectionId: string;
|
|
886
|
+
key: string;
|
|
887
|
+
required: boolean;
|
|
888
|
+
xdefault?: any[];
|
|
889
|
+
newKey?: string;
|
|
890
|
+
}): Promise<Models.AttributeLine>;
|
|
891
|
+
/**
|
|
892
|
+
* Update a line attribute. Changing the `default` value will not update already existing documents.
|
|
893
|
+
*
|
|
894
|
+
* @param {string} databaseId - Database ID.
|
|
895
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
|
896
|
+
* @param {string} key - Attribute Key.
|
|
897
|
+
* @param {boolean} required - Is attribute required?
|
|
898
|
+
* @param {any[]} xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
|
|
899
|
+
* @param {string} newKey - New attribute key.
|
|
900
|
+
* @throws {AppwriteException}
|
|
901
|
+
* @returns {Promise<Models.AttributeLine>}
|
|
902
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
903
|
+
*/
|
|
904
|
+
updateLineAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise<Models.AttributeLine>;
|
|
905
|
+
/**
|
|
906
|
+
* Create a geometric point attribute.
|
|
907
|
+
*
|
|
908
|
+
* @param {string} params.databaseId - Database ID.
|
|
909
|
+
* @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).
|
|
910
|
+
* @param {string} params.key - Attribute Key.
|
|
911
|
+
* @param {boolean} params.required - Is attribute required?
|
|
912
|
+
* @param {any[]} params.xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
|
|
913
|
+
* @throws {AppwriteException}
|
|
914
|
+
* @returns {Promise<Models.AttributePoint>}
|
|
915
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createPointColumn` instead.
|
|
916
|
+
*/
|
|
917
|
+
createPointAttribute(params: {
|
|
918
|
+
databaseId: string;
|
|
919
|
+
collectionId: string;
|
|
920
|
+
key: string;
|
|
921
|
+
required: boolean;
|
|
922
|
+
xdefault?: any[];
|
|
923
|
+
}): Promise<Models.AttributePoint>;
|
|
924
|
+
/**
|
|
925
|
+
* Create a geometric point attribute.
|
|
926
|
+
*
|
|
927
|
+
* @param {string} databaseId - Database ID.
|
|
928
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
929
|
+
* @param {string} key - Attribute Key.
|
|
930
|
+
* @param {boolean} required - Is attribute required?
|
|
931
|
+
* @param {any[]} xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
|
|
932
|
+
* @throws {AppwriteException}
|
|
933
|
+
* @returns {Promise<Models.AttributePoint>}
|
|
934
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
935
|
+
*/
|
|
936
|
+
createPointAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[]): Promise<Models.AttributePoint>;
|
|
937
|
+
/**
|
|
938
|
+
* Update a point attribute. Changing the `default` value will not update already existing documents.
|
|
939
|
+
*
|
|
940
|
+
* @param {string} params.databaseId - Database ID.
|
|
941
|
+
* @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).
|
|
942
|
+
* @param {string} params.key - Attribute Key.
|
|
943
|
+
* @param {boolean} params.required - Is attribute required?
|
|
944
|
+
* @param {any[]} params.xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
|
|
945
|
+
* @param {string} params.newKey - New attribute key.
|
|
946
|
+
* @throws {AppwriteException}
|
|
947
|
+
* @returns {Promise<Models.AttributePoint>}
|
|
948
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updatePointColumn` instead.
|
|
949
|
+
*/
|
|
950
|
+
updatePointAttribute(params: {
|
|
951
|
+
databaseId: string;
|
|
952
|
+
collectionId: string;
|
|
953
|
+
key: string;
|
|
954
|
+
required: boolean;
|
|
955
|
+
xdefault?: any[];
|
|
956
|
+
newKey?: string;
|
|
957
|
+
}): Promise<Models.AttributePoint>;
|
|
958
|
+
/**
|
|
959
|
+
* Update a point attribute. Changing the `default` value will not update already existing documents.
|
|
960
|
+
*
|
|
961
|
+
* @param {string} databaseId - Database ID.
|
|
962
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
|
963
|
+
* @param {string} key - Attribute Key.
|
|
964
|
+
* @param {boolean} required - Is attribute required?
|
|
965
|
+
* @param {any[]} xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
|
|
966
|
+
* @param {string} newKey - New attribute key.
|
|
967
|
+
* @throws {AppwriteException}
|
|
968
|
+
* @returns {Promise<Models.AttributePoint>}
|
|
969
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
970
|
+
*/
|
|
971
|
+
updatePointAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise<Models.AttributePoint>;
|
|
972
|
+
/**
|
|
973
|
+
* Create a geometric polygon attribute.
|
|
974
|
+
*
|
|
975
|
+
* @param {string} params.databaseId - Database ID.
|
|
976
|
+
* @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).
|
|
977
|
+
* @param {string} params.key - Attribute Key.
|
|
978
|
+
* @param {boolean} params.required - Is attribute required?
|
|
979
|
+
* @param {any[]} params.xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
|
|
980
|
+
* @throws {AppwriteException}
|
|
981
|
+
* @returns {Promise<Models.AttributePolygon>}
|
|
982
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createPolygonColumn` instead.
|
|
983
|
+
*/
|
|
984
|
+
createPolygonAttribute(params: {
|
|
985
|
+
databaseId: string;
|
|
986
|
+
collectionId: string;
|
|
987
|
+
key: string;
|
|
988
|
+
required: boolean;
|
|
989
|
+
xdefault?: any[];
|
|
990
|
+
}): Promise<Models.AttributePolygon>;
|
|
991
|
+
/**
|
|
992
|
+
* Create a geometric polygon attribute.
|
|
993
|
+
*
|
|
994
|
+
* @param {string} databaseId - Database ID.
|
|
995
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
996
|
+
* @param {string} key - Attribute Key.
|
|
997
|
+
* @param {boolean} required - Is attribute required?
|
|
998
|
+
* @param {any[]} xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
|
|
999
|
+
* @throws {AppwriteException}
|
|
1000
|
+
* @returns {Promise<Models.AttributePolygon>}
|
|
1001
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1002
|
+
*/
|
|
1003
|
+
createPolygonAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[]): Promise<Models.AttributePolygon>;
|
|
1004
|
+
/**
|
|
1005
|
+
* Update a polygon attribute. Changing the `default` value will not update already existing documents.
|
|
1006
|
+
*
|
|
1007
|
+
* @param {string} params.databaseId - Database ID.
|
|
1008
|
+
* @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).
|
|
1009
|
+
* @param {string} params.key - Attribute Key.
|
|
1010
|
+
* @param {boolean} params.required - Is attribute required?
|
|
1011
|
+
* @param {any[]} params.xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
|
|
1012
|
+
* @param {string} params.newKey - New attribute key.
|
|
1013
|
+
* @throws {AppwriteException}
|
|
1014
|
+
* @returns {Promise<Models.AttributePolygon>}
|
|
1015
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updatePolygonColumn` instead.
|
|
1016
|
+
*/
|
|
1017
|
+
updatePolygonAttribute(params: {
|
|
1018
|
+
databaseId: string;
|
|
1019
|
+
collectionId: string;
|
|
1020
|
+
key: string;
|
|
1021
|
+
required: boolean;
|
|
1022
|
+
xdefault?: any[];
|
|
1023
|
+
newKey?: string;
|
|
1024
|
+
}): Promise<Models.AttributePolygon>;
|
|
1025
|
+
/**
|
|
1026
|
+
* Update a polygon attribute. Changing the `default` value will not update already existing documents.
|
|
1027
|
+
*
|
|
1028
|
+
* @param {string} databaseId - Database ID.
|
|
1029
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
|
1030
|
+
* @param {string} key - Attribute Key.
|
|
1031
|
+
* @param {boolean} required - Is attribute required?
|
|
1032
|
+
* @param {any[]} xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
|
|
1033
|
+
* @param {string} newKey - New attribute key.
|
|
1034
|
+
* @throws {AppwriteException}
|
|
1035
|
+
* @returns {Promise<Models.AttributePolygon>}
|
|
1036
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1037
|
+
*/
|
|
1038
|
+
updatePolygonAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise<Models.AttributePolygon>;
|
|
1039
|
+
/**
|
|
1040
|
+
* Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
1041
|
+
*
|
|
1042
|
+
*
|
|
1043
|
+
* @param {string} params.databaseId - Database ID.
|
|
1044
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1045
|
+
* @param {string} params.relatedCollectionId - Related Collection ID.
|
|
1046
|
+
* @param {RelationshipType} params.type - Relation type
|
|
1047
|
+
* @param {boolean} params.twoWay - Is Two Way?
|
|
1048
|
+
* @param {string} params.key - Attribute Key.
|
|
1049
|
+
* @param {string} params.twoWayKey - Two Way Attribute Key.
|
|
1050
|
+
* @param {RelationMutate} params.onDelete - Constraints option
|
|
1051
|
+
* @throws {AppwriteException}
|
|
1052
|
+
* @returns {Promise<Models.AttributeRelationship>}
|
|
1053
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRelationshipColumn` instead.
|
|
1054
|
+
*/
|
|
1055
|
+
createRelationshipAttribute(params: {
|
|
1056
|
+
databaseId: string;
|
|
1057
|
+
collectionId: string;
|
|
1058
|
+
relatedCollectionId: string;
|
|
1059
|
+
type: RelationshipType;
|
|
1060
|
+
twoWay?: boolean;
|
|
1061
|
+
key?: string;
|
|
1062
|
+
twoWayKey?: string;
|
|
1063
|
+
onDelete?: RelationMutate;
|
|
1064
|
+
}): Promise<Models.AttributeRelationship>;
|
|
324
1065
|
/**
|
|
325
1066
|
* Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
326
1067
|
*
|
|
327
1068
|
*
|
|
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
|
|
1069
|
+
* @param {string} databaseId - Database ID.
|
|
1070
|
+
* @param {string} collectionId - Collection ID.
|
|
1071
|
+
* @param {string} relatedCollectionId - Related Collection ID.
|
|
1072
|
+
* @param {RelationshipType} type - Relation type
|
|
1073
|
+
* @param {boolean} twoWay - Is Two Way?
|
|
1074
|
+
* @param {string} key - Attribute Key.
|
|
1075
|
+
* @param {string} twoWayKey - Two Way Attribute Key.
|
|
1076
|
+
* @param {RelationMutate} onDelete - Constraints option
|
|
336
1077
|
* @throws {AppwriteException}
|
|
337
1078
|
* @returns {Promise<Models.AttributeRelationship>}
|
|
1079
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
338
1080
|
*/
|
|
339
1081
|
createRelationshipAttribute(databaseId: string, collectionId: string, relatedCollectionId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate): Promise<Models.AttributeRelationship>;
|
|
340
1082
|
/**
|
|
341
1083
|
* Create a string attribute.
|
|
342
1084
|
*
|
|
343
1085
|
*
|
|
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
|
|
1086
|
+
* @param {string} params.databaseId - Database ID.
|
|
1087
|
+
* @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).
|
|
1088
|
+
* @param {string} params.key - Attribute Key.
|
|
1089
|
+
* @param {number} params.size - Attribute size for text attributes, in number of characters.
|
|
1090
|
+
* @param {boolean} params.required - Is attribute required?
|
|
1091
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1092
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
1093
|
+
* @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
1094
|
* @throws {AppwriteException}
|
|
353
1095
|
* @returns {Promise<Models.AttributeString>}
|
|
1096
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createStringColumn` instead.
|
|
1097
|
+
*/
|
|
1098
|
+
createStringAttribute(params: {
|
|
1099
|
+
databaseId: string;
|
|
1100
|
+
collectionId: string;
|
|
1101
|
+
key: string;
|
|
1102
|
+
size: number;
|
|
1103
|
+
required: boolean;
|
|
1104
|
+
xdefault?: string;
|
|
1105
|
+
array?: boolean;
|
|
1106
|
+
encrypt?: boolean;
|
|
1107
|
+
}): Promise<Models.AttributeString>;
|
|
1108
|
+
/**
|
|
1109
|
+
* Create a string attribute.
|
|
1110
|
+
*
|
|
1111
|
+
*
|
|
1112
|
+
* @param {string} databaseId - Database ID.
|
|
1113
|
+
* @param {string} collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1114
|
+
* @param {string} key - Attribute Key.
|
|
1115
|
+
* @param {number} size - Attribute size for text attributes, in number of characters.
|
|
1116
|
+
* @param {boolean} required - Is attribute required?
|
|
1117
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1118
|
+
* @param {boolean} array - Is attribute an array?
|
|
1119
|
+
* @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.
|
|
1120
|
+
* @throws {AppwriteException}
|
|
1121
|
+
* @returns {Promise<Models.AttributeString>}
|
|
1122
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
354
1123
|
*/
|
|
355
1124
|
createStringAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeString>;
|
|
356
1125
|
/**
|
|
357
1126
|
* Update a string attribute. Changing the `default` value will not update already existing documents.
|
|
358
1127
|
*
|
|
359
1128
|
*
|
|
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
|
|
1129
|
+
* @param {string} params.databaseId - Database ID.
|
|
1130
|
+
* @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).
|
|
1131
|
+
* @param {string} params.key - Attribute Key.
|
|
1132
|
+
* @param {boolean} params.required - Is attribute required?
|
|
1133
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1134
|
+
* @param {number} params.size - Maximum size of the string attribute.
|
|
1135
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
367
1136
|
* @throws {AppwriteException}
|
|
368
1137
|
* @returns {Promise<Models.AttributeString>}
|
|
1138
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateStringColumn` instead.
|
|
1139
|
+
*/
|
|
1140
|
+
updateStringAttribute(params: {
|
|
1141
|
+
databaseId: string;
|
|
1142
|
+
collectionId: string;
|
|
1143
|
+
key: string;
|
|
1144
|
+
required: boolean;
|
|
1145
|
+
xdefault?: string;
|
|
1146
|
+
size?: number;
|
|
1147
|
+
newKey?: string;
|
|
1148
|
+
}): Promise<Models.AttributeString>;
|
|
1149
|
+
/**
|
|
1150
|
+
* Update a string attribute. Changing the `default` value will not update already existing documents.
|
|
1151
|
+
*
|
|
1152
|
+
*
|
|
1153
|
+
* @param {string} databaseId - Database ID.
|
|
1154
|
+
* @param {string} collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1155
|
+
* @param {string} key - Attribute Key.
|
|
1156
|
+
* @param {boolean} required - Is attribute required?
|
|
1157
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1158
|
+
* @param {number} size - Maximum size of the string attribute.
|
|
1159
|
+
* @param {string} newKey - New Attribute Key.
|
|
1160
|
+
* @throws {AppwriteException}
|
|
1161
|
+
* @returns {Promise<Models.AttributeString>}
|
|
1162
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
369
1163
|
*/
|
|
370
1164
|
updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string): Promise<Models.AttributeString>;
|
|
371
1165
|
/**
|
|
372
1166
|
* Create a URL attribute.
|
|
373
1167
|
*
|
|
374
1168
|
*
|
|
375
|
-
* @param {string} databaseId
|
|
376
|
-
* @param {string} collectionId
|
|
377
|
-
* @param {string} key
|
|
378
|
-
* @param {boolean} required
|
|
379
|
-
* @param {string} xdefault
|
|
380
|
-
* @param {boolean} array
|
|
1169
|
+
* @param {string} params.databaseId - Database ID.
|
|
1170
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1171
|
+
* @param {string} params.key - Attribute Key.
|
|
1172
|
+
* @param {boolean} params.required - Is attribute required?
|
|
1173
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1174
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
1175
|
+
* @throws {AppwriteException}
|
|
1176
|
+
* @returns {Promise<Models.AttributeUrl>}
|
|
1177
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createUrlColumn` instead.
|
|
1178
|
+
*/
|
|
1179
|
+
createUrlAttribute(params: {
|
|
1180
|
+
databaseId: string;
|
|
1181
|
+
collectionId: string;
|
|
1182
|
+
key: string;
|
|
1183
|
+
required: boolean;
|
|
1184
|
+
xdefault?: string;
|
|
1185
|
+
array?: boolean;
|
|
1186
|
+
}): Promise<Models.AttributeUrl>;
|
|
1187
|
+
/**
|
|
1188
|
+
* Create a URL attribute.
|
|
1189
|
+
*
|
|
1190
|
+
*
|
|
1191
|
+
* @param {string} databaseId - Database ID.
|
|
1192
|
+
* @param {string} collectionId - Collection ID.
|
|
1193
|
+
* @param {string} key - Attribute Key.
|
|
1194
|
+
* @param {boolean} required - Is attribute required?
|
|
1195
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1196
|
+
* @param {boolean} array - Is attribute an array?
|
|
381
1197
|
* @throws {AppwriteException}
|
|
382
1198
|
* @returns {Promise<Models.AttributeUrl>}
|
|
1199
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
383
1200
|
*/
|
|
384
1201
|
createUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeUrl>;
|
|
385
1202
|
/**
|
|
386
1203
|
* Update an url attribute. Changing the `default` value will not update already existing documents.
|
|
387
1204
|
*
|
|
388
1205
|
*
|
|
389
|
-
* @param {string} databaseId
|
|
390
|
-
* @param {string} collectionId
|
|
391
|
-
* @param {string} key
|
|
392
|
-
* @param {boolean} required
|
|
393
|
-
* @param {string} xdefault
|
|
394
|
-
* @param {string} newKey
|
|
1206
|
+
* @param {string} params.databaseId - Database ID.
|
|
1207
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1208
|
+
* @param {string} params.key - Attribute Key.
|
|
1209
|
+
* @param {boolean} params.required - Is attribute required?
|
|
1210
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1211
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
395
1212
|
* @throws {AppwriteException}
|
|
396
1213
|
* @returns {Promise<Models.AttributeUrl>}
|
|
1214
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateUrlColumn` instead.
|
|
1215
|
+
*/
|
|
1216
|
+
updateUrlAttribute(params: {
|
|
1217
|
+
databaseId: string;
|
|
1218
|
+
collectionId: string;
|
|
1219
|
+
key: string;
|
|
1220
|
+
required: boolean;
|
|
1221
|
+
xdefault?: string;
|
|
1222
|
+
newKey?: string;
|
|
1223
|
+
}): Promise<Models.AttributeUrl>;
|
|
1224
|
+
/**
|
|
1225
|
+
* Update an url attribute. Changing the `default` value will not update already existing documents.
|
|
1226
|
+
*
|
|
1227
|
+
*
|
|
1228
|
+
* @param {string} databaseId - Database ID.
|
|
1229
|
+
* @param {string} collectionId - Collection ID.
|
|
1230
|
+
* @param {string} key - Attribute Key.
|
|
1231
|
+
* @param {boolean} required - Is attribute required?
|
|
1232
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1233
|
+
* @param {string} newKey - New Attribute Key.
|
|
1234
|
+
* @throws {AppwriteException}
|
|
1235
|
+
* @returns {Promise<Models.AttributeUrl>}
|
|
1236
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
397
1237
|
*/
|
|
398
1238
|
updateUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeUrl>;
|
|
399
1239
|
/**
|
|
400
1240
|
* Get attribute by ID.
|
|
401
1241
|
*
|
|
402
|
-
* @param {string} databaseId
|
|
403
|
-
* @param {string} collectionId
|
|
404
|
-
* @param {string} key
|
|
1242
|
+
* @param {string} params.databaseId - Database ID.
|
|
1243
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1244
|
+
* @param {string} params.key - Attribute Key.
|
|
405
1245
|
* @throws {AppwriteException}
|
|
406
1246
|
* @returns {Promise<{}>}
|
|
1247
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getColumn` instead.
|
|
1248
|
+
*/
|
|
1249
|
+
getAttribute(params: {
|
|
1250
|
+
databaseId: string;
|
|
1251
|
+
collectionId: string;
|
|
1252
|
+
key: string;
|
|
1253
|
+
}): Promise<{}>;
|
|
1254
|
+
/**
|
|
1255
|
+
* Get attribute by ID.
|
|
1256
|
+
*
|
|
1257
|
+
* @param {string} databaseId - Database ID.
|
|
1258
|
+
* @param {string} collectionId - Collection ID.
|
|
1259
|
+
* @param {string} key - Attribute Key.
|
|
1260
|
+
* @throws {AppwriteException}
|
|
1261
|
+
* @returns {Promise<{}>}
|
|
1262
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
407
1263
|
*/
|
|
408
1264
|
getAttribute(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
409
1265
|
/**
|
|
410
1266
|
* Deletes an attribute.
|
|
411
1267
|
*
|
|
412
|
-
* @param {string} databaseId
|
|
413
|
-
* @param {string} collectionId
|
|
414
|
-
* @param {string} key
|
|
1268
|
+
* @param {string} params.databaseId - Database ID.
|
|
1269
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1270
|
+
* @param {string} params.key - Attribute Key.
|
|
415
1271
|
* @throws {AppwriteException}
|
|
416
1272
|
* @returns {Promise<{}>}
|
|
1273
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteColumn` instead.
|
|
1274
|
+
*/
|
|
1275
|
+
deleteAttribute(params: {
|
|
1276
|
+
databaseId: string;
|
|
1277
|
+
collectionId: string;
|
|
1278
|
+
key: string;
|
|
1279
|
+
}): Promise<{}>;
|
|
1280
|
+
/**
|
|
1281
|
+
* Deletes an attribute.
|
|
1282
|
+
*
|
|
1283
|
+
* @param {string} databaseId - Database ID.
|
|
1284
|
+
* @param {string} collectionId - Collection ID.
|
|
1285
|
+
* @param {string} key - Attribute Key.
|
|
1286
|
+
* @throws {AppwriteException}
|
|
1287
|
+
* @returns {Promise<{}>}
|
|
1288
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
417
1289
|
*/
|
|
418
1290
|
deleteAttribute(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
419
1291
|
/**
|
|
420
1292
|
* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
421
1293
|
*
|
|
422
1294
|
*
|
|
423
|
-
* @param {string} databaseId
|
|
424
|
-
* @param {string} collectionId
|
|
425
|
-
* @param {string} key
|
|
426
|
-
* @param {RelationMutate} onDelete
|
|
427
|
-
* @param {string} newKey
|
|
1295
|
+
* @param {string} params.databaseId - Database ID.
|
|
1296
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1297
|
+
* @param {string} params.key - Attribute Key.
|
|
1298
|
+
* @param {RelationMutate} params.onDelete - Constraints option
|
|
1299
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
428
1300
|
* @throws {AppwriteException}
|
|
429
1301
|
* @returns {Promise<Models.AttributeRelationship>}
|
|
1302
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRelationshipColumn` instead.
|
|
1303
|
+
*/
|
|
1304
|
+
updateRelationshipAttribute(params: {
|
|
1305
|
+
databaseId: string;
|
|
1306
|
+
collectionId: string;
|
|
1307
|
+
key: string;
|
|
1308
|
+
onDelete?: RelationMutate;
|
|
1309
|
+
newKey?: string;
|
|
1310
|
+
}): Promise<Models.AttributeRelationship>;
|
|
1311
|
+
/**
|
|
1312
|
+
* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
1313
|
+
*
|
|
1314
|
+
*
|
|
1315
|
+
* @param {string} databaseId - Database ID.
|
|
1316
|
+
* @param {string} collectionId - Collection ID.
|
|
1317
|
+
* @param {string} key - Attribute Key.
|
|
1318
|
+
* @param {RelationMutate} onDelete - Constraints option
|
|
1319
|
+
* @param {string} newKey - New Attribute Key.
|
|
1320
|
+
* @throws {AppwriteException}
|
|
1321
|
+
* @returns {Promise<Models.AttributeRelationship>}
|
|
1322
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
430
1323
|
*/
|
|
431
1324
|
updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string): Promise<Models.AttributeRelationship>;
|
|
432
1325
|
/**
|
|
433
|
-
* Get a list of all the user
|
|
1326
|
+
* Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
|
|
1327
|
+
*
|
|
1328
|
+
* @param {string} params.databaseId - Database ID.
|
|
1329
|
+
* @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).
|
|
1330
|
+
* @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.
|
|
1331
|
+
* @throws {AppwriteException}
|
|
1332
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1333
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.
|
|
1334
|
+
*/
|
|
1335
|
+
listDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1336
|
+
databaseId: string;
|
|
1337
|
+
collectionId: string;
|
|
1338
|
+
queries?: string[];
|
|
1339
|
+
}): Promise<Models.DocumentList<Document>>;
|
|
1340
|
+
/**
|
|
1341
|
+
* Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
|
|
434
1342
|
*
|
|
435
|
-
* @param {string} databaseId
|
|
436
|
-
* @param {string} collectionId
|
|
437
|
-
* @param {string[]} queries
|
|
1343
|
+
* @param {string} databaseId - Database ID.
|
|
1344
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1345
|
+
* @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
1346
|
* @throws {AppwriteException}
|
|
439
1347
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1348
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
440
1349
|
*/
|
|
441
1350
|
listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>>;
|
|
442
1351
|
/**
|
|
443
1352
|
* 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
1353
|
*
|
|
445
|
-
* @param {string} databaseId
|
|
446
|
-
* @param {string} collectionId
|
|
447
|
-
* @param {string} documentId
|
|
448
|
-
* @param {Document extends Models.DefaultDocument ? Models.
|
|
449
|
-
* @param {string[]} permissions
|
|
1354
|
+
* @param {string} params.databaseId - Database ID.
|
|
1355
|
+
* @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.
|
|
1356
|
+
* @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.
|
|
1357
|
+
* @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.
|
|
1358
|
+
* @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
1359
|
* @throws {AppwriteException}
|
|
451
1360
|
* @returns {Promise<Document>}
|
|
1361
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRow` instead.
|
|
452
1362
|
*/
|
|
453
|
-
createDocument<Document extends Models.Document = Models.DefaultDocument>(
|
|
1363
|
+
createDocument<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1364
|
+
databaseId: string;
|
|
1365
|
+
collectionId: string;
|
|
1366
|
+
documentId: string;
|
|
1367
|
+
data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>;
|
|
1368
|
+
permissions?: string[];
|
|
1369
|
+
}): Promise<Document>;
|
|
454
1370
|
/**
|
|
455
|
-
*
|
|
1371
|
+
* 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
1372
|
*
|
|
1373
|
+
* @param {string} databaseId - Database ID.
|
|
1374
|
+
* @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.
|
|
1375
|
+
* @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.
|
|
1376
|
+
* @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.
|
|
1377
|
+
* @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).
|
|
1378
|
+
* @throws {AppwriteException}
|
|
1379
|
+
* @returns {Promise<Document>}
|
|
1380
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1381
|
+
*/
|
|
1382
|
+
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>;
|
|
1383
|
+
/**
|
|
1384
|
+
* 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.
|
|
1385
|
+
*
|
|
1386
|
+
* @param {string} params.databaseId - Database ID.
|
|
1387
|
+
* @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.
|
|
1388
|
+
* @param {object[]} params.documents - Array of documents data as JSON objects.
|
|
1389
|
+
* @throws {AppwriteException}
|
|
1390
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1391
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRows` instead.
|
|
1392
|
+
*/
|
|
1393
|
+
createDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1394
|
+
databaseId: string;
|
|
1395
|
+
collectionId: string;
|
|
1396
|
+
documents: object[];
|
|
1397
|
+
}): Promise<Models.DocumentList<Document>>;
|
|
1398
|
+
/**
|
|
457
1399
|
* 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
1400
|
*
|
|
459
|
-
* @param {string} databaseId
|
|
460
|
-
* @param {string} collectionId
|
|
461
|
-
* @param {object[]} documents
|
|
1401
|
+
* @param {string} databaseId - Database ID.
|
|
1402
|
+
* @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.
|
|
1403
|
+
* @param {object[]} documents - Array of documents data as JSON objects.
|
|
462
1404
|
* @throws {AppwriteException}
|
|
463
1405
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1406
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
464
1407
|
*/
|
|
465
1408
|
createDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[]): Promise<Models.DocumentList<Document>>;
|
|
466
1409
|
/**
|
|
467
|
-
*
|
|
1410
|
+
* 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.
|
|
1411
|
+
*
|
|
468
1412
|
*
|
|
1413
|
+
* @param {string} params.databaseId - Database ID.
|
|
1414
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1415
|
+
* @param {object[]} params.documents - Array of document data as JSON objects. May contain partial documents.
|
|
1416
|
+
* @throws {AppwriteException}
|
|
1417
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1418
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.upsertRows` instead.
|
|
1419
|
+
*/
|
|
1420
|
+
upsertDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1421
|
+
databaseId: string;
|
|
1422
|
+
collectionId: string;
|
|
1423
|
+
documents: object[];
|
|
1424
|
+
}): Promise<Models.DocumentList<Document>>;
|
|
1425
|
+
/**
|
|
469
1426
|
* 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
1427
|
*
|
|
471
1428
|
*
|
|
472
|
-
* @param {string} databaseId
|
|
473
|
-
* @param {string} collectionId
|
|
474
|
-
* @param {object[]} documents
|
|
1429
|
+
* @param {string} databaseId - Database ID.
|
|
1430
|
+
* @param {string} collectionId - Collection ID.
|
|
1431
|
+
* @param {object[]} documents - Array of document data as JSON objects. May contain partial documents.
|
|
475
1432
|
* @throws {AppwriteException}
|
|
476
1433
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1434
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
477
1435
|
*/
|
|
478
1436
|
upsertDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[]): Promise<Models.DocumentList<Document>>;
|
|
479
1437
|
/**
|
|
480
|
-
*
|
|
1438
|
+
* 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
1439
|
*
|
|
1440
|
+
* @param {string} params.databaseId - Database ID.
|
|
1441
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1442
|
+
* @param {object} params.data - Document data as JSON object. Include only attribute and value pairs to be updated.
|
|
1443
|
+
* @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.
|
|
1444
|
+
* @throws {AppwriteException}
|
|
1445
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1446
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRows` instead.
|
|
1447
|
+
*/
|
|
1448
|
+
updateDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1449
|
+
databaseId: string;
|
|
1450
|
+
collectionId: string;
|
|
1451
|
+
data?: object;
|
|
1452
|
+
queries?: string[];
|
|
1453
|
+
}): Promise<Models.DocumentList<Document>>;
|
|
1454
|
+
/**
|
|
482
1455
|
* 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
1456
|
*
|
|
484
|
-
* @param {string} databaseId
|
|
485
|
-
* @param {string} collectionId
|
|
486
|
-
* @param {object} data
|
|
487
|
-
* @param {string[]} queries
|
|
1457
|
+
* @param {string} databaseId - Database ID.
|
|
1458
|
+
* @param {string} collectionId - Collection ID.
|
|
1459
|
+
* @param {object} data - Document data as JSON object. Include only attribute and value pairs to be updated.
|
|
1460
|
+
* @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
1461
|
* @throws {AppwriteException}
|
|
489
1462
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1463
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
490
1464
|
*/
|
|
491
1465
|
updateDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, data?: object, queries?: string[]): Promise<Models.DocumentList<Document>>;
|
|
492
1466
|
/**
|
|
493
|
-
*
|
|
1467
|
+
* Bulk delete documents using queries, if no queries are passed then all documents are deleted.
|
|
494
1468
|
*
|
|
1469
|
+
* @param {string} params.databaseId - Database ID.
|
|
1470
|
+
* @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).
|
|
1471
|
+
* @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.
|
|
1472
|
+
* @throws {AppwriteException}
|
|
1473
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1474
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteRows` instead.
|
|
1475
|
+
*/
|
|
1476
|
+
deleteDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1477
|
+
databaseId: string;
|
|
1478
|
+
collectionId: string;
|
|
1479
|
+
queries?: string[];
|
|
1480
|
+
}): Promise<Models.DocumentList<Document>>;
|
|
1481
|
+
/**
|
|
495
1482
|
* Bulk delete documents using queries, if no queries are passed then all documents are deleted.
|
|
496
1483
|
*
|
|
497
|
-
* @param {string} databaseId
|
|
498
|
-
* @param {string} collectionId
|
|
499
|
-
* @param {string[]} queries
|
|
1484
|
+
* @param {string} databaseId - Database ID.
|
|
1485
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1486
|
+
* @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
1487
|
* @throws {AppwriteException}
|
|
501
1488
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1489
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
502
1490
|
*/
|
|
503
1491
|
deleteDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>>;
|
|
504
1492
|
/**
|
|
505
1493
|
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
|
|
506
1494
|
*
|
|
507
|
-
* @param {string} databaseId
|
|
508
|
-
* @param {string} collectionId
|
|
509
|
-
* @param {string} documentId
|
|
510
|
-
* @param {string[]} queries
|
|
1495
|
+
* @param {string} params.databaseId - Database ID.
|
|
1496
|
+
* @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).
|
|
1497
|
+
* @param {string} params.documentId - Document ID.
|
|
1498
|
+
* @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.
|
|
1499
|
+
* @throws {AppwriteException}
|
|
1500
|
+
* @returns {Promise<Document>}
|
|
1501
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getRow` instead.
|
|
1502
|
+
*/
|
|
1503
|
+
getDocument<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1504
|
+
databaseId: string;
|
|
1505
|
+
collectionId: string;
|
|
1506
|
+
documentId: string;
|
|
1507
|
+
queries?: string[];
|
|
1508
|
+
}): Promise<Document>;
|
|
1509
|
+
/**
|
|
1510
|
+
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
|
|
1511
|
+
*
|
|
1512
|
+
* @param {string} databaseId - Database ID.
|
|
1513
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1514
|
+
* @param {string} documentId - Document ID.
|
|
1515
|
+
* @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
1516
|
* @throws {AppwriteException}
|
|
512
1517
|
* @returns {Promise<Document>}
|
|
1518
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
513
1519
|
*/
|
|
514
1520
|
getDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Document>;
|
|
515
1521
|
/**
|
|
516
|
-
*
|
|
1522
|
+
* 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
1523
|
*
|
|
1524
|
+
* @param {string} params.databaseId - Database ID.
|
|
1525
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1526
|
+
* @param {string} params.documentId - Document ID.
|
|
1527
|
+
* @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.
|
|
1528
|
+
* @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).
|
|
1529
|
+
* @throws {AppwriteException}
|
|
1530
|
+
* @returns {Promise<Document>}
|
|
1531
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.upsertRow` instead.
|
|
1532
|
+
*/
|
|
1533
|
+
upsertDocument<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1534
|
+
databaseId: string;
|
|
1535
|
+
collectionId: string;
|
|
1536
|
+
documentId: string;
|
|
1537
|
+
data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>;
|
|
1538
|
+
permissions?: string[];
|
|
1539
|
+
}): Promise<Document>;
|
|
1540
|
+
/**
|
|
518
1541
|
* 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
1542
|
*
|
|
520
|
-
* @param {string} databaseId
|
|
521
|
-
* @param {string} collectionId
|
|
522
|
-
* @param {string} documentId
|
|
523
|
-
* @param {
|
|
524
|
-
* @param {string[]} permissions
|
|
1543
|
+
* @param {string} databaseId - Database ID.
|
|
1544
|
+
* @param {string} collectionId - Collection ID.
|
|
1545
|
+
* @param {string} documentId - Document ID.
|
|
1546
|
+
* @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.
|
|
1547
|
+
* @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
1548
|
+
* @throws {AppwriteException}
|
|
1549
|
+
* @returns {Promise<Document>}
|
|
1550
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1551
|
+
*/
|
|
1552
|
+
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>;
|
|
1553
|
+
/**
|
|
1554
|
+
* Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
1555
|
+
*
|
|
1556
|
+
* @param {string} params.databaseId - Database ID.
|
|
1557
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1558
|
+
* @param {string} params.documentId - Document ID.
|
|
1559
|
+
* @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.
|
|
1560
|
+
* @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).
|
|
525
1561
|
* @throws {AppwriteException}
|
|
526
1562
|
* @returns {Promise<Document>}
|
|
1563
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRow` instead.
|
|
527
1564
|
*/
|
|
528
|
-
|
|
1565
|
+
updateDocument<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1566
|
+
databaseId: string;
|
|
1567
|
+
collectionId: string;
|
|
1568
|
+
documentId: string;
|
|
1569
|
+
data?: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>;
|
|
1570
|
+
permissions?: string[];
|
|
1571
|
+
}): Promise<Document>;
|
|
529
1572
|
/**
|
|
530
1573
|
* Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
531
1574
|
*
|
|
532
|
-
* @param {string} databaseId
|
|
533
|
-
* @param {string} collectionId
|
|
534
|
-
* @param {string} documentId
|
|
535
|
-
* @param {
|
|
536
|
-
* @param {string[]} permissions
|
|
1575
|
+
* @param {string} databaseId - Database ID.
|
|
1576
|
+
* @param {string} collectionId - Collection ID.
|
|
1577
|
+
* @param {string} documentId - Document ID.
|
|
1578
|
+
* @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.
|
|
1579
|
+
* @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
537
1580
|
* @throws {AppwriteException}
|
|
538
1581
|
* @returns {Promise<Document>}
|
|
1582
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
539
1583
|
*/
|
|
540
|
-
updateDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data?:
|
|
1584
|
+
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>;
|
|
541
1585
|
/**
|
|
542
1586
|
* Delete a document by its unique ID.
|
|
543
1587
|
*
|
|
544
|
-
* @param {string} databaseId
|
|
545
|
-
* @param {string} collectionId
|
|
546
|
-
* @param {string} documentId
|
|
1588
|
+
* @param {string} params.databaseId - Database ID.
|
|
1589
|
+
* @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).
|
|
1590
|
+
* @param {string} params.documentId - Document ID.
|
|
547
1591
|
* @throws {AppwriteException}
|
|
548
1592
|
* @returns {Promise<{}>}
|
|
1593
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteRow` instead.
|
|
1594
|
+
*/
|
|
1595
|
+
deleteDocument(params: {
|
|
1596
|
+
databaseId: string;
|
|
1597
|
+
collectionId: string;
|
|
1598
|
+
documentId: string;
|
|
1599
|
+
}): Promise<{}>;
|
|
1600
|
+
/**
|
|
1601
|
+
* Delete a document by its unique ID.
|
|
1602
|
+
*
|
|
1603
|
+
* @param {string} databaseId - Database ID.
|
|
1604
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1605
|
+
* @param {string} documentId - Document ID.
|
|
1606
|
+
* @throws {AppwriteException}
|
|
1607
|
+
* @returns {Promise<{}>}
|
|
1608
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
549
1609
|
*/
|
|
550
1610
|
deleteDocument(databaseId: string, collectionId: string, documentId: string): Promise<{}>;
|
|
551
1611
|
/**
|
|
552
1612
|
* Decrement a specific attribute of a document by a given value.
|
|
553
1613
|
*
|
|
554
|
-
* @param {string} databaseId
|
|
555
|
-
* @param {string} collectionId
|
|
556
|
-
* @param {string} documentId
|
|
557
|
-
* @param {string} attribute
|
|
558
|
-
* @param {number} value
|
|
559
|
-
* @param {number} min
|
|
1614
|
+
* @param {string} params.databaseId - Database ID.
|
|
1615
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1616
|
+
* @param {string} params.documentId - Document ID.
|
|
1617
|
+
* @param {string} params.attribute - Attribute key.
|
|
1618
|
+
* @param {number} params.value - Value to increment the attribute by. The value must be a number.
|
|
1619
|
+
* @param {number} params.min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
|
|
1620
|
+
* @throws {AppwriteException}
|
|
1621
|
+
* @returns {Promise<Document>}
|
|
1622
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.decrementRowColumn` instead.
|
|
1623
|
+
*/
|
|
1624
|
+
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1625
|
+
databaseId: string;
|
|
1626
|
+
collectionId: string;
|
|
1627
|
+
documentId: string;
|
|
1628
|
+
attribute: string;
|
|
1629
|
+
value?: number;
|
|
1630
|
+
min?: number;
|
|
1631
|
+
}): Promise<Document>;
|
|
1632
|
+
/**
|
|
1633
|
+
* Decrement a specific attribute of a document by a given value.
|
|
1634
|
+
*
|
|
1635
|
+
* @param {string} databaseId - Database ID.
|
|
1636
|
+
* @param {string} collectionId - Collection ID.
|
|
1637
|
+
* @param {string} documentId - Document ID.
|
|
1638
|
+
* @param {string} attribute - Attribute key.
|
|
1639
|
+
* @param {number} value - Value to increment the attribute by. The value must be a number.
|
|
1640
|
+
* @param {number} min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
|
|
560
1641
|
* @throws {AppwriteException}
|
|
561
1642
|
* @returns {Promise<Document>}
|
|
1643
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
562
1644
|
*/
|
|
563
1645
|
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number): Promise<Document>;
|
|
564
1646
|
/**
|
|
565
1647
|
* Increment a specific attribute of a document by a given value.
|
|
566
1648
|
*
|
|
567
|
-
* @param {string} databaseId
|
|
568
|
-
* @param {string} collectionId
|
|
569
|
-
* @param {string} documentId
|
|
570
|
-
* @param {string} attribute
|
|
571
|
-
* @param {number} value
|
|
572
|
-
* @param {number} max
|
|
1649
|
+
* @param {string} params.databaseId - Database ID.
|
|
1650
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1651
|
+
* @param {string} params.documentId - Document ID.
|
|
1652
|
+
* @param {string} params.attribute - Attribute key.
|
|
1653
|
+
* @param {number} params.value - Value to increment the attribute by. The value must be a number.
|
|
1654
|
+
* @param {number} params.max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
|
|
573
1655
|
* @throws {AppwriteException}
|
|
574
1656
|
* @returns {Promise<Document>}
|
|
1657
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.incrementRowColumn` instead.
|
|
1658
|
+
*/
|
|
1659
|
+
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1660
|
+
databaseId: string;
|
|
1661
|
+
collectionId: string;
|
|
1662
|
+
documentId: string;
|
|
1663
|
+
attribute: string;
|
|
1664
|
+
value?: number;
|
|
1665
|
+
max?: number;
|
|
1666
|
+
}): Promise<Document>;
|
|
1667
|
+
/**
|
|
1668
|
+
* Increment a specific attribute of a document by a given value.
|
|
1669
|
+
*
|
|
1670
|
+
* @param {string} databaseId - Database ID.
|
|
1671
|
+
* @param {string} collectionId - Collection ID.
|
|
1672
|
+
* @param {string} documentId - Document ID.
|
|
1673
|
+
* @param {string} attribute - Attribute key.
|
|
1674
|
+
* @param {number} value - Value to increment the attribute by. The value must be a number.
|
|
1675
|
+
* @param {number} max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
|
|
1676
|
+
* @throws {AppwriteException}
|
|
1677
|
+
* @returns {Promise<Document>}
|
|
1678
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
575
1679
|
*/
|
|
576
1680
|
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number): Promise<Document>;
|
|
577
1681
|
/**
|
|
578
1682
|
* List indexes in the collection.
|
|
579
1683
|
*
|
|
580
|
-
* @param {string} databaseId
|
|
581
|
-
* @param {string} collectionId
|
|
582
|
-
* @param {string[]} queries
|
|
1684
|
+
* @param {string} params.databaseId - Database ID.
|
|
1685
|
+
* @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).
|
|
1686
|
+
* @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
|
|
583
1687
|
* @throws {AppwriteException}
|
|
584
1688
|
* @returns {Promise<Models.IndexList>}
|
|
1689
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listIndexes` instead.
|
|
1690
|
+
*/
|
|
1691
|
+
listIndexes(params: {
|
|
1692
|
+
databaseId: string;
|
|
1693
|
+
collectionId: string;
|
|
1694
|
+
queries?: string[];
|
|
1695
|
+
}): Promise<Models.IndexList>;
|
|
1696
|
+
/**
|
|
1697
|
+
* List indexes in the collection.
|
|
1698
|
+
*
|
|
1699
|
+
* @param {string} databaseId - Database ID.
|
|
1700
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1701
|
+
* @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
|
|
1702
|
+
* @throws {AppwriteException}
|
|
1703
|
+
* @returns {Promise<Models.IndexList>}
|
|
1704
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
585
1705
|
*/
|
|
586
1706
|
listIndexes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.IndexList>;
|
|
587
1707
|
/**
|
|
588
1708
|
* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
|
|
589
1709
|
* Attributes can be `key`, `fulltext`, and `unique`.
|
|
590
1710
|
*
|
|
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
|
|
1711
|
+
* @param {string} params.databaseId - Database ID.
|
|
1712
|
+
* @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).
|
|
1713
|
+
* @param {string} params.key - Index Key.
|
|
1714
|
+
* @param {IndexType} params.type - Index type.
|
|
1715
|
+
* @param {string[]} params.attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.
|
|
1716
|
+
* @param {string[]} params.orders - Array of index orders. Maximum of 100 orders are allowed.
|
|
1717
|
+
* @param {number[]} params.lengths - Length of index. Maximum of 100
|
|
598
1718
|
* @throws {AppwriteException}
|
|
599
1719
|
* @returns {Promise<Models.Index>}
|
|
1720
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIndex` instead.
|
|
1721
|
+
*/
|
|
1722
|
+
createIndex(params: {
|
|
1723
|
+
databaseId: string;
|
|
1724
|
+
collectionId: string;
|
|
1725
|
+
key: string;
|
|
1726
|
+
type: IndexType;
|
|
1727
|
+
attributes: string[];
|
|
1728
|
+
orders?: string[];
|
|
1729
|
+
lengths?: number[];
|
|
1730
|
+
}): Promise<Models.Index>;
|
|
1731
|
+
/**
|
|
1732
|
+
* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
|
|
1733
|
+
* Attributes can be `key`, `fulltext`, and `unique`.
|
|
1734
|
+
*
|
|
1735
|
+
* @param {string} databaseId - Database ID.
|
|
1736
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1737
|
+
* @param {string} key - Index Key.
|
|
1738
|
+
* @param {IndexType} type - Index type.
|
|
1739
|
+
* @param {string[]} attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.
|
|
1740
|
+
* @param {string[]} orders - Array of index orders. Maximum of 100 orders are allowed.
|
|
1741
|
+
* @param {number[]} lengths - Length of index. Maximum of 100
|
|
1742
|
+
* @throws {AppwriteException}
|
|
1743
|
+
* @returns {Promise<Models.Index>}
|
|
1744
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
600
1745
|
*/
|
|
601
1746
|
createIndex(databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number[]): Promise<Models.Index>;
|
|
602
1747
|
/**
|
|
603
1748
|
* Get index by ID.
|
|
604
1749
|
*
|
|
605
|
-
* @param {string} databaseId
|
|
606
|
-
* @param {string} collectionId
|
|
607
|
-
* @param {string} key
|
|
1750
|
+
* @param {string} params.databaseId - Database ID.
|
|
1751
|
+
* @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).
|
|
1752
|
+
* @param {string} params.key - Index Key.
|
|
608
1753
|
* @throws {AppwriteException}
|
|
609
1754
|
* @returns {Promise<Models.Index>}
|
|
1755
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getIndex` instead.
|
|
1756
|
+
*/
|
|
1757
|
+
getIndex(params: {
|
|
1758
|
+
databaseId: string;
|
|
1759
|
+
collectionId: string;
|
|
1760
|
+
key: string;
|
|
1761
|
+
}): Promise<Models.Index>;
|
|
1762
|
+
/**
|
|
1763
|
+
* Get index by ID.
|
|
1764
|
+
*
|
|
1765
|
+
* @param {string} databaseId - Database ID.
|
|
1766
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1767
|
+
* @param {string} key - Index Key.
|
|
1768
|
+
* @throws {AppwriteException}
|
|
1769
|
+
* @returns {Promise<Models.Index>}
|
|
1770
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
610
1771
|
*/
|
|
611
1772
|
getIndex(databaseId: string, collectionId: string, key: string): Promise<Models.Index>;
|
|
612
1773
|
/**
|
|
613
1774
|
* Delete an index.
|
|
614
1775
|
*
|
|
615
|
-
* @param {string} databaseId
|
|
616
|
-
* @param {string} collectionId
|
|
617
|
-
* @param {string} key
|
|
1776
|
+
* @param {string} params.databaseId - Database ID.
|
|
1777
|
+
* @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).
|
|
1778
|
+
* @param {string} params.key - Index Key.
|
|
1779
|
+
* @throws {AppwriteException}
|
|
1780
|
+
* @returns {Promise<{}>}
|
|
1781
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteIndex` instead.
|
|
1782
|
+
*/
|
|
1783
|
+
deleteIndex(params: {
|
|
1784
|
+
databaseId: string;
|
|
1785
|
+
collectionId: string;
|
|
1786
|
+
key: string;
|
|
1787
|
+
}): Promise<{}>;
|
|
1788
|
+
/**
|
|
1789
|
+
* Delete an index.
|
|
1790
|
+
*
|
|
1791
|
+
* @param {string} databaseId - Database ID.
|
|
1792
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1793
|
+
* @param {string} key - Index Key.
|
|
618
1794
|
* @throws {AppwriteException}
|
|
619
1795
|
* @returns {Promise<{}>}
|
|
1796
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
620
1797
|
*/
|
|
621
1798
|
deleteIndex(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
622
1799
|
}
|