@appwrite.io/console 2.0.0 → 2.1.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/CHANGELOG.md +8 -0
- package/README.md +2 -2
- package/dist/cjs/sdk.js +81 -15
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +77 -15
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +3838 -15
- package/docs/examples/account/update-payment-method.md +1 -1
- package/docs/examples/projects/update-labels.md +14 -0
- package/package.json +7 -1
- package/rollup.config.js +40 -24
- package/src/client.ts +49 -10
- package/src/models.ts +432 -424
- package/src/query.ts +14 -11
- package/src/services/account.ts +20 -20
- package/src/services/avatars.ts +117 -117
- package/src/services/backups.ts +18 -18
- package/src/services/console.ts +24 -24
- package/src/services/databases.ts +119 -119
- package/src/services/domains.ts +204 -204
- package/src/services/functions.ts +30 -30
- package/src/services/health.ts +146 -146
- package/src/services/messaging.ts +54 -54
- package/src/services/migrations.ts +36 -36
- package/src/services/organizations.ts +42 -42
- package/src/services/projects.ts +146 -83
- package/src/services/sites.ts +30 -30
- package/src/services/storage.ts +49 -49
- package/src/services/tables-db.ts +119 -119
- package/src/services/users.ts +39 -39
- package/types/client.d.ts +27 -1
- package/types/models.d.ts +432 -424
- package/types/query.d.ts +8 -8
- package/types/services/account.d.ts +11 -11
- package/types/services/avatars.d.ts +82 -82
- package/types/services/backups.d.ts +8 -8
- package/types/services/console.d.ts +14 -14
- package/types/services/databases.d.ts +70 -70
- package/types/services/domains.d.ts +104 -104
- package/types/services/functions.d.ts +15 -15
- package/types/services/health.d.ts +72 -72
- package/types/services/messaging.d.ts +24 -24
- package/types/services/migrations.d.ts +16 -16
- package/types/services/organizations.d.ts +22 -22
- package/types/services/projects.d.ts +60 -38
- package/types/services/sites.d.ts +15 -15
- package/types/services/storage.d.ts +34 -34
- package/types/services/tables-db.d.ts +70 -70
- package/types/services/users.d.ts +24 -24
|
@@ -209,30 +209,30 @@ export class TablesDB {
|
|
|
209
209
|
/**
|
|
210
210
|
* Create a new transaction.
|
|
211
211
|
*
|
|
212
|
-
* @param {number} params.ttl - Seconds before the transaction expires.
|
|
212
|
+
* @param {number | bigint} params.ttl - Seconds before the transaction expires.
|
|
213
213
|
* @throws {AppwriteException}
|
|
214
214
|
* @returns {Promise<Models.Transaction>}
|
|
215
215
|
*/
|
|
216
|
-
createTransaction(params?: { ttl?: number }): Promise<Models.Transaction>;
|
|
216
|
+
createTransaction(params?: { ttl?: number | bigint }): Promise<Models.Transaction>;
|
|
217
217
|
/**
|
|
218
218
|
* Create a new transaction.
|
|
219
219
|
*
|
|
220
|
-
* @param {number} ttl - Seconds before the transaction expires.
|
|
220
|
+
* @param {number | bigint} ttl - Seconds before the transaction expires.
|
|
221
221
|
* @throws {AppwriteException}
|
|
222
222
|
* @returns {Promise<Models.Transaction>}
|
|
223
223
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
224
224
|
*/
|
|
225
|
-
createTransaction(ttl?: number): Promise<Models.Transaction>;
|
|
225
|
+
createTransaction(ttl?: number | bigint): Promise<Models.Transaction>;
|
|
226
226
|
createTransaction(
|
|
227
|
-
paramsOrFirst?: { ttl?: number } | number
|
|
227
|
+
paramsOrFirst?: { ttl?: number | bigint } | number | bigint
|
|
228
228
|
): Promise<Models.Transaction> {
|
|
229
|
-
let params: { ttl?: number };
|
|
229
|
+
let params: { ttl?: number | bigint };
|
|
230
230
|
|
|
231
231
|
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
232
|
-
params = (paramsOrFirst || {}) as { ttl?: number };
|
|
232
|
+
params = (paramsOrFirst || {}) as { ttl?: number | bigint };
|
|
233
233
|
} else {
|
|
234
234
|
params = {
|
|
235
|
-
ttl: paramsOrFirst as number
|
|
235
|
+
ttl: paramsOrFirst as number | bigint
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
238
|
|
|
@@ -1964,14 +1964,14 @@ export class TablesDB {
|
|
|
1964
1964
|
* @param {string} params.tableId - Table ID.
|
|
1965
1965
|
* @param {string} params.key - Column Key.
|
|
1966
1966
|
* @param {boolean} params.required - Is column required?
|
|
1967
|
-
* @param {number} params.min - Minimum value
|
|
1968
|
-
* @param {number} params.max - Maximum value
|
|
1969
|
-
* @param {number} params.xdefault - Default value. Cannot be set when required.
|
|
1967
|
+
* @param {number | bigint} params.min - Minimum value
|
|
1968
|
+
* @param {number | bigint} params.max - Maximum value
|
|
1969
|
+
* @param {number | bigint} params.xdefault - Default value. Cannot be set when required.
|
|
1970
1970
|
* @param {boolean} params.array - Is column an array?
|
|
1971
1971
|
* @throws {AppwriteException}
|
|
1972
1972
|
* @returns {Promise<Models.ColumnFloat>}
|
|
1973
1973
|
*/
|
|
1974
|
-
createFloatColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean }): Promise<Models.ColumnFloat>;
|
|
1974
|
+
createFloatColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean }): Promise<Models.ColumnFloat>;
|
|
1975
1975
|
/**
|
|
1976
1976
|
* Create a float column. Optionally, minimum and maximum values can be provided.
|
|
1977
1977
|
*
|
|
@@ -1980,32 +1980,32 @@ export class TablesDB {
|
|
|
1980
1980
|
* @param {string} tableId - Table ID.
|
|
1981
1981
|
* @param {string} key - Column Key.
|
|
1982
1982
|
* @param {boolean} required - Is column required?
|
|
1983
|
-
* @param {number} min - Minimum value
|
|
1984
|
-
* @param {number} max - Maximum value
|
|
1985
|
-
* @param {number} xdefault - Default value. Cannot be set when required.
|
|
1983
|
+
* @param {number | bigint} min - Minimum value
|
|
1984
|
+
* @param {number | bigint} max - Maximum value
|
|
1985
|
+
* @param {number | bigint} xdefault - Default value. Cannot be set when required.
|
|
1986
1986
|
* @param {boolean} array - Is column an array?
|
|
1987
1987
|
* @throws {AppwriteException}
|
|
1988
1988
|
* @returns {Promise<Models.ColumnFloat>}
|
|
1989
1989
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1990
1990
|
*/
|
|
1991
|
-
createFloatColumn(databaseId: string, tableId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.ColumnFloat>;
|
|
1991
|
+
createFloatColumn(databaseId: string, tableId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean): Promise<Models.ColumnFloat>;
|
|
1992
1992
|
createFloatColumn(
|
|
1993
|
-
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean } | string,
|
|
1994
|
-
...rest: [(string)?, (string)?, (boolean)?, (number)?, (number)?, (number)?, (boolean)?]
|
|
1993
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean } | string,
|
|
1994
|
+
...rest: [(string)?, (string)?, (boolean)?, (number | bigint)?, (number | bigint)?, (number | bigint)?, (boolean)?]
|
|
1995
1995
|
): Promise<Models.ColumnFloat> {
|
|
1996
|
-
let params: { databaseId: string, tableId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean };
|
|
1996
|
+
let params: { databaseId: string, tableId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean };
|
|
1997
1997
|
|
|
1998
1998
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1999
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean };
|
|
1999
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean };
|
|
2000
2000
|
} else {
|
|
2001
2001
|
params = {
|
|
2002
2002
|
databaseId: paramsOrFirst as string,
|
|
2003
2003
|
tableId: rest[0] as string,
|
|
2004
2004
|
key: rest[1] as string,
|
|
2005
2005
|
required: rest[2] as boolean,
|
|
2006
|
-
min: rest[3] as number,
|
|
2007
|
-
max: rest[4] as number,
|
|
2008
|
-
xdefault: rest[5] as number,
|
|
2006
|
+
min: rest[3] as number | bigint,
|
|
2007
|
+
max: rest[4] as number | bigint,
|
|
2008
|
+
xdefault: rest[5] as number | bigint,
|
|
2009
2009
|
array: rest[6] as boolean
|
|
2010
2010
|
};
|
|
2011
2011
|
}
|
|
@@ -2074,14 +2074,14 @@ export class TablesDB {
|
|
|
2074
2074
|
* @param {string} params.tableId - Table ID.
|
|
2075
2075
|
* @param {string} params.key - Column Key.
|
|
2076
2076
|
* @param {boolean} params.required - Is column required?
|
|
2077
|
-
* @param {number} params.xdefault - Default value. Cannot be set when required.
|
|
2078
|
-
* @param {number} params.min - Minimum value
|
|
2079
|
-
* @param {number} params.max - Maximum value
|
|
2077
|
+
* @param {number | bigint} params.xdefault - Default value. Cannot be set when required.
|
|
2078
|
+
* @param {number | bigint} params.min - Minimum value
|
|
2079
|
+
* @param {number | bigint} params.max - Maximum value
|
|
2080
2080
|
* @param {string} params.newKey - New Column Key.
|
|
2081
2081
|
* @throws {AppwriteException}
|
|
2082
2082
|
* @returns {Promise<Models.ColumnFloat>}
|
|
2083
2083
|
*/
|
|
2084
|
-
updateFloatColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string }): Promise<Models.ColumnFloat>;
|
|
2084
|
+
updateFloatColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string }): Promise<Models.ColumnFloat>;
|
|
2085
2085
|
/**
|
|
2086
2086
|
* Update a float column. Changing the `default` value will not update already existing rows.
|
|
2087
2087
|
*
|
|
@@ -2090,32 +2090,32 @@ export class TablesDB {
|
|
|
2090
2090
|
* @param {string} tableId - Table ID.
|
|
2091
2091
|
* @param {string} key - Column Key.
|
|
2092
2092
|
* @param {boolean} required - Is column required?
|
|
2093
|
-
* @param {number} xdefault - Default value. Cannot be set when required.
|
|
2094
|
-
* @param {number} min - Minimum value
|
|
2095
|
-
* @param {number} max - Maximum value
|
|
2093
|
+
* @param {number | bigint} xdefault - Default value. Cannot be set when required.
|
|
2094
|
+
* @param {number | bigint} min - Minimum value
|
|
2095
|
+
* @param {number | bigint} max - Maximum value
|
|
2096
2096
|
* @param {string} newKey - New Column Key.
|
|
2097
2097
|
* @throws {AppwriteException}
|
|
2098
2098
|
* @returns {Promise<Models.ColumnFloat>}
|
|
2099
2099
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2100
2100
|
*/
|
|
2101
|
-
updateFloatColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.ColumnFloat>;
|
|
2101
|
+
updateFloatColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string): Promise<Models.ColumnFloat>;
|
|
2102
2102
|
updateFloatColumn(
|
|
2103
|
-
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string } | string,
|
|
2104
|
-
...rest: [(string)?, (string)?, (boolean)?, (number)?, (number)?, (number)?, (string)?]
|
|
2103
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string } | string,
|
|
2104
|
+
...rest: [(string)?, (string)?, (boolean)?, (number | bigint)?, (number | bigint)?, (number | bigint)?, (string)?]
|
|
2105
2105
|
): Promise<Models.ColumnFloat> {
|
|
2106
|
-
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string };
|
|
2106
|
+
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string };
|
|
2107
2107
|
|
|
2108
2108
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2109
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string };
|
|
2109
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string };
|
|
2110
2110
|
} else {
|
|
2111
2111
|
params = {
|
|
2112
2112
|
databaseId: paramsOrFirst as string,
|
|
2113
2113
|
tableId: rest[0] as string,
|
|
2114
2114
|
key: rest[1] as string,
|
|
2115
2115
|
required: rest[2] as boolean,
|
|
2116
|
-
xdefault: rest[3] as number,
|
|
2117
|
-
min: rest[4] as number,
|
|
2118
|
-
max: rest[5] as number,
|
|
2116
|
+
xdefault: rest[3] as number | bigint,
|
|
2117
|
+
min: rest[4] as number | bigint,
|
|
2118
|
+
max: rest[5] as number | bigint,
|
|
2119
2119
|
newKey: rest[6] as string
|
|
2120
2120
|
};
|
|
2121
2121
|
}
|
|
@@ -2184,14 +2184,14 @@ export class TablesDB {
|
|
|
2184
2184
|
* @param {string} params.tableId - Table ID.
|
|
2185
2185
|
* @param {string} params.key - Column Key.
|
|
2186
2186
|
* @param {boolean} params.required - Is column required?
|
|
2187
|
-
* @param {number} params.min - Minimum value
|
|
2188
|
-
* @param {number} params.max - Maximum value
|
|
2189
|
-
* @param {number} params.xdefault - Default value. Cannot be set when column is required.
|
|
2187
|
+
* @param {number | bigint} params.min - Minimum value
|
|
2188
|
+
* @param {number | bigint} params.max - Maximum value
|
|
2189
|
+
* @param {number | bigint} params.xdefault - Default value. Cannot be set when column is required.
|
|
2190
2190
|
* @param {boolean} params.array - Is column an array?
|
|
2191
2191
|
* @throws {AppwriteException}
|
|
2192
2192
|
* @returns {Promise<Models.ColumnInteger>}
|
|
2193
2193
|
*/
|
|
2194
|
-
createIntegerColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean }): Promise<Models.ColumnInteger>;
|
|
2194
|
+
createIntegerColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean }): Promise<Models.ColumnInteger>;
|
|
2195
2195
|
/**
|
|
2196
2196
|
* Create an integer column. Optionally, minimum and maximum values can be provided.
|
|
2197
2197
|
*
|
|
@@ -2200,32 +2200,32 @@ export class TablesDB {
|
|
|
2200
2200
|
* @param {string} tableId - Table ID.
|
|
2201
2201
|
* @param {string} key - Column Key.
|
|
2202
2202
|
* @param {boolean} required - Is column required?
|
|
2203
|
-
* @param {number} min - Minimum value
|
|
2204
|
-
* @param {number} max - Maximum value
|
|
2205
|
-
* @param {number} xdefault - Default value. Cannot be set when column is required.
|
|
2203
|
+
* @param {number | bigint} min - Minimum value
|
|
2204
|
+
* @param {number | bigint} max - Maximum value
|
|
2205
|
+
* @param {number | bigint} xdefault - Default value. Cannot be set when column is required.
|
|
2206
2206
|
* @param {boolean} array - Is column an array?
|
|
2207
2207
|
* @throws {AppwriteException}
|
|
2208
2208
|
* @returns {Promise<Models.ColumnInteger>}
|
|
2209
2209
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2210
2210
|
*/
|
|
2211
|
-
createIntegerColumn(databaseId: string, tableId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.ColumnInteger>;
|
|
2211
|
+
createIntegerColumn(databaseId: string, tableId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean): Promise<Models.ColumnInteger>;
|
|
2212
2212
|
createIntegerColumn(
|
|
2213
|
-
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean } | string,
|
|
2214
|
-
...rest: [(string)?, (string)?, (boolean)?, (number)?, (number)?, (number)?, (boolean)?]
|
|
2213
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean } | string,
|
|
2214
|
+
...rest: [(string)?, (string)?, (boolean)?, (number | bigint)?, (number | bigint)?, (number | bigint)?, (boolean)?]
|
|
2215
2215
|
): Promise<Models.ColumnInteger> {
|
|
2216
|
-
let params: { databaseId: string, tableId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean };
|
|
2216
|
+
let params: { databaseId: string, tableId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean };
|
|
2217
2217
|
|
|
2218
2218
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2219
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean };
|
|
2219
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean };
|
|
2220
2220
|
} else {
|
|
2221
2221
|
params = {
|
|
2222
2222
|
databaseId: paramsOrFirst as string,
|
|
2223
2223
|
tableId: rest[0] as string,
|
|
2224
2224
|
key: rest[1] as string,
|
|
2225
2225
|
required: rest[2] as boolean,
|
|
2226
|
-
min: rest[3] as number,
|
|
2227
|
-
max: rest[4] as number,
|
|
2228
|
-
xdefault: rest[5] as number,
|
|
2226
|
+
min: rest[3] as number | bigint,
|
|
2227
|
+
max: rest[4] as number | bigint,
|
|
2228
|
+
xdefault: rest[5] as number | bigint,
|
|
2229
2229
|
array: rest[6] as boolean
|
|
2230
2230
|
};
|
|
2231
2231
|
}
|
|
@@ -2294,14 +2294,14 @@ export class TablesDB {
|
|
|
2294
2294
|
* @param {string} params.tableId - Table ID.
|
|
2295
2295
|
* @param {string} params.key - Column Key.
|
|
2296
2296
|
* @param {boolean} params.required - Is column required?
|
|
2297
|
-
* @param {number} params.xdefault - Default value. Cannot be set when column is required.
|
|
2298
|
-
* @param {number} params.min - Minimum value
|
|
2299
|
-
* @param {number} params.max - Maximum value
|
|
2297
|
+
* @param {number | bigint} params.xdefault - Default value. Cannot be set when column is required.
|
|
2298
|
+
* @param {number | bigint} params.min - Minimum value
|
|
2299
|
+
* @param {number | bigint} params.max - Maximum value
|
|
2300
2300
|
* @param {string} params.newKey - New Column Key.
|
|
2301
2301
|
* @throws {AppwriteException}
|
|
2302
2302
|
* @returns {Promise<Models.ColumnInteger>}
|
|
2303
2303
|
*/
|
|
2304
|
-
updateIntegerColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string }): Promise<Models.ColumnInteger>;
|
|
2304
|
+
updateIntegerColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string }): Promise<Models.ColumnInteger>;
|
|
2305
2305
|
/**
|
|
2306
2306
|
* Update an integer column. Changing the `default` value will not update already existing rows.
|
|
2307
2307
|
*
|
|
@@ -2310,32 +2310,32 @@ export class TablesDB {
|
|
|
2310
2310
|
* @param {string} tableId - Table ID.
|
|
2311
2311
|
* @param {string} key - Column Key.
|
|
2312
2312
|
* @param {boolean} required - Is column required?
|
|
2313
|
-
* @param {number} xdefault - Default value. Cannot be set when column is required.
|
|
2314
|
-
* @param {number} min - Minimum value
|
|
2315
|
-
* @param {number} max - Maximum value
|
|
2313
|
+
* @param {number | bigint} xdefault - Default value. Cannot be set when column is required.
|
|
2314
|
+
* @param {number | bigint} min - Minimum value
|
|
2315
|
+
* @param {number | bigint} max - Maximum value
|
|
2316
2316
|
* @param {string} newKey - New Column Key.
|
|
2317
2317
|
* @throws {AppwriteException}
|
|
2318
2318
|
* @returns {Promise<Models.ColumnInteger>}
|
|
2319
2319
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2320
2320
|
*/
|
|
2321
|
-
updateIntegerColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.ColumnInteger>;
|
|
2321
|
+
updateIntegerColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string): Promise<Models.ColumnInteger>;
|
|
2322
2322
|
updateIntegerColumn(
|
|
2323
|
-
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string } | string,
|
|
2324
|
-
...rest: [(string)?, (string)?, (boolean)?, (number)?, (number)?, (number)?, (string)?]
|
|
2323
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string } | string,
|
|
2324
|
+
...rest: [(string)?, (string)?, (boolean)?, (number | bigint)?, (number | bigint)?, (number | bigint)?, (string)?]
|
|
2325
2325
|
): Promise<Models.ColumnInteger> {
|
|
2326
|
-
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string };
|
|
2326
|
+
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string };
|
|
2327
2327
|
|
|
2328
2328
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2329
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string };
|
|
2329
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string };
|
|
2330
2330
|
} else {
|
|
2331
2331
|
params = {
|
|
2332
2332
|
databaseId: paramsOrFirst as string,
|
|
2333
2333
|
tableId: rest[0] as string,
|
|
2334
2334
|
key: rest[1] as string,
|
|
2335
2335
|
required: rest[2] as boolean,
|
|
2336
|
-
xdefault: rest[3] as number,
|
|
2337
|
-
min: rest[4] as number,
|
|
2338
|
-
max: rest[5] as number,
|
|
2336
|
+
xdefault: rest[3] as number | bigint,
|
|
2337
|
+
min: rest[4] as number | bigint,
|
|
2338
|
+
max: rest[5] as number | bigint,
|
|
2339
2339
|
newKey: rest[6] as string
|
|
2340
2340
|
};
|
|
2341
2341
|
}
|
|
@@ -3239,7 +3239,7 @@ export class TablesDB {
|
|
|
3239
3239
|
* @param {string} params.databaseId - Database ID.
|
|
3240
3240
|
* @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).
|
|
3241
3241
|
* @param {string} params.key - Column Key.
|
|
3242
|
-
* @param {number} params.size - Column size for text columns, in number of characters.
|
|
3242
|
+
* @param {number | bigint} params.size - Column size for text columns, in number of characters.
|
|
3243
3243
|
* @param {boolean} params.required - Is column required?
|
|
3244
3244
|
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
3245
3245
|
* @param {boolean} params.array - Is column an array?
|
|
@@ -3247,7 +3247,7 @@ export class TablesDB {
|
|
|
3247
3247
|
* @throws {AppwriteException}
|
|
3248
3248
|
* @returns {Promise<Models.ColumnString>}
|
|
3249
3249
|
*/
|
|
3250
|
-
createStringColumn(params: { databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise<Models.ColumnString>;
|
|
3250
|
+
createStringColumn(params: { databaseId: string, tableId: string, key: string, size: number | bigint, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise<Models.ColumnString>;
|
|
3251
3251
|
/**
|
|
3252
3252
|
* Create a string column.
|
|
3253
3253
|
*
|
|
@@ -3255,7 +3255,7 @@ export class TablesDB {
|
|
|
3255
3255
|
* @param {string} databaseId - Database ID.
|
|
3256
3256
|
* @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).
|
|
3257
3257
|
* @param {string} key - Column Key.
|
|
3258
|
-
* @param {number} size - Column size for text columns, in number of characters.
|
|
3258
|
+
* @param {number | bigint} size - Column size for text columns, in number of characters.
|
|
3259
3259
|
* @param {boolean} required - Is column required?
|
|
3260
3260
|
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
3261
3261
|
* @param {boolean} array - Is column an array?
|
|
@@ -3264,21 +3264,21 @@ export class TablesDB {
|
|
|
3264
3264
|
* @returns {Promise<Models.ColumnString>}
|
|
3265
3265
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3266
3266
|
*/
|
|
3267
|
-
createStringColumn(databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.ColumnString>;
|
|
3267
|
+
createStringColumn(databaseId: string, tableId: string, key: string, size: number | bigint, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.ColumnString>;
|
|
3268
3268
|
createStringColumn(
|
|
3269
|
-
paramsOrFirst: { databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean } | string,
|
|
3270
|
-
...rest: [(string)?, (string)?, (number)?, (boolean)?, (string)?, (boolean)?, (boolean)?]
|
|
3269
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, size: number | bigint, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean } | string,
|
|
3270
|
+
...rest: [(string)?, (string)?, (number | bigint)?, (boolean)?, (string)?, (boolean)?, (boolean)?]
|
|
3271
3271
|
): Promise<Models.ColumnString> {
|
|
3272
|
-
let params: { databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
3272
|
+
let params: { databaseId: string, tableId: string, key: string, size: number | bigint, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
3273
3273
|
|
|
3274
3274
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3275
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
3275
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, size: number | bigint, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
3276
3276
|
} else {
|
|
3277
3277
|
params = {
|
|
3278
3278
|
databaseId: paramsOrFirst as string,
|
|
3279
3279
|
tableId: rest[0] as string,
|
|
3280
3280
|
key: rest[1] as string,
|
|
3281
|
-
size: rest[2] as number,
|
|
3281
|
+
size: rest[2] as number | bigint,
|
|
3282
3282
|
required: rest[3] as boolean,
|
|
3283
3283
|
xdefault: rest[4] as string,
|
|
3284
3284
|
array: rest[5] as boolean,
|
|
@@ -3354,12 +3354,12 @@ export class TablesDB {
|
|
|
3354
3354
|
* @param {string} params.key - Column Key.
|
|
3355
3355
|
* @param {boolean} params.required - Is column required?
|
|
3356
3356
|
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
3357
|
-
* @param {number} params.size - Maximum size of the string column.
|
|
3357
|
+
* @param {number | bigint} params.size - Maximum size of the string column.
|
|
3358
3358
|
* @param {string} params.newKey - New Column Key.
|
|
3359
3359
|
* @throws {AppwriteException}
|
|
3360
3360
|
* @returns {Promise<Models.ColumnString>}
|
|
3361
3361
|
*/
|
|
3362
|
-
updateStringColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string }): Promise<Models.ColumnString>;
|
|
3362
|
+
updateStringColumn(params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number | bigint, newKey?: string }): Promise<Models.ColumnString>;
|
|
3363
3363
|
/**
|
|
3364
3364
|
* Update a string column. Changing the `default` value will not update already existing rows.
|
|
3365
3365
|
*
|
|
@@ -3369,21 +3369,21 @@ export class TablesDB {
|
|
|
3369
3369
|
* @param {string} key - Column Key.
|
|
3370
3370
|
* @param {boolean} required - Is column required?
|
|
3371
3371
|
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
3372
|
-
* @param {number} size - Maximum size of the string column.
|
|
3372
|
+
* @param {number | bigint} size - Maximum size of the string column.
|
|
3373
3373
|
* @param {string} newKey - New Column Key.
|
|
3374
3374
|
* @throws {AppwriteException}
|
|
3375
3375
|
* @returns {Promise<Models.ColumnString>}
|
|
3376
3376
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3377
3377
|
*/
|
|
3378
|
-
updateStringColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string): Promise<Models.ColumnString>;
|
|
3378
|
+
updateStringColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number | bigint, newKey?: string): Promise<Models.ColumnString>;
|
|
3379
3379
|
updateStringColumn(
|
|
3380
|
-
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string } | string,
|
|
3381
|
-
...rest: [(string)?, (string)?, (boolean)?, (string)?, (number)?, (string)?]
|
|
3380
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number | bigint, newKey?: string } | string,
|
|
3381
|
+
...rest: [(string)?, (string)?, (boolean)?, (string)?, (number | bigint)?, (string)?]
|
|
3382
3382
|
): Promise<Models.ColumnString> {
|
|
3383
|
-
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string };
|
|
3383
|
+
let params: { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number | bigint, newKey?: string };
|
|
3384
3384
|
|
|
3385
3385
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3386
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string };
|
|
3386
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, size?: number | bigint, newKey?: string };
|
|
3387
3387
|
} else {
|
|
3388
3388
|
params = {
|
|
3389
3389
|
databaseId: paramsOrFirst as string,
|
|
@@ -3391,7 +3391,7 @@ export class TablesDB {
|
|
|
3391
3391
|
key: rest[1] as string,
|
|
3392
3392
|
required: rest[2] as boolean,
|
|
3393
3393
|
xdefault: rest[3] as string,
|
|
3394
|
-
size: rest[4] as number,
|
|
3394
|
+
size: rest[4] as number | bigint,
|
|
3395
3395
|
newKey: rest[5] as string
|
|
3396
3396
|
};
|
|
3397
3397
|
}
|
|
@@ -3939,11 +3939,11 @@ export class TablesDB {
|
|
|
3939
3939
|
* @param {IndexType} params.type - Index type.
|
|
3940
3940
|
* @param {string[]} params.columns - Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.
|
|
3941
3941
|
* @param {string[]} params.orders - Array of index orders. Maximum of 100 orders are allowed.
|
|
3942
|
-
* @param {number[]} params.lengths - Length of index. Maximum of 100
|
|
3942
|
+
* @param {number | bigint[]} params.lengths - Length of index. Maximum of 100
|
|
3943
3943
|
* @throws {AppwriteException}
|
|
3944
3944
|
* @returns {Promise<Models.ColumnIndex>}
|
|
3945
3945
|
*/
|
|
3946
|
-
createIndex(params: { databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?: string[], lengths?: number[] }): Promise<Models.ColumnIndex>;
|
|
3946
|
+
createIndex(params: { databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?: string[], lengths?: number | bigint[] }): Promise<Models.ColumnIndex>;
|
|
3947
3947
|
/**
|
|
3948
3948
|
* Creates an index on the columns listed. Your index should include all the columns you will query in a single request.
|
|
3949
3949
|
* Type can be `key`, `fulltext`, or `unique`.
|
|
@@ -3954,20 +3954,20 @@ export class TablesDB {
|
|
|
3954
3954
|
* @param {IndexType} type - Index type.
|
|
3955
3955
|
* @param {string[]} columns - Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.
|
|
3956
3956
|
* @param {string[]} orders - Array of index orders. Maximum of 100 orders are allowed.
|
|
3957
|
-
* @param {number[]} lengths - Length of index. Maximum of 100
|
|
3957
|
+
* @param {number | bigint[]} lengths - Length of index. Maximum of 100
|
|
3958
3958
|
* @throws {AppwriteException}
|
|
3959
3959
|
* @returns {Promise<Models.ColumnIndex>}
|
|
3960
3960
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3961
3961
|
*/
|
|
3962
|
-
createIndex(databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?: string[], lengths?: number[]): Promise<Models.ColumnIndex>;
|
|
3962
|
+
createIndex(databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?: string[], lengths?: number | bigint[]): Promise<Models.ColumnIndex>;
|
|
3963
3963
|
createIndex(
|
|
3964
|
-
paramsOrFirst: { databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?: string[], lengths?: number[] } | string,
|
|
3965
|
-
...rest: [(string)?, (string)?, (IndexType)?, (string[])?, (string[])?, (number[])?]
|
|
3964
|
+
paramsOrFirst: { databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?: string[], lengths?: number | bigint[] } | string,
|
|
3965
|
+
...rest: [(string)?, (string)?, (IndexType)?, (string[])?, (string[])?, (number | bigint[])?]
|
|
3966
3966
|
): Promise<Models.ColumnIndex> {
|
|
3967
|
-
let params: { databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?: string[], lengths?: number[] };
|
|
3967
|
+
let params: { databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?: string[], lengths?: number | bigint[] };
|
|
3968
3968
|
|
|
3969
3969
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3970
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?: string[], lengths?: number[] };
|
|
3970
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, key: string, type: IndexType, columns: string[], orders?: string[], lengths?: number | bigint[] };
|
|
3971
3971
|
} else {
|
|
3972
3972
|
params = {
|
|
3973
3973
|
databaseId: paramsOrFirst as string,
|
|
@@ -3976,7 +3976,7 @@ export class TablesDB {
|
|
|
3976
3976
|
type: rest[2] as IndexType,
|
|
3977
3977
|
columns: rest[3] as string[],
|
|
3978
3978
|
orders: rest[4] as string[],
|
|
3979
|
-
lengths: rest[5] as number[]
|
|
3979
|
+
lengths: rest[5] as number | bigint[]
|
|
3980
3980
|
};
|
|
3981
3981
|
}
|
|
3982
3982
|
|
|
@@ -5129,13 +5129,13 @@ export class TablesDB {
|
|
|
5129
5129
|
* @param {string} params.tableId - Table ID.
|
|
5130
5130
|
* @param {string} params.rowId - Row ID.
|
|
5131
5131
|
* @param {string} params.column - Column key.
|
|
5132
|
-
* @param {number} params.value - Value to increment the column by. The value must be a number.
|
|
5133
|
-
* @param {number} params.min - Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
|
|
5132
|
+
* @param {number | bigint} params.value - Value to increment the column by. The value must be a number.
|
|
5133
|
+
* @param {number | bigint} params.min - Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
|
|
5134
5134
|
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
5135
5135
|
* @throws {AppwriteException}
|
|
5136
5136
|
* @returns {Promise<Row>}
|
|
5137
5137
|
*/
|
|
5138
|
-
decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number, transactionId?: string }): Promise<Row>;
|
|
5138
|
+
decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rowId: string, column: string, value?: number | bigint, min?: number | bigint, transactionId?: string }): Promise<Row>;
|
|
5139
5139
|
/**
|
|
5140
5140
|
* Decrement a specific column of a row by a given value.
|
|
5141
5141
|
*
|
|
@@ -5143,30 +5143,30 @@ export class TablesDB {
|
|
|
5143
5143
|
* @param {string} tableId - Table ID.
|
|
5144
5144
|
* @param {string} rowId - Row ID.
|
|
5145
5145
|
* @param {string} column - Column key.
|
|
5146
|
-
* @param {number} value - Value to increment the column by. The value must be a number.
|
|
5147
|
-
* @param {number} min - Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
|
|
5146
|
+
* @param {number | bigint} value - Value to increment the column by. The value must be a number.
|
|
5147
|
+
* @param {number | bigint} min - Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
|
|
5148
5148
|
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
5149
5149
|
* @throws {AppwriteException}
|
|
5150
5150
|
* @returns {Promise<Row>}
|
|
5151
5151
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
5152
5152
|
*/
|
|
5153
|
-
decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number, transactionId?: string): Promise<Row>;
|
|
5153
|
+
decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number | bigint, min?: number | bigint, transactionId?: string): Promise<Row>;
|
|
5154
5154
|
decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(
|
|
5155
|
-
paramsOrFirst: { databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number, transactionId?: string } | string,
|
|
5156
|
-
...rest: [(string)?, (string)?, (string)?, (number)?, (number)?, (string)?]
|
|
5155
|
+
paramsOrFirst: { databaseId: string, tableId: string, rowId: string, column: string, value?: number | bigint, min?: number | bigint, transactionId?: string } | string,
|
|
5156
|
+
...rest: [(string)?, (string)?, (string)?, (number | bigint)?, (number | bigint)?, (string)?]
|
|
5157
5157
|
): Promise<Row> {
|
|
5158
|
-
let params: { databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number, transactionId?: string };
|
|
5158
|
+
let params: { databaseId: string, tableId: string, rowId: string, column: string, value?: number | bigint, min?: number | bigint, transactionId?: string };
|
|
5159
5159
|
|
|
5160
5160
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5161
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number, transactionId?: string };
|
|
5161
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, rowId: string, column: string, value?: number | bigint, min?: number | bigint, transactionId?: string };
|
|
5162
5162
|
} else {
|
|
5163
5163
|
params = {
|
|
5164
5164
|
databaseId: paramsOrFirst as string,
|
|
5165
5165
|
tableId: rest[0] as string,
|
|
5166
5166
|
rowId: rest[1] as string,
|
|
5167
5167
|
column: rest[2] as string,
|
|
5168
|
-
value: rest[3] as number,
|
|
5169
|
-
min: rest[4] as number,
|
|
5168
|
+
value: rest[3] as number | bigint,
|
|
5169
|
+
min: rest[4] as number | bigint,
|
|
5170
5170
|
transactionId: rest[5] as string
|
|
5171
5171
|
};
|
|
5172
5172
|
}
|
|
@@ -5224,13 +5224,13 @@ export class TablesDB {
|
|
|
5224
5224
|
* @param {string} params.tableId - Table ID.
|
|
5225
5225
|
* @param {string} params.rowId - Row ID.
|
|
5226
5226
|
* @param {string} params.column - Column key.
|
|
5227
|
-
* @param {number} params.value - Value to increment the column by. The value must be a number.
|
|
5228
|
-
* @param {number} params.max - Maximum value for the column. If the current value is greater than this value, an error will be thrown.
|
|
5227
|
+
* @param {number | bigint} params.value - Value to increment the column by. The value must be a number.
|
|
5228
|
+
* @param {number | bigint} params.max - Maximum value for the column. If the current value is greater than this value, an error will be thrown.
|
|
5229
5229
|
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
5230
5230
|
* @throws {AppwriteException}
|
|
5231
5231
|
* @returns {Promise<Row>}
|
|
5232
5232
|
*/
|
|
5233
|
-
incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string }): Promise<Row>;
|
|
5233
|
+
incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, rowId: string, column: string, value?: number | bigint, max?: number | bigint, transactionId?: string }): Promise<Row>;
|
|
5234
5234
|
/**
|
|
5235
5235
|
* Increment a specific column of a row by a given value.
|
|
5236
5236
|
*
|
|
@@ -5238,30 +5238,30 @@ export class TablesDB {
|
|
|
5238
5238
|
* @param {string} tableId - Table ID.
|
|
5239
5239
|
* @param {string} rowId - Row ID.
|
|
5240
5240
|
* @param {string} column - Column key.
|
|
5241
|
-
* @param {number} value - Value to increment the column by. The value must be a number.
|
|
5242
|
-
* @param {number} max - Maximum value for the column. If the current value is greater than this value, an error will be thrown.
|
|
5241
|
+
* @param {number | bigint} value - Value to increment the column by. The value must be a number.
|
|
5242
|
+
* @param {number | bigint} max - Maximum value for the column. If the current value is greater than this value, an error will be thrown.
|
|
5243
5243
|
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
5244
5244
|
* @throws {AppwriteException}
|
|
5245
5245
|
* @returns {Promise<Row>}
|
|
5246
5246
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
5247
5247
|
*/
|
|
5248
|
-
incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string): Promise<Row>;
|
|
5248
|
+
incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number | bigint, max?: number | bigint, transactionId?: string): Promise<Row>;
|
|
5249
5249
|
incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(
|
|
5250
|
-
paramsOrFirst: { databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string } | string,
|
|
5251
|
-
...rest: [(string)?, (string)?, (string)?, (number)?, (number)?, (string)?]
|
|
5250
|
+
paramsOrFirst: { databaseId: string, tableId: string, rowId: string, column: string, value?: number | bigint, max?: number | bigint, transactionId?: string } | string,
|
|
5251
|
+
...rest: [(string)?, (string)?, (string)?, (number | bigint)?, (number | bigint)?, (string)?]
|
|
5252
5252
|
): Promise<Row> {
|
|
5253
|
-
let params: { databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string };
|
|
5253
|
+
let params: { databaseId: string, tableId: string, rowId: string, column: string, value?: number | bigint, max?: number | bigint, transactionId?: string };
|
|
5254
5254
|
|
|
5255
5255
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5256
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string };
|
|
5256
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, rowId: string, column: string, value?: number | bigint, max?: number | bigint, transactionId?: string };
|
|
5257
5257
|
} else {
|
|
5258
5258
|
params = {
|
|
5259
5259
|
databaseId: paramsOrFirst as string,
|
|
5260
5260
|
tableId: rest[0] as string,
|
|
5261
5261
|
rowId: rest[1] as string,
|
|
5262
5262
|
column: rest[2] as string,
|
|
5263
|
-
value: rest[3] as number,
|
|
5264
|
-
max: rest[4] as number,
|
|
5263
|
+
value: rest[3] as number | bigint,
|
|
5264
|
+
max: rest[4] as number | bigint,
|
|
5265
5265
|
transactionId: rest[5] as string
|
|
5266
5266
|
};
|
|
5267
5267
|
}
|