@appwrite.io/console 13.2.0 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1089,7 +1089,7 @@ export declare class Databases {
1089
1089
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1090
1090
  * @param {string} params.key - Attribute Key.
1091
1091
  * @param {boolean} params.required - Is attribute required?
1092
- * @param {any[]} params.xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
1092
+ * @param {any[][]} params.xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
1093
1093
  * @throws {AppwriteException}
1094
1094
  * @returns {Promise<Models.AttributeLine>}
1095
1095
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createLineColumn` instead.
@@ -1099,7 +1099,7 @@ export declare class Databases {
1099
1099
  collectionId: string;
1100
1100
  key: string;
1101
1101
  required: boolean;
1102
- xdefault?: any[];
1102
+ xdefault?: any[][];
1103
1103
  }): Promise<Models.AttributeLine>;
1104
1104
  /**
1105
1105
  * Create a geometric line attribute.
@@ -1108,12 +1108,12 @@ export declare class Databases {
1108
1108
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1109
1109
  * @param {string} key - Attribute Key.
1110
1110
  * @param {boolean} required - Is attribute required?
1111
- * @param {any[]} xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
1111
+ * @param {any[][]} xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
1112
1112
  * @throws {AppwriteException}
1113
1113
  * @returns {Promise<Models.AttributeLine>}
1114
1114
  * @deprecated Use the object parameter style method for a better developer experience.
1115
1115
  */
1116
- createLineAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[]): Promise<Models.AttributeLine>;
1116
+ createLineAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][]): Promise<Models.AttributeLine>;
1117
1117
  /**
1118
1118
  * Update a line attribute. Changing the `default` value will not update already existing documents.
1119
1119
  *
@@ -1121,7 +1121,7 @@ export declare class Databases {
1121
1121
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
1122
1122
  * @param {string} params.key - Attribute Key.
1123
1123
  * @param {boolean} params.required - Is attribute required?
1124
- * @param {any[]} params.xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
1124
+ * @param {any[][]} params.xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
1125
1125
  * @param {string} params.newKey - New attribute key.
1126
1126
  * @throws {AppwriteException}
1127
1127
  * @returns {Promise<Models.AttributeLine>}
@@ -1132,7 +1132,7 @@ export declare class Databases {
1132
1132
  collectionId: string;
1133
1133
  key: string;
1134
1134
  required: boolean;
1135
- xdefault?: any[];
1135
+ xdefault?: any[][];
1136
1136
  newKey?: string;
1137
1137
  }): Promise<Models.AttributeLine>;
1138
1138
  /**
@@ -1142,13 +1142,13 @@ export declare class Databases {
1142
1142
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
1143
1143
  * @param {string} key - Attribute Key.
1144
1144
  * @param {boolean} required - Is attribute required?
1145
- * @param {any[]} xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
1145
+ * @param {any[][]} xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
1146
1146
  * @param {string} newKey - New attribute key.
1147
1147
  * @throws {AppwriteException}
1148
1148
  * @returns {Promise<Models.AttributeLine>}
1149
1149
  * @deprecated Use the object parameter style method for a better developer experience.
1150
1150
  */
1151
- updateLineAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise<Models.AttributeLine>;
1151
+ updateLineAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string): Promise<Models.AttributeLine>;
1152
1152
  /**
1153
1153
  * Create a longtext attribute.
1154
1154
  *
@@ -1306,7 +1306,7 @@ export declare class Databases {
1306
1306
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1307
1307
  * @param {string} params.key - Attribute Key.
1308
1308
  * @param {boolean} params.required - Is attribute required?
1309
- * @param {any[]} params.xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
1309
+ * @param {number[]} params.xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
1310
1310
  * @throws {AppwriteException}
1311
1311
  * @returns {Promise<Models.AttributePoint>}
1312
1312
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createPointColumn` instead.
@@ -1316,7 +1316,7 @@ export declare class Databases {
1316
1316
  collectionId: string;
1317
1317
  key: string;
1318
1318
  required: boolean;
1319
- xdefault?: any[];
1319
+ xdefault?: number[];
1320
1320
  }): Promise<Models.AttributePoint>;
