@appwrite.io/console 15.3.0 → 15.5.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 +3 -3
- package/dist/cjs/sdk.js +2568 -1656
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +2568 -1656
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +2568 -1656
- package/package.json +1 -1
- package/types/enums/database-status.d.ts +12 -1
- package/types/enums/database-type.d.ts +4 -1
- package/types/enums/o-auth-provider.d.ts +1 -0
- package/types/enums/organization-key-scopes.d.ts +2 -0
- package/types/enums/project-key-scopes.d.ts +5 -2
- package/types/enums/project-o-auth-provider-id.d.ts +1 -0
- package/types/enums/query-suggestion-resource.d.ts +8 -2
- package/types/enums/waf-rule-action.d.ts +7 -0
- package/types/index.d.ts +3 -5
- package/types/models.d.ts +3334 -3354
- package/types/services/account.d.ts +133 -4
- package/types/services/apps.d.ts +141 -11
- package/types/services/backups.d.ts +17 -8
- package/types/services/databases.d.ts +0 -70
- package/types/services/documents-db.d.ts +75 -2
- package/types/services/functions.d.ts +4 -43
- package/types/services/locale.d.ts +2 -2
- package/types/services/migrations.d.ts +30 -18
- package/types/services/mongo.d.ts +13 -4
- package/types/services/mysql.d.ts +13 -4
- package/types/services/oauth-2.d.ts +119 -15
- package/types/services/organization.d.ts +104 -0
- package/types/services/postgresql.d.ts +13 -4
- package/types/services/project.d.ts +32 -1
- package/types/services/projects.d.ts +0 -25
- package/types/services/sites.d.ts +4 -43
- package/types/services/storage.d.ts +0 -46
- package/types/services/tables-db.d.ts +75 -69
- package/types/services/teams.d.ts +119 -0
- package/types/services/usage.d.ts +10 -10
- package/types/services/vectors-db.d.ts +111 -2
- package/types/services/waf.d.ts +435 -0
- package/types/enums/health-antivirus-status.d.ts +0 -5
- package/types/enums/health-check-status.d.ts +0 -4
- package/types/enums/health-queue-name.d.ts +0 -16
- package/types/services/health.d.ts +0 -483
|
@@ -31,7 +31,7 @@ export declare class Oauth2 {
|
|
|
31
31
|
/**
|
|
32
32
|
* 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.
|
|
33
33
|
*
|
|
34
|
-
* @param {string} params.clientId - OAuth2 client ID.
|
|
34
|
+
* @param {string} params.clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.
|
|
35
35
|
* @param {string} params.redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not.
|
|
36
36
|
* @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).
|
|
37
37
|
* @param {string} params.scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.
|
|
@@ -43,6 +43,7 @@ export declare class Oauth2 {
|
|
|
43
43
|
* @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.
|
|
44
44
|
* @param {string} params.authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
|
|
45
45
|
* @param {string} params.resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
46
|
+
* @param {string} params.audience - Compatibility alias for a single OAuth2 resource indicator URI.
|
|
46
47
|
* @param {string} params.requestUri - OAuth2 authorization request handle returned by the pushed authorization request endpoint.
|
|
47
48
|
* @throws {AppwriteException}
|
|
48
49
|
* @returns {Promise<Models.Oauth2Authorize>}
|
|
@@ -60,12 +61,13 @@ export declare class Oauth2 {
|
|
|
60
61
|
maxAge?: number;
|
|
61
62
|
authorizationDetails?: string;
|
|
62
63
|
resource?: string;
|
|
64
|
+
audience?: string;
|
|
63
65
|
requestUri?: string;
|
|
64
66
|
}): Promise<Models.Oauth2Authorize>;
|
|
65
67
|
/**
|
|
66
68
|
* 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.
|
|
67
69
|
*
|
|
68
|
-
* @param {string} clientId - OAuth2 client ID.
|
|
70
|
+
* @param {string} clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.
|
|
69
71
|
* @param {string} redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not.
|
|
70
72
|
* @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).
|
|
71
73
|
* @param {string} scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.
|
|
@@ -77,19 +79,79 @@ export declare class Oauth2 {
|
|
|
77
79
|
* @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.
|
|
78
80
|
* @param {string} authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
|
|
79
81
|
* @param {string} resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
82
|
+
* @param {string} audience - Compatibility alias for a single OAuth2 resource indicator URI.
|
|
80
83
|
* @param {string} requestUri - OAuth2 authorization request handle returned by the pushed authorization request endpoint.
|
|
81
84
|
* @throws {AppwriteException}
|
|
82
85
|
* @returns {Promise<Models.Oauth2Authorize>}
|
|
83
86
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
84
87
|
*/
|
|
85
|
-
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, requestUri?: string): Promise<Models.Oauth2Authorize>;
|
|
88
|
+
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, audience?: string, requestUri?: string): Promise<Models.Oauth2Authorize>;
|
|
89
|
+
/**
|
|
90
|
+
* 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.
|
|
91
|
+
*
|
|
92
|
+
* @param {string} params.clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.
|
|
93
|
+
* @param {string} params.redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not.
|
|
94
|
+
* @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).
|
|
95
|
+
* @param {string} params.scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.
|
|
96
|
+
* @param {string} params.state - OAuth2 state. You receive this back in the redirect URI.
|
|
97
|
+
* @param {string} params.nonce - OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.
|
|
98
|
+
* @param {string} params.codeChallenge - PKCE code challenge. Required when OAuth2 app is public.
|
|
99
|
+
* @param {string} params.codeChallengeMethod - PKCE code challenge method. Required when OAuth2 app is public.
|
|
100
|
+
* @param {string} params.prompt - OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.
|
|
101
|
+
* @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.
|
|
102
|
+
* @param {string} params.authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
|
|
103
|
+
* @param {string} params.resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
104
|
+
* @param {string} params.audience - Compatibility alias for a single OAuth2 resource indicator URI.
|
|
105
|
+
* @param {string} params.requestUri - OAuth2 authorization request handle returned by the pushed authorization request endpoint.
|
|
106
|
+
* @throws {AppwriteException}
|
|
107
|
+
* @returns {Promise<Models.Oauth2Authorize>}
|
|
108
|
+
*/
|
|
109
|
+
authorizePost(params?: {
|
|
110
|
+
clientId?: string;
|
|
111
|
+
redirectUri?: string;
|
|
112
|
+
responseType?: string;
|
|
113
|
+
scope?: string;
|
|
114
|
+
state?: string;
|
|
115
|
+
nonce?: string;
|
|
116
|
+
codeChallenge?: string;
|
|
117
|
+
codeChallengeMethod?: string;
|
|
118
|
+
prompt?: string;
|
|
119
|
+
maxAge?: number;
|
|
120
|
+
authorizationDetails?: string;
|
|
121
|
+
resource?: string;
|
|
122
|
+
audience?: string;
|
|
123
|
+
requestUri?: string;
|
|
124
|
+
}): Promise<Models.Oauth2Authorize>;
|
|
125
|
+
/**
|
|
126
|
+
* 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.
|
|
127
|
+
*
|
|
128
|
+
* @param {string} clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.
|
|
129
|
+
* @param {string} redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not.
|
|
130
|
+
* @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).
|
|
131
|
+
* @param {string} scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.
|
|
132
|
+
* @param {string} state - OAuth2 state. You receive this back in the redirect URI.
|
|
133
|
+
* @param {string} nonce - OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.
|
|
134
|
+
* @param {string} codeChallenge - PKCE code challenge. Required when OAuth2 app is public.
|
|
135
|
+
* @param {string} codeChallengeMethod - PKCE code challenge method. Required when OAuth2 app is public.
|
|
136
|
+
* @param {string} prompt - OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.
|
|
137
|
+
* @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.
|
|
138
|
+
* @param {string} authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
|
|
139
|
+
* @param {string} resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
140
|
+
* @param {string} audience - Compatibility alias for a single OAuth2 resource indicator URI.
|
|
141
|
+
* @param {string} requestUri - OAuth2 authorization request handle returned by the pushed authorization request endpoint.
|
|
142
|
+
* @throws {AppwriteException}
|
|
143
|
+
* @returns {Promise<Models.Oauth2Authorize>}
|
|
144
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
145
|
+
*/
|
|
146
|
+
authorizePost(clientId?: string, redirectUri?: string, responseType?: string, scope?: string, state?: string, nonce?: string, codeChallenge?: string, codeChallengeMethod?: string, prompt?: string, maxAge?: number, authorizationDetails?: string, resource?: string, audience?: string, requestUri?: string): Promise<Models.Oauth2Authorize>;
|
|
86
147
|
/**
|
|
87
148
|
* Start the OAuth2 Device Authorization Grant. Returns the device code, user code, verification URL, expiration, and polling interval.
|
|
88
149
|
*
|
|
89
|
-
* @param {string} params.clientId - OAuth2 client ID.
|
|
150
|
+
* @param {string} params.clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.
|
|
90
151
|
* @param {string} params.scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.
|
|
91
152
|
* @param {string} params.authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
|
|
92
153
|
* @param {string} params.resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
154
|
+
* @param {string} params.audience - Compatibility alias for a single OAuth2 resource indicator URI.
|
|
93
155
|
* @throws {AppwriteException}
|
|
94
156
|
* @returns {Promise<Models.Oauth2DeviceAuthorization>}
|
|
95
157
|
*/
|
|
@@ -98,19 +160,21 @@ export declare class Oauth2 {
|
|
|
98
160
|
scope?: string;
|
|
99
161
|
authorizationDetails?: string;
|
|
100
162
|
resource?: string;
|
|
163
|
+
audience?: string;
|
|
101
164
|
}): Promise<Models.Oauth2DeviceAuthorization>;
|
|
102
165
|
/**
|
|
103
166
|
* Start the OAuth2 Device Authorization Grant. Returns the device code, user code, verification URL, expiration, and polling interval.
|
|
104
167
|
*
|
|
105
|
-
* @param {string} clientId - OAuth2 client ID.
|
|
168
|
+
* @param {string} clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.
|
|
106
169
|
* @param {string} scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.
|
|
107
170
|
* @param {string} authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
|
|
108
171
|
* @param {string} resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
172
|
+
* @param {string} audience - Compatibility alias for a single OAuth2 resource indicator URI.
|
|
109
173
|
* @throws {AppwriteException}
|
|
110
174
|
* @returns {Promise<Models.Oauth2DeviceAuthorization>}
|
|
111
175
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
112
176
|
*/
|
|
113
|
-
createDeviceAuthorization(clientId?: string, scope?: string, authorizationDetails?: string, resource?: string): Promise<Models.Oauth2DeviceAuthorization>;
|
|
177
|
+
createDeviceAuthorization(clientId?: string, scope?: string, authorizationDetails?: string, resource?: string, audience?: string): Promise<Models.Oauth2DeviceAuthorization>;
|
|
114
178
|
/**
|
|
115
179
|
* 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.
|
|
116
180
|
*
|
|
@@ -183,6 +247,40 @@ export declare class Oauth2 {
|
|
|
183
247
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
184
248
|
*/
|
|
185
249
|
logout(idTokenHint?: string, logoutHint?: string, clientId?: string, postLogoutRedirectUri?: string, state?: string, uiLocales?: string): Promise<{}>;
|
|
250
|
+
/**
|
|
251
|
+
* 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.
|
|
252
|
+
*
|
|
253
|
+
* @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.
|
|
254
|
+
* @param {string} params.logoutHint - Hint about the user that is logging out. Accepted for OIDC compatibility.
|
|
255
|
+
* @param {string} params.clientId - OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app.
|
|
256
|
+
* @param {string} params.postLogoutRedirectUri - URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`.
|
|
257
|
+
* @param {string} params.state - Opaque value passed back unchanged in the `state` query param of the post-logout redirect.
|
|
258
|
+
* @param {string} params.uiLocales - Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility.
|
|
259
|
+
* @throws {AppwriteException}
|
|
260
|
+
* @returns {Promise<{}>}
|
|
261
|
+
*/
|
|
262
|
+
logoutPost(params?: {
|
|
263
|
+
idTokenHint?: string;
|
|
264
|
+
logoutHint?: string;
|
|
265
|
+
clientId?: string;
|
|
266
|
+
postLogoutRedirectUri?: string;
|
|
267
|
+
state?: string;
|
|
268
|
+
uiLocales?: string;
|
|
269
|
+
}): Promise<{}>;
|
|
270
|
+
/**
|
|
271
|
+
* 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.
|
|
272
|
+
*
|
|
273
|
+
* @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.
|
|
274
|
+
* @param {string} logoutHint - Hint about the user that is logging out. Accepted for OIDC compatibility.
|
|
275
|
+
* @param {string} clientId - OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app.
|
|
276
|
+
* @param {string} postLogoutRedirectUri - URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`.
|
|
277
|
+
* @param {string} state - Opaque value passed back unchanged in the `state` query param of the post-logout redirect.
|
|
278
|
+
* @param {string} uiLocales - Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility.
|
|
279
|
+
* @throws {AppwriteException}
|
|
280
|
+
* @returns {Promise<{}>}
|
|
281
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
282
|
+
*/
|
|
283
|
+
logoutPost(idTokenHint?: string, logoutHint?: string, clientId?: string, postLogoutRedirectUri?: string, state?: string, uiLocales?: string): Promise<{}>;
|
|
186
284
|
/**
|
|
187
285
|
* List the organizations the OAuth2 access token can access. Resolves the token's `organization` authorization details, expanding the `*` wildcard into the concrete set of organizations the user can see.
|
|
188
286
|
*
|
|
@@ -211,7 +309,7 @@ export declare class Oauth2 {
|
|
|
211
309
|
/**
|
|
212
310
|
* Store an OAuth2 authorization request server-side and receive a short-lived request_uri handle for the authorize endpoint.
|
|
213
311
|
*
|
|
214
|
-
* @param {string} params.clientId - OAuth2 client ID.
|
|
312
|
+
* @param {string} params.clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.
|
|
215
313
|
* @param {string} params.redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not.
|
|
216
314
|
* @param {string} params.responseType - OAuth2 / OIDC response type.
|
|
217
315
|
* @param {string} params.scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.
|
|
@@ -223,6 +321,7 @@ export declare class Oauth2 {
|
|
|
223
321
|
* @param {number} params.maxAge - OIDC max_age parameter for customization of consent screen.
|
|
224
322
|
* @param {string} params.authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
|
|
225
323
|
* @param {string} params.resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
324
|
+
* @param {string} params.audience - Compatibility alias for a single OAuth2 resource indicator URI.
|
|
226
325
|
* @throws {AppwriteException}
|
|
227
326
|
* @returns {Promise<Models.Oauth2PAR>}
|
|
228
327
|
*/
|
|
@@ -230,7 +329,7 @@ export declare class Oauth2 {
|
|
|
230
329
|
clientId: string;
|
|
231
330
|
redirectUri: string;
|
|
232
331
|
responseType: string;
|
|
233
|
-
scope
|
|
332
|
+
scope?: string;
|
|
234
333
|
state?: string;
|
|
235
334
|
nonce?: string;
|
|
236
335
|
codeChallenge?: string;
|
|
@@ -239,11 +338,12 @@ export declare class Oauth2 {
|
|
|
239
338
|
maxAge?: number;
|
|
240
339
|
authorizationDetails?: string;
|
|
241
340
|
resource?: string;
|
|
341
|
+
audience?: string;
|
|
242
342
|
}): Promise<Models.Oauth2PAR>;
|
|
243
343
|
/**
|
|
244
344
|
* Store an OAuth2 authorization request server-side and receive a short-lived request_uri handle for the authorize endpoint.
|
|
245
345
|
*
|
|
246
|
-
* @param {string} clientId - OAuth2 client ID.
|
|
346
|
+
* @param {string} clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.
|
|
247
347
|
* @param {string} redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not.
|
|
248
348
|
* @param {string} responseType - OAuth2 / OIDC response type.
|
|
249
349
|
* @param {string} scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.
|
|
@@ -255,11 +355,12 @@ export declare class Oauth2 {
|
|
|
255
355
|
* @param {number} maxAge - OIDC max_age parameter for customization of consent screen.
|
|
256
356
|
* @param {string} authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
|
|
257
357
|
* @param {string} resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
358
|
+
* @param {string} audience - Compatibility alias for a single OAuth2 resource indicator URI.
|
|
258
359
|
* @throws {AppwriteException}
|
|
259
360
|
* @returns {Promise<Models.Oauth2PAR>}
|
|
260
361
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
261
362
|
*/
|
|
262
|
-
createPAR(clientId: string, redirectUri: string, responseType: string, scope
|
|
363
|
+
createPAR(clientId: string, redirectUri: string, responseType: string, scope?: string, state?: string, nonce?: string, codeChallenge?: string, codeChallengeMethod?: string, prompt?: string, maxAge?: number, authorizationDetails?: string, resource?: string, audience?: string): Promise<Models.Oauth2PAR>;
|
|
263
364
|
/**
|
|
264
365
|
* List the projects the OAuth2 access token can access. Resolves the token's `project` authorization details, expanding the `*` wildcard into the concrete set of projects the user can see.
|
|
265
366
|
*
|
|
@@ -309,7 +410,7 @@ export declare class Oauth2 {
|
|
|
309
410
|
*
|
|
310
411
|
* @param {string} params.token - The access or refresh token to revoke.
|
|
311
412
|
* @param {string} params.tokenTypeHint - Type of token to revoke (access_token or refresh_token).
|
|
312
|
-
* @param {string} params.clientId - OAuth2 client ID.
|
|
413
|
+
* @param {string} params.clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.
|
|
313
414
|
* @param {string} params.clientSecret - OAuth2 client secret. Required for confidential apps; omitted for public apps.
|
|
314
415
|
* @throws {AppwriteException}
|
|
315
416
|
* @returns {Promise<{}>}
|
|
@@ -325,7 +426,7 @@ export declare class Oauth2 {
|
|
|
325
426
|
*
|
|
326
427
|
* @param {string} token - The access or refresh token to revoke.
|
|
327
428
|
* @param {string} tokenTypeHint - Type of token to revoke (access_token or refresh_token).
|
|
328
|
-
* @param {string} clientId - OAuth2 client ID.
|
|
429
|
+
* @param {string} clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.
|
|
329
430
|
* @param {string} clientSecret - OAuth2 client secret. Required for confidential apps; omitted for public apps.
|
|
330
431
|
* @throws {AppwriteException}
|
|
331
432
|
* @returns {Promise<{}>}
|
|
@@ -339,11 +440,12 @@ export declare class Oauth2 {
|
|
|
339
440
|
* @param {string} params.code - Authorization code to be exchanged for access and refresh tokens. Required for `authorization_code` grant type.
|
|
340
441
|
* @param {string} params.refreshToken - Refresh token to be exchanged for a new access and refresh tokens. Required for `refresh_token` grant type.
|
|
341
442
|
* @param {string} params.deviceCode - Device code obtained from the device authorization endpoint. Required for `urn:ietf:params:oauth:grant-type:device_code` grant type.
|
|
342
|
-
* @param {string} params.clientId - OAuth2 client ID.
|
|
443
|
+
* @param {string} params.clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.
|
|
343
444
|
* @param {string} params.clientSecret - OAuth2 client secret. Required for confidential apps.
|
|
344
445
|
* @param {string} params.codeVerifier - PKCE code verifier. Required for public apps.
|
|
345
446
|
* @param {string} params.redirectUri - Redirect URI. Required for `authorization_code` grant type.
|
|
346
447
|
* @param {string} params.resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
448
|
+
* @param {string} params.audience - Compatibility alias for a single OAuth2 resource indicator URI.
|
|
347
449
|
* @throws {AppwriteException}
|
|
348
450
|
* @returns {Promise<Models.Oauth2Token>}
|
|
349
451
|
*/
|
|
@@ -357,6 +459,7 @@ export declare class Oauth2 {
|
|
|
357
459
|
codeVerifier?: string;
|
|
358
460
|
redirectUri?: string;
|
|
359
461
|
resource?: string;
|
|
462
|
+
audience?: string;
|
|
360
463
|
}): Promise<Models.Oauth2Token>;
|
|
361
464
|
/**
|
|
362
465
|
* Exchange an OAuth2 authorization code, refresh token, or device code for access and refresh tokens.
|
|
@@ -365,14 +468,15 @@ export declare class Oauth2 {
|
|
|
365
468
|
* @param {string} code - Authorization code to be exchanged for access and refresh tokens. Required for `authorization_code` grant type.
|
|
366
469
|
* @param {string} refreshToken - Refresh token to be exchanged for a new access and refresh tokens. Required for `refresh_token` grant type.
|
|
367
470
|
* @param {string} deviceCode - Device code obtained from the device authorization endpoint. Required for `urn:ietf:params:oauth:grant-type:device_code` grant type.
|
|
368
|
-
* @param {string} clientId - OAuth2 client ID.
|
|
471
|
+
* @param {string} clientId - OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.
|
|
369
472
|
* @param {string} clientSecret - OAuth2 client secret. Required for confidential apps.
|
|
370
473
|
* @param {string} codeVerifier - PKCE code verifier. Required for public apps.
|
|
371
474
|
* @param {string} redirectUri - Redirect URI. Required for `authorization_code` grant type.
|
|
372
475
|
* @param {string} resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
476
|
+
* @param {string} audience - Compatibility alias for a single OAuth2 resource indicator URI.
|
|
373
477
|
* @throws {AppwriteException}
|
|
374
478
|
* @returns {Promise<Models.Oauth2Token>}
|
|
375
479
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
376
480
|
*/
|
|
377
|
-
createToken(grantType: string, code?: string, refreshToken?: string, deviceCode?: string, clientId?: string, clientSecret?: string, codeVerifier?: string, redirectUri?: string, resource?: string): Promise<Models.Oauth2Token>;
|
|
481
|
+
createToken(grantType: string, code?: string, refreshToken?: string, deviceCode?: string, clientId?: string, clientSecret?: string, codeVerifier?: string, redirectUri?: string, resource?: string, audience?: string): Promise<Models.Oauth2Token>;
|
|
378
482
|
}
|
|
@@ -38,6 +38,110 @@ export declare class Organization {
|
|
|
38
38
|
* @returns {Promise<{}>}
|
|
39
39
|
*/
|
|
40
40
|
delete(): Promise<{}>;
|
|
41
|
+
/**
|
|
42
|
+
* List app installations on the organization. Any organization member can read installations.
|
|
43
|
+
*
|
|
44
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
45
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
46
|
+
* @throws {AppwriteException}
|
|
47
|
+
* @returns {Promise<Models.AppInstallationList>}
|
|
48
|
+
*/
|
|
49
|
+
listInstallations(params?: {
|
|
50
|
+
queries?: string[];
|
|
51
|
+
total?: boolean;
|
|
52
|
+
}): Promise<Models.AppInstallationList>;
|
|
53
|
+
/**
|
|
54
|
+
* List app installations on the organization. Any organization member can read installations.
|
|
55
|
+
*
|
|
56
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
57
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
58
|
+
* @throws {AppwriteException}
|
|
59
|
+
* @returns {Promise<Models.AppInstallationList>}
|
|
60
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
61
|
+
*/
|
|
62
|
+
listInstallations(queries?: string[], total?: boolean): Promise<Models.AppInstallationList>;
|
|
63
|
+
/**
|
|
64
|
+
* Install an app on the organization. Only organization members with the owner role can install apps. The installation is granted the scopes the app currently requests.
|
|
65
|
+
*
|
|
66
|
+
* @param {string} params.appId - Application unique ID.
|
|
67
|
+
* @param {string} params.authorizationDetails - Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.
|
|
68
|
+
* @throws {AppwriteException}
|
|
69
|
+
* @returns {Promise<Models.AppInstallation>}
|
|
70
|
+
*/
|
|
71
|
+
createInstallation(params: {
|
|
72
|
+
appId: string;
|
|
73
|
+
authorizationDetails?: string;
|
|
74
|
+
}): Promise<Models.AppInstallation>;
|
|
75
|
+
/**
|
|
76
|
+
* Install an app on the organization. Only organization members with the owner role can install apps. The installation is granted the scopes the app currently requests.
|
|
77
|
+
*
|
|
78
|
+
* @param {string} appId - Application unique ID.
|
|
79
|
+
* @param {string} authorizationDetails - Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.
|
|
80
|
+
* @throws {AppwriteException}
|
|
81
|
+
* @returns {Promise<Models.AppInstallation>}
|
|
82
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
83
|
+
*/
|
|
84
|
+
createInstallation(appId: string, authorizationDetails?: string): Promise<Models.AppInstallation>;
|
|
85
|
+
/**
|
|
86
|
+
* Get an app installation on the organization by its unique ID. Any organization member can read installations.
|
|
87
|
+
*
|
|
88
|
+
* @param {string} params.installationId - Installation unique ID.
|
|
89
|
+
* @throws {AppwriteException}
|
|
90
|
+
* @returns {Promise<Models.AppInstallation>}
|
|
91
|
+
*/
|
|
92
|
+
getInstallation(params: {
|
|
93
|
+
installationId: string;
|
|
94
|
+
}): Promise<Models.AppInstallation>;
|
|
95
|
+
/**
|
|
96
|
+
* Get an app installation on the organization by its unique ID. Any organization member can read installations.
|
|
97
|
+
*
|
|
98
|
+
* @param {string} installationId - Installation unique ID.
|
|
99
|
+
* @throws {AppwriteException}
|
|
100
|
+
* @returns {Promise<Models.AppInstallation>}
|
|
101
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
102
|
+
*/
|
|
103
|
+
getInstallation(installationId: string): Promise<Models.AppInstallation>;
|
|
104
|
+
/**
|
|
105
|
+
* Update an app installation on the organization. Only organization members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.
|
|
106
|
+
*
|
|
107
|
+
* @param {string} params.installationId - Installation unique ID.
|
|
108
|
+
* @param {string} params.authorizationDetails - Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.
|
|
109
|
+
* @throws {AppwriteException}
|
|
110
|
+
* @returns {Promise<Models.AppInstallation>}
|
|
111
|
+
*/
|
|
112
|
+
updateInstallation(params: {
|
|
113
|
+
installationId: string;
|
|
114
|
+
authorizationDetails?: string;
|
|
115
|
+
}): Promise<Models.AppInstallation>;
|
|
116
|
+
/**
|
|
117
|
+
* Update an app installation on the organization. Only organization members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.
|
|
118
|
+
*
|
|
119
|
+
* @param {string} installationId - Installation unique ID.
|
|
120
|
+
* @param {string} authorizationDetails - Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.
|
|
121
|
+
* @throws {AppwriteException}
|
|
122
|
+
* @returns {Promise<Models.AppInstallation>}
|
|
123
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
124
|
+
*/
|
|
125
|
+
updateInstallation(installationId: string, authorizationDetails?: string): Promise<Models.AppInstallation>;
|
|
126
|
+
/**
|
|
127
|
+
* Uninstall an app from the organization by its installation ID. Only organization members with the owner role can remove installations. Previously issued installation access tokens are revoked.
|
|
128
|
+
*
|
|
129
|
+
* @param {string} params.installationId - Installation unique ID.
|
|
130
|
+
* @throws {AppwriteException}
|
|
131
|
+
* @returns {Promise<{}>}
|
|
132
|
+
*/
|
|
133
|
+
deleteInstallation(params: {
|
|
134
|
+
installationId: string;
|
|
135
|
+
}): Promise<{}>;
|
|
136
|
+
/**
|
|
137
|
+
* Uninstall an app from the organization by its installation ID. Only organization members with the owner role can remove installations. Previously issued installation access tokens are revoked.
|
|
138
|
+
*
|
|
139
|
+
* @param {string} installationId - Installation unique ID.
|
|
140
|
+
* @throws {AppwriteException}
|
|
141
|
+
* @returns {Promise<{}>}
|
|
142
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
143
|
+
*/
|
|
144
|
+
deleteInstallation(installationId: string): Promise<{}>;
|
|
41
145
|
/**
|
|
42
146
|
* Get a list of all API keys from the current organization.
|
|
43
147
|
*
|
|
@@ -31,6 +31,7 @@ export declare class Postgresql {
|
|
|
31
31
|
* @param {string} params.specification - Specification identifier. Drives the allocated CPU, memory, storage, storage class, and connection ceiling.
|
|
32
32
|
* @param {number} params.replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
|
|
33
33
|
* @param {string} params.syncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
|
|
34
|
+
* @param {string} params.standbyRegion - Standby region for a cross-region replica. When set, a replica is provisioned in this region for cross-region high availability. Must differ from the database region.
|
|
34
35
|
* @param {number} params.networkIdleTimeoutSeconds - Connection idle timeout in seconds.
|
|
35
36
|
* @param {string[]} params.networkIPAllowlist - IP addresses/CIDR ranges allowed to connect.
|
|
36
37
|
* @param {number} params.idleTimeoutMinutes - Minutes of inactivity before container scales to zero.
|
|
@@ -39,7 +40,7 @@ export declare class Postgresql {
|
|
|
39
40
|
* @param {boolean} params.storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
|
|
40
41
|
* @param {number} params.storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
|
|
41
42
|
* @param {number} params.storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
|
|
42
|
-
* @param {string} params.api - Product API that owns this database:
|
|
43
|
+
* @param {string} params.api - Product API that owns this database: tablesdb, documentsdb, or vectorsdb. Omit for a raw database reached directly; its api is its engine. tablesdb/documentsdb/vectorsdb databases are reached only through their product APIs.
|
|
43
44
|
* @throws {AppwriteException}
|
|
44
45
|
* @returns {Promise<Models.DedicatedDatabase>}
|
|
45
46
|
*/
|
|
@@ -50,6 +51,7 @@ export declare class Postgresql {
|
|
|
50
51
|
specification?: string;
|
|
51
52
|
replicas?: number;
|
|
52
53
|
syncMode?: string;
|
|
54
|
+
standbyRegion?: string;
|
|
53
55
|
networkIdleTimeoutSeconds?: number;
|
|
54
56
|
networkIPAllowlist?: string[];
|
|
55
57
|
idleTimeoutMinutes?: number;
|
|
@@ -69,6 +71,7 @@ export declare class Postgresql {
|
|
|
69
71
|
* @param {string} specification - Specification identifier. Drives the allocated CPU, memory, storage, storage class, and connection ceiling.
|
|
70
72
|
* @param {number} replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
|
|
71
73
|
* @param {string} syncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
|
|
74
|
+
* @param {string} standbyRegion - Standby region for a cross-region replica. When set, a replica is provisioned in this region for cross-region high availability. Must differ from the database region.
|
|
72
75
|
* @param {number} networkIdleTimeoutSeconds - Connection idle timeout in seconds.
|
|
73
76
|
* @param {string[]} networkIPAllowlist - IP addresses/CIDR ranges allowed to connect.
|
|
74
77
|
* @param {number} idleTimeoutMinutes - Minutes of inactivity before container scales to zero.
|
|
@@ -77,12 +80,12 @@ export declare class Postgresql {
|
|
|
77
80
|
* @param {boolean} storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
|
|
78
81
|
* @param {number} storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
|
|
79
82
|
* @param {number} storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
|
|
80
|
-
* @param {string} api - Product API that owns this database:
|
|
83
|
+
* @param {string} api - Product API that owns this database: tablesdb, documentsdb, or vectorsdb. Omit for a raw database reached directly; its api is its engine. tablesdb/documentsdb/vectorsdb databases are reached only through their product APIs.
|
|
81
84
|
* @throws {AppwriteException}
|
|
82
85
|
* @returns {Promise<Models.DedicatedDatabase>}
|
|
83
86
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
84
87
|
*/
|
|
85
|
-
create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number, api?: string): Promise<Models.DedicatedDatabase>;
|
|
88
|
+
create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number, api?: string): Promise<Models.DedicatedDatabase>;
|
|
86
89
|
/**
|
|
87
90
|
* List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.
|
|
88
91
|
*
|
|
@@ -118,6 +121,8 @@ export declare class Postgresql {
|
|
|
118
121
|
* @param {string} params.specification - Specification. Changes cpu, memory, storage, connection ceiling, and node pool based on specification config. Resource changes are applied via rolling cutover with zero downtime.
|
|
119
122
|
* @param {number} params.replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
|
|
120
123
|
* @param {string} params.syncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
|
|
124
|
+
* @param {number} params.crossRegionReplicas - Number of cross-region standby replicas (0-1). Cross-region replication is enabled when greater than 0.
|
|
125
|
+
* @param {string} params.standbyRegion - Standby region for the cross-region replica. Required when enabling cross-region replication and no standby region is already configured. Must differ from the database region.
|
|
121
126
|
* @param {number} params.networkIdleTimeoutSeconds - Connection idle timeout in seconds (60-86400).
|
|
122
127
|
* @param {string[]} params.networkIPAllowlist - IP addresses/CIDR ranges allowed to connect.
|
|
123
128
|
* @param {number} params.idleTimeoutMinutes - Minutes before container scales to zero.
|
|
@@ -143,6 +148,8 @@ export declare class Postgresql {
|
|
|
143
148
|
specification?: string;
|
|
144
149
|
replicas?: number;
|
|
145
150
|
syncMode?: string;
|
|
151
|
+
crossRegionReplicas?: number;
|
|
152
|
+
standbyRegion?: string;
|
|
146
153
|
networkIdleTimeoutSeconds?: number;
|
|
147
154
|
networkIPAllowlist?: string[];
|
|
148
155
|
idleTimeoutMinutes?: number;
|
|
@@ -168,6 +175,8 @@ export declare class Postgresql {
|
|
|
168
175
|
* @param {string} specification - Specification. Changes cpu, memory, storage, connection ceiling, and node pool based on specification config. Resource changes are applied via rolling cutover with zero downtime.
|
|
169
176
|
* @param {number} replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
|
|
170
177
|
* @param {string} syncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
|
|
178
|
+
* @param {number} crossRegionReplicas - Number of cross-region standby replicas (0-1). Cross-region replication is enabled when greater than 0.
|
|
179
|
+
* @param {string} standbyRegion - Standby region for the cross-region replica. Required when enabling cross-region replication and no standby region is already configured. Must differ from the database region.
|
|
171
180
|
* @param {number} networkIdleTimeoutSeconds - Connection idle timeout in seconds (60-86400).
|
|
172
181
|
* @param {string[]} networkIPAllowlist - IP addresses/CIDR ranges allowed to connect.
|
|
173
182
|
* @param {number} idleTimeoutMinutes - Minutes before container scales to zero.
|
|
@@ -187,7 +196,7 @@ export declare class Postgresql {
|
|
|
187
196
|
* @returns {Promise<Models.DedicatedDatabase>}
|
|
188
197
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
189
198
|
*/
|
|
190
|
-
update(databaseId: string, name?: string, status?: string, specification?: string, replicas?: number, syncMode?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number, metricsTraceSampleRate?: number, metricsSlowQueryLogThresholdMs?: number, sqlApiEnabled?: boolean, sqlApiAllowedStatements?: string[], sqlApiMaxRows?: number, sqlApiMaxBytes?: number, sqlApiTimeoutSeconds?: number): Promise<Models.DedicatedDatabase>;
|
|
199
|
+
update(databaseId: string, name?: string, status?: string, specification?: string, replicas?: number, syncMode?: string, crossRegionReplicas?: number, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number, metricsTraceSampleRate?: number, metricsSlowQueryLogThresholdMs?: number, sqlApiEnabled?: boolean, sqlApiAllowedStatements?: string[], sqlApiMaxRows?: number, sqlApiMaxBytes?: number, sqlApiTimeoutSeconds?: number): Promise<Models.DedicatedDatabase>;
|
|
191
200
|
/**
|
|
192
201
|
* Delete a dedicated database. This action is irreversible. The database status will be set to 'deleting' and all resources will be cleaned up. Deletion is allowed from any state, and repeating the call re-dispatches the cleanup.
|
|
193
202
|
*
|
|
@@ -353,11 +353,13 @@ export declare class Project {
|
|
|
353
353
|
* @param {number} params.refreshTokenDuration - Refresh token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 1 year.
|
|
354
354
|
* @param {number} params.publicAccessTokenDuration - Access token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 1 hour.
|
|
355
355
|
* @param {number} params.publicRefreshTokenDuration - Refresh token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 30 days.
|
|
356
|
+
* @param {number} params.installationAccessTokenDuration - Access token duration in seconds for app installation access tokens. Leave empty to use default 1 hour.
|
|
356
357
|
* @param {boolean} params.confidentialPkce - When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting.
|
|
357
358
|
* @param {string} params.verificationUrl - URL to your application page where users enter the device flow user code. Required to enable the Device Authorization Grant.
|
|
358
359
|
* @param {number} params.userCodeLength - Number of characters in the device flow user code, excluding the formatting separator. Shorter codes are easier to type but weaker; pair short codes with short expiry. Leave empty to use default 8.
|
|
359
360
|
* @param {string} params.userCodeFormat - Character set for device flow user codes: `numeric` (digits only — best for numeric keypads and TV remotes), `alphabetic` (letters only), or `alphanumeric` (letters and digits — highest entropy per character). Defaults to `alphanumeric`.
|
|
360
361
|
* @param {number} params.deviceCodeDuration - Lifetime in seconds of device flow device codes and user codes. Device codes are intentionally short-lived. Leave empty to use default 600.
|
|
362
|
+
* @param {string[]} params.defaultScopes - List of OAuth2 scopes used when an authorization request omits the scope parameter. Every default scope must also be allowed by the OAuth2 server. Maximum of 100 scopes are allowed, each up to 128 characters long.
|
|
361
363
|
* @throws {AppwriteException}
|
|
362
364
|
* @returns {Promise<Models.Project>}
|
|
363
365
|
*/
|
|
@@ -370,11 +372,13 @@ export declare class Project {
|
|
|
370
372
|
refreshTokenDuration?: number;
|
|
371
373
|
publicAccessTokenDuration?: number;
|
|
372
374
|
publicRefreshTokenDuration?: number;
|
|
375
|
+
installationAccessTokenDuration?: number;
|
|
373
376
|
confidentialPkce?: boolean;
|
|
374
377
|
verificationUrl?: string;
|
|
375
378
|
userCodeLength?: number;
|
|
376
379
|
userCodeFormat?: string;
|
|
377
380
|
deviceCodeDuration?: number;
|
|
381
|
+
defaultScopes?: string[];
|
|
378
382
|
}): Promise<Models.Project>;
|
|
379
383
|
/**
|
|
380
384
|
* Update the OAuth2 server (OIDC provider) configuration.
|
|
@@ -387,16 +391,18 @@ export declare class Project {
|
|
|
387
391
|
* @param {number} refreshTokenDuration - Refresh token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 1 year.
|
|
388
392
|
* @param {number} publicAccessTokenDuration - Access token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 1 hour.
|
|
389
393
|
* @param {number} publicRefreshTokenDuration - Refresh token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 30 days.
|
|
394
|
+
* @param {number} installationAccessTokenDuration - Access token duration in seconds for app installation access tokens. Leave empty to use default 1 hour.
|
|
390
395
|
* @param {boolean} confidentialPkce - When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting.
|
|
391
396
|
* @param {string} verificationUrl - URL to your application page where users enter the device flow user code. Required to enable the Device Authorization Grant.
|
|
392
397
|
* @param {number} userCodeLength - Number of characters in the device flow user code, excluding the formatting separator. Shorter codes are easier to type but weaker; pair short codes with short expiry. Leave empty to use default 8.
|
|
393
398
|
* @param {string} userCodeFormat - Character set for device flow user codes: `numeric` (digits only — best for numeric keypads and TV remotes), `alphabetic` (letters only), or `alphanumeric` (letters and digits — highest entropy per character). Defaults to `alphanumeric`.
|
|
394
399
|
* @param {number} deviceCodeDuration - Lifetime in seconds of device flow device codes and user codes. Device codes are intentionally short-lived. Leave empty to use default 600.
|
|
400
|
+
* @param {string[]} defaultScopes - List of OAuth2 scopes used when an authorization request omits the scope parameter. Every default scope must also be allowed by the OAuth2 server. Maximum of 100 scopes are allowed, each up to 128 characters long.
|
|
395
401
|
* @throws {AppwriteException}
|
|
396
402
|
* @returns {Promise<Models.Project>}
|
|
397
403
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
398
404
|
*/
|
|
399
|
-
updateOAuth2Server(enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number): Promise<Models.Project>;
|
|
405
|
+
updateOAuth2Server(enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, installationAccessTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number, defaultScopes?: string[]): Promise<Models.Project>;
|
|
400
406
|
/**
|
|
401
407
|
* Update the project OAuth2 Amazon configuration.
|
|
402
408
|
*
|
|
@@ -453,6 +459,31 @@ export declare class Project {
|
|
|
453
459
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
454
460
|
*/
|
|
455
461
|
updateOAuth2Apple(serviceId?: string, keyId?: string, teamId?: string, p8File?: string, enabled?: boolean): Promise<Models.OAuth2Apple>;
|
|
462
|
+
/**
|
|
463
|
+
* Update the project OAuth2 Appwrite configuration.
|
|
464
|
+
*
|
|
465
|
+
* @param {string} params.clientId - 'Client ID' of Appwrite OAuth2 app. For example: 6a42000000000000b5a0
|
|
466
|
+
* @param {string} params.clientSecret - 'Client Secret' of Appwrite OAuth2 app. For example: b86afd000000000000000000000000000000000000000000000000000ced5f93
|
|
467
|
+
* @param {boolean} params.enabled - OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
468
|
+
* @throws {AppwriteException}
|
|
469
|
+
* @returns {Promise<Models.OAuth2Appwrite>}
|
|
470
|
+
*/
|
|
471
|
+
updateOAuth2Appwrite(params?: {
|
|
472
|
+
clientId?: string;
|
|
473
|
+
clientSecret?: string;
|
|
474
|
+
enabled?: boolean;
|
|
475
|
+
}): Promise<Models.OAuth2Appwrite>;
|
|
476
|
+
/**
|
|
477
|
+
* Update the project OAuth2 Appwrite configuration.
|
|
478
|
+
*
|
|
479
|
+
* @param {string} clientId - 'Client ID' of Appwrite OAuth2 app. For example: 6a42000000000000b5a0
|
|
480
|
+
* @param {string} clientSecret - 'Client Secret' of Appwrite OAuth2 app. For example: b86afd000000000000000000000000000000000000000000000000000ced5f93
|
|
481
|
+
* @param {boolean} enabled - OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
482
|
+
* @throws {AppwriteException}
|
|
483
|
+
* @returns {Promise<Models.OAuth2Appwrite>}
|
|
484
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
485
|
+
*/
|
|
486
|
+
updateOAuth2Appwrite(clientId?: string, clientSecret?: string, enabled?: boolean): Promise<Models.OAuth2Appwrite>;
|
|
456
487
|
/**
|
|
457
488
|
* Update the project OAuth2 Auth0 configuration.
|
|
458
489
|
*
|
|
@@ -186,31 +186,6 @@ export declare class Projects {
|
|
|
186
186
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
187
187
|
*/
|
|
188
188
|
listDevKeys(projectId: string, queries?: string[]): Promise<Models.DevKeyList>;
|
|
189
|
-
/**
|
|
190
|
-
* Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.
|
|
191
|
-
*
|
|
192
|
-
* @param {string} params.projectId - Project unique ID.
|
|
193
|
-
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
194
|
-
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
|
195
|
-
* @throws {AppwriteException}
|
|
196
|
-
* @returns {Promise<Models.DevKey>}
|
|
197
|
-
*/
|
|
198
|
-
createDevKey(params: {
|
|
199
|
-
projectId: string;
|
|
200
|
-
name: string;
|
|
201
|
-
expire: string;
|
|
202
|
-
}): Promise<Models.DevKey>;
|
|
203
|
-
/**
|
|
204
|
-
* Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.
|
|
205
|
-
*
|
|
206
|
-
* @param {string} projectId - Project unique ID.
|
|
207
|
-
* @param {string} name - Key name. Max length: 128 chars.
|
|
208
|
-
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
|
209
|
-
* @throws {AppwriteException}
|
|
210
|
-
* @returns {Promise<Models.DevKey>}
|
|
211
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
212
|
-
*/
|
|
213
|
-
createDevKey(projectId: string, name: string, expire: string): Promise<Models.DevKey>;
|
|
214
189
|
/**
|
|
215
190
|
* Get a project\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.
|
|
216
191
|
*
|