@appwrite.io/console 14.0.0 → 15.1.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.
- package/README.md +1 -1
- package/dist/cjs/sdk.js +1256 -636
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1256 -637
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +1256 -636
- package/package.json +1 -1
- package/types/client.d.ts +15 -3
- package/types/enums/project-policy-id.d.ts +2 -1
- package/types/enums/project-service-id.d.ts +2 -1
- package/types/enums/query-suggestion-resource.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/models.d.ts +275 -76
- package/types/services/apps.d.ts +38 -2
- package/types/services/compute.d.ts +10 -10
- package/types/services/databases.d.ts +14 -0
- package/types/services/oauth-2.d.ts +270 -0
- package/types/services/project.d.ts +27 -8
- package/types/services/usage.d.ts +98 -20
package/types/services/apps.d.ts
CHANGED
|
@@ -37,6 +37,12 @@ export declare class Apps {
|
|
|
37
37
|
* @param {string} params.privacyPolicyUrl - Application privacy policy URL shown to users during OAuth2 consent.
|
|
38
38
|
* @param {string} params.termsUrl - Application terms of service URL shown to users during OAuth2 consent.
|
|
39
39
|
* @param {string[]} params.contacts - Application support or security contact emails. Maximum of 100 contacts are allowed.
|
|
40
|
+
* @param {string} params.tagline - Application tagline shown to users during OAuth2 consent.
|
|
41
|
+
* @param {string[]} params.tags - Application tags shown to users during OAuth2 consent. Maximum of 100 tags are allowed, each up to 64 characters long.
|
|
42
|
+
* @param {string[]} params.images - Application image URLs shown to users during OAuth2 consent. Maximum of 100 images are allowed.
|
|
43
|
+
* @param {string} params.supportUrl - Application support URL shown to users during OAuth2 consent.
|
|
44
|
+
* @param {string} params.dataDeletionUrl - Application data deletion URL shown to users during OAuth2 consent.
|
|
45
|
+
* @param {string[]} params.postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout (array of valid URLs). After ending the user session, the logout endpoint only redirects to URIs in this list.
|
|
40
46
|
* @param {boolean} params.enabled - Is application enabled?
|
|
41
47
|
* @param {string} params.type - OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` — PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.
|
|
42
48
|
* @param {boolean} params.deviceFlow - Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.
|
|
@@ -54,6 +60,12 @@ export declare class Apps {
|
|
|
54
60
|
privacyPolicyUrl?: string;
|
|
55
61
|
termsUrl?: string;
|
|
56
62
|
contacts?: string[];
|
|
63
|
+
tagline?: string;
|
|
64
|
+
tags?: string[];
|
|
65
|
+
images?: string[];
|
|
66
|
+
supportUrl?: string;
|
|
67
|
+
dataDeletionUrl?: string;
|
|
68
|
+
postLogoutRedirectUris?: string[];
|
|
57
69
|
enabled?: boolean;
|
|
58
70
|
type?: string;
|
|
59
71
|
deviceFlow?: boolean;
|
|
@@ -71,6 +83,12 @@ export declare class Apps {
|
|
|
71
83
|
* @param {string} privacyPolicyUrl - Application privacy policy URL shown to users during OAuth2 consent.
|
|
72
84
|
* @param {string} termsUrl - Application terms of service URL shown to users during OAuth2 consent.
|
|
73
85
|
* @param {string[]} contacts - Application support or security contact emails. Maximum of 100 contacts are allowed.
|
|
86
|
+
* @param {string} tagline - Application tagline shown to users during OAuth2 consent.
|
|
87
|
+
* @param {string[]} tags - Application tags shown to users during OAuth2 consent. Maximum of 100 tags are allowed, each up to 64 characters long.
|
|
88
|
+
* @param {string[]} images - Application image URLs shown to users during OAuth2 consent. Maximum of 100 images are allowed.
|
|
89
|
+
* @param {string} supportUrl - Application support URL shown to users during OAuth2 consent.
|
|
90
|
+
* @param {string} dataDeletionUrl - Application data deletion URL shown to users during OAuth2 consent.
|
|
91
|
+
* @param {string[]} postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout (array of valid URLs). After ending the user session, the logout endpoint only redirects to URIs in this list.
|
|
74
92
|
* @param {boolean} enabled - Is application enabled?
|
|
75
93
|
* @param {string} type - OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` — PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.
|
|
76
94
|
* @param {boolean} deviceFlow - Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.
|
|
@@ -79,7 +97,7 @@ export declare class Apps {
|
|
|
79
97
|
* @returns {Promise<Models.App>}
|
|
80
98
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
81
99
|
*/
|
|
82
|
-
create(appId: string, name: string, redirectUris: string[], description?: string, clientUri?: string, logoUri?: string, privacyPolicyUrl?: string, termsUrl?: string, contacts?: string[], enabled?: boolean, type?: string, deviceFlow?: boolean, teamId?: string): Promise<Models.App>;
|
|
100
|
+
create(appId: string, name: string, redirectUris: string[], description?: string, clientUri?: string, logoUri?: string, privacyPolicyUrl?: string, termsUrl?: string, contacts?: string[], tagline?: string, tags?: string[], images?: string[], supportUrl?: string, dataDeletionUrl?: string, postLogoutRedirectUris?: string[], enabled?: boolean, type?: string, deviceFlow?: boolean, teamId?: string): Promise<Models.App>;
|
|
83
101
|
/**
|
|
84
102
|
* Get an application by its unique ID.
|
|
85
103
|
*
|
|
@@ -110,8 +128,14 @@ export declare class Apps {
|
|
|
110
128
|
* @param {string} params.privacyPolicyUrl - Application privacy policy URL shown to users during OAuth2 consent.
|
|
111
129
|
* @param {string} params.termsUrl - Application terms of service URL shown to users during OAuth2 consent.
|
|
112
130
|
* @param {string[]} params.contacts - Application support or security contact emails. Maximum of 100 contacts are allowed.
|
|
131
|
+
* @param {string} params.tagline - Application tagline shown to users during OAuth2 consent.
|
|
132
|
+
* @param {string[]} params.tags - Application tags shown to users during OAuth2 consent. Maximum of 100 tags are allowed, each up to 64 characters long.
|
|
133
|
+
* @param {string[]} params.images - Application image URLs shown to users during OAuth2 consent. Maximum of 100 images are allowed.
|
|
134
|
+
* @param {string} params.supportUrl - Application support URL shown to users during OAuth2 consent.
|
|
135
|
+
* @param {string} params.dataDeletionUrl - Application data deletion URL shown to users during OAuth2 consent.
|
|
113
136
|
* @param {boolean} params.enabled - Is application enabled?
|
|
114
137
|
* @param {string[]} params.redirectUris - Redirect URIs (array of valid URLs).
|
|
138
|
+
* @param {string[]} params.postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout (array of valid URLs). After ending the user session, the logout endpoint only redirects to URIs in this list.
|
|
115
139
|
* @param {string} params.type - OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` — PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.
|
|
116
140
|
* @param {boolean} params.deviceFlow - Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.
|
|
117
141
|
* @throws {AppwriteException}
|
|
@@ -126,8 +150,14 @@ export declare class Apps {
|
|
|
126
150
|
privacyPolicyUrl?: string;
|
|
127
151
|
termsUrl?: string;
|
|
128
152
|
contacts?: string[];
|
|
153
|
+
tagline?: string;
|
|
154
|
+
tags?: string[];
|
|
155
|
+
images?: string[];
|
|
156
|
+
supportUrl?: string;
|
|
157
|
+
dataDeletionUrl?: string;
|
|
129
158
|
enabled?: boolean;
|
|
130
159
|
redirectUris?: string[];
|
|
160
|
+
postLogoutRedirectUris?: string[];
|
|
131
161
|
type?: string;
|
|
132
162
|
deviceFlow?: boolean;
|
|
133
163
|
}): Promise<Models.App>;
|
|
@@ -142,15 +172,21 @@ export declare class Apps {
|
|
|
142
172
|
* @param {string} privacyPolicyUrl - Application privacy policy URL shown to users during OAuth2 consent.
|
|
143
173
|
* @param {string} termsUrl - Application terms of service URL shown to users during OAuth2 consent.
|
|
144
174
|
* @param {string[]} contacts - Application support or security contact emails. Maximum of 100 contacts are allowed.
|
|
175
|
+
* @param {string} tagline - Application tagline shown to users during OAuth2 consent.
|
|
176
|
+
* @param {string[]} tags - Application tags shown to users during OAuth2 consent. Maximum of 100 tags are allowed, each up to 64 characters long.
|
|
177
|
+
* @param {string[]} images - Application image URLs shown to users during OAuth2 consent. Maximum of 100 images are allowed.
|
|
178
|
+
* @param {string} supportUrl - Application support URL shown to users during OAuth2 consent.
|
|
179
|
+
* @param {string} dataDeletionUrl - Application data deletion URL shown to users during OAuth2 consent.
|
|
145
180
|
* @param {boolean} enabled - Is application enabled?
|
|
146
181
|
* @param {string[]} redirectUris - Redirect URIs (array of valid URLs).
|
|
182
|
+
* @param {string[]} postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout (array of valid URLs). After ending the user session, the logout endpoint only redirects to URIs in this list.
|
|
147
183
|
* @param {string} type - OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` — PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.
|
|
148
184
|
* @param {boolean} deviceFlow - Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.
|
|
149
185
|
* @throws {AppwriteException}
|
|
150
186
|
* @returns {Promise<Models.App>}
|
|
151
187
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
152
188
|
*/
|
|
153
|
-
update(appId: string, name: string, description?: string, clientUri?: string, logoUri?: string, privacyPolicyUrl?: string, termsUrl?: string, contacts?: string[], enabled?: boolean, redirectUris?: string[], type?: string, deviceFlow?: boolean): Promise<Models.App>;
|
|
189
|
+
update(appId: string, name: string, description?: string, clientUri?: string, logoUri?: string, privacyPolicyUrl?: string, termsUrl?: string, contacts?: string[], tagline?: string, tags?: string[], images?: string[], supportUrl?: string, dataDeletionUrl?: string, enabled?: boolean, redirectUris?: string[], postLogoutRedirectUris?: string[], type?: string, deviceFlow?: boolean): Promise<Models.App>;
|
|
154
190
|
/**
|
|
155
191
|
* Delete an application by its unique ID.
|
|
156
192
|
*
|
|
@@ -35,7 +35,7 @@ export declare class Compute {
|
|
|
35
35
|
* @param {number} params.cpu - CPU in millicores (125-16000).
|
|
36
36
|
* @param {number} params.memory - Memory in MB to allocate (128-65536).
|
|
37
37
|
* @param {number} params.storage - Storage in GB to allocate (1-16384).
|
|
38
|
-
* @param {string} params.storageClass - Storage class: ssd
|
|
38
|
+
* @param {string} params.storageClass - Storage class. Allowed values: ssd. DigitalOcean exposes a single block-storage class, so only 'ssd' is offered today.
|
|
39
39
|
* @param {number} params.storageMaxGb - Maximum storage limit in GB. 0 uses system default.
|
|
40
40
|
* @param {number} params.replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
|
|
41
41
|
* @param {string} params.highAvailabilitySyncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
|
|
@@ -51,7 +51,7 @@ export declare class Compute {
|
|
|
51
51
|
* @param {boolean} params.storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
|
|
52
52
|
* @param {number} params.storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
|
|
53
53
|
* @param {number} params.storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
|
|
54
|
-
* @param {boolean} params.metricsEnabled - Enable metrics collection.
|
|
54
|
+
* @param {boolean} params.metricsEnabled - Enable metrics collection. Enabled by default; pass false to opt out.
|
|
55
55
|
* @param {boolean} params.poolerEnabled - Enable connection pooler on provision.
|
|
56
56
|
* @param {string} params.api - Product API that owns this database: compute (raw, direct-access), tablesdb, documentsdb, or vectorsdb. tablesdb/documentsdb/vectorsdb computes are reached only through their product APIs.
|
|
57
57
|
* @throws {AppwriteException}
|
|
@@ -101,7 +101,7 @@ export declare class Compute {
|
|
|
101
101
|
* @param {number} cpu - CPU in millicores (125-16000).
|
|
102
102
|
* @param {number} memory - Memory in MB to allocate (128-65536).
|
|
103
103
|
* @param {number} storage - Storage in GB to allocate (1-16384).
|
|
104
|
-
* @param {string} storageClass - Storage class: ssd
|
|
104
|
+
* @param {string} storageClass - Storage class. Allowed values: ssd. DigitalOcean exposes a single block-storage class, so only 'ssd' is offered today.
|
|
105
105
|
* @param {number} storageMaxGb - Maximum storage limit in GB. 0 uses system default.
|
|
106
106
|
* @param {number} replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
|
|
107
107
|
* @param {string} highAvailabilitySyncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
|
|
@@ -117,7 +117,7 @@ export declare class Compute {
|
|
|
117
117
|
* @param {boolean} storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
|
|
118
118
|
* @param {number} storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
|
|
119
119
|
* @param {number} storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
|
|
120
|
-
* @param {boolean} metricsEnabled - Enable metrics collection.
|
|
120
|
+
* @param {boolean} metricsEnabled - Enable metrics collection. Enabled by default; pass false to opt out.
|
|
121
121
|
* @param {boolean} poolerEnabled - Enable connection pooler on provision.
|
|
122
122
|
* @param {string} api - Product API that owns this database: compute (raw, direct-access), tablesdb, documentsdb, or vectorsdb. tablesdb/documentsdb/vectorsdb computes are reached only through their product APIs.
|
|
123
123
|
* @throws {AppwriteException}
|
|
@@ -156,12 +156,12 @@ export declare class Compute {
|
|
|
156
156
|
*
|
|
157
157
|
* @param {string} params.databaseId - Database ID.
|
|
158
158
|
* @param {string} params.name - Database display name.
|
|
159
|
-
* @param {string} params.status - Database status. Allowed values: ready, paused, inactive. Set to "paused" to pause, "ready" to resume, or "inactive" to spin down a shared-pool database.
|
|
159
|
+
* @param {string} params.status - Database status. Allowed values: ready, paused, inactive. Set to "paused" to pause, "ready" to resume (also recovers a failed database whose infrastructure is healthy), or "inactive" to spin down a shared-pool database.
|
|
160
160
|
* @param {string} params.specification - Specification. Changes cpu, memory, and node pool based on specification config.
|
|
161
161
|
* @param {number} params.cpu - CPU cores to allocate (125-16000).
|
|
162
162
|
* @param {number} params.memory - Memory in MB to allocate (128-65536).
|
|
163
163
|
* @param {number} params.storage - Storage in GB to allocate (1-16384).
|
|
164
|
-
* @param {string} params.storageClass - Storage class. Allowed values: ssd
|
|
164
|
+
* @param {string} params.storageClass - Storage class. Allowed values: ssd.
|
|
165
165
|
* @param {number} params.replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
|
|
166
166
|
* @param {string} params.highAvailabilitySyncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
|
|
167
167
|
* @param {number} params.networkMaxConnections - Maximum concurrent connections.
|
|
@@ -226,12 +226,12 @@ export declare class Compute {
|
|
|
226
226
|
*
|
|
227
227
|
* @param {string} databaseId - Database ID.
|
|
228
228
|
* @param {string} name - Database display name.
|
|
229
|
-
* @param {string} status - Database status. Allowed values: ready, paused, inactive. Set to "paused" to pause, "ready" to resume, or "inactive" to spin down a shared-pool database.
|
|
229
|
+
* @param {string} status - Database status. Allowed values: ready, paused, inactive. Set to "paused" to pause, "ready" to resume (also recovers a failed database whose infrastructure is healthy), or "inactive" to spin down a shared-pool database.
|
|
230
230
|
* @param {string} specification - Specification. Changes cpu, memory, and node pool based on specification config.
|
|
231
231
|
* @param {number} cpu - CPU cores to allocate (125-16000).
|
|
232
232
|
* @param {number} memory - Memory in MB to allocate (128-65536).
|
|
233
233
|
* @param {number} storage - Storage in GB to allocate (1-16384).
|
|
234
|
-
* @param {string} storageClass - Storage class. Allowed values: ssd
|
|
234
|
+
* @param {string} storageClass - Storage class. Allowed values: ssd.
|
|
235
235
|
* @param {number} replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
|
|
236
236
|
* @param {string} highAvailabilitySyncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
|
|
237
237
|
* @param {number} networkMaxConnections - Maximum concurrent connections.
|
|
@@ -637,7 +637,7 @@ export declare class Compute {
|
|
|
637
637
|
*/
|
|
638
638
|
updateDatabaseCredentials(databaseId: string): Promise<Models.DedicatedDatabaseCredentials>;
|
|
639
639
|
/**
|
|
640
|
-
* Execute SQL through the console-facing Cloud endpoint. Cloud proxies through the edge platform to the per-database SQL API sidecar. Application traffic should bypass cloud entirely and POST directly to the per-database hostname: `https://db-{project}-{db}.{region}.appwrite.center/v1/sql/
|
|
640
|
+
* Execute SQL through the console-facing Cloud endpoint. Cloud proxies through the edge platform to the per-database SQL API sidecar. Application traffic should bypass cloud entirely and POST directly to the per-database hostname: `https://db-{project}-{db}.{region}.appwrite.center/v1/sql/executions` with an `X-Appwrite-Key` header — that path scales to the whole DB fleet without a per-query cloud round-trip. The statement type must be on the database's configured allow-list. Use bound parameters for any user-supplied values — the API does not interpolate raw strings.
|
|
641
641
|
*
|
|
642
642
|
* @param {string} params.databaseId - Database ID.
|
|
643
643
|
* @param {string} params.sql - SQL statement to execute. Exactly one statement per request.
|
|
@@ -653,7 +653,7 @@ export declare class Compute {
|
|
|
653
653
|
timeoutSeconds?: number;
|
|
654
654
|
}): Promise<Models.DedicatedDatabaseExecution>;
|
|
655
655
|
/**
|
|
656
|
-
* Execute SQL through the console-facing Cloud endpoint. Cloud proxies through the edge platform to the per-database SQL API sidecar. Application traffic should bypass cloud entirely and POST directly to the per-database hostname: `https://db-{project}-{db}.{region}.appwrite.center/v1/sql/
|
|
656
|
+
* Execute SQL through the console-facing Cloud endpoint. Cloud proxies through the edge platform to the per-database SQL API sidecar. Application traffic should bypass cloud entirely and POST directly to the per-database hostname: `https://db-{project}-{db}.{region}.appwrite.center/v1/sql/executions` with an `X-Appwrite-Key` header — that path scales to the whole DB fleet without a per-query cloud round-trip. The statement type must be on the database's configured allow-list. Use bound parameters for any user-supplied values — the API does not interpolate raw strings.
|
|
657
657
|
*
|
|
658
658
|
* @param {string} databaseId - Database ID.
|
|
659
659
|
* @param {string} sql - SQL statement to execute. Exactly one statement per request.
|
|
@@ -68,6 +68,7 @@ export declare class Databases {
|
|
|
68
68
|
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
|
|
69
69
|
* @throws {AppwriteException}
|
|
70
70
|
* @returns {Promise<Models.TransactionList>}
|
|
71
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listTransactions` instead.
|
|
71
72
|
*/
|
|
72
73
|
listTransactions(params?: {
|
|
73
74
|
queries?: string[];
|
|
@@ -87,6 +88,7 @@ export declare class Databases {
|
|
|
87
88
|
* @param {number} params.ttl - Seconds before the transaction expires.
|
|
88
89
|
* @throws {AppwriteException}
|
|
89
90
|
* @returns {Promise<Models.Transaction>}
|
|
91
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createTransaction` instead.
|
|
90
92
|
*/
|
|
91
93
|
createTransaction(params?: {
|
|
92
94
|
ttl?: number;
|
|
@@ -106,6 +108,7 @@ export declare class Databases {
|
|
|
106
108
|
* @param {string} params.transactionId - Transaction ID.
|
|
107
109
|
* @throws {AppwriteException}
|
|
108
110
|
* @returns {Promise<Models.Transaction>}
|
|
111
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getTransaction` instead.
|
|
109
112
|
*/
|
|
110
113
|
getTransaction(params: {
|
|
111
114
|
transactionId: string;
|
|
@@ -127,6 +130,7 @@ export declare class Databases {
|
|
|
127
130
|
* @param {boolean} params.rollback - Rollback transaction?
|
|
128
131
|
* @throws {AppwriteException}
|
|
129
132
|
* @returns {Promise<Models.Transaction>}
|
|
133
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateTransaction` instead.
|
|
130
134
|
*/
|
|
131
135
|
updateTransaction(params: {
|
|
132
136
|
transactionId: string;
|
|
@@ -150,6 +154,7 @@ export declare class Databases {
|
|
|
150
154
|
* @param {string} params.transactionId - Transaction ID.
|
|
151
155
|
* @throws {AppwriteException}
|
|
152
156
|
* @returns {Promise<{}>}
|
|
157
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteTransaction` instead.
|
|
153
158
|
*/
|
|
154
159
|
deleteTransaction(params: {
|
|
155
160
|
transactionId: string;
|
|
@@ -170,6 +175,7 @@ export declare class Databases {
|
|
|
170
175
|
* @param {object[]} params.operations - Array of staged operations.
|
|
171
176
|
* @throws {AppwriteException}
|
|
172
177
|
* @returns {Promise<Models.Transaction>}
|
|
178
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createOperations` instead.
|
|
173
179
|
*/
|
|
174
180
|
createOperations(params: {
|
|
175
181
|
transactionId: string;
|
|
@@ -1162,6 +1168,7 @@ export declare class Databases {
|
|
|
1162
1168
|
* @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
1163
1169
|
* @throws {AppwriteException}
|
|
1164
1170
|
* @returns {Promise<Models.AttributeLongtext>}
|
|
1171
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createLongtextColumn` instead.
|
|
1165
1172
|
*/
|
|
1166
1173
|
createLongtextAttribute(params: {
|
|
1167
1174
|
databaseId: string;
|
|
@@ -1200,6 +1207,7 @@ export declare class Databases {
|
|
|
1200
1207
|
* @param {string} params.newKey - New Attribute Key.
|
|
1201
1208
|
* @throws {AppwriteException}
|
|
1202
1209
|
* @returns {Promise<Models.AttributeLongtext>}
|
|
1210
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateLongtextColumn` instead.
|
|
1203
1211
|
*/
|
|
1204
1212
|
updateLongtextAttribute(params: {
|
|
1205
1213
|
databaseId: string;
|
|
@@ -1237,6 +1245,7 @@ export declare class Databases {
|
|
|
1237
1245
|
* @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
1238
1246
|
* @throws {AppwriteException}
|
|
1239
1247
|
* @returns {Promise<Models.AttributeMediumtext>}
|
|
1248
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createMediumtextColumn` instead.
|
|
1240
1249
|
*/
|
|
1241
1250
|
createMediumtextAttribute(params: {
|
|
1242
1251
|
databaseId: string;
|
|
@@ -1275,6 +1284,7 @@ export declare class Databases {
|
|
|
1275
1284
|
* @param {string} params.newKey - New Attribute Key.
|
|
1276
1285
|
* @throws {AppwriteException}
|
|
1277
1286
|
* @returns {Promise<Models.AttributeMediumtext>}
|
|
1287
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateMediumtextColumn` instead.
|
|
1278
1288
|
*/
|
|
1279
1289
|
updateMediumtextAttribute(params: {
|
|
1280
1290
|
databaseId: string;
|
|
@@ -1606,6 +1616,7 @@ export declare class Databases {
|
|
|
1606
1616
|
* @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
1607
1617
|
* @throws {AppwriteException}
|
|
1608
1618
|
* @returns {Promise<Models.AttributeText>}
|
|
1619
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createTextColumn` instead.
|
|
1609
1620
|
*/
|
|
1610
1621
|
createTextAttribute(params: {
|
|
1611
1622
|
databaseId: string;
|
|
@@ -1644,6 +1655,7 @@ export declare class Databases {
|
|
|
1644
1655
|
* @param {string} params.newKey - New Attribute Key.
|
|
1645
1656
|
* @throws {AppwriteException}
|
|
1646
1657
|
* @returns {Promise<Models.AttributeText>}
|
|
1658
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateTextColumn` instead.
|
|
1647
1659
|
*/
|
|
1648
1660
|
updateTextAttribute(params: {
|
|
1649
1661
|
databaseId: string;
|
|
@@ -1756,6 +1768,7 @@ export declare class Databases {
|
|
|
1756
1768
|
* @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
1757
1769
|
* @throws {AppwriteException}
|
|
1758
1770
|
* @returns {Promise<Models.AttributeVarchar>}
|
|
1771
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createVarcharColumn` instead.
|
|
1759
1772
|
*/
|
|
1760
1773
|
createVarcharAttribute(params: {
|
|
1761
1774
|
databaseId: string;
|
|
@@ -1797,6 +1810,7 @@ export declare class Databases {
|
|
|
1797
1810
|
* @param {string} params.newKey - New Attribute Key.
|
|
1798
1811
|
* @throws {AppwriteException}
|
|
1799
1812
|
* @returns {Promise<Models.AttributeVarchar>}
|
|
1813
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateVarcharColumn` instead.
|
|
1800
1814
|
*/
|
|
1801
1815
|
updateVarcharAttribute(params: {
|
|
1802
1816
|
databaseId: string;
|
|
@@ -0,0 +1,270 @@
|
|
|
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
|
+
* @param {string} params.resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
43
|
+
* @throws {AppwriteException}
|
|
44
|
+
* @returns {Promise<Models.Oauth2Authorize>}
|
|
45
|
+
*/
|
|
46
|
+
authorize(params: {
|
|
47
|
+
clientId: string;
|
|
48
|
+
redirectUri: string;
|
|
49
|
+
responseType: string;
|
|
50
|
+
scope: string;
|
|
51
|
+
state?: string;
|
|
52
|
+
nonce?: string;
|
|
53
|
+
codeChallenge?: string;
|
|
54
|
+
codeChallengeMethod?: string;
|
|
55
|
+
prompt?: string;
|
|
56
|
+
maxAge?: number;
|
|
57
|
+
authorizationDetails?: string;
|
|
58
|
+
resource?: string;
|
|
59
|
+
}): Promise<Models.Oauth2Authorize>;
|
|
60
|
+
/**
|
|
61
|
+
* 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.
|
|
62
|
+
*
|
|
63
|
+
* @param {string} clientId - OAuth2 client ID.
|
|
64
|
+
* @param {string} redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not.
|
|
65
|
+
* @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).
|
|
66
|
+
* @param {string} scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.
|
|
67
|
+
* @param {string} state - OAuth2 state. You receive this back in the redirect URI.
|
|
68
|
+
* @param {string} nonce - OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.
|
|
69
|
+
* @param {string} codeChallenge - PKCE code challenge. Required when OAuth2 app is public.
|
|
70
|
+
* @param {string} codeChallengeMethod - PKCE code challenge method. Required when OAuth2 app is public.
|
|
71
|
+
* @param {string} prompt - OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.
|
|
72
|
+
* @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.
|
|
73
|
+
* @param {string} authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
|
|
74
|
+
* @param {string} resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
75
|
+
* @throws {AppwriteException}
|
|
76
|
+
* @returns {Promise<Models.Oauth2Authorize>}
|
|
77
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
78
|
+
*/
|
|
79
|
+
authorize(clientId: string, redirectUri: string, responseType: string, scope: string, state?: string, nonce?: string, codeChallenge?: string, codeChallengeMethod?: string, prompt?: string, maxAge?: number, authorizationDetails?: string, resource?: string): Promise<Models.Oauth2Authorize>;
|
|
80
|
+
/**
|
|
81
|
+
* Start the OAuth2 Device Authorization Grant. Returns the device code, user code, verification URL, expiration, and polling interval.
|
|
82
|
+
*
|
|
83
|
+
* @param {string} params.clientId - OAuth2 client ID.
|
|
84
|
+
* @param {string} params.scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.
|
|
85
|
+
* @param {string} params.authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
|
|
86
|
+
* @param {string} params.resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
87
|
+
* @throws {AppwriteException}
|
|
88
|
+
* @returns {Promise<Models.Oauth2DeviceAuthorization>}
|
|
89
|
+
*/
|
|
90
|
+
createDeviceAuthorization(params?: {
|
|
91
|
+
clientId?: string;
|
|
92
|
+
scope?: string;
|
|
93
|
+
authorizationDetails?: string;
|
|
94
|
+
resource?: string;
|
|
95
|
+
}): Promise<Models.Oauth2DeviceAuthorization>;
|
|
96
|
+
/**
|
|
97
|
+
* Start the OAuth2 Device Authorization Grant. Returns the device code, user code, verification URL, expiration, and polling interval.
|
|
98
|
+
*
|
|
99
|
+
* @param {string} clientId - OAuth2 client ID.
|
|
100
|
+
* @param {string} scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.
|
|
101
|
+
* @param {string} authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
|
|
102
|
+
* @param {string} resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
103
|
+
* @throws {AppwriteException}
|
|
104
|
+
* @returns {Promise<Models.Oauth2DeviceAuthorization>}
|
|
105
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
106
|
+
*/
|
|
107
|
+
createDeviceAuthorization(clientId?: string, scope?: string, authorizationDetails?: string, resource?: string): Promise<Models.Oauth2DeviceAuthorization>;
|
|
108
|
+
/**
|
|
109
|
+
* 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.
|
|
110
|
+
*
|
|
111
|
+
* @param {string} params.userCode - User code displayed on the device.
|
|
112
|
+
* @throws {AppwriteException}
|
|
113
|
+
* @returns {Promise<Models.Oauth2Grant>}
|
|
114
|
+
*/
|
|
115
|
+
createGrant(params: {
|
|
116
|
+
userCode: string;
|
|
117
|
+
}): Promise<Models.Oauth2Grant>;
|
|
118
|
+
/**
|
|
119
|
+
* 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.
|
|
120
|
+
*
|
|
121
|
+
* @param {string} userCode - User code displayed on the device.
|
|
122
|
+
* @throws {AppwriteException}
|
|
123
|
+
* @returns {Promise<Models.Oauth2Grant>}
|
|
124
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
125
|
+
*/
|
|
126
|
+
createGrant(userCode: string): Promise<Models.Oauth2Grant>;
|
|
127
|
+
/**
|
|
128
|
+
* 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.
|
|
129
|
+
*
|
|
130
|
+
* @param {string} params.grantId - Grant ID made during authorization, provided to consent screen in URL search params.
|
|
131
|
+
* @throws {AppwriteException}
|
|
132
|
+
* @returns {Promise<Models.Oauth2Grant>}
|
|
133
|
+
*/
|
|
134
|
+
getGrant(params: {
|
|
135
|
+
grantId: string;
|
|
136
|
+
}): Promise<Models.Oauth2Grant>;
|
|
137
|
+
/**
|
|
138
|
+
* 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.
|
|
139
|
+
*
|
|
140
|
+
* @param {string} grantId - Grant ID made during authorization, provided to consent screen in URL search params.
|
|
141
|
+
* @throws {AppwriteException}
|
|
142
|
+
* @returns {Promise<Models.Oauth2Grant>}
|
|
143
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
144
|
+
*/
|
|
145
|
+
getGrant(grantId: string): Promise<Models.Oauth2Grant>;
|
|
146
|
+
/**
|
|
147
|
+
* 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.
|
|
148
|
+
*
|
|
149
|
+
* @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.
|
|
150
|
+
* @param {string} params.logoutHint - Hint about the user that is logging out. Accepted for OIDC compatibility.
|
|
151
|
+
* @param {string} params.clientId - OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app.
|
|
152
|
+
* @param {string} params.postLogoutRedirectUri - URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`.
|
|
153
|
+
* @param {string} params.state - Opaque value passed back unchanged in the `state` query param of the post-logout redirect.
|
|
154
|
+
* @param {string} params.uiLocales - Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility.
|
|
155
|
+
* @throws {AppwriteException}
|
|
156
|
+
* @returns {Promise<{}>}
|
|
157
|
+
*/
|
|
158
|
+
logout(params?: {
|
|
159
|
+
idTokenHint?: string;
|
|
160
|
+
logoutHint?: string;
|
|
161
|
+
clientId?: string;
|
|
162
|
+
postLogoutRedirectUri?: string;
|
|
163
|
+
state?: string;
|
|
164
|
+
uiLocales?: string;
|
|
165
|
+
}): Promise<{}>;
|
|
166
|
+
/**
|
|
167
|
+
* 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.
|
|
168
|
+
*
|
|
169
|
+
* @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.
|
|
170
|
+
* @param {string} logoutHint - Hint about the user that is logging out. Accepted for OIDC compatibility.
|
|
171
|
+
* @param {string} clientId - OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app.
|
|
172
|
+
* @param {string} postLogoutRedirectUri - URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`.
|
|
173
|
+
* @param {string} state - Opaque value passed back unchanged in the `state` query param of the post-logout redirect.
|
|
174
|
+
* @param {string} uiLocales - Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility.
|
|
175
|
+
* @throws {AppwriteException}
|
|
176
|
+
* @returns {Promise<{}>}
|
|
177
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
178
|
+
*/
|
|
179
|
+
logout(idTokenHint?: string, logoutHint?: string, clientId?: string, postLogoutRedirectUri?: string, state?: string, uiLocales?: string): Promise<{}>;
|
|
180
|
+
/**
|
|
181
|
+
* 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.
|
|
182
|
+
*
|
|
183
|
+
* @param {string} params.grantId - Grant ID made during authorization, provided to consent screen in URL search params.
|
|
184
|
+
* @throws {AppwriteException}
|
|
185
|
+
* @returns {Promise<Models.Oauth2Reject>}
|
|
186
|
+
*/
|
|
187
|
+
reject(params: {
|
|
188
|
+
grantId: string;
|
|
189
|
+
}): Promise<Models.Oauth2Reject>;
|
|
190
|
+
/**
|
|
191
|
+
* 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.
|
|
192
|
+
*
|
|
193
|
+
* @param {string} grantId - Grant ID made during authorization, provided to consent screen in URL search params.
|
|
194
|
+
* @throws {AppwriteException}
|
|
195
|
+
* @returns {Promise<Models.Oauth2Reject>}
|
|
196
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
197
|
+
*/
|
|
198
|
+
reject(grantId: string): Promise<Models.Oauth2Reject>;
|
|
199
|
+
/**
|
|
200
|
+
* Revoke an OAuth2 access token or refresh token.
|
|
201
|
+
*
|
|
202
|
+
* @param {string} params.token - The access or refresh token to revoke.
|
|
203
|
+
* @param {string} params.tokenTypeHint - Type of token to revoke (access_token or refresh_token).
|
|
204
|
+
* @param {string} params.clientId - OAuth2 client ID.
|
|
205
|
+
* @param {string} params.clientSecret - OAuth2 client secret. Required for confidential apps; omitted for public apps.
|
|
206
|
+
* @throws {AppwriteException}
|
|
207
|
+
* @returns {Promise<{}>}
|
|
208
|
+
*/
|
|
209
|
+
revoke(params: {
|
|
210
|
+
token: string;
|
|
211
|
+
tokenTypeHint?: string;
|
|
212
|
+
clientId?: string;
|
|
213
|
+
clientSecret?: string;
|
|
214
|
+
}): Promise<{}>;
|
|
215
|
+
/**
|
|
216
|
+
* Revoke an OAuth2 access token or refresh token.
|
|
217
|
+
*
|
|
218
|
+
* @param {string} token - The access or refresh token to revoke.
|
|
219
|
+
* @param {string} tokenTypeHint - Type of token to revoke (access_token or refresh_token).
|
|
220
|
+
* @param {string} clientId - OAuth2 client ID.
|
|
221
|
+
* @param {string} clientSecret - OAuth2 client secret. Required for confidential apps; omitted for public apps.
|
|
222
|
+
* @throws {AppwriteException}
|
|
223
|
+
* @returns {Promise<{}>}
|
|
224
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
225
|
+
*/
|
|
226
|
+
revoke(token: string, tokenTypeHint?: string, clientId?: string, clientSecret?: string): Promise<{}>;
|
|
227
|
+
/**
|
|
228
|
+
* Exchange an OAuth2 authorization code, refresh token, or device code for access and refresh tokens.
|
|
229
|
+
*
|
|
230
|
+
* @param {string} params.grantType - OAuth2 grant type. Can be one of: `authorization_code`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`.
|
|
231
|
+
* @param {string} params.code - Authorization code to be exchanged for access and refresh tokens. Required for `authorization_code` grant type.
|
|
232
|
+
* @param {string} params.refreshToken - Refresh token to be exchanged for a new access and refresh tokens. Required for `refresh_token` grant type.
|
|
233
|
+
* @param {string} params.deviceCode - Device code obtained from the device authorization endpoint. Required for `urn:ietf:params:oauth:grant-type:device_code` grant type.
|
|
234
|
+
* @param {string} params.clientId - OAuth2 client ID.
|
|
235
|
+
* @param {string} params.clientSecret - OAuth2 client secret. Required for confidential apps.
|
|
236
|
+
* @param {string} params.codeVerifier - PKCE code verifier. Required for public apps.
|
|
237
|
+
* @param {string} params.redirectUri - Redirect URI. Required for `authorization_code` grant type.
|
|
238
|
+
* @param {string} params.resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
239
|
+
* @throws {AppwriteException}
|
|
240
|
+
* @returns {Promise<Models.Oauth2Token>}
|
|
241
|
+
*/
|
|
242
|
+
createToken(params: {
|
|
243
|
+
grantType: string;
|
|
244
|
+
code?: string;
|
|
245
|
+
refreshToken?: string;
|
|
246
|
+
deviceCode?: string;
|
|
247
|
+
clientId?: string;
|
|
248
|
+
clientSecret?: string;
|
|
249
|
+
codeVerifier?: string;
|
|
250
|
+
redirectUri?: string;
|
|
251
|
+
resource?: string;
|
|
252
|
+
}): Promise<Models.Oauth2Token>;
|
|
253
|
+
/**
|
|
254
|
+
* Exchange an OAuth2 authorization code, refresh token, or device code for access and refresh tokens.
|
|
255
|
+
*
|
|
256
|
+
* @param {string} grantType - OAuth2 grant type. Can be one of: `authorization_code`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`.
|
|
257
|
+
* @param {string} code - Authorization code to be exchanged for access and refresh tokens. Required for `authorization_code` grant type.
|
|
258
|
+
* @param {string} refreshToken - Refresh token to be exchanged for a new access and refresh tokens. Required for `refresh_token` grant type.
|
|
259
|
+
* @param {string} deviceCode - Device code obtained from the device authorization endpoint. Required for `urn:ietf:params:oauth:grant-type:device_code` grant type.
|
|
260
|
+
* @param {string} clientId - OAuth2 client ID.
|
|
261
|
+
* @param {string} clientSecret - OAuth2 client secret. Required for confidential apps.
|
|
262
|
+
* @param {string} codeVerifier - PKCE code verifier. Required for public apps.
|
|
263
|
+
* @param {string} redirectUri - Redirect URI. Required for `authorization_code` grant type.
|
|
264
|
+
* @param {string} resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
265
|
+
* @throws {AppwriteException}
|
|
266
|
+
* @returns {Promise<Models.Oauth2Token>}
|
|
267
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
268
|
+
*/
|
|
269
|
+
createToken(grantType: string, code?: string, refreshToken?: string, deviceCode?: string, clientId?: string, clientSecret?: string, codeVerifier?: string, redirectUri?: string, resource?: string): Promise<Models.Oauth2Token>;
|
|
270
|
+
}
|