1321
1321
  /**
1322
1322
  * Create a geometric point attribute.
@@ -1325,12 +1325,12 @@ export declare class Databases {
1325
1325
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1326
1326
  * @param {string} key - Attribute Key.
1327
1327
  * @param {boolean} required - Is attribute required?
1328
- * @param {any[]} xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
1328
+ * @param {number[]} xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
1329
1329
  * @throws {AppwriteException}
1330
1330
  * @returns {Promise<Models.AttributePoint>}
1331
1331
  * @deprecated Use the object parameter style method for a better developer experience.
1332
1332
  */
1333
- createPointAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[]): Promise<Models.AttributePoint>;
1333
+ createPointAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number[]): Promise<Models.AttributePoint>;
1334
1334
  /**
1335
1335
  * Update a point attribute. Changing the `default` value will not update already existing documents.
1336
1336
  *
@@ -1338,7 +1338,7 @@ export declare class Databases {
1338
1338
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
1339
1339
  * @param {string} params.key - Attribute Key.
1340
1340
  * @param {boolean} params.required - Is attribute required?
1341
- * @param {any[]} params.xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
1341
+ * @param {number[]} params.xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
1342
1342
  * @param {string} params.newKey - New attribute key.
1343
1343
  * @throws {AppwriteException}
1344
1344
  * @returns {Promise<Models.AttributePoint>}
@@ -1349,7 +1349,7 @@ export declare class Databases {
1349
1349
  collectionId: string;
1350
1350
  key: string;
1351
1351
  required: boolean;
1352
- xdefault?: any[];
1352
+ xdefault?: number[];
1353
1353
  newKey?: string;
1354
1354
  }): Promise<Models.AttributePoint>;
1355
1355
  /**
@@ -1359,13 +1359,13 @@ export declare class Databases {
1359
1359
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
1360
1360
  * @param {string} key - Attribute Key.
1361
1361
  * @param {boolean} required - Is attribute required?
1362
- * @param {any[]} xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
1362
+ * @param {number[]} xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
1363
1363
  * @param {string} newKey - New attribute key.
1364
1364
  * @throws {AppwriteException}
1365
1365
  * @returns {Promise<Models.AttributePoint>}
1366
1366
  * @deprecated Use the object parameter style method for a better developer experience.
1367
1367
  */
1368
- updatePointAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise<Models.AttributePoint>;
1368
+ updatePointAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number[], newKey?: string): Promise<Models.AttributePoint>;
1369
1369
  /**
1370
1370
  * Create a geometric polygon attribute.
1371
1371
  *
@@ -1373,7 +1373,7 @@ export declare class Databases {
1373
1373
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1374
1374
  * @param {string} params.key - Attribute Key.
1375
1375
  * @param {boolean} params.required - Is attribute required?
1376
- * @param {any[]} params.xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
1376
+ * @param {any[][]} params.xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
1377
1377
  * @throws {AppwriteException}
1378
1378
  * @returns {Promise<Models.AttributePolygon>}
1379
1379
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createPolygonColumn` instead.
@@ -1383,7 +1383,7 @@ export declare class Databases {
1383
1383
  collectionId: string;
1384
1384
  key: string;
1385
1385
  required: boolean;
1386
- xdefault?: any[];
1386
+ xdefault?: any[][];
1387
1387
  }): Promise<Models.AttributePolygon>;
1388
1388
  /**
1389
1389
  * Create a geometric polygon attribute.
@@ -1392,12 +1392,12 @@ export declare class Databases {
1392
1392
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1393
1393
  * @param {string} key - Attribute Key.
1394
1394
  * @param {boolean} required - Is attribute required?
1395
- * @param {any[]} xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
1395
+ * @param {any[][]} xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
1396
1396
  * @throws {AppwriteException}
1397
1397
  * @returns {Promise<Models.AttributePolygon>}
1398
1398
  * @deprecated Use the object parameter style method for a better developer experience.
1399
1399
  */
