@appwrite.io/console 3.0.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +470 -83
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +471 -84
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +470 -83
- package/docs/examples/databases/list-documents.md +2 -1
- package/docs/examples/domains/create-purchase.md +25 -0
- package/docs/examples/domains/create-transfer-in.md +18 -0
- package/docs/examples/domains/create-transfer-out.md +16 -0
- package/docs/examples/domains/get-transfer-status.md +15 -0
- package/docs/examples/health/get-console-pausing.md +16 -0
- package/docs/examples/migrations/create-appwrite-migration.md +2 -2
- package/docs/examples/migrations/create-firebase-migration.md +2 -2
- package/docs/examples/migrations/create-n-host-migration.md +2 -2
- package/docs/examples/migrations/create-supabase-migration.md +2 -2
- package/docs/examples/migrations/get-appwrite-report.md +2 -2
- package/docs/examples/migrations/get-firebase-report.md +2 -2
- package/docs/examples/migrations/get-n-host-report.md +2 -2
- package/docs/examples/migrations/get-supabase-report.md +2 -2
- package/docs/examples/organizations/get-scopes.md +2 -1
- package/docs/examples/projects/update-console-access.md +15 -0
- package/docs/examples/projects/update-status.md +16 -0
- package/docs/examples/sites/create-deployment.md +2 -2
- package/docs/examples/tablesdb/list-rows.md +2 -1
- package/package.json +1 -1
- package/src/channel.ts +19 -15
- package/src/client.ts +7 -2
- package/src/enums/appwrite-migration-resource.ts +21 -0
- package/src/enums/domain-transfer-status-status.ts +10 -0
- package/src/enums/firebase-migration-resource.ts +12 -0
- package/src/enums/{resources.ts → n-host-migration-resource.ts} +1 -1
- package/src/enums/status.ts +3 -0
- package/src/enums/supabase-migration-resource.ts +13 -0
- package/src/index.ts +6 -1
- package/src/models.ts +124 -3
- package/src/query.ts +26 -0
- package/src/services/account.ts +2 -2
- package/src/services/databases.ts +100 -93
- package/src/services/domains.ts +350 -0
- package/src/services/health.ts +61 -0
- package/src/services/messaging.ts +2 -2
- package/src/services/migrations.ts +68 -65
- package/src/services/organizations.ts +14 -6
- package/src/services/projects.ts +120 -0
- package/src/services/sites.ts +13 -16
- package/src/services/tables-db.ts +14 -7
- package/src/services/teams.ts +4 -4
- package/types/channel.d.ts +9 -9
- package/types/enums/appwrite-migration-resource.d.ts +21 -0
- package/types/enums/domain-transfer-status-status.d.ts +10 -0
- package/types/enums/firebase-migration-resource.d.ts +12 -0
- package/types/enums/{resources.d.ts → n-host-migration-resource.d.ts} +1 -1
- package/types/enums/status.d.ts +3 -0
- package/types/enums/supabase-migration-resource.d.ts +13 -0
- package/types/index.d.ts +6 -1
- package/types/models.d.ts +122 -3
- package/types/query.d.ts +22 -0
- package/types/services/databases.d.ts +40 -37
- package/types/services/domains.d.ts +118 -0
- package/types/services/health.d.ts +24 -0
- package/types/services/messaging.d.ts +2 -2
- package/types/services/migrations.d.ts +36 -33
- package/types/services/organizations.d.ts +4 -1
- package/types/services/projects.d.ts +46 -0
- package/types/services/sites.d.ts +4 -4
- package/types/services/tables-db.d.ts +4 -1
- package/types/services/teams.d.ts +4 -4
|
@@ -9,6 +9,7 @@ import { PlatformType } from '../enums/platform-type';
|
|
|
9
9
|
import { ResourceType } from '../enums/resource-type';
|
|
10
10
|
import { ApiService } from '../enums/api-service';
|
|
11
11
|
import { SMTPSecure } from '../enums/smtp-secure';
|
|
12
|
+
import { Status } from '../enums/status';
|
|
12
13
|
import { EmailTemplateType } from '../enums/email-template-type';
|
|
13
14
|
import { EmailTemplateLocale } from '../enums/email-template-locale';
|
|
14
15
|
import { SmsTemplateType } from '../enums/sms-template-type';
|
|
@@ -530,6 +531,27 @@ export declare class Projects {
|
|
|
530
531
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
531
532
|
*/
|
|
532
533
|
updateAuthStatus(projectId: string, method: AuthMethod, status: boolean): Promise<Models.Project>;
|
|
534
|
+
/**
|
|
535
|
+
* Record console access to a project. This endpoint updates the last accessed timestamp for the project to track console activity.
|
|
536
|
+
*
|
|
537
|
+
*
|
|
538
|
+
* @param {string} params.projectId - Project ID
|
|
539
|
+
* @throws {AppwriteException}
|
|
540
|
+
* @returns {Promise<{}>}
|
|
541
|
+
*/
|
|
542
|
+
updateConsoleAccess(params: {
|
|
543
|
+
projectId: string;
|
|
544
|
+
}): Promise<{}>;
|
|
545
|
+
/**
|
|
546
|
+
* Record console access to a project. This endpoint updates the last accessed timestamp for the project to track console activity.
|
|
547
|
+
*
|
|
548
|
+
*
|
|
549
|
+
* @param {string} projectId - Project ID
|
|
550
|
+
* @throws {AppwriteException}
|
|
551
|
+
* @returns {Promise<{}>}
|
|
552
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
553
|
+
*/
|
|
554
|
+
updateConsoleAccess(projectId: string): Promise<{}>;
|
|
533
555
|
/**
|
|
534
556
|
* List all the project\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'
|
|
535
557
|
*
|
|
@@ -1306,6 +1328,30 @@ export declare class Projects {
|
|
|
1306
1328
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1307
1329
|
*/
|
|
1308
1330
|
createSMTPTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
|
|
1331
|
+
/**
|
|
1332
|
+
* Update the status of a project. Can be used to archive/restore projects, and to restore paused projects. When restoring a paused project, the console fingerprint header must be provided and the project must not be blocked for any reason other than inactivity.
|
|
1333
|
+
*
|
|
1334
|
+
*
|
|
1335
|
+
* @param {string} params.projectId - Project ID
|
|
1336
|
+
* @param {Status} params.status - New status for the project
|
|
1337
|
+
* @throws {AppwriteException}
|
|
1338
|
+
* @returns {Promise<{}>}
|
|
1339
|
+
*/
|
|
1340
|
+
updateStatus(params: {
|
|
1341
|
+
projectId: string;
|
|
1342
|
+
status: Status;
|
|
1343
|
+
}): Promise<{}>;
|
|
1344
|
+
/**
|
|
1345
|
+
* Update the status of a project. Can be used to archive/restore projects, and to restore paused projects. When restoring a paused project, the console fingerprint header must be provided and the project must not be blocked for any reason other than inactivity.
|
|
1346
|
+
*
|
|
1347
|
+
*
|
|
1348
|
+
* @param {string} projectId - Project ID
|
|
1349
|
+
* @param {Status} status - New status for the project
|
|
1350
|
+
* @throws {AppwriteException}
|
|
1351
|
+
* @returns {Promise<{}>}
|
|
1352
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1353
|
+
*/
|
|
1354
|
+
updateStatus(projectId: string, status: Status): Promise<{}>;
|
|
1309
1355
|
/**
|
|
1310
1356
|
* Update the team ID of a project allowing for it to be transferred to another team.
|
|
1311
1357
|
*
|
|
@@ -350,20 +350,20 @@ export declare class Sites {
|
|
|
350
350
|
*
|
|
351
351
|
* @param {string} params.siteId - Site ID.
|
|
352
352
|
* @param {File} params.code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
|
|
353
|
-
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
354
353
|
* @param {string} params.installCommand - Install Commands.
|
|
355
354
|
* @param {string} params.buildCommand - Build Commands.
|
|
356
355
|
* @param {string} params.outputDirectory - Output Directory.
|
|
356
|
+
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
357
357
|
* @throws {AppwriteException}
|
|
358
358
|
* @returns {Promise<Models.Deployment>}
|
|
359
359
|
*/
|
|
360
360
|
createDeployment(params: {
|
|
361
361
|
siteId: string;
|
|
362
362
|
code: File;
|
|
363
|
-
activate: boolean;
|
|
364
363
|
installCommand?: string;
|
|
365
364
|
buildCommand?: string;
|
|
366
365
|
outputDirectory?: string;
|
|
366
|
+
activate?: boolean;
|
|
367
367
|
onProgress?: (progress: UploadProgress) => void;
|
|
368
368
|
}): Promise<Models.Deployment>;
|
|
369
369
|
/**
|
|
@@ -371,15 +371,15 @@ export declare class Sites {
|
|
|
371
371
|
*
|
|
372
372
|
* @param {string} siteId - Site ID.
|
|
373
373
|
* @param {File} code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
|
|
374
|
-
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
375
374
|
* @param {string} installCommand - Install Commands.
|
|
376
375
|
* @param {string} buildCommand - Build Commands.
|
|
377
376
|
* @param {string} outputDirectory - Output Directory.
|
|
377
|
+
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
378
378
|
* @throws {AppwriteException}
|
|
379
379
|
* @returns {Promise<Models.Deployment>}
|
|
380
380
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
381
381
|
*/
|
|
382
|
-
createDeployment(siteId: string, code: File,
|
|
382
|
+
createDeployment(siteId: string, code: File, installCommand?: string, buildCommand?: string, outputDirectory?: string, activate?: boolean, onProgress?: (progress: UploadProgress) => void): Promise<Models.Deployment>;
|
|
383
383
|
/**
|
|
384
384
|
* Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.
|
|
385
385
|
*
|
|
@@ -1896,6 +1896,7 @@ export declare class TablesDB {
|
|
|
1896
1896
|
* @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.
|
|
1897
1897
|
* @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
1898
1898
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1899
|
+
* @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
|
|
1899
1900
|
* @throws {AppwriteException}
|
|
1900
1901
|
* @returns {Promise<Models.RowList<Row>>}
|
|
1901
1902
|
*/
|
|
@@ -1905,6 +1906,7 @@ export declare class TablesDB {
|
|
|
1905
1906
|
queries?: string[];
|
|
1906
1907
|
transactionId?: string;
|
|
1907
1908
|
total?: boolean;
|
|
1909
|
+
ttl?: number;
|
|
1908
1910
|
}): Promise<Models.RowList<Row>>;
|
|
1909
1911
|
/**
|
|
1910
1912
|
* Get a list of all the user's rows in a given table. You can use the query params to filter your results.
|
|
@@ -1914,11 +1916,12 @@ export declare class TablesDB {
|
|
|
1914
1916
|
* @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.
|
|
1915
1917
|
* @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
1916
1918
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1919
|
+
* @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
|
|
1917
1920
|
* @throws {AppwriteException}
|
|
1918
1921
|
* @returns {Promise<Models.RowList<Row>>}
|
|
1919
1922
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1920
1923
|
*/
|
|
1921
|
-
listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.RowList<Row>>;
|
|
1924
|
+
listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number): Promise<Models.RowList<Row>>;
|
|
1922
1925
|
/**
|
|
1923
1926
|
* Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
1924
1927
|
*
|
|
@@ -177,7 +177,7 @@ export declare class Teams {
|
|
|
177
177
|
*
|
|
178
178
|
*
|
|
179
179
|
* @param {string} params.teamId - Team ID.
|
|
180
|
-
* @param {string[]} params.roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each
|
|
180
|
+
* @param {string[]} params.roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
|
|
181
181
|
* @param {string} params.email - Email of the new team member.
|
|
182
182
|
* @param {string} params.userId - ID of the user to be added to a team.
|
|
183
183
|
* @param {string} params.phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
@@ -206,7 +206,7 @@ export declare class Teams {
|
|
|
206
206
|
*
|
|
207
207
|
*
|
|
208
208
|
* @param {string} teamId - Team ID.
|
|
209
|
-
* @param {string[]} roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each
|
|
209
|
+
* @param {string[]} roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
|
|
210
210
|
* @param {string} email - Email of the new team member.
|
|
211
211
|
* @param {string} userId - ID of the user to be added to a team.
|
|
212
212
|
* @param {string} phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
@@ -245,7 +245,7 @@ export declare class Teams {
|
|
|
245
245
|
*
|
|
246
246
|
* @param {string} params.teamId - Team ID.
|
|
247
247
|
* @param {string} params.membershipId - Membership ID.
|
|
248
|
-
* @param {string[]} params.roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each
|
|
248
|
+
* @param {string[]} params.roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
|
|
249
249
|
* @throws {AppwriteException}
|
|
250
250
|
* @returns {Promise<Models.Membership>}
|
|
251
251
|
*/
|
|
@@ -260,7 +260,7 @@ export declare class Teams {
|
|
|
260
260
|
*
|
|
261
261
|
* @param {string} teamId - Team ID.
|
|
262
262
|
* @param {string} membershipId - Membership ID.
|
|
263
|
-
* @param {string[]} roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each
|
|
263
|
+
* @param {string[]} roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
|
|
264
264
|
* @throws {AppwriteException}
|
|
265
265
|
* @returns {Promise<Models.Membership>}
|
|
266
266
|
* @deprecated Use the object parameter style method for a better developer experience.
|