node-appwrite 20.0.0 → 20.2.1
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/dist/client.js +2 -2
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +2 -2
- package/dist/client.mjs.map +1 -1
- package/dist/models.d.mts +42 -0
- package/dist/models.d.ts +42 -0
- package/dist/services/account.d.mts +49 -0
- package/dist/services/account.d.ts +49 -0
- package/dist/services/account.js +70 -4
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +70 -4
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/databases.d.mts +173 -14
- package/dist/services/databases.d.ts +173 -14
- package/dist/services/databases.js +239 -12
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +239 -12
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/functions.d.mts +2 -2
- package/dist/services/functions.d.ts +2 -2
- package/dist/services/functions.js.map +1 -1
- package/dist/services/functions.mjs.map +1 -1
- package/dist/services/sites.d.mts +2 -2
- package/dist/services/sites.d.ts +2 -2
- package/dist/services/sites.js.map +1 -1
- package/dist/services/sites.mjs.map +1 -1
- package/dist/services/tables-db.d.mts +221 -62
- package/dist/services/tables-db.d.ts +221 -62
- package/dist/services/tables-db.js +239 -12
- package/dist/services/tables-db.js.map +1 -1
- package/dist/services/tables-db.mjs +239 -12
- package/dist/services/tables-db.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -67,6 +67,129 @@ declare class TablesDB {
|
|
|
67
67
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
68
68
|
*/
|
|
69
69
|
create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
|
|
70
|
+
/**
|
|
71
|
+
* List transactions across all databases.
|
|
72
|
+
*
|
|
73
|
+
* @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).
|
|
74
|
+
* @throws {AppwriteException}
|
|
75
|
+
* @returns {Promise<Models.TransactionList>}
|
|
76
|
+
*/
|
|
77
|
+
listTransactions(params?: {
|
|
78
|
+
queries?: string[];
|
|
79
|
+
}): Promise<Models.TransactionList>;
|
|
80
|
+
/**
|
|
81
|
+
* List transactions across all databases.
|
|
82
|
+
*
|
|
83
|
+
* @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).
|
|
84
|
+
* @throws {AppwriteException}
|
|
85
|
+
* @returns {Promise<Models.TransactionList>}
|
|
86
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
87
|
+
*/
|
|
88
|
+
listTransactions(queries?: string[]): Promise<Models.TransactionList>;
|
|
89
|
+
/**
|
|
90
|
+
* Create a new transaction.
|
|
91
|
+
*
|
|
92
|
+
* @param {number} params.ttl - Seconds before the transaction expires.
|
|
93
|
+
* @throws {AppwriteException}
|
|
94
|
+
* @returns {Promise<Models.Transaction>}
|
|
95
|
+
*/
|
|
96
|
+
createTransaction(params?: {
|
|
97
|
+
ttl?: number;
|
|
98
|
+
}): Promise<Models.Transaction>;
|
|
99
|
+
/**
|
|
100
|
+
* Create a new transaction.
|
|
101
|
+
*
|
|
102
|
+
* @param {number} ttl - Seconds before the transaction expires.
|
|
103
|
+
* @throws {AppwriteException}
|
|
104
|
+
* @returns {Promise<Models.Transaction>}
|
|
105
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
106
|
+
*/
|
|
107
|
+
createTransaction(ttl?: number): Promise<Models.Transaction>;
|
|
108
|
+
/**
|
|
109
|
+
* Get a transaction by its unique ID.
|
|
110
|
+
*
|
|
111
|
+
* @param {string} params.transactionId - Transaction ID.
|
|
112
|
+
* @throws {AppwriteException}
|
|
113
|
+
* @returns {Promise<Models.Transaction>}
|
|
114
|
+
*/
|
|
115
|
+
getTransaction(params: {
|
|
116
|
+
transactionId: string;
|
|
117
|
+
}): Promise<Models.Transaction>;
|
|
118
|
+
/**
|
|
119
|
+
* Get a transaction by its unique ID.
|
|
120
|
+
*
|
|
121
|
+
* @param {string} transactionId - Transaction ID.
|
|
122
|
+
* @throws {AppwriteException}
|
|
123
|
+
* @returns {Promise<Models.Transaction>}
|
|
124
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
125
|
+
*/
|
|
126
|
+
getTransaction(transactionId: string): Promise<Models.Transaction>;
|
|
127
|
+
/**
|
|
128
|
+
* Update a transaction, to either commit or roll back its operations.
|
|
129
|
+
*
|
|
130
|
+
* @param {string} params.transactionId - Transaction ID.
|
|
131
|
+
* @param {boolean} params.commit - Commit transaction?
|
|
132
|
+
* @param {boolean} params.rollback - Rollback transaction?
|
|
133
|
+
* @throws {AppwriteException}
|
|
134
|
+
* @returns {Promise<Models.Transaction>}
|
|
135
|
+
*/
|
|
136
|
+
updateTransaction(params: {
|
|
137
|
+
transactionId: string;
|
|
138
|
+
commit?: boolean;
|
|
139
|
+
rollback?: boolean;
|
|
140
|
+
}): Promise<Models.Transaction>;
|
|
141
|
+
/**
|
|
142
|
+
* Update a transaction, to either commit or roll back its operations.
|
|
143
|
+
*
|
|
144
|
+
* @param {string} transactionId - Transaction ID.
|
|
145
|
+
* @param {boolean} commit - Commit transaction?
|
|
146
|
+
* @param {boolean} rollback - Rollback transaction?
|
|
147
|
+
* @throws {AppwriteException}
|
|
148
|
+
* @returns {Promise<Models.Transaction>}
|
|
149
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
150
|
+
*/
|
|
151
|
+
updateTransaction(transactionId: string, commit?: boolean, rollback?: boolean): Promise<Models.Transaction>;
|
|
152
|
+
/**
|
|
153
|
+
* Delete a transaction by its unique ID.
|
|
154
|
+
*
|
|
155
|
+
* @param {string} params.transactionId - Transaction ID.
|
|
156
|
+
* @throws {AppwriteException}
|
|
157
|
+
* @returns {Promise<{}>}
|
|
158
|
+
*/
|
|
159
|
+
deleteTransaction(params: {
|
|
160
|
+
transactionId: string;
|
|
161
|
+
}): Promise<{}>;
|
|
162
|
+
/**
|
|
163
|
+
* Delete a transaction by its unique ID.
|
|
164
|
+
*
|
|
165
|
+
* @param {string} transactionId - Transaction ID.
|
|
166
|
+
* @throws {AppwriteException}
|
|
167
|
+
* @returns {Promise<{}>}
|
|
168
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
169
|
+
*/
|
|
170
|
+
deleteTransaction(transactionId: string): Promise<{}>;
|
|
171
|
+
/**
|
|
172
|
+
* Create multiple operations in a single transaction.
|
|
173
|
+
*
|
|
174
|
+
* @param {string} params.transactionId - Transaction ID.
|
|
175
|
+
* @param {object[]} params.operations - Array of staged operations.
|
|
176
|
+
* @throws {AppwriteException}
|
|
177
|
+
* @returns {Promise<Models.Transaction>}
|
|
178
|
+
*/
|
|
179
|
+
createOperations(params: {
|
|
180
|
+
transactionId: string;
|
|
181
|
+
operations?: object[];
|
|
182
|
+
}): Promise<Models.Transaction>;
|
|
183
|
+
/**
|
|
184
|
+
* Create multiple operations in a single transaction.
|
|
185
|
+
*
|
|
186
|
+
* @param {string} transactionId - Transaction ID.
|
|
187
|
+
* @param {object[]} operations - Array of staged operations.
|
|
188
|
+
* @throws {AppwriteException}
|
|
189
|
+
* @returns {Promise<Models.Transaction>}
|
|
190
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
191
|
+
*/
|
|
192
|
+
createOperations(transactionId: string, operations?: object[]): Promise<Models.Transaction>;
|
|
70
193
|
/**
|
|
71
194
|
* Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
|
|
72
195
|
*
|
|
@@ -156,7 +279,7 @@ declare class TablesDB {
|
|
|
156
279
|
*/
|
|
157
280
|
listTables(databaseId: string, queries?: string[], search?: string): Promise<Models.TableList>;
|
|
158
281
|
/**
|
|
159
|
-
* 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/
|
|
282
|
+
* Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
160
283
|
*
|
|
161
284
|
* @param {string} params.databaseId - Database ID.
|
|
162
285
|
* @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.
|
|
@@ -176,7 +299,7 @@ declare class TablesDB {
|
|
|
176
299
|
enabled?: boolean;
|
|
177
300
|
}): Promise<Models.Table>;
|
|
178
301
|
/**
|
|
179
|
-
* 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/
|
|
302
|
+
* Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
180
303
|
*
|
|
181
304
|
* @param {string} databaseId - Database ID.
|
|
182
305
|
* @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.
|
|
@@ -297,7 +420,7 @@ declare class TablesDB {
|
|
|
297
420
|
*
|
|
298
421
|
*
|
|
299
422
|
* @param {string} params.databaseId - Database ID.
|
|
300
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
423
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
301
424
|
* @param {string} params.key - Column Key.
|
|
302
425
|
* @param {boolean} params.required - Is column required?
|
|
303
426
|
* @param {boolean} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
@@ -318,7 +441,7 @@ declare class TablesDB {
|
|
|
318
441
|
*
|
|
319
442
|
*
|
|
320
443
|
* @param {string} databaseId - Database ID.
|
|
321
|
-
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
444
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
322
445
|
* @param {string} key - Column Key.
|
|
323
446
|
* @param {boolean} required - Is column required?
|
|
324
447
|
* @param {boolean} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
@@ -332,7 +455,7 @@ declare class TablesDB {
|
|
|
332
455
|
* Update a boolean column. Changing the `default` value will not update already existing rows.
|
|
333
456
|
*
|
|
334
457
|
* @param {string} params.databaseId - Database ID.
|
|
335
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
458
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
336
459
|
* @param {string} params.key - Column Key.
|
|
337
460
|
* @param {boolean} params.required - Is column required?
|
|
338
461
|
* @param {boolean} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
@@ -352,7 +475,7 @@ declare class TablesDB {
|
|
|
352
475
|
* Update a boolean column. Changing the `default` value will not update already existing rows.
|
|
353
476
|
*
|
|
354
477
|
* @param {string} databaseId - Database ID.
|
|
355
|
-
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
478
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
356
479
|
* @param {string} key - Column Key.
|
|
357
480
|
* @param {boolean} required - Is column required?
|
|
358
481
|
* @param {boolean} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
@@ -822,7 +945,7 @@ declare class TablesDB {
|
|
|
822
945
|
* Create a geometric line column.
|
|
823
946
|
*
|
|
824
947
|
* @param {string} params.databaseId - Database ID.
|
|
825
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
948
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
826
949
|
* @param {string} params.key - Column Key.
|
|
827
950
|
* @param {boolean} params.required - Is column required?
|
|
828
951
|
* @param {any[]} params.xdefault - Default value for column 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 column is required.
|
|
@@ -840,7 +963,7 @@ declare class TablesDB {
|
|
|
840
963
|
* Create a geometric line column.
|
|
841
964
|
*
|
|
842
965
|
* @param {string} databaseId - Database ID.
|
|
843
|
-
* @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
966
|
+
* @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
844
967
|
* @param {string} key - Column Key.
|
|
845
968
|
* @param {boolean} required - Is column required?
|
|
846
969
|
* @param {any[]} xdefault - Default value for column 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 column is required.
|
|
@@ -853,7 +976,7 @@ declare class TablesDB {
|
|
|
853
976
|
* Update a line column. Changing the `default` value will not update already existing rows.
|
|
854
977
|
*
|
|
855
978
|
* @param {string} params.databaseId - Database ID.
|
|
856
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
979
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
857
980
|
* @param {string} params.key - Column Key.
|
|
858
981
|
* @param {boolean} params.required - Is column required?
|
|
859
982
|
* @param {any[]} params.xdefault - Default value for column 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 column is required.
|
|
@@ -873,7 +996,7 @@ declare class TablesDB {
|
|
|
873
996
|
* Update a line column. Changing the `default` value will not update already existing rows.
|
|
874
997
|
*
|
|
875
998
|
* @param {string} databaseId - Database ID.
|
|
876
|
-
* @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
999
|
+
* @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
877
1000
|
* @param {string} key - Column Key.
|
|
878
1001
|
* @param {boolean} required - Is column required?
|
|
879
1002
|
* @param {any[]} xdefault - Default value for column 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 column is required.
|
|
@@ -887,7 +1010,7 @@ declare class TablesDB {
|
|
|
887
1010
|
* Create a geometric point column.
|
|
888
1011
|
*
|
|
889
1012
|
* @param {string} params.databaseId - Database ID.
|
|
890
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
1013
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
891
1014
|
* @param {string} params.key - Column Key.
|
|
892
1015
|
* @param {boolean} params.required - Is column required?
|
|
893
1016
|
* @param {any[]} params.xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
|
|
@@ -905,7 +1028,7 @@ declare class TablesDB {
|
|
|
905
1028
|
* Create a geometric point column.
|
|
906
1029
|
*
|
|
907
1030
|
* @param {string} databaseId - Database ID.
|
|
908
|
-
* @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
1031
|
+
* @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
909
1032
|
* @param {string} key - Column Key.
|
|
910
1033
|
* @param {boolean} required - Is column required?
|
|
911
1034
|
* @param {any[]} xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
|
|
@@ -918,7 +1041,7 @@ declare class TablesDB {
|
|
|
918
1041
|
* Update a point column. Changing the `default` value will not update already existing rows.
|
|
919
1042
|
*
|
|
920
1043
|
* @param {string} params.databaseId - Database ID.
|
|
921
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
1044
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
922
1045
|
* @param {string} params.key - Column Key.
|
|
923
1046
|
* @param {boolean} params.required - Is column required?
|
|
924
1047
|
* @param {any[]} params.xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
|
|
@@ -938,7 +1061,7 @@ declare class TablesDB {
|
|
|
938
1061
|
* Update a point column. Changing the `default` value will not update already existing rows.
|
|
939
1062
|
*
|
|
940
1063
|
* @param {string} databaseId - Database ID.
|
|
941
|
-
* @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
1064
|
+
* @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
942
1065
|
* @param {string} key - Column Key.
|
|
943
1066
|
* @param {boolean} required - Is column required?
|
|
944
1067
|
* @param {any[]} xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
|
|
@@ -952,7 +1075,7 @@ declare class TablesDB {
|
|
|
952
1075
|
* Create a geometric polygon column.
|
|
953
1076
|
*
|
|
954
1077
|
* @param {string} params.databaseId - Database ID.
|
|
955
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
1078
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
956
1079
|
* @param {string} params.key - Column Key.
|
|
957
1080
|
* @param {boolean} params.required - Is column required?
|
|
958
1081
|
* @param {any[]} params.xdefault - Default value for column 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 column is required.
|
|
@@ -970,7 +1093,7 @@ declare class TablesDB {
|
|
|
970
1093
|
* Create a geometric polygon column.
|
|
971
1094
|
*
|
|
972
1095
|
* @param {string} databaseId - Database ID.
|
|
973
|
-
* @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
1096
|
+
* @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
974
1097
|
* @param {string} key - Column Key.
|
|
975
1098
|
* @param {boolean} required - Is column required?
|
|
976
1099
|
* @param {any[]} xdefault - Default value for column 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 column is required.
|
|
@@ -983,7 +1106,7 @@ declare class TablesDB {
|
|
|
983
1106
|
* Update a polygon column. Changing the `default` value will not update already existing rows.
|
|
984
1107
|
*
|
|
985
1108
|
* @param {string} params.databaseId - Database ID.
|
|
986
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
1109
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
987
1110
|
* @param {string} params.key - Column Key.
|
|
988
1111
|
* @param {boolean} params.required - Is column required?
|
|
989
1112
|
* @param {any[]} params.xdefault - Default value for column 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 column is required.
|
|
@@ -1003,7 +1126,7 @@ declare class TablesDB {
|
|
|
1003
1126
|
* Update a polygon column. Changing the `default` value will not update already existing rows.
|
|
1004
1127
|
*
|
|
1005
1128
|
* @param {string} databaseId - Database ID.
|
|
1006
|
-
* @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
1129
|
+
* @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1007
1130
|
* @param {string} key - Column Key.
|
|
1008
1131
|
* @param {boolean} required - Is column required?
|
|
1009
1132
|
* @param {any[]} xdefault - Default value for column 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 column is required.
|
|
@@ -1060,7 +1183,7 @@ declare class TablesDB {
|
|
|
1060
1183
|
*
|
|
1061
1184
|
*
|
|
1062
1185
|
* @param {string} params.databaseId - Database ID.
|
|
1063
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1186
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1064
1187
|
* @param {string} params.key - Column Key.
|
|
1065
1188
|
* @param {number} params.size - Column size for text columns, in number of characters.
|
|
1066
1189
|
* @param {boolean} params.required - Is column required?
|
|
@@ -1085,7 +1208,7 @@ declare class TablesDB {
|
|
|
1085
1208
|
*
|
|
1086
1209
|
*
|
|
1087
1210
|
* @param {string} databaseId - Database ID.
|
|
1088
|
-
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1211
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1089
1212
|
* @param {string} key - Column Key.
|
|
1090
1213
|
* @param {number} size - Column size for text columns, in number of characters.
|
|
1091
1214
|
* @param {boolean} required - Is column required?
|
|
@@ -1102,7 +1225,7 @@ declare class TablesDB {
|
|
|
1102
1225
|
*
|
|
1103
1226
|
*
|
|
1104
1227
|
* @param {string} params.databaseId - Database ID.
|
|
1105
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1228
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1106
1229
|
* @param {string} params.key - Column Key.
|
|
1107
1230
|
* @param {boolean} params.required - Is column required?
|
|
1108
1231
|
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
@@ -1125,7 +1248,7 @@ declare class TablesDB {
|
|
|
1125
1248
|
*
|
|
1126
1249
|
*
|
|
1127
1250
|
* @param {string} databaseId - Database ID.
|
|
1128
|
-
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1251
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1129
1252
|
* @param {string} key - Column Key.
|
|
1130
1253
|
* @param {boolean} required - Is column required?
|
|
1131
1254
|
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
@@ -1295,7 +1418,7 @@ declare class TablesDB {
|
|
|
1295
1418
|
* List indexes on the table.
|
|
1296
1419
|
*
|
|
1297
1420
|
* @param {string} params.databaseId - Database ID.
|
|
1298
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1421
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1299
1422
|
* @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
|
|
1300
1423
|
* @throws {AppwriteException}
|
|
1301
1424
|
* @returns {Promise<Models.ColumnIndexList>}
|
|
@@ -1309,7 +1432,7 @@ declare class TablesDB {
|
|
|
1309
1432
|
* List indexes on the table.
|
|
1310
1433
|
*
|
|
1311
1434
|
* @param {string} databaseId - Database ID.
|
|
1312
|
-
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1435
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1313
1436
|
* @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
|
|
1314
1437
|
* @throws {AppwriteException}
|
|
1315
1438
|
* @returns {Promise<Models.ColumnIndexList>}
|
|
@@ -1321,7 +1444,7 @@ declare class TablesDB {
|
|
|
1321
1444
|
* Type can be `key`, `fulltext`, or `unique`.
|
|
1322
1445
|
*
|
|
1323
1446
|
* @param {string} params.databaseId - Database ID.
|
|
1324
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1447
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1325
1448
|
* @param {string} params.key - Index Key.
|
|
1326
1449
|
* @param {IndexType} params.type - Index type.
|
|
1327
1450
|
* @param {string[]} params.columns - Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.
|
|
@@ -1344,7 +1467,7 @@ declare class TablesDB {
|
|
|
1344
1467
|
* Type can be `key`, `fulltext`, or `unique`.
|
|
1345
1468
|
*
|
|
1346
1469
|
* @param {string} databaseId - Database ID.
|
|
1347
|
-
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1470
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1348
1471
|
* @param {string} key - Index Key.
|
|
1349
1472
|
* @param {IndexType} type - Index type.
|
|
1350
1473
|
* @param {string[]} columns - Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.
|
|
@@ -1359,7 +1482,7 @@ declare class TablesDB {
|
|
|
1359
1482
|
* Get index by ID.
|
|
1360
1483
|
*
|
|
1361
1484
|
* @param {string} params.databaseId - Database ID.
|
|
1362
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1485
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1363
1486
|
* @param {string} params.key - Index Key.
|
|
1364
1487
|
* @throws {AppwriteException}
|
|
1365
1488
|
* @returns {Promise<Models.ColumnIndex>}
|
|
@@ -1373,7 +1496,7 @@ declare class TablesDB {
|
|
|
1373
1496
|
* Get index by ID.
|
|
1374
1497
|
*
|
|
1375
1498
|
* @param {string} databaseId - Database ID.
|
|
1376
|
-
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1499
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1377
1500
|
* @param {string} key - Index Key.
|
|
1378
1501
|
* @throws {AppwriteException}
|
|
1379
1502
|
* @returns {Promise<Models.ColumnIndex>}
|
|
@@ -1384,7 +1507,7 @@ declare class TablesDB {
|
|
|
1384
1507
|
* Delete an index.
|
|
1385
1508
|
*
|
|
1386
1509
|
* @param {string} params.databaseId - Database ID.
|
|
1387
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the
|
|
1510
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1388
1511
|
* @param {string} params.key - Index Key.
|
|
1389
1512
|
* @throws {AppwriteException}
|
|
1390
1513
|
* @returns {Promise<{}>}
|
|
@@ -1398,7 +1521,7 @@ declare class TablesDB {
|
|
|
1398
1521
|
* Delete an index.
|
|
1399
1522
|
*
|
|
1400
1523
|
* @param {string} databaseId - Database ID.
|
|
1401
|
-
* @param {string} tableId - Table ID. You can create a new table using the
|
|
1524
|
+
* @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1402
1525
|
* @param {string} key - Index Key.
|
|
1403
1526
|
* @throws {AppwriteException}
|
|
1404
1527
|
* @returns {Promise<{}>}
|
|
@@ -1409,8 +1532,9 @@ declare class TablesDB {
|
|
|
1409
1532
|
* Get a list of all the user's rows in a given table. You can use the query params to filter your results.
|
|
1410
1533
|
*
|
|
1411
1534
|
* @param {string} params.databaseId - Database ID.
|
|
1412
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the
|
|
1535
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table).
|
|
1413
1536
|
* @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.
|
|
1537
|
+
* @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
1414
1538
|
* @throws {AppwriteException}
|
|
1415
1539
|
* @returns {Promise<Models.RowList<Row>>}
|
|
1416
1540
|
*/
|
|
@@ -1418,26 +1542,29 @@ declare class TablesDB {
|
|
|
1418
1542
|
databaseId: string;
|
|
1419
1543
|
tableId: string;
|
|
1420
1544
|
queries?: string[];
|
|
1545
|
+
transactionId?: string;
|
|
1421
1546
|
}): Promise<Models.RowList<Row>>;
|
|
1422
1547
|
/**
|
|
1423
1548
|
* Get a list of all the user's rows in a given table. You can use the query params to filter your results.
|
|
1424
1549
|
*
|
|
1425
1550
|
* @param {string} databaseId - Database ID.
|
|
1426
|
-
* @param {string} tableId - Table ID. You can create a new table using the
|
|
1551
|
+
* @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table).
|
|
1427
1552
|
* @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.
|
|
1553
|
+
* @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
1428
1554
|
* @throws {AppwriteException}
|
|
1429
1555
|
* @returns {Promise<Models.RowList<Row>>}
|
|
1430
1556
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1431
1557
|
*/
|
|
1432
|
-
listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[]): Promise<Models.RowList<Row>>;
|
|
1558
|
+
listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string): Promise<Models.RowList<Row>>;
|
|
1433
1559
|
/**
|
|
1434
|
-
* 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/
|
|
1560
|
+
* Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
1435
1561
|
*
|
|
1436
1562
|
* @param {string} params.databaseId - Database ID.
|
|
1437
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1563
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.
|
|
1438
1564
|
* @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.
|
|
1439
1565
|
* @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.
|
|
1440
1566
|
* @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).
|
|
1567
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
1441
1568
|
* @throws {AppwriteException}
|
|
1442
1569
|
* @returns {Promise<Row>}
|
|
1443
1570
|
*/
|
|
@@ -1447,26 +1574,29 @@ declare class TablesDB {
|
|
|
1447
1574
|
rowId: string;
|
|
1448
1575
|
data: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>;
|
|
1449
1576
|
permissions?: string[];
|
|
1577
|
+
transactionId?: string;
|
|
1450
1578
|
}): Promise<Row>;
|
|
1451
1579
|
/**
|
|
1452
|
-
* 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/
|
|
1580
|
+
* Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
1453
1581
|
*
|
|
1454
1582
|
* @param {string} databaseId - Database ID.
|
|
1455
|
-
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1583
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.
|
|
1456
1584
|
* @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.
|
|
1457
1585
|
* @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.
|
|
1458
1586
|
* @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).
|
|
1587
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1459
1588
|
* @throws {AppwriteException}
|
|
1460
1589
|
* @returns {Promise<Row>}
|
|
1461
1590
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1462
1591
|
*/
|
|
1463
|
-
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>;
|
|
1592
|
+
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[], transactionId?: string): Promise<Row>;
|
|
1464
1593
|
/**
|
|
1465
|
-
* Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/
|
|
1594
|
+
* Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
1466
1595
|
*
|
|
1467
1596
|
* @param {string} params.databaseId - Database ID.
|
|
1468
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1597
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.
|
|
1469
1598
|
* @param {object[]} params.rows - Array of rows data as JSON objects.
|
|
1599
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
1470
1600
|
* @throws {AppwriteException}
|
|
1471
1601
|
* @returns {Promise<Models.RowList<Row>>}
|
|
1472
1602
|
*/
|
|
@@ -1474,25 +1604,28 @@ declare class TablesDB {
|
|
|
1474
1604
|
databaseId: string;
|
|
1475
1605
|
tableId: string;
|
|
1476
1606
|
rows: object[];
|
|
1607
|
+
transactionId?: string;
|
|
1477
1608
|
}): Promise<Models.RowList<Row>>;
|
|
1478
1609
|
/**
|
|
1479
|
-
* Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/
|
|
1610
|
+
* Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
1480
1611
|
*
|
|
1481
1612
|
* @param {string} databaseId - Database ID.
|
|
1482
|
-
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1613
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.
|
|
1483
1614
|
* @param {object[]} rows - Array of rows data as JSON objects.
|
|
1615
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1484
1616
|
* @throws {AppwriteException}
|
|
1485
1617
|
* @returns {Promise<Models.RowList<Row>>}
|
|
1486
1618
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1487
1619
|
*/
|
|
1488
|
-
createRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rows: object[]): Promise<Models.RowList<Row>>;
|
|
1620
|
+
createRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rows: object[], transactionId?: string): Promise<Models.RowList<Row>>;
|
|
1489
1621
|
/**
|
|
1490
|
-
* 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/
|
|
1622
|
+
* Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
1491
1623
|
*
|
|
1492
1624
|
*
|
|
1493
1625
|
* @param {string} params.databaseId - Database ID.
|
|
1494
1626
|
* @param {string} params.tableId - Table ID.
|
|
1495
1627
|
* @param {object[]} params.rows - Array of row data as JSON objects. May contain partial rows.
|
|
1628
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
1496
1629
|
* @throws {AppwriteException}
|
|
1497
1630
|
* @returns {Promise<Models.RowList<Row>>}
|
|
1498
1631
|
*/
|
|
@@ -1500,19 +1633,21 @@ declare class TablesDB {
|
|
|
1500
1633
|
databaseId: string;
|
|
1501
1634
|
tableId: string;
|
|
1502
1635
|
rows: object[];
|
|
1636
|
+
transactionId?: string;
|
|
1503
1637
|
}): Promise<Models.RowList<Row>>;
|
|
1504
1638
|
/**
|
|
1505
|
-
* 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/
|
|
1639
|
+
* Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
1506
1640
|
*
|
|
1507
1641
|
*
|
|
1508
1642
|
* @param {string} databaseId - Database ID.
|
|
1509
1643
|
* @param {string} tableId - Table ID.
|
|
1510
1644
|
* @param {object[]} rows - Array of row data as JSON objects. May contain partial rows.
|
|
1645
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1511
1646
|
* @throws {AppwriteException}
|
|
1512
1647
|
* @returns {Promise<Models.RowList<Row>>}
|
|
1513
1648
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1514
1649
|
*/
|
|
1515
|
-
upsertRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rows: object[]): Promise<Models.RowList<Row>>;
|
|
1650
|
+
upsertRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rows: object[], transactionId?: string): Promise<Models.RowList<Row>>;
|
|
1516
1651
|
/**
|
|
1517
1652
|
* 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.
|
|
1518
1653
|
*
|
|
@@ -1520,6 +1655,7 @@ declare class TablesDB {
|
|
|
1520
1655
|
* @param {string} params.tableId - Table ID.
|
|
1521
1656
|
* @param {object} params.data - Row data as JSON object. Include only column and value pairs to be updated.
|
|
1522
1657
|
* @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.
|
|
1658
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
1523
1659
|
* @throws {AppwriteException}
|
|
1524
1660
|
* @returns {Promise<Models.RowList<Row>>}
|
|
1525
1661
|
*/
|
|
@@ -1528,6 +1664,7 @@ declare class TablesDB {
|
|
|
1528
1664
|
tableId: string;
|
|
1529
1665
|
data?: object;
|
|
1530
1666
|
queries?: string[];
|
|
1667
|
+
transactionId?: string;
|
|
1531
1668
|
}): Promise<Models.RowList<Row>>;
|
|
1532
1669
|
/**
|
|
1533
1670
|
* 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.
|
|
@@ -1536,17 +1673,19 @@ declare class TablesDB {
|
|
|
1536
1673
|
* @param {string} tableId - Table ID.
|
|
1537
1674
|
* @param {object} data - Row data as JSON object. Include only column and value pairs to be updated.
|
|
1538
1675
|
* @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.
|
|
1676
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1539
1677
|
* @throws {AppwriteException}
|
|
1540
1678
|
* @returns {Promise<Models.RowList<Row>>}
|
|
1541
1679
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1542
1680
|
*/
|
|
1543
|
-
updateRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, data?: object, queries?: string[]): Promise<Models.RowList<Row>>;
|
|
1681
|
+
updateRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, data?: object, queries?: string[], transactionId?: string): Promise<Models.RowList<Row>>;
|
|
1544
1682
|
/**
|
|
1545
1683
|
* Bulk delete rows using queries, if no queries are passed then all rows are deleted.
|
|
1546
1684
|
*
|
|
1547
1685
|
* @param {string} params.databaseId - Database ID.
|
|
1548
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1686
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1549
1687
|
* @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.
|
|
1688
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
1550
1689
|
* @throws {AppwriteException}
|
|
1551
1690
|
* @returns {Promise<Models.RowList<Row>>}
|
|
1552
1691
|
*/
|
|
@@ -1554,25 +1693,28 @@ declare class TablesDB {
|
|
|
1554
1693
|
databaseId: string;
|
|
1555
1694
|
tableId: string;
|
|
1556
1695
|
queries?: string[];
|
|
1696
|
+
transactionId?: string;
|
|
1557
1697
|
}): Promise<Models.RowList<Row>>;
|
|
1558
1698
|
/**
|
|
1559
1699
|
* Bulk delete rows using queries, if no queries are passed then all rows are deleted.
|
|
1560
1700
|
*
|
|
1561
1701
|
* @param {string} databaseId - Database ID.
|
|
1562
|
-
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1702
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1563
1703
|
* @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.
|
|
1704
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1564
1705
|
* @throws {AppwriteException}
|
|
1565
1706
|
* @returns {Promise<Models.RowList<Row>>}
|
|
1566
1707
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1567
1708
|
*/
|
|
1568
|
-
deleteRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[]): Promise<Models.RowList<Row>>;
|
|
1709
|
+
deleteRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string): Promise<Models.RowList<Row>>;
|
|
1569
1710
|
/**
|
|
1570
1711
|
* Get a row by its unique ID. This endpoint response returns a JSON object with the row data.
|
|
1571
1712
|
*
|
|
1572
1713
|
* @param {string} params.databaseId - Database ID.
|
|
1573
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1714
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1574
1715
|
* @param {string} params.rowId - Row ID.
|
|
1575
1716
|
* @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.
|
|
1717
|
+
* @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
1576
1718
|
* @throws {AppwriteException}
|
|
1577
1719
|
* @returns {Promise<Row>}
|
|
1578
1720
|
*/
|
|
@@ -1581,27 +1723,30 @@ declare class TablesDB {
|
|
|
1581
1723
|
tableId: string;
|
|
1582
1724
|
rowId: string;
|
|
1583
1725
|
queries?: string[];
|
|
1726
|
+
transactionId?: string;
|
|
1584
1727
|
}): Promise<Row>;
|
|
1585
1728
|
/**
|
|
1586
1729
|
* Get a row by its unique ID. This endpoint response returns a JSON object with the row data.
|
|
1587
1730
|
*
|
|
1588
1731
|
* @param {string} databaseId - Database ID.
|
|
1589
|
-
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1732
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1590
1733
|
* @param {string} rowId - Row ID.
|
|
1591
1734
|
* @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.
|
|
1735
|
+
* @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
1592
1736
|
* @throws {AppwriteException}
|
|
1593
1737
|
* @returns {Promise<Row>}
|
|
1594
1738
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1595
1739
|
*/
|
|
1596
|
-
getRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, queries?: string[]): Promise<Row>;
|
|
1740
|
+
getRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, queries?: string[], transactionId?: string): Promise<Row>;
|
|
1597
1741
|
/**
|
|
1598
|
-
* 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/
|
|
1742
|
+
* 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/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
1599
1743
|
*
|
|
1600
1744
|
* @param {string} params.databaseId - Database ID.
|
|
1601
1745
|
* @param {string} params.tableId - Table ID.
|
|
1602
1746
|
* @param {string} params.rowId - Row ID.
|
|
1603
1747
|
* @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.
|
|
1604
1748
|
* @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).
|
|
1749
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
1605
1750
|
* @throws {AppwriteException}
|
|
1606
1751
|
* @returns {Promise<Row>}
|
|
1607
1752
|
*/
|
|
@@ -1611,20 +1756,22 @@ declare class TablesDB {
|
|
|
1611
1756
|
rowId: string;
|
|
1612
1757
|
data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>;
|
|
1613
1758
|
permissions?: string[];
|
|
1759
|
+
transactionId?: string;
|
|
1614
1760
|
}): Promise<Row>;
|
|
1615
1761
|
/**
|
|
1616
|
-
* 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/
|
|
1762
|
+
* 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/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
1617
1763
|
*
|
|
1618
1764
|
* @param {string} databaseId - Database ID.
|
|
1619
1765
|
* @param {string} tableId - Table ID.
|
|
1620
1766
|
* @param {string} rowId - Row ID.
|
|
1621
1767
|
* @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.
|
|
1622
1768
|
* @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
1769
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1623
1770
|
* @throws {AppwriteException}
|
|
1624
1771
|
* @returns {Promise<Row>}
|
|
1625
1772
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1626
1773
|
*/
|
|
1627
|
-
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>;
|
|
1774
|
+
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[], transactionId?: string): Promise<Row>;
|
|
1628
1775
|
/**
|
|
1629
1776
|
* Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
1630
1777
|
*
|
|
@@ -1633,6 +1780,7 @@ declare class TablesDB {
|
|
|
1633
1780
|
* @param {string} params.rowId - Row ID.
|
|
1634
1781
|
* @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.
|
|
1635
1782
|
* @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).
|
|
1783
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
1636
1784
|
* @throws {AppwriteException}
|
|
1637
1785
|
* @returns {Promise<Row>}
|
|
1638
1786
|
*/
|
|
@@ -1642,6 +1790,7 @@ declare class TablesDB {
|
|
|
1642
1790
|
rowId: string;
|
|
1643
1791
|
data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>;
|
|
1644
1792
|
permissions?: string[];
|
|
1793
|
+
transactionId?: string;
|
|
1645
1794
|
}): Promise<Row>;
|
|
1646
1795
|
/**
|
|
1647
1796
|
* Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
@@ -1651,17 +1800,19 @@ declare class TablesDB {
|
|
|
1651
1800
|
* @param {string} rowId - Row ID.
|
|
1652
1801
|
* @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.
|
|
1653
1802
|
* @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
1803
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1654
1804
|
* @throws {AppwriteException}
|
|
1655
1805
|
* @returns {Promise<Row>}
|
|
1656
1806
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1657
1807
|
*/
|
|
1658
|
-
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>;
|
|
1808
|
+
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[], transactionId?: string): Promise<Row>;
|
|
1659
1809
|
/**
|
|
1660
1810
|
* Delete a row by its unique ID.
|
|
1661
1811
|
*
|
|
1662
1812
|
* @param {string} params.databaseId - Database ID.
|
|
1663
|
-
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1813
|
+
* @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1664
1814
|
* @param {string} params.rowId - Row ID.
|
|
1815
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
1665
1816
|
* @throws {AppwriteException}
|
|
1666
1817
|
* @returns {Promise<{}>}
|
|
1667
1818
|
*/
|
|
@@ -1669,18 +1820,20 @@ declare class TablesDB {
|
|
|
1669
1820
|
databaseId: string;
|
|
1670
1821
|
tableId: string;
|
|
1671
1822
|
rowId: string;
|
|
1823
|
+
transactionId?: string;
|
|
1672
1824
|
}): Promise<{}>;
|
|
1673
1825
|
/**
|
|
1674
1826
|
* Delete a row by its unique ID.
|
|
1675
1827
|
*
|
|
1676
1828
|
* @param {string} databaseId - Database ID.
|
|
1677
|
-
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1829
|
+
* @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1678
1830
|
* @param {string} rowId - Row ID.
|
|
1831
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1679
1832
|
* @throws {AppwriteException}
|
|
1680
1833
|
* @returns {Promise<{}>}
|
|
1681
1834
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1682
1835
|
*/
|
|
1683
|
-
deleteRow(databaseId: string, tableId: string, rowId: string): Promise<{}>;
|
|
1836
|
+
deleteRow(databaseId: string, tableId: string, rowId: string, transactionId?: string): Promise<{}>;
|
|
1684
1837
|
/**
|
|
1685
1838
|
* Decrement a specific column of a row by a given value.
|
|
1686
1839
|
*
|
|
@@ -1690,6 +1843,7 @@ declare class TablesDB {
|
|
|
1690
1843
|
* @param {string} params.column - Column key.
|
|
1691
1844
|
* @param {number} params.value - Value to increment the column by. The value must be a number.
|
|
1692
1845
|
* @param {number} params.min - Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
|
|
1846
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
1693
1847
|
* @throws {AppwriteException}
|
|
1694
1848
|
* @returns {Promise<Row>}
|
|
1695
1849
|
*/
|
|
@@ -1700,6 +1854,7 @@ declare class TablesDB {
|
|
|
1700
1854
|
column: string;
|
|
1701
1855
|
value?: number;
|
|
1702
1856
|
min?: number;
|
|
1857
|
+
transactionId?: string;
|
|
1703
1858
|
}): Promise<Row>;
|
|
1704
1859
|
/**
|
|
1705
1860
|
* Decrement a specific column of a row by a given value.
|
|
@@ -1710,11 +1865,12 @@ declare class TablesDB {
|
|
|
1710
1865
|
* @param {string} column - Column key.
|
|
1711
1866
|
* @param {number} value - Value to increment the column by. The value must be a number.
|
|
1712
1867
|
* @param {number} min - Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
|
|
1868
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1713
1869
|
* @throws {AppwriteException}
|
|
1714
1870
|
* @returns {Promise<Row>}
|
|
1715
1871
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1716
1872
|
*/
|
|
1717
|
-
decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number): Promise<Row>;
|
|
1873
|
+
decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number, transactionId?: string): Promise<Row>;
|
|
1718
1874
|
/**
|
|
1719
1875
|
* Increment a specific column of a row by a given value.
|
|
1720
1876
|
*
|
|
@@ -1724,6 +1880,7 @@ declare class TablesDB {
|
|
|
1724
1880
|
* @param {string} params.column - Column key.
|
|
1725
1881
|
* @param {number} params.value - Value to increment the column by. The value must be a number.
|
|
1726
1882
|
* @param {number} params.max - Maximum value for the column. If the current value is greater than this value, an error will be thrown.
|
|
1883
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
1727
1884
|
* @throws {AppwriteException}
|
|
1728
1885
|
* @returns {Promise<Row>}
|
|
1729
1886
|
*/
|
|
@@ -1734,6 +1891,7 @@ declare class TablesDB {
|
|
|
1734
1891
|
column: string;
|
|
1735
1892
|
value?: number;
|
|
1736
1893
|
max?: number;
|
|
1894
|
+
transactionId?: string;
|
|
1737
1895
|
}): Promise<Row>;
|
|
1738
1896
|
/**
|
|
1739
1897
|
* Increment a specific column of a row by a given value.
|
|
@@ -1744,11 +1902,12 @@ declare class TablesDB {
|
|
|
1744
1902
|
* @param {string} column - Column key.
|
|
1745
1903
|
* @param {number} value - Value to increment the column by. The value must be a number.
|
|
1746
1904
|
* @param {number} max - Maximum value for the column. If the current value is greater than this value, an error will be thrown.
|
|
1905
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1747
1906
|
* @throws {AppwriteException}
|
|
1748
1907
|
* @returns {Promise<Row>}
|
|
1749
1908
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1750
1909
|
*/
|
|
1751
|
-
incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number): Promise<Row>;
|
|
1910
|
+
incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string): Promise<Row>;
|
|
1752
1911
|
}
|
|
1753
1912
|
|
|
1754
1913
|
export { TablesDB };
|