appbuild-oceanbase-console 1.12.2 → 1.13.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/dist/cjs/package.json +3 -0
- package/dist/cjs/sdk.js +3837 -1017
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/package.json +3 -0
- package/dist/esm/sdk.js +3831 -1018
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +10131 -3554
- package/package.json +7 -2
- package/types/channel.d.ts +74 -0
- package/types/client.d.ts +84 -16
- package/types/enums/appwrite-migration-resource.d.ts +25 -0
- package/types/enums/backup-services.d.ts +5 -0
- package/types/enums/billing-plan-group.d.ts +5 -0
- package/types/enums/browser-permission.d.ts +22 -0
- package/types/enums/domain-purchase-status.d.ts +6 -0
- package/types/enums/domain-transfer-status-enum.d.ts +10 -0
- package/types/enums/filter-type.d.ts +4 -0
- package/types/enums/firebase-migration-resource.d.ts +12 -0
- package/types/enums/frameworks.d.ts +17 -0
- package/types/enums/n-host-migration-resource.d.ts +13 -0
- package/types/enums/order-by.d.ts +4 -0
- package/types/enums/registration-type.d.ts +6 -0
- package/types/enums/resource-type.d.ts +6 -0
- package/types/enums/runtimes.d.ts +180 -0
- package/types/enums/scopes.d.ts +70 -0
- package/types/enums/supabase-migration-resource.d.ts +13 -0
- package/types/enums/template-reference-type.d.ts +5 -0
- package/types/enums/use-cases.d.ts +11 -0
- package/types/enums/vcs-reference-type.d.ts +5 -0
- package/types/index.d.ts +119 -96
- package/types/migrations.d.ts +10 -9
- package/types/models.d.ts +1270 -136
- package/types/query.d.ts +60 -8
- package/types/services/account.d.ts +162 -39
- package/types/services/activities.d.ts +46 -0
- package/types/services/avatars.d.ts +9 -8
- package/types/services/backups.d.ts +13 -12
- package/types/services/console.d.ts +41 -3
- package/types/services/databases.d.ts +384 -68
- package/types/services/domains.d.ts +223 -0
- package/types/services/functions.d.ts +46 -31
- package/types/services/health.d.ts +49 -6
- package/types/services/messaging.d.ts +2 -2
- package/types/services/organizations.d.ts +203 -36
- package/types/services/projects.d.ts +151 -210
- package/types/services/realtime.d.ts +26 -10
- package/types/services/sites.d.ts +49 -29
- package/types/services/storage.d.ts +12 -12
- package/types/services/tables-db.d.ts +352 -34
- package/types/services/teams.d.ts +4 -4
- package/types/services/users.d.ts +26 -2
- package/types/services/vcs.d.ts +4 -1
- package/types/services/webhooks.d.ts +165 -0
|
@@ -3,8 +3,10 @@ import type { Models } from '../models';
|
|
|
3
3
|
import { Region } from '../enums/region';
|
|
4
4
|
import { Api } from '../enums/api';
|
|
5
5
|
import { AuthMethod } from '../enums/auth-method';
|
|
6
|
+
import { Scopes } from '../enums/scopes';
|
|
6
7
|
import { OAuthProvider } from '../enums/o-auth-provider';
|
|
7
8
|
import { PlatformType } from '../enums/platform-type';
|
|
9
|
+
import { ResourceType } from '../enums/resource-type';
|
|
8
10
|
import { ApiService } from '../enums/api-service';
|
|
9
11
|
import { SMTPSecure } from '../enums/smtp-secure';
|
|
10
12
|
import { Status } from '../enums/status';
|
|
@@ -18,7 +20,7 @@ export declare class Projects {
|
|
|
18
20
|
/**
|
|
19
21
|
* Get a list of all projects. You can use the query params to filter your results.
|
|
20
22
|
*
|
|
21
|
-
* @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 attributes: name, teamId
|
|
23
|
+
* @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 attributes: name, teamId, labels, search
|
|
22
24
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
23
25
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
24
26
|
* @throws {AppwriteException}
|
|
@@ -32,7 +34,7 @@ export declare class Projects {
|
|
|
32
34
|
/**
|
|
33
35
|
* Get a list of all projects. You can use the query params to filter your results.
|
|
34
36
|
*
|
|
35
|
-
* @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 attributes: name, teamId
|
|
37
|
+
* @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 attributes: name, teamId, labels, search
|
|
36
38
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
37
39
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
38
40
|
* @throws {AppwriteException}
|
|
@@ -322,28 +324,6 @@ export declare class Projects {
|
|
|
322
324
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
323
325
|
*/
|
|
324
326
|
updateAuthLimit(projectId: string, limit: number): Promise<Models.Project>;
|
|
325
|
-
/**
|
|
326
|
-
* Update the maximum database storage in bytes allowed for this project. Set to 0 for unlimited. Default is 1GB (1073741824 bytes).
|
|
327
|
-
*
|
|
328
|
-
* @param {string} params.projectId - Project unique ID.
|
|
329
|
-
* @param {number} params.limit - Max database storage in bytes. Use 0 for unlimited. Must be non-negative integer.
|
|
330
|
-
* @throws {AppwriteException}
|
|
331
|
-
* @returns {Promise<Models.Project>}
|
|
332
|
-
*/
|
|
333
|
-
updateAuthDatabaseStorageLimit(params: {
|
|
334
|
-
projectId: string;
|
|
335
|
-
limit: number;
|
|
336
|
-
}): Promise<Models.Project>;
|
|
337
|
-
/**
|
|
338
|
-
* Update the maximum database storage in bytes allowed for this project. Set to 0 for unlimited. Default is 1GB (1073741824 bytes).
|
|
339
|
-
*
|
|
340
|
-
* @param {string} projectId - Project unique ID.
|
|
341
|
-
* @param {number} limit - Max database storage in bytes. Use 0 for unlimited. Must be non-negative integer.
|
|
342
|
-
* @throws {AppwriteException}
|
|
343
|
-
* @returns {Promise<Models.Project>}
|
|
344
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
345
|
-
*/
|
|
346
|
-
updateAuthDatabaseStorageLimit(projectId: string, limit: number): Promise<Models.Project>;
|
|
347
327
|
/**
|
|
348
328
|
* Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.
|
|
349
329
|
*
|
|
@@ -551,6 +531,27 @@ export declare class Projects {
|
|
|
551
531
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
552
532
|
*/
|
|
553
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<{}>;
|
|
554
555
|
/**
|
|
555
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.'
|
|
556
557
|
*
|
|
@@ -674,55 +675,59 @@ export declare class Projects {
|
|
|
674
675
|
* Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time.
|
|
675
676
|
*
|
|
676
677
|
* @param {string} params.projectId - Project unique ID.
|
|
677
|
-
* @param {
|
|
678
|
+
* @param {Scopes[]} params.scopes - List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
|
|
678
679
|
* @param {number} params.duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
|
|
679
680
|
* @throws {AppwriteException}
|
|
680
681
|
* @returns {Promise<Models.Jwt>}
|
|
681
682
|
*/
|
|
682
683
|
createJWT(params: {
|
|
683
684
|
projectId: string;
|
|
684
|
-
scopes:
|
|
685
|
+
scopes: Scopes[];
|
|
685
686
|
duration?: number;
|
|
686
687
|
}): Promise<Models.Jwt>;
|
|
687
688
|
/**
|
|
688
689
|
* Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time.
|
|
689
690
|
*
|
|
690
691
|
* @param {string} projectId - Project unique ID.
|
|
691
|
-
* @param {
|
|
692
|
+
* @param {Scopes[]} scopes - List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
|
|
692
693
|
* @param {number} duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
|
|
693
694
|
* @throws {AppwriteException}
|
|
694
695
|
* @returns {Promise<Models.Jwt>}
|
|
695
696
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
696
697
|
*/
|
|
697
|
-
createJWT(projectId: string, scopes:
|
|
698
|
+
createJWT(projectId: string, scopes: Scopes[], duration?: number): Promise<Models.Jwt>;
|
|
698
699
|
/**
|
|
699
700
|
* Get a list of all API keys from the current project.
|
|
700
701
|
*
|
|
701
702
|
* @param {string} params.projectId - Project unique ID.
|
|
703
|
+
* @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 attributes: expire, accessedAt, name, scopes
|
|
702
704
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
703
705
|
* @throws {AppwriteException}
|
|
704
706
|
* @returns {Promise<Models.KeyList>}
|
|
705
707
|
*/
|
|
706
708
|
listKeys(params: {
|
|
707
709
|
projectId: string;
|
|
710
|
+
queries?: string[];
|
|
708
711
|
total?: boolean;
|
|
709
712
|
}): Promise<Models.KeyList>;
|
|
710
713
|
/**
|
|
711
714
|
* Get a list of all API keys from the current project.
|
|
712
715
|
*
|
|
713
716
|
* @param {string} projectId - Project unique ID.
|
|
717
|
+
* @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 attributes: expire, accessedAt, name, scopes
|
|
714
718
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
715
719
|
* @throws {AppwriteException}
|
|
716
720
|
* @returns {Promise<Models.KeyList>}
|
|
717
721
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
718
722
|
*/
|
|
719
|
-
listKeys(projectId: string, total?: boolean): Promise<Models.KeyList>;
|
|
723
|
+
listKeys(projectId: string, queries?: string[], total?: boolean): Promise<Models.KeyList>;
|
|
720
724
|
/**
|
|
721
725
|
* Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.
|
|
722
726
|
*
|
|
723
727
|
* @param {string} params.projectId - Project unique ID.
|
|
724
728
|
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
725
|
-
* @param {
|
|
729
|
+
* @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
730
|
+
* @param {string} params.keyId - Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
726
731
|
* @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.
|
|
727
732
|
* @throws {AppwriteException}
|
|
728
733
|
* @returns {Promise<Models.Key>}
|
|
@@ -730,7 +735,8 @@ export declare class Projects {
|
|
|
730
735
|
createKey(params: {
|
|
731
736
|
projectId: string;
|
|
732
737
|
name: string;
|
|
733
|
-
scopes?:
|
|
738
|
+
scopes?: Scopes[];
|
|
739
|
+
keyId?: string;
|
|
734
740
|
expire?: string;
|
|
735
741
|
}): Promise<Models.Key>;
|
|
736
742
|
/**
|
|
@@ -738,13 +744,14 @@ export declare class Projects {
|
|
|
738
744
|
*
|
|
739
745
|
* @param {string} projectId - Project unique ID.
|
|
740
746
|
* @param {string} name - Key name. Max length: 128 chars.
|
|
741
|
-
* @param {
|
|
747
|
+
* @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
748
|
+
* @param {string} keyId - Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
742
749
|
* @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.
|
|
743
750
|
* @throws {AppwriteException}
|
|
744
751
|
* @returns {Promise<Models.Key>}
|
|
745
752
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
746
753
|
*/
|
|
747
|
-
createKey(projectId: string, name: string, scopes?:
|
|
754
|
+
createKey(projectId: string, name: string, scopes?: Scopes[], keyId?: string, expire?: string): Promise<Models.Key>;
|
|
748
755
|
/**
|
|
749
756
|
* Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.
|
|
750
757
|
*
|
|
@@ -773,7 +780,7 @@ export declare class Projects {
|
|
|
773
780
|
* @param {string} params.projectId - Project unique ID.
|
|
774
781
|
* @param {string} params.keyId - Key unique ID.
|
|
775
782
|
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
776
|
-
* @param {
|
|
783
|
+
* @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 events are allowed.
|
|
777
784
|
* @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.
|
|
778
785
|
* @throws {AppwriteException}
|
|
779
786
|
* @returns {Promise<Models.Key>}
|
|
@@ -782,7 +789,7 @@ export declare class Projects {
|
|
|
782
789
|
projectId: string;
|
|
783
790
|
keyId: string;
|
|
784
791
|
name: string;
|
|
785
|
-
scopes?:
|
|
792
|
+
scopes?: Scopes[];
|
|
786
793
|
expire?: string;
|
|
787
794
|
}): Promise<Models.Key>;
|
|
788
795
|
/**
|
|
@@ -791,13 +798,13 @@ export declare class Projects {
|
|
|
791
798
|
* @param {string} projectId - Project unique ID.
|
|
792
799
|
* @param {string} keyId - Key unique ID.
|
|
793
800
|
* @param {string} name - Key name. Max length: 128 chars.
|
|
794
|
-
* @param {
|
|
801
|
+
* @param {Scopes[]} scopes - Key scopes list. Maximum of 100 events are allowed.
|
|
795
802
|
* @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.
|
|
796
803
|
* @throws {AppwriteException}
|
|
797
804
|
* @returns {Promise<Models.Key>}
|
|
798
805
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
799
806
|
*/
|
|
800
|
-
updateKey(projectId: string, keyId: string, name: string, scopes?:
|
|
807
|
+
updateKey(projectId: string, keyId: string, name: string, scopes?: Scopes[], expire?: string): Promise<Models.Key>;
|
|
801
808
|
/**
|
|
802
809
|
* Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
|
|
803
810
|
*
|
|
@@ -820,6 +827,28 @@ export declare class Projects {
|
|
|
820
827
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
821
828
|
*/
|
|
822
829
|
deleteKey(projectId: string, keyId: string): Promise<{}>;
|
|
830
|
+
/**
|
|
831
|
+
* Update the project labels by its unique ID. Labels can be used to easily filter projects in an organization.
|
|
832
|
+
*
|
|
833
|
+
* @param {string} params.projectId - Project unique ID.
|
|
834
|
+
* @param {string[]} params.labels - Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.
|
|
835
|
+
* @throws {AppwriteException}
|
|
836
|
+
* @returns {Promise<Models.Project>}
|
|
837
|
+
*/
|
|
838
|
+
updateLabels(params: {
|
|
839
|
+
projectId: string;
|
|
840
|
+
labels: string[];
|
|
841
|
+
}): Promise<Models.Project>;
|
|
842
|
+
/**
|
|
843
|
+
* Update the project labels by its unique ID. Labels can be used to easily filter projects in an organization.
|
|
844
|
+
*
|
|
845
|
+
* @param {string} projectId - Project unique ID.
|
|
846
|
+
* @param {string[]} labels - Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.
|
|
847
|
+
* @throws {AppwriteException}
|
|
848
|
+
* @returns {Promise<Models.Project>}
|
|
849
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
850
|
+
*/
|
|
851
|
+
updateLabels(projectId: string, labels: string[]): Promise<Models.Project>;
|
|
823
852
|
/**
|
|
824
853
|
* Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers.
|
|
825
854
|
*
|
|
@@ -985,6 +1014,87 @@ export declare class Projects {
|
|
|
985
1014
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
986
1015
|
*/
|
|
987
1016
|
deletePlatform(projectId: string, platformId: string): Promise<{}>;
|
|
1017
|
+
/**
|
|
1018
|
+
* Get a list of all the project's schedules. You can use the query params to filter your results.
|
|
1019
|
+
*
|
|
1020
|
+
* @param {string} params.projectId - Project unique ID.
|
|
1021
|
+
* @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 attributes: resourceType, resourceId, projectId, schedule, active, region
|
|
1022
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1023
|
+
* @throws {AppwriteException}
|
|
1024
|
+
* @returns {Promise<Models.ScheduleList>}
|
|
1025
|
+
*/
|
|
1026
|
+
listSchedules(params: {
|
|
1027
|
+
projectId: string;
|
|
1028
|
+
queries?: string[];
|
|
1029
|
+
total?: boolean;
|
|
1030
|
+
}): Promise<Models.ScheduleList>;
|
|
1031
|
+
/**
|
|
1032
|
+
* Get a list of all the project's schedules. You can use the query params to filter your results.
|
|
1033
|
+
*
|
|
1034
|
+
* @param {string} projectId - Project unique ID.
|
|
1035
|
+
* @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 attributes: resourceType, resourceId, projectId, schedule, active, region
|
|
1036
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1037
|
+
* @throws {AppwriteException}
|
|
1038
|
+
* @returns {Promise<Models.ScheduleList>}
|
|
1039
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1040
|
+
*/
|
|
1041
|
+
listSchedules(projectId: string, queries?: string[], total?: boolean): Promise<Models.ScheduleList>;
|
|
1042
|
+
/**
|
|
1043
|
+
* Create a new schedule for a resource.
|
|
1044
|
+
*
|
|
1045
|
+
* @param {string} params.projectId - Project unique ID.
|
|
1046
|
+
* @param {ResourceType} params.resourceType - The resource type for the schedule. Possible values: function, execution, message, backup.
|
|
1047
|
+
* @param {string} params.resourceId - The resource ID to associate with this schedule.
|
|
1048
|
+
* @param {string} params.schedule - Schedule CRON expression.
|
|
1049
|
+
* @param {boolean} params.active - Whether the schedule is active.
|
|
1050
|
+
* @param {object} params.data - Schedule data as a JSON string. Used to store resource-specific context needed for execution.
|
|
1051
|
+
* @throws {AppwriteException}
|
|
1052
|
+
* @returns {Promise<Models.Schedule>}
|
|
1053
|
+
*/
|
|
1054
|
+
createSchedule(params: {
|
|
1055
|
+
projectId: string;
|
|
1056
|
+
resourceType: ResourceType;
|
|
1057
|
+
resourceId: string;
|
|
1058
|
+
schedule: string;
|
|
1059
|
+
active?: boolean;
|
|
1060
|
+
data?: object;
|
|
1061
|
+
}): Promise<Models.Schedule>;
|
|
1062
|
+
/**
|
|
1063
|
+
* Create a new schedule for a resource.
|
|
1064
|
+
*
|
|
1065
|
+
* @param {string} projectId - Project unique ID.
|
|
1066
|
+
* @param {ResourceType} resourceType - The resource type for the schedule. Possible values: function, execution, message, backup.
|
|
1067
|
+
* @param {string} resourceId - The resource ID to associate with this schedule.
|
|
1068
|
+
* @param {string} schedule - Schedule CRON expression.
|
|
1069
|
+
* @param {boolean} active - Whether the schedule is active.
|
|
1070
|
+
* @param {object} data - Schedule data as a JSON string. Used to store resource-specific context needed for execution.
|
|
1071
|
+
* @throws {AppwriteException}
|
|
1072
|
+
* @returns {Promise<Models.Schedule>}
|
|
1073
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1074
|
+
*/
|
|
1075
|
+
createSchedule(projectId: string, resourceType: ResourceType, resourceId: string, schedule: string, active?: boolean, data?: object): Promise<Models.Schedule>;
|
|
1076
|
+
/**
|
|
1077
|
+
* Get a schedule by its unique ID.
|
|
1078
|
+
*
|
|
1079
|
+
* @param {string} params.projectId - Project unique ID.
|
|
1080
|
+
* @param {string} params.scheduleId - Schedule ID.
|
|
1081
|
+
* @throws {AppwriteException}
|
|
1082
|
+
* @returns {Promise<Models.Schedule>}
|
|
1083
|
+
*/
|
|
1084
|
+
getSchedule(params: {
|
|
1085
|
+
projectId: string;
|
|
1086
|
+
scheduleId: string;
|
|
1087
|
+
}): Promise<Models.Schedule>;
|
|
1088
|
+
/**
|
|
1089
|
+
* Get a schedule by its unique ID.
|
|
1090
|
+
*
|
|
1091
|
+
* @param {string} projectId - Project unique ID.
|
|
1092
|
+
* @param {string} scheduleId - Schedule ID.
|
|
1093
|
+
* @throws {AppwriteException}
|
|
1094
|
+
* @returns {Promise<Models.Schedule>}
|
|
1095
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1096
|
+
*/
|
|
1097
|
+
getSchedule(projectId: string, scheduleId: string): Promise<Models.Schedule>;
|
|
988
1098
|
/**
|
|
989
1099
|
* Update the status of a specific service. Use this endpoint to enable or disable a service in your project.
|
|
990
1100
|
*
|
|
@@ -1219,7 +1329,8 @@ export declare class Projects {
|
|
|
1219
1329
|
*/
|
|
1220
1330
|
createSMTPTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
|
|
1221
1331
|
/**
|
|
1222
|
-
* Update the status of a project
|
|
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
|
+
*
|
|
1223
1334
|
*
|
|
1224
1335
|
* @param {string} params.projectId - Project ID
|
|
1225
1336
|
* @param {Status} params.status - New status for the project
|
|
@@ -1231,7 +1342,8 @@ export declare class Projects {
|
|
|
1231
1342
|
status: Status;
|
|
1232
1343
|
}): Promise<{}>;
|
|
1233
1344
|
/**
|
|
1234
|
-
* Update the status of a project
|
|
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
|
+
*
|
|
1235
1347
|
*
|
|
1236
1348
|
* @param {string} projectId - Project ID
|
|
1237
1349
|
* @param {Status} status - New status for the project
|
|
@@ -1511,175 +1623,4 @@ export declare class Projects {
|
|
|
1511
1623
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1512
1624
|
*/
|
|
1513
1625
|
deleteSMSTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate>;
|
|
1514
|
-
/**
|
|
1515
|
-
* Get a list of all webhooks belonging to the project. You can use the query params to filter your results.
|
|
1516
|
-
*
|
|
1517
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1518
|
-
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1519
|
-
* @throws {AppwriteException}
|
|
1520
|
-
* @returns {Promise<Models.WebhookList>}
|
|
1521
|
-
*/
|
|
1522
|
-
listWebhooks(params: {
|
|
1523
|
-
projectId: string;
|
|
1524
|
-
total?: boolean;
|
|
1525
|
-
}): Promise<Models.WebhookList>;
|
|
1526
|
-
/**
|
|
1527
|
-
* Get a list of all webhooks belonging to the project. You can use the query params to filter your results.
|
|
1528
|
-
*
|
|
1529
|
-
* @param {string} projectId - Project unique ID.
|
|
1530
|
-
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1531
|
-
* @throws {AppwriteException}
|
|
1532
|
-
* @returns {Promise<Models.WebhookList>}
|
|
1533
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1534
|
-
*/
|
|
1535
|
-
listWebhooks(projectId: string, total?: boolean): Promise<Models.WebhookList>;
|
|
1536
|
-
/**
|
|
1537
|
-
* Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.
|
|
1538
|
-
*
|
|
1539
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1540
|
-
* @param {string} params.name - Webhook name. Max length: 128 chars.
|
|
1541
|
-
* @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
|
|
1542
|
-
* @param {string} params.url - Webhook URL.
|
|
1543
|
-
* @param {boolean} params.security - Certificate verification, false for disabled or true for enabled.
|
|
1544
|
-
* @param {boolean} params.enabled - Enable or disable a webhook.
|
|
1545
|
-
* @param {string} params.httpUser - Webhook HTTP user. Max length: 256 chars.
|
|
1546
|
-
* @param {string} params.httpPass - Webhook HTTP password. Max length: 256 chars.
|
|
1547
|
-
* @throws {AppwriteException}
|
|
1548
|
-
* @returns {Promise<Models.Webhook>}
|
|
1549
|
-
*/
|
|
1550
|
-
createWebhook(params: {
|
|
1551
|
-
projectId: string;
|
|
1552
|
-
name: string;
|
|
1553
|
-
events: string[];
|
|
1554
|
-
url: string;
|
|
1555
|
-
security: boolean;
|
|
1556
|
-
enabled?: boolean;
|
|
1557
|
-
httpUser?: string;
|
|
1558
|
-
httpPass?: string;
|
|
1559
|
-
}): Promise<Models.Webhook>;
|
|
1560
|
-
/**
|
|
1561
|
-
* Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.
|
|
1562
|
-
*
|
|
1563
|
-
* @param {string} projectId - Project unique ID.
|
|
1564
|
-
* @param {string} name - Webhook name. Max length: 128 chars.
|
|
1565
|
-
* @param {string[]} events - Events list. Maximum of 100 events are allowed.
|
|
1566
|
-
* @param {string} url - Webhook URL.
|
|
1567
|
-
* @param {boolean} security - Certificate verification, false for disabled or true for enabled.
|
|
1568
|
-
* @param {boolean} enabled - Enable or disable a webhook.
|
|
1569
|
-
* @param {string} httpUser - Webhook HTTP user. Max length: 256 chars.
|
|
1570
|
-
* @param {string} httpPass - Webhook HTTP password. Max length: 256 chars.
|
|
1571
|
-
* @throws {AppwriteException}
|
|
1572
|
-
* @returns {Promise<Models.Webhook>}
|
|
1573
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1574
|
-
*/
|
|
1575
|
-
createWebhook(projectId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook>;
|
|
1576
|
-
/**
|
|
1577
|
-
* Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project.
|
|
1578
|
-
*
|
|
1579
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1580
|
-
* @param {string} params.webhookId - Webhook unique ID.
|
|
1581
|
-
* @throws {AppwriteException}
|
|
1582
|
-
* @returns {Promise<Models.Webhook>}
|
|
1583
|
-
*/
|
|
1584
|
-
getWebhook(params: {
|
|
1585
|
-
projectId: string;
|
|
1586
|
-
webhookId: string;
|
|
1587
|
-
}): Promise<Models.Webhook>;
|
|
1588
|
-
/**
|
|
1589
|
-
* Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project.
|
|
1590
|
-
*
|
|
1591
|
-
* @param {string} projectId - Project unique ID.
|
|
1592
|
-
* @param {string} webhookId - Webhook unique ID.
|
|
1593
|
-
* @throws {AppwriteException}
|
|
1594
|
-
* @returns {Promise<Models.Webhook>}
|
|
1595
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1596
|
-
*/
|
|
1597
|
-
getWebhook(projectId: string, webhookId: string): Promise<Models.Webhook>;
|
|
1598
|
-
/**
|
|
1599
|
-
* Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.
|
|
1600
|
-
*
|
|
1601
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1602
|
-
* @param {string} params.webhookId - Webhook unique ID.
|
|
1603
|
-
* @param {string} params.name - Webhook name. Max length: 128 chars.
|
|
1604
|
-
* @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
|
|
1605
|
-
* @param {string} params.url - Webhook URL.
|
|
1606
|
-
* @param {boolean} params.security - Certificate verification, false for disabled or true for enabled.
|
|
1607
|
-
* @param {boolean} params.enabled - Enable or disable a webhook.
|
|
1608
|
-
* @param {string} params.httpUser - Webhook HTTP user. Max length: 256 chars.
|
|
1609
|
-
* @param {string} params.httpPass - Webhook HTTP password. Max length: 256 chars.
|
|
1610
|
-
* @throws {AppwriteException}
|
|
1611
|
-
* @returns {Promise<Models.Webhook>}
|
|
1612
|
-
*/
|
|
1613
|
-
updateWebhook(params: {
|
|
1614
|
-
projectId: string;
|
|
1615
|
-
webhookId: string;
|
|
1616
|
-
name: string;
|
|
1617
|
-
events: string[];
|
|
1618
|
-
url: string;
|
|
1619
|
-
security: boolean;
|
|
1620
|
-
enabled?: boolean;
|
|
1621
|
-
httpUser?: string;
|
|
1622
|
-
httpPass?: string;
|
|
1623
|
-
}): Promise<Models.Webhook>;
|
|
1624
|
-
/**
|
|
1625
|
-
* Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.
|
|
1626
|
-
*
|
|
1627
|
-
* @param {string} projectId - Project unique ID.
|
|
1628
|
-
* @param {string} webhookId - Webhook unique ID.
|
|
1629
|
-
* @param {string} name - Webhook name. Max length: 128 chars.
|
|
1630
|
-
* @param {string[]} events - Events list. Maximum of 100 events are allowed.
|
|
1631
|
-
* @param {string} url - Webhook URL.
|
|
1632
|
-
* @param {boolean} security - Certificate verification, false for disabled or true for enabled.
|
|
1633
|
-
* @param {boolean} enabled - Enable or disable a webhook.
|
|
1634
|
-
* @param {string} httpUser - Webhook HTTP user. Max length: 256 chars.
|
|
1635
|
-
* @param {string} httpPass - Webhook HTTP password. Max length: 256 chars.
|
|
1636
|
-
* @throws {AppwriteException}
|
|
1637
|
-
* @returns {Promise<Models.Webhook>}
|
|
1638
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1639
|
-
*/
|
|
1640
|
-
updateWebhook(projectId: string, webhookId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook>;
|
|
1641
|
-
/**
|
|
1642
|
-
* Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events.
|
|
1643
|
-
*
|
|
1644
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1645
|
-
* @param {string} params.webhookId - Webhook unique ID.
|
|
1646
|
-
* @throws {AppwriteException}
|
|
1647
|
-
* @returns {Promise<{}>}
|
|
1648
|
-
*/
|
|
1649
|
-
deleteWebhook(params: {
|
|
1650
|
-
projectId: string;
|
|
1651
|
-
webhookId: string;
|
|
1652
|
-
}): Promise<{}>;
|
|
1653
|
-
/**
|
|
1654
|
-
* Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events.
|
|
1655
|
-
*
|
|
1656
|
-
* @param {string} projectId - Project unique ID.
|
|
1657
|
-
* @param {string} webhookId - Webhook unique ID.
|
|
1658
|
-
* @throws {AppwriteException}
|
|
1659
|
-
* @returns {Promise<{}>}
|
|
1660
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1661
|
-
*/
|
|
1662
|
-
deleteWebhook(projectId: string, webhookId: string): Promise<{}>;
|
|
1663
|
-
/**
|
|
1664
|
-
* Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook.
|
|
1665
|
-
*
|
|
1666
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1667
|
-
* @param {string} params.webhookId - Webhook unique ID.
|
|
1668
|
-
* @throws {AppwriteException}
|
|
1669
|
-
* @returns {Promise<Models.Webhook>}
|
|
1670
|
-
*/
|
|
1671
|
-
updateWebhookSignature(params: {
|
|
1672
|
-
projectId: string;
|
|
1673
|
-
webhookId: string;
|
|
1674
|
-
}): Promise<Models.Webhook>;
|
|
1675
|
-
/**
|
|
1676
|
-
* Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook.
|
|
1677
|
-
*
|
|
1678
|
-
* @param {string} projectId - Project unique ID.
|
|
1679
|
-
* @param {string} webhookId - Webhook unique ID.
|
|
1680
|
-
* @throws {AppwriteException}
|
|
1681
|
-
* @returns {Promise<Models.Webhook>}
|
|
1682
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1683
|
-
*/
|
|
1684
|
-
updateWebhookSignature(projectId: string, webhookId: string): Promise<Models.Webhook>;
|
|
1685
1626
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { Client } from '../client';
|
|
2
|
+
import { Channel, ActionableChannel, ResolvedChannel } from '../channel';
|
|
3
|
+
import { Query } from '../query';
|
|
2
4
|
export declare type RealtimeSubscription = {
|
|
3
5
|
close: () => Promise<void>;
|
|
4
6
|
};
|
|
5
7
|
export declare type RealtimeCallback<T = any> = {
|
|
6
8
|
channels: Set<string>;
|
|
9
|
+
queries: string[];
|
|
7
10
|
callback: (event: RealtimeResponseEvent<T>) => void;
|
|
8
11
|
};
|
|
9
12
|
export declare type RealtimeResponse = {
|
|
@@ -15,10 +18,14 @@ export declare type RealtimeResponseEvent<T = any> = {
|
|
|
15
18
|
channels: string[];
|
|
16
19
|
timestamp: string;
|
|
17
20
|
payload: T;
|
|
21
|
+
subscriptions: string[];
|
|
18
22
|
};
|
|
19
23
|
export declare type RealtimeResponseConnected = {
|
|
20
24
|
channels: string[];
|
|
21
25
|
user?: object;
|
|
26
|
+
subscriptions?: {
|
|
27
|
+
[slot: string]: string;
|
|
28
|
+
};
|
|
22
29
|
};
|
|
23
30
|
export declare type RealtimeRequest = {
|
|
24
31
|
type: 'authentication';
|
|
@@ -40,12 +47,14 @@ export declare class Realtime {
|
|
|
40
47
|
private readonly HEARTBEAT_INTERVAL;
|
|
41
48
|
private client;
|
|
42
49
|
private socket?;
|
|
43
|
-
private activeChannels;
|
|
44
50
|
private activeSubscriptions;
|
|
51
|
+
private slotToSubscriptionId;
|
|
52
|
+
private subscriptionIdToSlot;
|
|
45
53
|
private heartbeatTimer?;
|
|
46
54
|
private subCallDepth;
|
|
47
55
|
private reconnectAttempts;
|
|
48
56
|
private subscriptionsCounter;
|
|
57
|
+
private connectionId;
|
|
49
58
|
private reconnect;
|
|
50
59
|
private onErrorCallbacks;
|
|
51
60
|
private onCloseCallbacks;
|
|
@@ -78,39 +87,46 @@ export declare class Realtime {
|
|
|
78
87
|
private closeSocket;
|
|
79
88
|
private getTimeout;
|
|
80
89
|
private sleep;
|
|
90
|
+
/**
|
|
91
|
+
* Convert a channel value to a string
|
|
92
|
+
*
|
|
93
|
+
* @private
|
|
94
|
+
* @param {string | Channel<any> | ActionableChannel | ResolvedChannel} channel - Channel value (string or Channel builder instance)
|
|
95
|
+
* @returns {string} Channel string representation
|
|
96
|
+
*/
|
|
97
|
+
private channelToString;
|
|
81
98
|
/**
|
|
82
99
|
* Subscribe to a single channel
|
|
83
100
|
*
|
|
84
|
-
* @param {string} channel - Channel name to subscribe to
|
|
101
|
+
* @param {string | Channel<any> | ActionableChannel | ResolvedChannel} channel - Channel name to subscribe to (string or Channel builder instance)
|
|
85
102
|
* @param {Function} callback - Callback function to handle events
|
|
86
103
|
* @returns {Promise<RealtimeSubscription>} Subscription object with close method
|
|
87
104
|
*/
|
|
88
|
-
subscribe(channel: string, callback: (event: RealtimeResponseEvent<any>) => void): Promise<RealtimeSubscription>;
|
|
105
|
+
subscribe(channel: string | Channel<any> | ActionableChannel | ResolvedChannel, callback: (event: RealtimeResponseEvent<any>) => void, queries?: (string | Query)[]): Promise<RealtimeSubscription>;
|
|
89
106
|
/**
|
|
90
107
|
* Subscribe to multiple channels
|
|
91
108
|
*
|
|
92
|
-
* @param {string[]} channels - Array of channel names to subscribe to
|
|
109
|
+
* @param {(string | Channel<any> | ActionableChannel | ResolvedChannel)[]} channels - Array of channel names to subscribe to (strings or Channel builder instances)
|
|
93
110
|
* @param {Function} callback - Callback function to handle events
|
|
94
111
|
* @returns {Promise<RealtimeSubscription>} Subscription object with close method
|
|
95
112
|
*/
|
|
96
|
-
subscribe(channels: string[], callback: (event: RealtimeResponseEvent<any>) => void): Promise<RealtimeSubscription>;
|
|
113
|
+
subscribe(channels: (string | Channel<any> | ActionableChannel | ResolvedChannel)[], callback: (event: RealtimeResponseEvent<any>) => void, queries?: (string | Query)[]): Promise<RealtimeSubscription>;
|
|
97
114
|
/**
|
|
98
115
|
* Subscribe to a single channel with typed payload
|
|
99
116
|
*
|
|
100
|
-
* @param {string} channel - Channel name to subscribe to
|
|
117
|
+
* @param {string | Channel<any> | ActionableChannel | ResolvedChannel} channel - Channel name to subscribe to (string or Channel builder instance)
|
|
101
118
|
* @param {Function} callback - Callback function to handle events with typed payload
|
|
102
119
|
* @returns {Promise<RealtimeSubscription>} Subscription object with close method
|
|
103
120
|
*/
|
|
104
|
-
subscribe<T>(channel: string, callback: (event: RealtimeResponseEvent<T>) => void): Promise<RealtimeSubscription>;
|
|
121
|
+
subscribe<T>(channel: string | Channel<any> | ActionableChannel | ResolvedChannel, callback: (event: RealtimeResponseEvent<T>) => void, queries?: (string | Query)[]): Promise<RealtimeSubscription>;
|
|
105
122
|
/**
|
|
106
123
|
* Subscribe to multiple channels with typed payload
|
|
107
124
|
*
|
|
108
|
-
* @param {string[]} channels - Array of channel names to subscribe to
|
|
125
|
+
* @param {(string | Channel<any> | ActionableChannel | ResolvedChannel)[]} channels - Array of channel names to subscribe to (strings or Channel builder instances)
|
|
109
126
|
* @param {Function} callback - Callback function to handle events with typed payload
|
|
110
127
|
* @returns {Promise<RealtimeSubscription>} Subscription object with close method
|
|
111
128
|
*/
|
|
112
|
-
subscribe<T>(channels: string[], callback: (event: RealtimeResponseEvent<T>) => void): Promise<RealtimeSubscription>;
|
|
113
|
-
private cleanUp;
|
|
129
|
+
subscribe<T>(channels: (string | Channel<any> | ActionableChannel | ResolvedChannel)[], callback: (event: RealtimeResponseEvent<T>) => void, queries?: (string | Query)[]): Promise<RealtimeSubscription>;
|
|
114
130
|
private handleMessage;
|
|
115
131
|
private handleResponseConnected;
|
|
116
132
|
private handleResponseError;
|