node-appwrite 17.2.0 → 18.0.0

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