1400
- createPolygonAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[]): Promise<Models.AttributePolygon>;
1400
+ createPolygonAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][]): Promise<Models.AttributePolygon>;
1401
1401
  /**
1402
1402
  * Update a polygon attribute. Changing the `default` value will not update already existing documents.
1403
1403
  *
@@ -1405,7 +1405,7 @@ export declare class Databases {
1405
1405
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
1406
1406
  * @param {string} params.key - Attribute Key.
1407
1407
  * @param {boolean} params.required - Is attribute required?
1408
- * @param {any[]} params.xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
1408
+ * @param {any[][]} params.xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
1409
1409
  * @param {string} params.newKey - New attribute key.
1410
1410
  * @throws {AppwriteException}
1411
1411
  * @returns {Promise<Models.AttributePolygon>}
@@ -1416,7 +1416,7 @@ export declare class Databases {
1416
1416
  collectionId: string;
1417
1417
  key: string;
1418
1418
  required: boolean;
1419
- xdefault?: any[];
1419
+ xdefault?: any[][];
1420
1420
  newKey?: string;
1421
1421
  }): Promise<Models.AttributePolygon>;
1422
1422
  /**
@@ -1426,13 +1426,13 @@ export declare class Databases {
1426
1426
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
1427
1427
  * @param {string} key - Attribute Key.
1428
1428
  * @param {boolean} required - Is attribute required?
1429
- * @param {any[]} xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
1429
+ * @param {any[][]} xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
1430
1430
  * @param {string} newKey - New attribute key.
1431
1431
  * @throws {AppwriteException}
1432
1432
  * @returns {Promise<Models.AttributePolygon>}
1433
1433
  * @deprecated Use the object parameter style method for a better developer experience.
1434
1434
  */
1435
- updatePolygonAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise<Models.AttributePolygon>;
1435
+ updatePolygonAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string): Promise<Models.AttributePolygon>;
1436
1436
  /**
1437
1437
  * Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
1438
1438
  *
@@ -35,6 +35,7 @@ export declare class DocumentsDB {
35
35
  * @param {string} params.databaseId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
36
36
  * @param {string} params.name - Database name. Max length: 128 chars.
37
37
  * @param {boolean} params.enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
38
+ * @param {string} params.dedicatedDatabaseId - Optional dedicated database (compute) ID to attach this database to. Leave empty to create a database on the shared pool.
38
39
  * @throws {AppwriteException}
39
40
  * @returns {Promise<Models.Database>}
40
41
  */
@@ -42,6 +43,7 @@ export declare class DocumentsDB {
42
43
  databaseId: string;
43
44
  name: string;
44
45
  enabled?: boolean;
46
+ dedicatedDatabaseId?: string;
45
47
  }): Promise<Models.Database>;
46
48
  /**
47
49
  * Create a new Database.
@@ -50,11 +52,12 @@ export declare class DocumentsDB {
50
52
  * @param {string} databaseId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
51
53
  * @param {string} name - Database name. Max length: 128 chars.
52
54
  * @param {boolean} enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
55
+ * @param {string} dedicatedDatabaseId - Optional dedicated database (compute) ID to attach this database to. Leave empty to create a database on the shared pool.
53
56
  * @throws {AppwriteException}
54
57
  * @returns {Promise<Models.Database>}
55
58
  * @deprecated Use the object parameter style method for a better developer experience.
56
59
  */
