@appwrite.io/console 12.2.0 → 13.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 +2 -2
- package/dist/cjs/sdk.js +1719 -1204
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1717 -1205
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +1736 -1221
- package/package.json +1 -1
- package/types/channel.d.ts +8 -3
- package/types/client.d.ts +1 -1
- package/types/enums/account-key-scopes.d.ts +5 -0
- package/types/enums/appwrite-migration-resource.d.ts +1 -0
- package/types/enums/backup-services.d.ts +1 -0
- package/types/enums/{resource-type.d.ts → block-resource-type.d.ts} +2 -6
- package/types/enums/{theme.d.ts → browser-theme.d.ts} +1 -1
- package/types/enums/cache-database.d.ts +5 -0
- package/types/enums/cache-target.d.ts +8 -0
- package/types/enums/{registration-type.d.ts → domain-registration-type.d.ts} +1 -1
- package/types/enums/{filter-type.d.ts → domain-suggestion-type.d.ts} +1 -1
- package/types/enums/{model.d.ts → embedding-model.d.ts} +1 -1
- package/types/enums/{runtime.d.ts → function-runtime.d.ts} +4 -2
- package/types/enums/function-template-use-case.d.ts +9 -0
- package/types/enums/{name.d.ts → health-queue-name.d.ts} +1 -1
- package/types/enums/{on-duplicate.d.ts → migration-on-duplicate.d.ts} +1 -1
- package/types/enums/o-auth-2-google-prompt.d.ts +5 -0
- package/types/enums/o-auth-provider.d.ts +1 -3
- package/types/enums/organization-addon.d.ts +4 -0
- package/types/enums/organization-key-scopes.d.ts +12 -0
- package/types/enums/{auth-method.d.ts → project-auth-method-id.d.ts} +1 -1
- package/types/enums/{email-template-type.d.ts → project-email-template-id.d.ts} +1 -1
- package/types/enums/{email-template-locale.d.ts → project-email-template-locale.d.ts} +1 -1
- package/types/enums/{scopes.d.ts → project-key-scopes.d.ts} +10 -8
- package/types/enums/project-o-auth-2-google-prompt.d.ts +5 -0
- package/types/enums/project-o-auth-provider-id.d.ts +45 -0
- package/types/enums/{project-policy.d.ts → project-policy-id.d.ts} +1 -1
- package/types/enums/{protocol-id.d.ts → project-protocol-id.d.ts} +1 -1
- package/types/enums/{service-id.d.ts → project-service-id.d.ts} +3 -2
- package/types/enums/project-smtp-secure.d.ts +4 -0
- package/types/enums/project-status.d.ts +3 -0
- package/types/enums/query-suggestion-resource.d.ts +10 -1
- package/types/enums/redirect-status-code.d.ts +6 -0
- package/types/enums/schedule-resource-type.d.ts +6 -0
- package/types/enums/{adapter.d.ts → site-adapter.d.ts} +1 -1
- package/types/enums/{runtimes.d.ts → site-build-runtime.d.ts} +4 -2
- package/types/enums/{framework.d.ts → site-framework.d.ts} +1 -1
- package/types/enums/{use-cases.d.ts → site-template-use-case.d.ts} +3 -8
- package/types/index.d.ts +36 -26
- package/types/models.d.ts +1186 -1185
- package/types/services/account.d.ts +9 -9
- package/types/services/avatars.d.ts +5 -5
- package/types/services/console.d.ts +31 -0
- package/types/services/documents-db.d.ts +1 -4
- package/types/services/domains.d.ts +216 -216
- package/types/services/functions.d.ts +36 -25
- package/types/services/health.d.ts +5 -5
- package/types/services/manager.d.ts +49 -9
- package/types/services/migrations.d.ts +13 -13
- package/types/services/organization.d.ts +234 -0
- package/types/services/organizations.d.ts +5 -131
- package/types/services/presences.d.ts +166 -0
- package/types/services/project.d.ts +226 -215
- package/types/services/projects.d.ts +10 -159
- package/types/services/proxy.d.ts +5 -5
- package/types/services/realtime.d.ts +45 -3
- package/types/services/sites.d.ts +43 -32
- package/types/services/usage.d.ts +50 -0
- package/types/services/vectors-db.d.ts +6 -9
- package/types/enums/addon.d.ts +0 -3
- package/types/enums/build-runtime.d.ts +0 -91
- package/types/enums/frameworks.d.ts +0 -17
- package/types/enums/secure.d.ts +0 -4
- package/types/enums/status-code.d.ts +0 -6
- package/types/enums/status.d.ts +0 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Client } from '../client';
|
|
2
2
|
import type { Models } from '../models';
|
|
3
|
-
import {
|
|
3
|
+
import { AccountKeyScopes } from '../enums/account-key-scopes';
|
|
4
4
|
import { AuthenticatorType } from '../enums/authenticator-type';
|
|
5
5
|
import { AuthenticationFactor } from '../enums/authentication-factor';
|
|
6
6
|
import { OAuthProvider } from '../enums/o-auth-provider';
|
|
@@ -324,27 +324,27 @@ export declare class Account {
|
|
|
324
324
|
* Create a new account API key.
|
|
325
325
|
*
|
|
326
326
|
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
327
|
-
* @param {
|
|
327
|
+
* @param {AccountKeyScopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
328
328
|
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
329
329
|
* @throws {AppwriteException}
|
|
330
330
|
* @returns {Promise<Models.Key>}
|
|
331
331
|
*/
|
|
332
332
|
createKey(params: {
|
|
333
333
|
name: string;
|
|
334
|
-
scopes:
|
|
334
|
+
scopes: AccountKeyScopes[];
|
|
335
335
|
expire?: string;
|
|
336
336
|
}): Promise<Models.Key>;
|
|
337
337
|
/**
|
|
338
338
|
* Create a new account API key.
|
|
339
339
|
*
|
|
340
340
|
* @param {string} name - Key name. Max length: 128 chars.
|
|
341
|
-
* @param {
|
|
341
|
+
* @param {AccountKeyScopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
342
342
|
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
343
343
|
* @throws {AppwriteException}
|
|
344
344
|
* @returns {Promise<Models.Key>}
|
|
345
345
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
346
346
|
*/
|
|
347
|
-
createKey(name: string, scopes:
|
|
347
|
+
createKey(name: string, scopes: AccountKeyScopes[], expire?: string): Promise<Models.Key>;
|
|
348
348
|
/**
|
|
349
349
|
* Get a key by its unique ID. This endpoint returns details about a specific API key in your account including it's scopes.
|
|
350
350
|
*
|
|
@@ -369,7 +369,7 @@ export declare class Account {
|
|
|
369
369
|
*
|
|
370
370
|
* @param {string} params.keyId - Key unique ID.
|
|
371
371
|
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
372
|
-
* @param {
|
|
372
|
+
* @param {AccountKeyScopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
373
373
|
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
374
374
|
* @throws {AppwriteException}
|
|
375
375
|
* @returns {Promise<Models.Key>}
|
|
@@ -377,7 +377,7 @@ export declare class Account {
|
|
|
377
377
|
updateKey(params: {
|
|
378
378
|
keyId: string;
|
|
379
379
|
name: string;
|
|
380
|
-
scopes:
|
|
380
|
+
scopes: AccountKeyScopes[];
|
|
381
381
|
expire?: string;
|
|
382
382
|
}): Promise<Models.Key>;
|
|
383
383
|
/**
|
|
@@ -385,13 +385,13 @@ export declare class Account {
|
|
|
385
385
|
*
|
|
386
386
|
* @param {string} keyId - Key unique ID.
|
|
387
387
|
* @param {string} name - Key name. Max length: 128 chars.
|
|
388
|
-
* @param {
|
|
388
|
+
* @param {AccountKeyScopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
389
389
|
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
390
390
|
* @throws {AppwriteException}
|
|
391
391
|
* @returns {Promise<Models.Key>}
|
|
392
392
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
393
393
|
*/
|
|
394
|
-
updateKey(keyId: string, name: string, scopes:
|
|
394
|
+
updateKey(keyId: string, name: string, scopes: AccountKeyScopes[], expire?: string): Promise<Models.Key>;
|
|
395
395
|
/**
|
|
396
396
|
* Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
|
|
397
397
|
*
|
|
@@ -2,7 +2,7 @@ import { Client } from '../client';
|
|
|
2
2
|
import { Browser } from '../enums/browser';
|
|
3
3
|
import { CreditCard } from '../enums/credit-card';
|
|
4
4
|
import { Flag } from '../enums/flag';
|
|
5
|
-
import {
|
|
5
|
+
import { BrowserTheme } from '../enums/browser-theme';
|
|
6
6
|
import { Timezone } from '../enums/timezone';
|
|
7
7
|
import { BrowserPermission } from '../enums/browser-permission';
|
|
8
8
|
import { ImageFormat } from '../enums/image-format';
|
|
@@ -245,7 +245,7 @@ export declare class Avatars {
|
|
|
245
245
|
* @param {number} params.viewportWidth - Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.
|
|
246
246
|
* @param {number} params.viewportHeight - Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.
|
|
247
247
|
* @param {number} params.scale - Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.
|
|
248
|
-
* @param {
|
|
248
|
+
* @param {BrowserTheme} params.theme - Browser theme. Pass "light" or "dark". Defaults to "light".
|
|
249
249
|
* @param {string} params.userAgent - Custom user agent string. Defaults to browser default.
|
|
250
250
|
* @param {boolean} params.fullpage - Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.
|
|
251
251
|
* @param {string} params.locale - Browser locale (e.g., "en-US", "fr-FR"). Defaults to browser default.
|
|
@@ -269,7 +269,7 @@ export declare class Avatars {
|
|
|
269
269
|
viewportWidth?: number;
|
|
270
270
|
viewportHeight?: number;
|
|
271
271
|
scale?: number;
|
|
272
|
-
theme?:
|
|
272
|
+
theme?: BrowserTheme;
|
|
273
273
|
userAgent?: string;
|
|
274
274
|
fullpage?: boolean;
|
|
275
275
|
locale?: string;
|
|
@@ -297,7 +297,7 @@ export declare class Avatars {
|
|
|
297
297
|
* @param {number} viewportWidth - Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.
|
|
298
298
|
* @param {number} viewportHeight - Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.
|
|
299
299
|
* @param {number} scale - Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.
|
|
300
|
-
* @param {
|
|
300
|
+
* @param {BrowserTheme} theme - Browser theme. Pass "light" or "dark". Defaults to "light".
|
|
301
301
|
* @param {string} userAgent - Custom user agent string. Defaults to browser default.
|
|
302
302
|
* @param {boolean} fullpage - Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.
|
|
303
303
|
* @param {string} locale - Browser locale (e.g., "en-US", "fr-FR"). Defaults to browser default.
|
|
@@ -316,5 +316,5 @@ export declare class Avatars {
|
|
|
316
316
|
* @returns {string}
|
|
317
317
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
318
318
|
*/
|
|
319
|
-
getScreenshot(url: string, headers?: object, viewportWidth?: number, viewportHeight?: number, scale?: number, theme?:
|
|
319
|
+
getScreenshot(url: string, headers?: object, viewportWidth?: number, viewportHeight?: number, scale?: number, theme?: BrowserTheme, userAgent?: string, fullpage?: boolean, locale?: string, timezone?: Timezone, latitude?: number, longitude?: number, accuracy?: number, touch?: boolean, permissions?: BrowserPermission[], sleep?: number, width?: number, height?: number, quality?: number, output?: ImageFormat): string;
|
|
320
320
|
}
|
|
@@ -3,6 +3,8 @@ import type { Models } from '../models';
|
|
|
3
3
|
import { Platform } from '../enums/platform';
|
|
4
4
|
import { ConsoleResourceType } from '../enums/console-resource-type';
|
|
5
5
|
import { QuerySuggestionResource } from '../enums/query-suggestion-resource';
|
|
6
|
+
import { ProjectEmailTemplateId } from '../enums/project-email-template-id';
|
|
7
|
+
import { ProjectEmailTemplateLocale } from '../enums/project-email-template-locale';
|
|
6
8
|
export declare class Console {
|
|
7
9
|
client: Client;
|
|
8
10
|
constructor(client: Client);
|
|
@@ -156,6 +158,13 @@ export declare class Console {
|
|
|
156
158
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
157
159
|
*/
|
|
158
160
|
getResource(value: string, type: ConsoleResourceType): Promise<{}>;
|
|
161
|
+
/**
|
|
162
|
+
* List all scopes available for organization API keys, along with a description for each scope.
|
|
163
|
+
*
|
|
164
|
+
* @throws {AppwriteException}
|
|
165
|
+
* @returns {Promise<Models.ConsoleKeyScopeList>}
|
|
166
|
+
*/
|
|
167
|
+
listOrganizationScopes(): Promise<Models.ConsoleKeyScopeList>;
|
|
159
168
|
/**
|
|
160
169
|
* List all scopes available for project API keys, along with a description for each scope.
|
|
161
170
|
*
|
|
@@ -283,6 +292,28 @@ export declare class Console {
|
|
|
283
292
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
284
293
|
*/
|
|
285
294
|
suggestQueries(resource: QuerySuggestionResource, input: string, databaseId?: string, tableId?: string): Promise<{}>;
|
|
295
|
+
/**
|
|
296
|
+
* Get the Appwrite built-in default email template for the specified type and locale. Always returns the unmodified default, ignoring any custom project overrides.
|
|
297
|
+
*
|
|
298
|
+
* @param {ProjectEmailTemplateId} params.templateId - Email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession
|
|
299
|
+
* @param {ProjectEmailTemplateLocale} params.locale - Template locale. If left empty, the fallback locale (en) will be used.
|
|
300
|
+
* @throws {AppwriteException}
|
|
301
|
+
* @returns {Promise<Models.EmailTemplate>}
|
|
302
|
+
*/
|
|
303
|
+
getEmailTemplate(params: {
|
|
304
|
+
templateId: ProjectEmailTemplateId;
|
|
305
|
+
locale?: ProjectEmailTemplateLocale;
|
|
306
|
+
}): Promise<Models.EmailTemplate>;
|
|
307
|
+
/**
|
|
308
|
+
* Get the Appwrite built-in default email template for the specified type and locale. Always returns the unmodified default, ignoring any custom project overrides.
|
|
309
|
+
*
|
|
310
|
+
* @param {ProjectEmailTemplateId} templateId - Email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession
|
|
311
|
+
* @param {ProjectEmailTemplateLocale} locale - Template locale. If left empty, the fallback locale (en) will be used.
|
|
312
|
+
* @throws {AppwriteException}
|
|
313
|
+
* @returns {Promise<Models.EmailTemplate>}
|
|
314
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
315
|
+
*/
|
|
316
|
+
getEmailTemplate(templateId: ProjectEmailTemplateId, locale?: ProjectEmailTemplateLocale): Promise<Models.EmailTemplate>;
|
|
286
317
|
/**
|
|
287
318
|
* Get all Environment Variables that are relevant for the console.
|
|
288
319
|
*
|
|
@@ -10,27 +10,24 @@ export declare class DocumentsDB {
|
|
|
10
10
|
* Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
|
|
11
11
|
*
|
|
12
12
|
* @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. You may filter on the following columns: name
|
|
13
|
-
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
14
13
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
15
14
|
* @throws {AppwriteException}
|
|
16
15
|
* @returns {Promise<Models.DatabaseList>}
|
|
17
16
|
*/
|
|
18
17
|
list(params?: {
|
|
19
18
|
queries?: string[];
|
|
20
|
-
search?: string;
|
|
21
19
|
total?: boolean;
|
|
22
20
|
}): Promise<Models.DatabaseList>;
|
|
23
21
|
/**
|
|
24
22
|
* Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
|
|
25
23
|
*
|
|
26
24
|
* @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. You may filter on the following columns: name
|
|
27
|
-
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
28
25
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
29
26
|
* @throws {AppwriteException}
|
|
30
27
|
* @returns {Promise<Models.DatabaseList>}
|
|
31
28
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
32
29
|
*/
|
|
33
|
-
list(queries?: string[],
|
|
30
|
+
list(queries?: string[], total?: boolean): Promise<Models.DatabaseList>;
|
|
34
31
|
/**
|
|
35
32
|
* Create a new Database.
|
|
36
33
|
*
|