@appwrite.io/console 2.1.1 → 2.1.2
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 +4 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +99 -7
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +100 -8
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +99 -7
- package/docs/examples/domains/list-suggestions.md +18 -0
- package/docs/examples/health/get-queue-audits.md +13 -0
- package/docs/examples/organizations/create.md +2 -2
- package/docs/examples/organizations/estimation-create-organization.md +2 -2
- package/docs/examples/organizations/estimation-update-plan.md +2 -2
- package/docs/examples/organizations/update-plan.md +2 -2
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/enums/billing-plan.ts +17 -0
- package/src/enums/filter-type.ts +4 -0
- package/src/enums/name.ts +1 -0
- package/src/enums/o-auth-provider.ts +0 -2
- package/src/index.ts +2 -0
- package/src/models.ts +437 -375
- 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 +89 -89
- package/src/services/domains.ts +295 -204
- package/src/services/functions.ts +30 -30
- package/src/services/health.ts +201 -152
- package/src/services/messaging.ts +54 -54
- package/src/services/migrations.ts +36 -36
- package/src/services/organizations.ts +67 -66
- package/src/services/projects.ts +81 -81
- package/src/services/sites.ts +30 -30
- package/src/services/storage.ts +45 -45
- package/src/services/tables-db.ts +89 -89
- package/src/services/users.ts +39 -39
- package/types/enums/billing-plan.d.ts +17 -0
- package/types/enums/filter-type.d.ts +4 -0
- package/types/enums/name.d.ts +1 -0
- package/types/enums/o-auth-provider.d.ts +0 -2
- package/types/index.d.ts +2 -0
- package/types/models.d.ts +434 -375
- 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 +50 -50
- package/types/services/domains.d.ts +139 -104
- package/types/services/functions.d.ts +15 -15
- package/types/services/health.d.ts +95 -78
- package/types/services/messaging.d.ts +24 -24
- package/types/services/migrations.d.ts +16 -16
- package/types/services/organizations.d.ts +37 -36
- package/types/services/projects.d.ts +36 -36
- package/types/services/sites.d.ts +15 -15
- package/types/services/storage.d.ts +30 -30
- package/types/services/tables-db.d.ts +50 -50
- package/types/services/users.d.ts +24 -24
|
@@ -211,30 +211,30 @@ export class Databases {
|
|
|
211
211
|
/**
|
|
212
212
|
* Create a new transaction.
|
|
213
213
|
*
|
|
214
|
-
* @param {number
|
|
214
|
+
* @param {number} params.ttl - Seconds before the transaction expires.
|
|
215
215
|
* @throws {AppwriteException}
|
|
216
216
|
* @returns {Promise<Models.Transaction>}
|
|
217
217
|
*/
|
|
218
|
-
createTransaction(params?: { ttl?: number
|
|
218
|
+
createTransaction(params?: { ttl?: number }): Promise<Models.Transaction>;
|
|
219
219
|
/**
|
|
220
220
|
* Create a new transaction.
|
|
221
221
|
*
|
|
222
|
-
* @param {number
|
|
222
|
+
* @param {number} ttl - Seconds before the transaction expires.
|
|
223
223
|
* @throws {AppwriteException}
|
|
224
224
|
* @returns {Promise<Models.Transaction>}
|
|
225
225
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
226
226
|
*/
|
|
227
|
-
createTransaction(ttl?: number
|
|
227
|
+
createTransaction(ttl?: number): Promise<Models.Transaction>;
|
|
228
228
|
createTransaction(
|
|
229
|
-
paramsOrFirst?: { ttl?: number
|
|
229
|
+
paramsOrFirst?: { ttl?: number } | number
|
|
230
230
|
): Promise<Models.Transaction> {
|
|
231
|
-
let params: { ttl?: number
|
|
231
|
+
let params: { ttl?: number };
|
|
232
232
|
|
|
233
233
|
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
234
|
-
params = (paramsOrFirst || {}) as { ttl?: number
|
|
234
|
+
params = (paramsOrFirst || {}) as { ttl?: number };
|
|
235
235
|
} else {
|
|
236
236
|
params = {
|
|
237
|
-
ttl: paramsOrFirst as number
|
|
237
|
+
ttl: paramsOrFirst as number
|
|
238
238
|
};
|
|
239
239
|
}
|
|
240
240
|
|
|
@@ -1986,15 +1986,15 @@ export class Databases {
|
|
|
1986
1986
|
* @param {string} params.collectionId - Collection ID.
|
|
1987
1987
|
* @param {string} params.key - Attribute Key.
|
|
1988
1988
|
* @param {boolean} params.required - Is attribute required?
|
|
1989
|
-
* @param {number
|
|
1990
|
-
* @param {number
|
|
1991
|
-
* @param {number
|
|
1989
|
+
* @param {number} params.min - Minimum value.
|
|
1990
|
+
* @param {number} params.max - Maximum value.
|
|
1991
|
+
* @param {number} params.xdefault - Default value. Cannot be set when required.
|
|
1992
1992
|
* @param {boolean} params.array - Is attribute an array?
|
|
1993
1993
|
* @throws {AppwriteException}
|
|
1994
1994
|
* @returns {Promise<Models.AttributeFloat>}
|
|
1995
1995
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createFloatColumn` instead.
|
|
1996
1996
|
*/
|
|
1997
|
-
createFloatAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number
|
|
1997
|
+
createFloatAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean }): Promise<Models.AttributeFloat>;
|
|
1998
1998
|
/**
|
|
1999
1999
|
* Create a float attribute. Optionally, minimum and maximum values can be provided.
|
|
2000
2000
|
*
|
|
@@ -2003,32 +2003,32 @@ export class Databases {
|
|
|
2003
2003
|
* @param {string} collectionId - Collection ID.
|
|
2004
2004
|
* @param {string} key - Attribute Key.
|
|
2005
2005
|
* @param {boolean} required - Is attribute required?
|
|
2006
|
-
* @param {number
|
|
2007
|
-
* @param {number
|
|
2008
|
-
* @param {number
|
|
2006
|
+
* @param {number} min - Minimum value.
|
|
2007
|
+
* @param {number} max - Maximum value.
|
|
2008
|
+
* @param {number} xdefault - Default value. Cannot be set when required.
|
|
2009
2009
|
* @param {boolean} array - Is attribute an array?
|
|
2010
2010
|
* @throws {AppwriteException}
|
|
2011
2011
|
* @returns {Promise<Models.AttributeFloat>}
|
|
2012
2012
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2013
2013
|
*/
|
|
2014
|
-
createFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number
|
|
2014
|
+
createFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeFloat>;
|
|
2015
2015
|
createFloatAttribute(
|
|
2016
|
-
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number
|
|
2017
|
-
...rest: [(string)?, (string)?, (boolean)?, (number
|
|
2016
|
+
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean } | string,
|
|
2017
|
+
...rest: [(string)?, (string)?, (boolean)?, (number)?, (number)?, (number)?, (boolean)?]
|
|
2018
2018
|
): Promise<Models.AttributeFloat> {
|
|
2019
|
-
let params: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number
|
|
2019
|
+
let params: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean };
|
|
2020
2020
|
|
|
2021
2021
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2022
|
-
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, min?: number
|
|
2022
|
+
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean };
|
|
2023
2023
|
} else {
|
|
2024
2024
|
params = {
|
|
2025
2025
|
databaseId: paramsOrFirst as string,
|
|
2026
2026
|
collectionId: rest[0] as string,
|
|
2027
2027
|
key: rest[1] as string,
|
|
2028
2028
|
required: rest[2] as boolean,
|
|
2029
|
-
min: rest[3] as number
|
|
2030
|
-
max: rest[4] as number
|
|
2031
|
-
xdefault: rest[5] as number
|
|
2029
|
+
min: rest[3] as number,
|
|
2030
|
+
max: rest[4] as number,
|
|
2031
|
+
xdefault: rest[5] as number,
|
|
2032
2032
|
array: rest[6] as boolean
|
|
2033
2033
|
};
|
|
2034
2034
|
}
|
|
@@ -2097,15 +2097,15 @@ export class Databases {
|
|
|
2097
2097
|
* @param {string} params.collectionId - Collection ID.
|
|
2098
2098
|
* @param {string} params.key - Attribute Key.
|
|
2099
2099
|
* @param {boolean} params.required - Is attribute required?
|
|
2100
|
-
* @param {number
|
|
2101
|
-
* @param {number
|
|
2102
|
-
* @param {number
|
|
2100
|
+
* @param {number} params.xdefault - Default value. Cannot be set when required.
|
|
2101
|
+
* @param {number} params.min - Minimum value.
|
|
2102
|
+
* @param {number} params.max - Maximum value.
|
|
2103
2103
|
* @param {string} params.newKey - New Attribute Key.
|
|
2104
2104
|
* @throws {AppwriteException}
|
|
2105
2105
|
* @returns {Promise<Models.AttributeFloat>}
|
|
2106
2106
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateFloatColumn` instead.
|
|
2107
2107
|
*/
|
|
2108
|
-
updateFloatAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number
|
|
2108
|
+
updateFloatAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string }): Promise<Models.AttributeFloat>;
|
|
2109
2109
|
/**
|
|
2110
2110
|
* Update a float attribute. Changing the `default` value will not update already existing documents.
|
|
2111
2111
|
*
|
|
@@ -2114,32 +2114,32 @@ export class Databases {
|
|
|
2114
2114
|
* @param {string} collectionId - Collection ID.
|
|
2115
2115
|
* @param {string} key - Attribute Key.
|
|
2116
2116
|
* @param {boolean} required - Is attribute required?
|
|
2117
|
-
* @param {number
|
|
2118
|
-
* @param {number
|
|
2119
|
-
* @param {number
|
|
2117
|
+
* @param {number} xdefault - Default value. Cannot be set when required.
|
|
2118
|
+
* @param {number} min - Minimum value.
|
|
2119
|
+
* @param {number} max - Maximum value.
|
|
2120
2120
|
* @param {string} newKey - New Attribute Key.
|
|
2121
2121
|
* @throws {AppwriteException}
|
|
2122
2122
|
* @returns {Promise<Models.AttributeFloat>}
|
|
2123
2123
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2124
2124
|
*/
|
|
2125
|
-
updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number
|
|
2125
|
+
updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeFloat>;
|
|
2126
2126
|
updateFloatAttribute(
|
|
2127
|
-
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number
|
|
2128
|
-
...rest: [(string)?, (string)?, (boolean)?, (number
|
|
2127
|
+
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string } | string,
|
|
2128
|
+
...rest: [(string)?, (string)?, (boolean)?, (number)?, (number)?, (number)?, (string)?]
|
|
2129
2129
|
): Promise<Models.AttributeFloat> {
|
|
2130
|
-
let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number
|
|
2130
|
+
let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string };
|
|
2131
2131
|
|
|
2132
2132
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2133
|
-
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number
|
|
2133
|
+
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string };
|
|
2134
2134
|
} else {
|
|
2135
2135
|
params = {
|
|
2136
2136
|
databaseId: paramsOrFirst as string,
|
|
2137
2137
|
collectionId: rest[0] as string,
|
|
2138
2138
|
key: rest[1] as string,
|
|
2139
2139
|
required: rest[2] as boolean,
|
|
2140
|
-
xdefault: rest[3] as number
|
|
2141
|
-
min: rest[4] as number
|
|
2142
|
-
max: rest[5] as number
|
|
2140
|
+
xdefault: rest[3] as number,
|
|
2141
|
+
min: rest[4] as number,
|
|
2142
|
+
max: rest[5] as number,
|
|
2143
2143
|
newKey: rest[6] as string
|
|
2144
2144
|
};
|
|
2145
2145
|
}
|
|
@@ -3274,7 +3274,7 @@ export class Databases {
|
|
|
3274
3274
|
* @param {string} params.databaseId - Database ID.
|
|
3275
3275
|
* @param {string} params.collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
3276
3276
|
* @param {string} params.key - Attribute Key.
|
|
3277
|
-
* @param {number
|
|
3277
|
+
* @param {number} params.size - Attribute size for text attributes, in number of characters.
|
|
3278
3278
|
* @param {boolean} params.required - Is attribute required?
|
|
3279
3279
|
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
3280
3280
|
* @param {boolean} params.array - Is attribute an array?
|
|
@@ -3283,7 +3283,7 @@ export class Databases {
|
|
|
3283
3283
|
* @returns {Promise<Models.AttributeString>}
|
|
3284
3284
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createStringColumn` instead.
|
|
3285
3285
|
*/
|
|
3286
|
-
createStringAttribute(params: { databaseId: string, collectionId: string, key: string, size: number
|
|
3286
|
+
createStringAttribute(params: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise<Models.AttributeString>;
|
|
3287
3287
|
/**
|
|
3288
3288
|
* Create a string attribute.
|
|
3289
3289
|
*
|
|
@@ -3291,7 +3291,7 @@ export class Databases {
|
|
|
3291
3291
|
* @param {string} databaseId - Database ID.
|
|
3292
3292
|
* @param {string} collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
3293
3293
|
* @param {string} key - Attribute Key.
|
|
3294
|
-
* @param {number
|
|
3294
|
+
* @param {number} size - Attribute size for text attributes, in number of characters.
|
|
3295
3295
|
* @param {boolean} required - Is attribute required?
|
|
3296
3296
|
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
3297
3297
|
* @param {boolean} array - Is attribute an array?
|
|
@@ -3300,21 +3300,21 @@ export class Databases {
|
|
|
3300
3300
|
* @returns {Promise<Models.AttributeString>}
|
|
3301
3301
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3302
3302
|
*/
|
|
3303
|
-
createStringAttribute(databaseId: string, collectionId: string, key: string, size: number
|
|
3303
|
+
createStringAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeString>;
|
|
3304
3304
|
createStringAttribute(
|
|
3305
|
-
paramsOrFirst: { databaseId: string, collectionId: string, key: string, size: number
|
|
3306
|
-
...rest: [(string)?, (string)?, (number
|
|
3305
|
+
paramsOrFirst: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean } | string,
|
|
3306
|
+
...rest: [(string)?, (string)?, (number)?, (boolean)?, (string)?, (boolean)?, (boolean)?]
|
|
3307
3307
|
): Promise<Models.AttributeString> {
|
|
3308
|
-
let params: { databaseId: string, collectionId: string, key: string, size: number
|
|
3308
|
+
let params: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
3309
3309
|
|
|
3310
3310
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3311
|
-
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, size: number
|
|
3311
|
+
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
3312
3312
|
} else {
|
|
3313
3313
|
params = {
|
|
3314
3314
|
databaseId: paramsOrFirst as string,
|
|
3315
3315
|
collectionId: rest[0] as string,
|
|
3316
3316
|
key: rest[1] as string,
|
|
3317
|
-
size: rest[2] as number
|
|
3317
|
+
size: rest[2] as number,
|
|
3318
3318
|
required: rest[3] as boolean,
|
|
3319
3319
|
xdefault: rest[4] as string,
|
|
3320
3320
|
array: rest[5] as boolean,
|
|
@@ -3390,13 +3390,13 @@ export class Databases {
|
|
|
3390
3390
|
* @param {string} params.key - Attribute Key.
|
|
3391
3391
|
* @param {boolean} params.required - Is attribute required?
|
|
3392
3392
|
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
3393
|
-
* @param {number
|
|
3393
|
+
* @param {number} params.size - Maximum size of the string attribute.
|
|
3394
3394
|
* @param {string} params.newKey - New Attribute Key.
|
|
3395
3395
|
* @throws {AppwriteException}
|
|
3396
3396
|
* @returns {Promise<Models.AttributeString>}
|
|
3397
3397
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateStringColumn` instead.
|
|
3398
3398
|
*/
|
|
3399
|
-
updateStringAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number
|
|
3399
|
+
updateStringAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string }): Promise<Models.AttributeString>;
|
|
3400
3400
|
/**
|
|
3401
3401
|
* Update a string attribute. Changing the `default` value will not update already existing documents.
|
|
3402
3402
|
*
|
|
@@ -3406,21 +3406,21 @@ export class Databases {
|
|
|
3406
3406
|
* @param {string} key - Attribute Key.
|
|
3407
3407
|
* @param {boolean} required - Is attribute required?
|
|
3408
3408
|
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
3409
|
-
* @param {number
|
|
3409
|
+
* @param {number} size - Maximum size of the string attribute.
|
|
3410
3410
|
* @param {string} newKey - New Attribute Key.
|
|
3411
3411
|
* @throws {AppwriteException}
|
|
3412
3412
|
* @returns {Promise<Models.AttributeString>}
|
|
3413
3413
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3414
3414
|
*/
|
|
3415
|
-
updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number
|
|
3415
|
+
updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string): Promise<Models.AttributeString>;
|
|
3416
3416
|
updateStringAttribute(
|
|
3417
|
-
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number
|
|
3418
|
-
...rest: [(string)?, (string)?, (boolean)?, (string)?, (number
|
|
3417
|
+
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string } | string,
|
|
3418
|
+
...rest: [(string)?, (string)?, (boolean)?, (string)?, (number)?, (string)?]
|
|
3419
3419
|
): Promise<Models.AttributeString> {
|
|
3420
|
-
let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number
|
|
3420
|
+
let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string };
|
|
3421
3421
|
|
|
3422
3422
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3423
|
-
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number
|
|
3423
|
+
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string };
|
|
3424
3424
|
} else {
|
|
3425
3425
|
params = {
|
|
3426
3426
|
databaseId: paramsOrFirst as string,
|
|
@@ -3428,7 +3428,7 @@ export class Databases {
|
|
|
3428
3428
|
key: rest[1] as string,
|
|
3429
3429
|
required: rest[2] as boolean,
|
|
3430
3430
|
xdefault: rest[3] as string,
|
|
3431
|
-
size: rest[4] as number
|
|
3431
|
+
size: rest[4] as number,
|
|
3432
3432
|
newKey: rest[5] as string
|
|
3433
3433
|
};
|
|
3434
3434
|
}
|
|
@@ -4804,14 +4804,14 @@ export class Databases {
|
|
|
4804
4804
|
* @param {string} params.collectionId - Collection ID.
|
|
4805
4805
|
* @param {string} params.documentId - Document ID.
|
|
4806
4806
|
* @param {string} params.attribute - Attribute key.
|
|
4807
|
-
* @param {number
|
|
4808
|
-
* @param {number
|
|
4807
|
+
* @param {number} params.value - Value to increment the attribute by. The value must be a number.
|
|
4808
|
+
* @param {number} params.min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
|
|
4809
4809
|
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
4810
4810
|
* @throws {AppwriteException}
|
|
4811
4811
|
* @returns {Promise<Document>}
|
|
4812
4812
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.decrementRowColumn` instead.
|
|
4813
4813
|
*/
|
|
4814
|
-
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number
|
|
4814
|
+
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string }): Promise<Document>;
|
|
4815
4815
|
/**
|
|
4816
4816
|
* Decrement a specific attribute of a document by a given value.
|
|
4817
4817
|
*
|
|
@@ -4819,30 +4819,30 @@ export class Databases {
|
|
|
4819
4819
|
* @param {string} collectionId - Collection ID.
|
|
4820
4820
|
* @param {string} documentId - Document ID.
|
|
4821
4821
|
* @param {string} attribute - Attribute key.
|
|
4822
|
-
* @param {number
|
|
4823
|
-
* @param {number
|
|
4822
|
+
* @param {number} value - Value to increment the attribute by. The value must be a number.
|
|
4823
|
+
* @param {number} min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
|
|
4824
4824
|
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
4825
4825
|
* @throws {AppwriteException}
|
|
4826
4826
|
* @returns {Promise<Document>}
|
|
4827
4827
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
4828
4828
|
*/
|
|
4829
|
-
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number
|
|
4829
|
+
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string): Promise<Document>;
|
|
4830
4830
|
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(
|
|
4831
|
-
paramsOrFirst: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number
|
|
4832
|
-
...rest: [(string)?, (string)?, (string)?, (number
|
|
4831
|
+
paramsOrFirst: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string } | string,
|
|
4832
|
+
...rest: [(string)?, (string)?, (string)?, (number)?, (number)?, (string)?]
|
|
4833
4833
|
): Promise<Document> {
|
|
4834
|
-
let params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number
|
|
4834
|
+
let params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string };
|
|
4835
4835
|
|
|
4836
4836
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
4837
|
-
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number
|
|
4837
|
+
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string };
|
|
4838
4838
|
} else {
|
|
4839
4839
|
params = {
|
|
4840
4840
|
databaseId: paramsOrFirst as string,
|
|
4841
4841
|
collectionId: rest[0] as string,
|
|
4842
4842
|
documentId: rest[1] as string,
|
|
4843
4843
|
attribute: rest[2] as string,
|
|
4844
|
-
value: rest[3] as number
|
|
4845
|
-
min: rest[4] as number
|
|
4844
|
+
value: rest[3] as number,
|
|
4845
|
+
min: rest[4] as number,
|
|
4846
4846
|
transactionId: rest[5] as string
|
|
4847
4847
|
};
|
|
4848
4848
|
}
|
|
@@ -4900,14 +4900,14 @@ export class Databases {
|
|
|
4900
4900
|
* @param {string} params.collectionId - Collection ID.
|
|
4901
4901
|
* @param {string} params.documentId - Document ID.
|
|
4902
4902
|
* @param {string} params.attribute - Attribute key.
|
|
4903
|
-
* @param {number
|
|
4904
|
-
* @param {number
|
|
4903
|
+
* @param {number} params.value - Value to increment the attribute by. The value must be a number.
|
|
4904
|
+
* @param {number} params.max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
|
|
4905
4905
|
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
4906
4906
|
* @throws {AppwriteException}
|
|
4907
4907
|
* @returns {Promise<Document>}
|
|
4908
4908
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.incrementRowColumn` instead.
|
|
4909
4909
|
*/
|
|
4910
|
-
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number
|
|
4910
|
+
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string }): Promise<Document>;
|
|
4911
4911
|
/**
|
|
4912
4912
|
* Increment a specific attribute of a document by a given value.
|
|
4913
4913
|
*
|
|
@@ -4915,30 +4915,30 @@ export class Databases {
|
|
|
4915
4915
|
* @param {string} collectionId - Collection ID.
|
|
4916
4916
|
* @param {string} documentId - Document ID.
|
|
4917
4917
|
* @param {string} attribute - Attribute key.
|
|
4918
|
-
* @param {number
|
|
4919
|
-
* @param {number
|
|
4918
|
+
* @param {number} value - Value to increment the attribute by. The value must be a number.
|
|
4919
|
+
* @param {number} max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
|
|
4920
4920
|
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
4921
4921
|
* @throws {AppwriteException}
|
|
4922
4922
|
* @returns {Promise<Document>}
|
|
4923
4923
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
4924
4924
|
*/
|
|
4925
|
-
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number
|
|
4925
|
+
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string): Promise<Document>;
|
|
4926
4926
|
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(
|
|
4927
|
-
paramsOrFirst: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number
|
|
4928
|
-
...rest: [(string)?, (string)?, (string)?, (number
|
|
4927
|
+
paramsOrFirst: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string } | string,
|
|
4928
|
+
...rest: [(string)?, (string)?, (string)?, (number)?, (number)?, (string)?]
|
|
4929
4929
|
): Promise<Document> {
|
|
4930
|
-
let params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number
|
|
4930
|
+
let params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string };
|
|
4931
4931
|
|
|
4932
4932
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
4933
|
-
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number
|
|
4933
|
+
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string };
|
|
4934
4934
|
} else {
|
|
4935
4935
|
params = {
|
|
4936
4936
|
databaseId: paramsOrFirst as string,
|
|
4937
4937
|
collectionId: rest[0] as string,
|
|
4938
4938
|
documentId: rest[1] as string,
|
|
4939
4939
|
attribute: rest[2] as string,
|
|
4940
|
-
value: rest[3] as number
|
|
4941
|
-
max: rest[4] as number
|
|
4940
|
+
value: rest[3] as number,
|
|
4941
|
+
max: rest[4] as number,
|
|
4942
4942
|
transactionId: rest[5] as string
|
|
4943
4943
|
};
|
|
4944
4944
|
}
|
|
@@ -5073,12 +5073,12 @@ export class Databases {
|
|
|
5073
5073
|
* @param {IndexType} params.type - Index type.
|
|
5074
5074
|
* @param {string[]} params.attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.
|
|
5075
5075
|
* @param {string[]} params.orders - Array of index orders. Maximum of 100 orders are allowed.
|
|
5076
|
-
* @param {number
|
|
5076
|
+
* @param {number[]} params.lengths - Length of index. Maximum of 100
|
|
5077
5077
|
* @throws {AppwriteException}
|
|
5078
5078
|
* @returns {Promise<Models.Index>}
|
|
5079
5079
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIndex` instead.
|
|
5080
5080
|
*/
|
|
5081
|
-
createIndex(params: { databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number
|
|
5081
|
+
createIndex(params: { databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number[] }): Promise<Models.Index>;
|
|
5082
5082
|
/**
|
|
5083
5083
|
* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
|
|
5084
5084
|
* Attributes can be `key`, `fulltext`, and `unique`.
|
|
@@ -5089,20 +5089,20 @@ export class Databases {
|
|
|
5089
5089
|
* @param {IndexType} type - Index type.
|
|
5090
5090
|
* @param {string[]} attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.
|
|
5091
5091
|
* @param {string[]} orders - Array of index orders. Maximum of 100 orders are allowed.
|
|
5092
|
-
* @param {number
|
|
5092
|
+
* @param {number[]} lengths - Length of index. Maximum of 100
|
|
5093
5093
|
* @throws {AppwriteException}
|
|
5094
5094
|
* @returns {Promise<Models.Index>}
|
|
5095
5095
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
5096
5096
|
*/
|
|
5097
|
-
createIndex(databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number
|
|
5097
|
+
createIndex(databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number[]): Promise<Models.Index>;
|
|
5098
5098
|
createIndex(
|
|
5099
|
-
paramsOrFirst: { databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number
|
|
5100
|
-
...rest: [(string)?, (string)?, (IndexType)?, (string[])?, (string[])?, (number
|
|
5099
|
+
paramsOrFirst: { databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number[] } | string,
|
|
5100
|
+
...rest: [(string)?, (string)?, (IndexType)?, (string[])?, (string[])?, (number[])?]
|
|
5101
5101
|
): Promise<Models.Index> {
|
|
5102
|
-
let params: { databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number
|
|
5102
|
+
let params: { databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number[] };
|
|
5103
5103
|
|
|
5104
5104
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5105
|
-
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number
|
|
5105
|
+
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number[] };
|
|
5106
5106
|
} else {
|
|
5107
5107
|
params = {
|
|
5108
5108
|
databaseId: paramsOrFirst as string,
|
|
@@ -5111,7 +5111,7 @@ export class Databases {
|
|
|
5111
5111
|
type: rest[2] as IndexType,
|
|
5112
5112
|
attributes: rest[3] as string[],
|
|
5113
5113
|
orders: rest[4] as string[],
|
|
5114
|
-
lengths: rest[5] as number
|
|
5114
|
+
lengths: rest[5] as number[]
|
|
5115
5115
|
};
|
|
5116
5116
|
}
|
|
5117
5117
|
|