57
- create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
60
+ create(databaseId: string, name: string, enabled?: boolean, dedicatedDatabaseId?: string): Promise<Models.Database>;
58
61
  /**
59
62
  * List transactions across all databases.
60
63
  *
@@ -0,0 +1,261 @@
1
+ import { Client } from '../client';
2
+ import type { Models } from '../models';
3
+ export declare class Oauth2 {
4
+ client: Client;
5
+ constructor(client: Client);
6
+ /**
7
+ * Approve an OAuth2 grant after the user gives consent. Returns the `redirectUrl` the end user should be sent to. The consent screen may optionally pass enriched `authorization_details` to record the concrete resources the user selected. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect.
8
+ *
9
+ * @param {string} params.grantId - Grant ID made during authorization, provided to consent screen in URL search params.
10
+ * @param {string} params.authorizationDetails - Enriched `authorization_details` the user consented to, replacing what the client requested. Each entry must use a `type` the project accepts. Optional; omit to keep the originally requested details.
11
+ * @throws {AppwriteException}
12
+ * @returns {Promise<Models.Oauth2Approve>}
13
+ */
14
+ approve(params: {
15
+ grantId: string;
16
+ authorizationDetails?: string;
17
+ }): Promise<Models.Oauth2Approve>;
18
+ /**
19
+ * Approve an OAuth2 grant after the user gives consent. Returns the `redirectUrl` the end user should be sent to. The consent screen may optionally pass enriched `authorization_details` to record the concrete resources the user selected. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect.
20
+ *
21
+ * @param {string} grantId - Grant ID made during authorization, provided to consent screen in URL search params.
22
+ * @param {string} authorizationDetails - Enriched `authorization_details` the user consented to, replacing what the client requested. Each entry must use a `type` the project accepts. Optional; omit to keep the originally requested details.
23
+ * @throws {AppwriteException}
24
+ * @returns {Promise<Models.Oauth2Approve>}
25
+ * @deprecated Use the object parameter style method for a better developer experience.
26
+ */
27
+ approve(grantId: string, authorizationDetails?: string): Promise<Models.Oauth2Approve>;
28
+ /**
29
+ * Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect.
30
+ *
31
+ * @param {string} params.clientId - OAuth2 client ID.
32
+ * @param {string} params.redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not.
33
+ * @param {string} params.responseType - OAuth2 / OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow).
34
+ * @param {string} params.scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.
35
+ * @param {string} params.state - OAuth2 state. You receive this back in the redirect URI.
36
+ * @param {string} params.nonce - OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.
37
+ * @param {string} params.codeChallenge - PKCE code challenge. Required when OAuth2 app is public.
38
+ * @param {string} params.codeChallengeMethod - PKCE code challenge method. Required when OAuth2 app is public.
39
+ * @param {string} params.prompt - OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.
40
+ * @param {number} params.maxAge - OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required.
41
+ * @param {string} params.authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
42
+ * @throws {AppwriteException}
43
+ * @returns {Promise<Models.Oauth2Authorize>}
44
+ */
45
+ authorize(params: {
46
+ clientId: string;
47
+ redirectUri: string;
48
+ responseType: string;
49
+ scope: string;
50
+ state?: string;
51
+ nonce?: string;
52
+ codeChallenge?: string;
53
+ codeChallengeMethod?: string;
54
+ prompt?: string;
55
+ maxAge?: number;
56
+ authorizationDetails?: string;
57
+ }): Promise<Models.Oauth2Authorize>;
58
+ /**
59
+ * Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect.
60
+ *
61
+ * @param {string} clientId - OAuth2 client ID.
62
+ * @param {string} redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not.
63
+ * @param {string} responseType - OAuth2 / OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow).
64
+ * @param {string} scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.
65
+ * @param {string} state - OAuth2 state. You receive this back in the redirect URI.
66
+ * @param {string} nonce - OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.
67
+ * @param {string} codeChallenge - PKCE code challenge. Required when OAuth2 app is public.
68
+ * @param {string} codeChallengeMethod - PKCE code challenge method. Required when OAuth2 app is public.
69
+ * @param {string} prompt - OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.
70
+ * @param {number} maxAge - OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required.
71
+ * @param {string} authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
72
+ * @throws {AppwriteException}
73
+ * @returns {Promise<Models.Oauth2Authorize>}
74
+ * @deprecated Use the object parameter style method for a better developer experience.
75
+ */
76
+ authorize(clientId: string, redirectUri: string, responseType: string, scope: string, state?: string, nonce?: string, codeChallenge?: string, codeChallengeMethod?: string, prompt?: string, maxAge?: number, authorizationDetails?: string): Promise<Models.Oauth2Authorize>;
77
+ /**
78
+ * Start the OAuth2 Device Authorization Grant. Returns the device code, user code, verification URL, expiration, and polling interval.
79
+ *
80
+ * @param {string} params.clientId - OAuth2 client ID.
81
+ * @param {string} params.scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.
82
+ * @param {string} params.authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
83
+ * @throws {AppwriteException}
84
+ * @returns {Promise<Models.Oauth2DeviceAuthorization>}
85
+ */
86
+ createDeviceAuthorization(params?: {
87
+ clientId?: string;
88
+ scope?: string;
89
+ authorizationDetails?: string;
90
+ }): Promise<Models.Oauth2DeviceAuthorization>;
91
+ /**
92
+ * Start the OAuth2 Device Authorization Grant. Returns the device code, user code, verification URL, expiration, and polling interval.
93
+ *
94
+ * @param {string} clientId - OAuth2 client ID.
95
+ * @param {string} scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.
96
+ * @param {string} authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
97
+ * @throws {AppwriteException}
98
+ * @returns {Promise<Models.Oauth2DeviceAuthorization>}
99
+ * @deprecated Use the object parameter style method for a better developer experience.
100
+ */
101
+ createDeviceAuthorization(clientId?: string, scope?: string, authorizationDetails?: string): Promise<Models.Oauth2DeviceAuthorization>;
102
+ /**
103
+ * Exchange a device flow user code for an OAuth2 grant. The authenticated user is bound to the pending grant. Pass the returned grant ID to the get grant endpoint to render the consent screen, then to the approve or reject endpoint to complete the flow.
104
+ *
105
+ * @param {string} params.userCode - User code displayed on the device.
106
+ * @throws {AppwriteException}
107
+ * @returns {Promise<Models.Oauth2Grant>}
108
+ */
109
+ createGrant(params: {
110
+ userCode: string;
111
+ }): Promise<Models.Oauth2Grant>;
112
+ /**
113
+ * Exchange a device flow user code for an OAuth2 grant. The authenticated user is bound to the pending grant. Pass the returned grant ID to the get grant endpoint to render the consent screen, then to the approve or reject endpoint to complete the flow.
114
+ *
115
+ * @param {string} userCode - User code displayed on the device.
116
+ * @throws {AppwriteException}
117
+ * @returns {Promise<Models.Oauth2Grant>}
118
+ * @deprecated Use the object parameter style method for a better developer experience.
119
+ */
120
+ createGrant(userCode: string): Promise<Models.Oauth2Grant>;
121
+ /**
122
+ * Get an OAuth2 grant by its ID. Used by the consent screen to display the details of the authorization the user is being asked to approve. A grant can only be read by the user it belongs to, or by server SDK.
123
+ *
124
+ * @param {string} params.grantId - Grant ID made during authorization, provided to consent screen in URL search params.
125
+ * @throws {AppwriteException}
126
+ * @returns {Promise<Models.Oauth2Grant>}
127
+ */
128
+ getGrant(params: {
129
+ grantId: string;
130
+ }): Promise<Models.Oauth2Grant>;
131
+ /**
132
+ * Get an OAuth2 grant by its ID. Used by the consent screen to display the details of the authorization the user is being asked to approve. A grant can only be read by the user it belongs to, or by server SDK.
133
+ *
134
+ * @param {string} grantId - Grant ID made during authorization, provided to consent screen in URL search params.
135
+ * @throws {AppwriteException}
136
+ * @returns {Promise<Models.Oauth2Grant>}
137
+ * @deprecated Use the object parameter style method for a better developer experience.
138
+ */
139
+ getGrant(grantId: string): Promise<Models.Oauth2Grant>;
140
+ /**
141
+ * OpenID Connect RP-Initiated Logout. Ends the user session and revokes the tokens issued to the app identified by the `id_token_hint`, then redirects the user to `post_logout_redirect_uri` when it matches a URI registered on the app.
142
+ *
143
+ * @param {string} params.idTokenHint - ID Token previously issued to the app, used as proof of the logout request. Required to end the session; signature and issuer are validated while expiry is ignored.
144
+ * @param {string} params.logoutHint - Hint about the user that is logging out. Accepted for OIDC compatibility.
145
+ * @param {string} params.clientId - OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app.
146
+ * @param {string} params.postLogoutRedirectUri - URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`.
147
+ * @param {string} params.state - Opaque value passed back unchanged in the `state` query param of the post-logout redirect.
148
+ * @param {string} params.uiLocales - Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility.
149
+ * @throws {AppwriteException}
150
+ * @returns {Promise<{}>}
151
+ */
152
+ logout(params?: {
153
+ idTokenHint?: string;
154
+ logoutHint?: string;
155
+ clientId?: string;
156
+ postLogoutRedirectUri?: string;
157
+ state?: string;
158
+ uiLocales?: string;
159
+ }): Promise<{}>;
160
+ /**
161
+ * OpenID Connect RP-Initiated Logout. Ends the user session and revokes the tokens issued to the app identified by the `id_token_hint`, then redirects the user to `post_logout_redirect_uri` when it matches a URI registered on the app.
162
+ *
163
+ * @param {string} idTokenHint - ID Token previously issued to the app, used as proof of the logout request. Required to end the session; signature and issuer are validated while expiry is ignored.
164
+ * @param {string} logoutHint - Hint about the user that is logging out. Accepted for OIDC compatibility.
165
+ * @param {string} clientId - OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app.
166
+ * @param {string} postLogoutRedirectUri - URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`.
167
+ * @param {string} state - Opaque value passed back unchanged in the `state` query param of the post-logout redirect.
168
+ * @param {string} uiLocales - Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility.
169
+ * @throws {AppwriteException}
170
+ * @returns {Promise<{}>}
171
+ * @deprecated Use the object parameter style method for a better developer experience.
172
+ */
173
+ logout(idTokenHint?: string, logoutHint?: string, clientId?: string, postLogoutRedirectUri?: string, state?: string, uiLocales?: string): Promise<{}>;
174
+ /**
175
+ * Reject an OAuth2 grant when the user denies consent. Returns the `redirectUrl` the end user should be sent to with an `access_denied` error. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect.
176
+ *
177
+ * @param {string} params.grantId - Grant ID made during authorization, provided to consent screen in URL search params.
178
+ * @throws {AppwriteException}
179
+ * @returns {Promise<Models.Oauth2Reject>}
180
+ */
181
+ reject(params: {
182
+ grantId: string;
183
+ }): Promise<Models.Oauth2Reject>;
184
+ /**
185
+ * Reject an OAuth2 grant when the user denies consent. Returns the `redirectUrl` the end user should be sent to with an `access_denied` error. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect.
186
+ *
187
+ * @param {string} grantId - Grant ID made during authorization, provided to consent screen in URL search params.
188
+ * @throws {AppwriteException}
189
+ * @returns {Promise<Models.Oauth2Reject>}
190
+ * @deprecated Use the object parameter style method for a better developer experience.
191
+ */
192
+ reject(grantId: string): Promise<Models.Oauth2Reject>;
193
+ /**
194
+ * Revoke an OAuth2 access token or refresh token.
195
+ *
196
+ * @param {string} params.token - The access or refresh token to revoke.
197
+ * @param {string} params.tokenTypeHint - Type of token to revoke (access_token or refresh_token).
198
+ * @param {string} params.clientId - OAuth2 client ID.
199
+ * @param {string} params.clientSecret - OAuth2 client secret. Required for confidential apps; omitted for public apps.
200
+ * @throws {AppwriteException}
201
+ * @returns {Promise<{}>}
202
+ */
203
+ revoke(params: {
204
+ token: string;
205
+ tokenTypeHint?: string;
206
+ clientId?: string;
207
+ clientSecret?: string;
208
+ }): Promise<{}>;
209
+ /**
210
+ * Revoke an OAuth2 access token or refresh token.
211
+ *
212
+ * @param {string} token - The access or refresh token to revoke.
213
+ * @param {string} tokenTypeHint - Type of token to revoke (access_token or refresh_token).
214
+ * @param {string} clientId - OAuth2 client ID.
215
+ * @param {string} clientSecret - OAuth2 client secret. Required for confidential apps; omitted for public apps.
216
+ * @throws {AppwriteException}
217
+ * @returns {Promise<{}>}
218
+ * @deprecated Use the object parameter style method for a better developer experience.
219
+ */
220
+ revoke(token: string, tokenTypeHint?: string, clientId?: string, clientSecret?: string): Promise<{}>;
221
+ /**
222
+ * Exchange an OAuth2 authorization code, refresh token, or device code for access and refresh tokens.
223
+ *
224
+ * @param {string} params.grantType - OAuth2 grant type. Can be one of: `authorization_code`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`.
225
+ * @param {string} params.code - Authorization code to be exchanged for access and refresh tokens. Required for `authorization_code` grant type.
226
+ * @param {string} params.refreshToken - Refresh token to be exchanged for a new access and refresh tokens. Required for `refresh_token` grant type.
227
+ * @param {string} params.deviceCode - Device code obtained from the device authorization endpoint. Required for `urn:ietf:params:oauth:grant-type:device_code` grant type.
228
+ * @param {string} params.clientId - OAuth2 client ID.
229
+ * @param {string} params.clientSecret - OAuth2 client secret. Required for confidential apps.
230
+ * @param {string} params.codeVerifier - PKCE code verifier. Required for public apps.
231
+ * @param {string} params.redirectUri - Redirect URI. Required for `authorization_code` grant type.
232
+ * @throws {AppwriteException}
233
+ * @returns {Promise<Models.Oauth2Token>}
234
+ */
235
+ createToken(params: {
236
+ grantType: string;
237
+ code?: string;
238
+ refreshToken?: string;
239
+ deviceCode?: string;
240
+ clientId?: string;
241
+ clientSecret?: string;
242
+ codeVerifier?: string;
243
+ redirectUri?: string;
244
+ }): Promise<Models.Oauth2Token>;
245
+ /**
246
+ * Exchange an OAuth2 authorization code, refresh token, or device code for access and refresh tokens.
247
+ *
248
+ * @param {string} grantType - OAuth2 grant type. Can be one of: `authorization_code`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`.
249
+ * @param {string} code - Authorization code to be exchanged for access and refresh tokens. Required for `authorization_code` grant type.
250
+ * @param {string} refreshToken - Refresh token to be exchanged for a new access and refresh tokens. Required for `refresh_token` grant type.
251
+ * @param {string} deviceCode - Device code obtained from the device authorization endpoint. Required for `urn:ietf:params:oauth:grant-type:device_code` grant type.
252
+ * @param {string} clientId - OAuth2 client ID.
253
+ * @param {string} clientSecret - OAuth2 client secret. Required for confidential apps.
254
+ * @param {string} codeVerifier - PKCE code verifier. Required for public apps.
255
+ * @param {string} redirectUri - Redirect URI. Required for `authorization_code` grant type.
256
+ * @throws {AppwriteException}
257
+ * @returns {Promise<Models.Oauth2Token>}
258
+ * @deprecated Use the object parameter style method for a better developer experience.
259
+ */
260
+ createToken(grantType: string, code?: string, refreshToken?: string, deviceCode?: string, clientId?: string, clientSecret?: string, codeVerifier?: string, redirectUri?: string): Promise<Models.Oauth2Token>;
261
+ }
@@ -640,22 +640,22 @@ export declare class Organizations {
640
640
  * @param {string} params.organizationId - Organization ID
641
641
  * @param {string} params.invoiceId - Invoice unique ID
642
642
  * @throws {AppwriteException}
643
- * @returns {Promise<Models.PaymentMethod>}
643
+ * @returns {string}
644
644
  */
645
645
  getInvoiceDownload(params: {
646
646
  organizationId: string;
647
647
  invoiceId: string;
648
- }): Promise<Models.PaymentMethod>;
648
+ }): string;
649
649
  /**
650
650
  * Download invoice in PDF
651
651
  *
652
652
  * @param {string} organizationId - Organization ID
653
653
  * @param {string} invoiceId - Invoice unique ID
654
654
  * @throws {AppwriteException}
655
- * @returns {Promise<Models.PaymentMethod>}
655
+ * @returns {string}
656
656
  * @deprecated Use the object parameter style method for a better developer experience.
657
657
  */
658
- getInvoiceDownload(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod>;
658
+ getInvoiceDownload(organizationId: string, invoiceId: string): string;
659
659
  /**
660
660
  * Initiate payment for failed invoice to pay live from console
661
661
  *
@@ -709,22 +709,22 @@ export declare class Organizations {
709
709
  * @param {string} params.organizationId - Organization ID
710
710
  * @param {string} params.invoiceId - Invoice unique ID
711
711
  * @throws {AppwriteException}
712
- * @returns {Promise<Models.PaymentMethod>}
712
+ * @returns {string}
713
713
  */
714
714
  getInvoiceView(params: {
715
715
  organizationId: string;
716
716
  invoiceId: string;
717
- }): Promise<Models.PaymentMethod>;
717
+ }): string;
718
718
  /**
719
719
  * View invoice in PDF
720
720
  *
721
721
  * @param {string} organizationId - Organization ID
722
722
  * @param {string} invoiceId - Invoice unique ID
723
723
  * @throws {AppwriteException}
724
- * @returns {Promise<Models.PaymentMethod>}
724
+ * @returns {string}
725
725
  * @deprecated Use the object parameter style method for a better developer experience.
726
726
  */
727
- getInvoiceView(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod>;
727
+ getInvoiceView(organizationId: string, invoiceId: string): string;
728
728
  /**
729
729
  * Set a organization's default payment method.
730
730
  *