@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
|
@@ -36,6 +36,7 @@ export declare class VectorsDB {
|
|
|
36
36
|
* @param {string} params.name - Database name. Max length: 128 chars.
|
|
37
37
|
* @param {boolean} params.enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
38
38
|
* @param {string} params.specification - Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.
|
|
39
|
+
* @param {number} params.replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.
|
|
39
40
|
* @throws {AppwriteException}
|
|
40
41
|
* @returns {Promise<Models.Database>}
|
|
41
42
|
*/
|
|
@@ -44,6 +45,7 @@ export declare class VectorsDB {
|
|
|
44
45
|
name: string;
|
|
45
46
|
enabled?: boolean;
|
|
46
47
|
specification?: string;
|
|
48
|
+
replicas?: number;
|
|
47
49
|
}): Promise<Models.Database>;
|
|
48
50
|
/**
|
|
49
51
|
* Create a new Database.
|
|
@@ -53,11 +55,12 @@ export declare class VectorsDB {
|
|
|
53
55
|
* @param {string} name - Database name. Max length: 128 chars.
|
|
54
56
|
* @param {boolean} enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
55
57
|
* @param {string} specification - Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.
|
|
58
|
+
* @param {number} replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.
|
|
56
59
|
* @throws {AppwriteException}
|
|
57
60
|
* @returns {Promise<Models.Database>}
|
|
58
61
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
59
62
|
*/
|
|
60
|
-
create(databaseId: string, name: string, enabled?: boolean, specification?: string): Promise<Models.Database>;
|
|
63
|
+
create(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number): Promise<Models.Database>;
|
|
61
64
|
/**
|
|
62
65
|
* Generate vector embeddings for an array of text using the selected embedding model. Use the returned vectors to power semantic search and similarity queries against your vector collections.
|
|
63
66
|
*
|
|
@@ -82,6 +85,13 @@ export declare class VectorsDB {
|
|
|
82
85
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
83
86
|
*/
|
|
84
87
|
createTextEmbeddings(texts: string[], model?: EmbeddingModel): Promise<Models.EmbeddingList>;
|
|
88
|
+
/**
|
|
89
|
+
* 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.
|
|
90
|
+
*
|
|
91
|
+
* @throws {AppwriteException}
|
|
92
|
+
* @returns {Promise<Models.DedicatedDatabaseSpecificationList>}
|
|
93
|
+
*/
|
|
94
|
+
listSpecifications(): Promise<Models.DedicatedDatabaseSpecificationList>;
|
|
85
95
|
/**
|
|
86
96
|
* List transactions across all databases.
|
|
87
97
|
*
|
|
@@ -230,6 +240,7 @@ export declare class VectorsDB {
|
|
|
230
240
|
* @param {string} params.databaseId - Database ID.
|
|
231
241
|
* @param {string} params.name - Database name. Max length: 128 chars.
|
|
232
242
|
* @param {boolean} params.enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
243
|
+
* @param {number} params.replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.
|
|
233
244
|
* @throws {AppwriteException}
|
|
234
245
|
* @returns {Promise<Models.Database>}
|
|
235
246
|
*/
|
|
@@ -237,6 +248,7 @@ export declare class VectorsDB {
|
|
|
237
248
|
databaseId: string;
|
|
238
249
|
name: string;
|
|
239
250
|
enabled?: boolean;
|
|
251
|
+
replicas?: number;
|
|
240
252
|
}): Promise<Models.Database>;
|
|
241
253
|
/**
|
|
242
254
|
* Update a database by its unique ID.
|
|
@@ -244,11 +256,12 @@ export declare class VectorsDB {
|
|
|
244
256
|
* @param {string} databaseId - Database ID.
|
|
245
257
|
* @param {string} name - Database name. Max length: 128 chars.
|
|
246
258
|
* @param {boolean} enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
259
|
+
* @param {number} replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.
|
|
247
260
|
* @throws {AppwriteException}
|
|
248
261
|
* @returns {Promise<Models.Database>}
|
|
249
262
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
250
263
|
*/
|
|
251
|
-
update(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
|
|
264
|
+
update(databaseId: string, name: string, enabled?: boolean, replicas?: number): Promise<Models.Database>;
|
|
252
265
|
/**
|
|
253
266
|
* Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
|
|
254
267
|
*
|
|
@@ -593,6 +606,42 @@ export declare class VectorsDB {
|
|
|
593
606
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
594
607
|
*/
|
|
595
608
|
deleteDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string): Promise<Models.DocumentList<Document>>;
|
|
609
|
+
/**
|
|
610
|
+
* Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string.
|
|
611
|
+
*
|
|
612
|
+
*
|
|
613
|
+
* @param {string} params.databaseId - Database ID.
|
|
614
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
615
|
+
* @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.
|
|
616
|
+
* @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
617
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
618
|
+
* @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
|
|
619
|
+
* @throws {AppwriteException}
|
|
620
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
621
|
+
*/
|
|
622
|
+
createQuery<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
623
|
+
databaseId: string;
|
|
624
|
+
collectionId: string;
|
|
625
|
+
queries?: string[];
|
|
626
|
+
transactionId?: string;
|
|
627
|
+
total?: boolean;
|
|
628
|
+
ttl?: number;
|
|
629
|
+
}): Promise<Models.DocumentList<Document>>;
|
|
630
|
+
/**
|
|
631
|
+
* Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string.
|
|
632
|
+
*
|
|
633
|
+
*
|
|
634
|
+
* @param {string} databaseId - Database ID.
|
|
635
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
636
|
+
* @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.
|
|
637
|
+
* @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
638
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
639
|
+
* @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
|
|
640
|
+
* @throws {AppwriteException}
|
|
641
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
642
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
643
|
+
*/
|
|
644
|
+
createQuery<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number): Promise<Models.DocumentList<Document>>;
|
|
596
645
|
/**
|
|
597
646
|
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
|
|
598
647
|
*
|
|
@@ -837,4 +886,64 @@ export declare class VectorsDB {
|
|
|
837
886
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
838
887
|
*/
|
|
839
888
|
deleteIndex(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
889
|
+
/**
|
|
890
|
+
* Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates.
|
|
891
|
+
*
|
|
892
|
+
* @param {string} params.databaseId - Database ID.
|
|
893
|
+
* @param {string} params.targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
|
|
894
|
+
* @throws {AppwriteException}
|
|
895
|
+
* @returns {Promise<Models.DedicatedDatabase>}
|
|
896
|
+
*/
|
|
897
|
+
createFailover(params: {
|
|
898
|
+
databaseId: string;
|
|
899
|
+
targetReplicaId?: string;
|
|
900
|
+
}): Promise<Models.DedicatedDatabase>;
|
|
901
|
+
/**
|
|
902
|
+
* Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates.
|
|
903
|
+
*
|
|
904
|
+
* @param {string} databaseId - Database ID.
|
|
905
|
+
* @param {string} targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
|
|
906
|
+
* @throws {AppwriteException}
|
|
907
|
+
* @returns {Promise<Models.DedicatedDatabase>}
|
|
908
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
909
|
+
*/
|
|
910
|
+
createFailover(databaseId: string, targetReplicaId?: string): Promise<Models.DedicatedDatabase>;
|
|
911
|
+
/**
|
|
912
|
+
* Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.
|
|
913
|
+
*
|
|
914
|
+
* @param {string} params.databaseId - Database ID.
|
|
915
|
+
* @throws {AppwriteException}
|
|
916
|
+
* @returns {Promise<Models.DedicatedDatabaseReplicas>}
|
|
917
|
+
*/
|
|
918
|
+
getReplicas(params: {
|
|
919
|
+
databaseId: string;
|
|
920
|
+
}): Promise<Models.DedicatedDatabaseReplicas>;
|
|
921
|
+
/**
|
|
922
|
+
* Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.
|
|
923
|
+
*
|
|
924
|
+
* @param {string} databaseId - Database ID.
|
|
925
|
+
* @throws {AppwriteException}
|
|
926
|
+
* @returns {Promise<Models.DedicatedDatabaseReplicas>}
|
|
927
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
928
|
+
*/
|
|
929
|
+
getReplicas(databaseId: string): Promise<Models.DedicatedDatabaseReplicas>;
|
|
930
|
+
/**
|
|
931
|
+
* Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.
|
|
932
|
+
*
|
|
933
|
+
* @param {string} params.databaseId - Database ID.
|
|
934
|
+
* @throws {AppwriteException}
|
|
935
|
+
* @returns {Promise<Models.DatabaseStatus>}
|
|
936
|
+
*/
|
|
937
|
+
getStatus(params: {
|
|
938
|
+
databaseId: string;
|
|
939
|
+
}): Promise<Models.DatabaseStatus>;
|
|
940
|
+
/**
|
|
941
|
+
* Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.
|
|
942
|
+
*
|
|
943
|
+
* @param {string} databaseId - Database ID.
|
|
944
|
+
* @throws {AppwriteException}
|
|
945
|
+
* @returns {Promise<Models.DatabaseStatus>}
|
|
946
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
947
|
+
*/
|
|
948
|
+
getStatus(databaseId: string): Promise<Models.DatabaseStatus>;
|
|
840
949
|
}
|
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
import { Client } from '../client';
|
|
2
|
+
import type { Models } from '../models';
|
|
3
|
+
export declare class Waf {
|
|
4
|
+
client: Client;
|
|
5
|
+
constructor(client: Client);
|
|
6
|
+
/**
|
|
7
|
+
* List WAF rules for the current project.
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* @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.
|
|
11
|
+
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
12
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
13
|
+
* @throws {AppwriteException}
|
|
14
|
+
* @returns {Promise<Models.WafRuleList>}
|
|
15
|
+
*/
|
|
16
|
+
listRules(params?: {
|
|
17
|
+
queries?: string[];
|
|
18
|
+
search?: string;
|
|
19
|
+
total?: boolean;
|
|
20
|
+
}): Promise<Models.WafRuleList>;
|
|
21
|
+
/**
|
|
22
|
+
* List WAF rules for the current project.
|
|
23
|
+
*
|
|
24
|
+
*
|
|
25
|
+
* @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.
|
|
26
|
+
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
27
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
28
|
+
* @throws {AppwriteException}
|
|
29
|
+
* @returns {Promise<Models.WafRuleList>}
|
|
30
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
31
|
+
*/
|
|
32
|
+
listRules(queries?: string[], search?: string, total?: boolean): Promise<Models.WafRuleList>;
|
|
33
|
+
/**
|
|
34
|
+
* Create a bypass WAF rule.
|
|
35
|
+
*
|
|
36
|
+
*
|
|
37
|
+
* @param {string} params.ruleId - Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.
|
|
38
|
+
* @param {string} params.resourceType - Resource type the rule applies to.
|
|
39
|
+
* @param {string} params.name - Rule name.
|
|
40
|
+
* @param {string} params.resourceId - Resource identifier. Leave empty for the API resource type.
|
|
41
|
+
* @param {string} params.description - Optional description for the rule.
|
|
42
|
+
* @param {number} params.priority - Evaluation priority. Lower numbers run earlier.
|
|
43
|
+
* @param {boolean} params.enabled - Set to false to create the rule in a disabled state.
|
|
44
|
+
* @param {string} params.conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
45
|
+
* @throws {AppwriteException}
|
|
46
|
+
* @returns {Promise<Models.WafRuleBypass>}
|
|
47
|
+
*/
|
|
48
|
+
createBypassRule(params: {
|
|
49
|
+
ruleId: string;
|
|
50
|
+
resourceType: string;
|
|
51
|
+
name: string;
|
|
52
|
+
resourceId?: string;
|
|
53
|
+
description?: string;
|
|
54
|
+
priority?: number;
|
|
55
|
+
enabled?: boolean;
|
|
56
|
+
conditions?: string;
|
|
57
|
+
}): Promise<Models.WafRuleBypass>;
|
|
58
|
+
/**
|
|
59
|
+
* Create a bypass WAF rule.
|
|
60
|
+
*
|
|
61
|
+
*
|
|
62
|
+
* @param {string} ruleId - Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.
|
|
63
|
+
* @param {string} resourceType - Resource type the rule applies to.
|
|
64
|
+
* @param {string} name - Rule name.
|
|
65
|
+
* @param {string} resourceId - Resource identifier. Leave empty for the API resource type.
|
|
66
|
+
* @param {string} description - Optional description for the rule.
|
|
67
|
+
* @param {number} priority - Evaluation priority. Lower numbers run earlier.
|
|
68
|
+
* @param {boolean} enabled - Set to false to create the rule in a disabled state.
|
|
69
|
+
* @param {string} conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
70
|
+
* @throws {AppwriteException}
|
|
71
|
+
* @returns {Promise<Models.WafRuleBypass>}
|
|
72
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
73
|
+
*/
|
|
74
|
+
createBypassRule(ruleId: string, resourceType: string, name: string, resourceId?: string, description?: string, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleBypass>;
|
|
75
|
+
/**
|
|
76
|
+
* Update a bypass WAF rule.
|
|
77
|
+
*
|
|
78
|
+
*
|
|
79
|
+
* @param {string} params.ruleId - Rule ID.
|
|
80
|
+
* @param {string} params.resourceType - Resource type the rule applies to.
|
|
81
|
+
* @param {string} params.resourceId - Resource identifier. Required for functions and sites.
|
|
82
|
+
* @param {string} params.name - Rule name.
|
|
83
|
+
* @param {string} params.description - Optional description for the rule.
|
|
84
|
+
* @param {number} params.priority - Evaluation priority. Lower numbers run earlier.
|
|
85
|
+
* @param {boolean} params.enabled - Set to false to disable the rule.
|
|
86
|
+
* @param {string} params.conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
87
|
+
* @throws {AppwriteException}
|
|
88
|
+
* @returns {Promise<Models.WafRuleBypass>}
|
|
89
|
+
*/
|
|
90
|
+
updateBypassRule(params: {
|
|
91
|
+
ruleId: string;
|
|
92
|
+
resourceType?: string;
|
|
93
|
+
resourceId?: string;
|
|
94
|
+
name?: string;
|
|
95
|
+
description?: string;
|
|
96
|
+
priority?: number;
|
|
97
|
+
enabled?: boolean;
|
|
98
|
+
conditions?: string;
|
|
99
|
+
}): Promise<Models.WafRuleBypass>;
|
|
100
|
+
/**
|
|
101
|
+
* Update a bypass WAF rule.
|
|
102
|
+
*
|
|
103
|
+
*
|
|
104
|
+
* @param {string} ruleId - Rule ID.
|
|
105
|
+
* @param {string} resourceType - Resource type the rule applies to.
|
|
106
|
+
* @param {string} resourceId - Resource identifier. Required for functions and sites.
|
|
107
|
+
* @param {string} name - Rule name.
|
|
108
|
+
* @param {string} description - Optional description for the rule.
|
|
109
|
+
* @param {number} priority - Evaluation priority. Lower numbers run earlier.
|
|
110
|
+
* @param {boolean} enabled - Set to false to disable the rule.
|
|
111
|
+
* @param {string} conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
112
|
+
* @throws {AppwriteException}
|
|
113
|
+
* @returns {Promise<Models.WafRuleBypass>}
|
|
114
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
115
|
+
*/
|
|
116
|
+
updateBypassRule(ruleId: string, resourceType?: string, resourceId?: string, name?: string, description?: string, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleBypass>;
|
|
117
|
+
/**
|
|
118
|
+
* Create a deny WAF rule.
|
|
119
|
+
*
|
|
120
|
+
*
|
|
121
|
+
* @param {string} params.ruleId - Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.
|
|
122
|
+
* @param {string} params.resourceType - Resource type the rule applies to.
|
|
123
|
+
* @param {string} params.name - Rule name.
|
|
124
|
+
* @param {string} params.resourceId - Resource identifier. Required for functions and sites.
|
|
125
|
+
* @param {string} params.description - Optional description for the rule.
|
|
126
|
+
* @param {number} params.priority - Evaluation priority. Lower numbers run earlier.
|
|
127
|
+
* @param {boolean} params.enabled - Set to false to create the rule in a disabled state.
|
|
128
|
+
* @param {string} params.conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
129
|
+
* @throws {AppwriteException}
|
|
130
|
+
* @returns {Promise<Models.WafRuleDeny>}
|
|
131
|
+
*/
|
|
132
|
+
createDenyRule(params: {
|
|
133
|
+
ruleId: string;
|
|
134
|
+
resourceType: string;
|
|
135
|
+
name: string;
|
|
136
|
+
resourceId?: string;
|
|
137
|
+
description?: string;
|
|
138
|
+
priority?: number;
|
|
139
|
+
enabled?: boolean;
|
|
140
|
+
conditions?: string;
|
|
141
|
+
}): Promise<Models.WafRuleDeny>;
|
|
142
|
+
/**
|
|
143
|
+
* Create a deny WAF rule.
|
|
144
|
+
*
|
|
145
|
+
*
|
|
146
|
+
* @param {string} ruleId - Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.
|
|
147
|
+
* @param {string} resourceType - Resource type the rule applies to.
|
|
148
|
+
* @param {string} name - Rule name.
|
|
149
|
+
* @param {string} resourceId - Resource identifier. Required for functions and sites.
|
|
150
|
+
* @param {string} description - Optional description for the rule.
|
|
151
|
+
* @param {number} priority - Evaluation priority. Lower numbers run earlier.
|
|
152
|
+
* @param {boolean} enabled - Set to false to create the rule in a disabled state.
|
|
153
|
+
* @param {string} conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
154
|
+
* @throws {AppwriteException}
|
|
155
|
+
* @returns {Promise<Models.WafRuleDeny>}
|
|
156
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
157
|
+
*/
|
|
158
|
+
createDenyRule(ruleId: string, resourceType: string, name: string, resourceId?: string, description?: string, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleDeny>;
|
|
159
|
+
/**
|
|
160
|
+
* Update a deny WAF rule.
|
|
161
|
+
*
|
|
162
|
+
*
|
|
163
|
+
* @param {string} params.ruleId - Rule ID.
|
|
164
|
+
* @param {string} params.resourceType - Resource type the rule applies to.
|
|
165
|
+
* @param {string} params.resourceId - Resource identifier. Required for functions and sites.
|
|
166
|
+
* @param {string} params.name - Rule name.
|
|
167
|
+
* @param {string} params.description - Optional description for the rule.
|
|
168
|
+
* @param {number} params.priority - Evaluation priority. Lower numbers run earlier.
|
|
169
|
+
* @param {boolean} params.enabled - Set to false to disable the rule.
|
|
170
|
+
* @param {string} params.conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
171
|
+
* @throws {AppwriteException}
|
|
172
|
+
* @returns {Promise<Models.WafRuleDeny>}
|
|
173
|
+
*/
|
|
174
|
+
updateDenyRule(params: {
|
|
175
|
+
ruleId: string;
|
|
176
|
+
resourceType?: string;
|
|
177
|
+
resourceId?: string;
|
|
178
|
+
name?: string;
|
|
179
|
+
description?: string;
|
|
180
|
+
priority?: number;
|
|
181
|
+
enabled?: boolean;
|
|
182
|
+
conditions?: string;
|
|
183
|
+
}): Promise<Models.WafRuleDeny>;
|
|
184
|
+
/**
|
|
185
|
+
* Update a deny WAF rule.
|
|
186
|
+
*
|
|
187
|
+
*
|
|
188
|
+
* @param {string} ruleId - Rule ID.
|
|
189
|
+
* @param {string} resourceType - Resource type the rule applies to.
|
|
190
|
+
* @param {string} resourceId - Resource identifier. Required for functions and sites.
|
|
191
|
+
* @param {string} name - Rule name.
|
|
192
|
+
* @param {string} description - Optional description for the rule.
|
|
193
|
+
* @param {number} priority - Evaluation priority. Lower numbers run earlier.
|
|
194
|
+
* @param {boolean} enabled - Set to false to disable the rule.
|
|
195
|
+
* @param {string} conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
196
|
+
* @throws {AppwriteException}
|
|
197
|
+
* @returns {Promise<Models.WafRuleDeny>}
|
|
198
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
199
|
+
*/
|
|
200
|
+
updateDenyRule(ruleId: string, resourceType?: string, resourceId?: string, name?: string, description?: string, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleDeny>;
|
|
201
|
+
/**
|
|
202
|
+
* Create a rate limit WAF rule.
|
|
203
|
+
*
|
|
204
|
+
*
|
|
205
|
+
* @param {string} params.ruleId - Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.
|
|
206
|
+
* @param {string} params.resourceType - Resource type the rule applies to.
|
|
207
|
+
* @param {string} params.name - Rule name.
|
|
208
|
+
* @param {number} params.limit - Maximum number of matching requests allowed in the configured interval.
|
|
209
|
+
* @param {number} params.interval - Interval in seconds used for rate limiting.
|
|
210
|
+
* @param {string} params.resourceId - Resource identifier. Required for functions and sites.
|
|
211
|
+
* @param {string} params.description - Optional description for the rule.
|
|
212
|
+
* @param {number} params.priority - Evaluation priority. Lower numbers run earlier.
|
|
213
|
+
* @param {boolean} params.enabled - Set to false to create the rule in a disabled state.
|
|
214
|
+
* @param {string} params.conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
215
|
+
* @throws {AppwriteException}
|
|
216
|
+
* @returns {Promise<Models.WafRuleRateLimit>}
|
|
217
|
+
*/
|
|
218
|
+
createRateLimitRule(params: {
|
|
219
|
+
ruleId: string;
|
|
220
|
+
resourceType: string;
|
|
221
|
+
name: string;
|
|
222
|
+
limit: number;
|
|
223
|
+
interval: number;
|
|
224
|
+
resourceId?: string;
|
|
225
|
+
description?: string;
|
|
226
|
+
priority?: number;
|
|
227
|
+
enabled?: boolean;
|
|
228
|
+
conditions?: string;
|
|
229
|
+
}): Promise<Models.WafRuleRateLimit>;
|
|
230
|
+
/**
|
|
231
|
+
* Create a rate limit WAF rule.
|
|
232
|
+
*
|
|
233
|
+
*
|
|
234
|
+
* @param {string} ruleId - Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.
|
|
235
|
+
* @param {string} resourceType - Resource type the rule applies to.
|
|
236
|
+
* @param {string} name - Rule name.
|
|
237
|
+
* @param {number} limit - Maximum number of matching requests allowed in the configured interval.
|
|
238
|
+
* @param {number} interval - Interval in seconds used for rate limiting.
|
|
239
|
+
* @param {string} resourceId - Resource identifier. Required for functions and sites.
|
|
240
|
+
* @param {string} description - Optional description for the rule.
|
|
241
|
+
* @param {number} priority - Evaluation priority. Lower numbers run earlier.
|
|
242
|
+
* @param {boolean} enabled - Set to false to create the rule in a disabled state.
|
|
243
|
+
* @param {string} conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
244
|
+
* @throws {AppwriteException}
|
|
245
|
+
* @returns {Promise<Models.WafRuleRateLimit>}
|
|
246
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
247
|
+
*/
|
|
248
|
+
createRateLimitRule(ruleId: string, resourceType: string, name: string, limit: number, interval: number, resourceId?: string, description?: string, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleRateLimit>;
|
|
249
|
+
/**
|
|
250
|
+
* Update a rate limit WAF rule.
|
|
251
|
+
*
|
|
252
|
+
*
|
|
253
|
+
* @param {string} params.ruleId - Rule ID.
|
|
254
|
+
* @param {string} params.resourceType - Resource type the rule applies to.
|
|
255
|
+
* @param {string} params.resourceId - Resource identifier. Required for functions and sites.
|
|
256
|
+
* @param {string} params.name - Rule name.
|
|
257
|
+
* @param {string} params.description - Optional description for the rule.
|
|
258
|
+
* @param {number} params.limit - Maximum number of matching requests allowed in the configured interval.
|
|
259
|
+
* @param {number} params.interval - Interval in seconds used for rate limiting.
|
|
260
|
+
* @param {number} params.priority - Evaluation priority. Lower numbers run earlier.
|
|
261
|
+
* @param {boolean} params.enabled - Set to false to disable the rule.
|
|
262
|
+
* @param {string} params.conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
263
|
+
* @throws {AppwriteException}
|
|
264
|
+
* @returns {Promise<Models.WafRuleRateLimit>}
|
|
265
|
+
*/
|
|
266
|
+
updateRateLimitRule(params: {
|
|
267
|
+
ruleId: string;
|
|
268
|
+
resourceType?: string;
|
|
269
|
+
resourceId?: string;
|
|
270
|
+
name?: string;
|
|
271
|
+
description?: string;
|
|
272
|
+
limit?: number;
|
|
273
|
+
interval?: number;
|
|
274
|
+
priority?: number;
|
|
275
|
+
enabled?: boolean;
|
|
276
|
+
conditions?: string;
|
|
277
|
+
}): Promise<Models.WafRuleRateLimit>;
|
|
278
|
+
/**
|
|
279
|
+
* Update a rate limit WAF rule.
|
|
280
|
+
*
|
|
281
|
+
*
|
|
282
|
+
* @param {string} ruleId - Rule ID.
|
|
283
|
+
* @param {string} resourceType - Resource type the rule applies to.
|
|
284
|
+
* @param {string} resourceId - Resource identifier. Required for functions and sites.
|
|
285
|
+
* @param {string} name - Rule name.
|
|
286
|
+
* @param {string} description - Optional description for the rule.
|
|
287
|
+
* @param {number} limit - Maximum number of matching requests allowed in the configured interval.
|
|
288
|
+
* @param {number} interval - Interval in seconds used for rate limiting.
|
|
289
|
+
* @param {number} priority - Evaluation priority. Lower numbers run earlier.
|
|
290
|
+
* @param {boolean} enabled - Set to false to disable the rule.
|
|
291
|
+
* @param {string} conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
292
|
+
* @throws {AppwriteException}
|
|
293
|
+
* @returns {Promise<Models.WafRuleRateLimit>}
|
|
294
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
295
|
+
*/
|
|
296
|
+
updateRateLimitRule(ruleId: string, resourceType?: string, resourceId?: string, name?: string, description?: string, limit?: number, interval?: number, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleRateLimit>;
|
|
297
|
+
/**
|
|
298
|
+
* Create a redirect WAF rule.
|
|
299
|
+
*
|
|
300
|
+
*
|
|
301
|
+
* @param {string} params.ruleId - Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.
|
|
302
|
+
* @param {string} params.resourceType - Resource type the rule applies to.
|
|
303
|
+
* @param {string} params.name - Rule name.
|
|
304
|
+
* @param {string} params.location - Location used for redirect responses.
|
|
305
|
+
* @param {number} params.statusCode - Integer status code used for redirect responses.
|
|
306
|
+
* @param {string} params.resourceId - Resource identifier. Required for functions and sites.
|
|
307
|
+
* @param {string} params.description - Optional description for the rule.
|
|
308
|
+
* @param {number} params.priority - Evaluation priority. Lower numbers run earlier.
|
|
309
|
+
* @param {boolean} params.enabled - Set to false to create the rule in a disabled state.
|
|
310
|
+
* @param {string} params.conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
311
|
+
* @throws {AppwriteException}
|
|
312
|
+
* @returns {Promise<Models.WafRuleRedirect>}
|
|
313
|
+
*/
|
|
314
|
+
createRedirectRule(params: {
|
|
315
|
+
ruleId: string;
|
|
316
|
+
resourceType: string;
|
|
317
|
+
name: string;
|
|
318
|
+
location: string;
|
|
319
|
+
statusCode: number;
|
|
320
|
+
resourceId?: string;
|
|
321
|
+
description?: string;
|
|
322
|
+
priority?: number;
|
|
323
|
+
enabled?: boolean;
|
|
324
|
+
conditions?: string;
|
|
325
|
+
}): Promise<Models.WafRuleRedirect>;
|
|
326
|
+
/**
|
|
327
|
+
* Create a redirect WAF rule.
|
|
328
|
+
*
|
|
329
|
+
*
|
|
330
|
+
* @param {string} ruleId - Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.
|
|
331
|
+
* @param {string} resourceType - Resource type the rule applies to.
|
|
332
|
+
* @param {string} name - Rule name.
|
|
333
|
+
* @param {string} location - Location used for redirect responses.
|
|
334
|
+
* @param {number} statusCode - Integer status code used for redirect responses.
|
|
335
|
+
* @param {string} resourceId - Resource identifier. Required for functions and sites.
|
|
336
|
+
* @param {string} description - Optional description for the rule.
|
|
337
|
+
* @param {number} priority - Evaluation priority. Lower numbers run earlier.
|
|
338
|
+
* @param {boolean} enabled - Set to false to create the rule in a disabled state.
|
|
339
|
+
* @param {string} conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
340
|
+
* @throws {AppwriteException}
|
|
341
|
+
* @returns {Promise<Models.WafRuleRedirect>}
|
|
342
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
343
|
+
*/
|
|
344
|
+
createRedirectRule(ruleId: string, resourceType: string, name: string, location: string, statusCode: number, resourceId?: string, description?: string, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleRedirect>;
|
|
345
|
+
/**
|
|
346
|
+
* Update a redirect WAF rule.
|
|
347
|
+
*
|
|
348
|
+
*
|
|
349
|
+
* @param {string} params.ruleId - Rule ID.
|
|
350
|
+
* @param {string} params.resourceType - Resource type the rule applies to.
|
|
351
|
+
* @param {string} params.resourceId - Resource identifier. Required for functions and sites.
|
|
352
|
+
* @param {string} params.name - Rule name.
|
|
353
|
+
* @param {string} params.description - Optional description for the rule.
|
|
354
|
+
* @param {string} params.location - Location used for redirect responses.
|
|
355
|
+
* @param {number} params.statusCode - Integer status code used for redirect responses.
|
|
356
|
+
* @param {number} params.priority - Evaluation priority. Lower numbers run earlier.
|
|
357
|
+
* @param {boolean} params.enabled - Set to false to disable the rule.
|
|
358
|
+
* @param {string} params.conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
359
|
+
* @throws {AppwriteException}
|
|
360
|
+
* @returns {Promise<Models.WafRuleRedirect>}
|
|
361
|
+
*/
|
|
362
|
+
updateRedirectRule(params: {
|
|
363
|
+
ruleId: string;
|
|
364
|
+
resourceType?: string;
|
|
365
|
+
resourceId?: string;
|
|
366
|
+
name?: string;
|
|
367
|
+
description?: string;
|
|
368
|
+
location?: string;
|
|
369
|
+
statusCode?: number;
|
|
370
|
+
priority?: number;
|
|
371
|
+
enabled?: boolean;
|
|
372
|
+
conditions?: string;
|
|
373
|
+
}): Promise<Models.WafRuleRedirect>;
|
|
374
|
+
/**
|
|
375
|
+
* Update a redirect WAF rule.
|
|
376
|
+
*
|
|
377
|
+
*
|
|
378
|
+
* @param {string} ruleId - Rule ID.
|
|
379
|
+
* @param {string} resourceType - Resource type the rule applies to.
|
|
380
|
+
* @param {string} resourceId - Resource identifier. Required for functions and sites.
|
|
381
|
+
* @param {string} name - Rule name.
|
|
382
|
+
* @param {string} description - Optional description for the rule.
|
|
383
|
+
* @param {string} location - Location used for redirect responses.
|
|
384
|
+
* @param {number} statusCode - Integer status code used for redirect responses.
|
|
385
|
+
* @param {number} priority - Evaluation priority. Lower numbers run earlier.
|
|
386
|
+
* @param {boolean} enabled - Set to false to disable the rule.
|
|
387
|
+
* @param {string} conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
388
|
+
* @throws {AppwriteException}
|
|
389
|
+
* @returns {Promise<Models.WafRuleRedirect>}
|
|
390
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
391
|
+
*/
|
|
392
|
+
updateRedirectRule(ruleId: string, resourceType?: string, resourceId?: string, name?: string, description?: string, location?: string, statusCode?: number, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleRedirect>;
|
|
393
|
+
/**
|
|
394
|
+
* Get a WAF rule by its ID.
|
|
395
|
+
*
|
|
396
|
+
*
|
|
397
|
+
* @param {string} params.ruleId - Rule ID.
|
|
398
|
+
* @throws {AppwriteException}
|
|
399
|
+
* @returns {Promise<Models.WafRule>}
|
|
400
|
+
*/
|
|
401
|
+
getRule(params: {
|
|
402
|
+
ruleId: string;
|
|
403
|
+
}): Promise<Models.WafRule>;
|
|
404
|
+
/**
|
|
405
|
+
* Get a WAF rule by its ID.
|
|
406
|
+
*
|
|
407
|
+
*
|
|
408
|
+
* @param {string} ruleId - Rule ID.
|
|
409
|
+
* @throws {AppwriteException}
|
|
410
|
+
* @returns {Promise<Models.WafRule>}
|
|
411
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
412
|
+
*/
|
|
413
|
+
getRule(ruleId: string): Promise<Models.WafRule>;
|
|
414
|
+
/**
|
|
415
|
+
* Delete a WAF rule.
|
|
416
|
+
*
|
|
417
|
+
*
|
|
418
|
+
* @param {string} params.ruleId - Rule ID.
|
|
419
|
+
* @throws {AppwriteException}
|
|
420
|
+
* @returns {Promise<{}>}
|
|
421
|
+
*/
|
|
422
|
+
deleteRule(params: {
|
|
423
|
+
ruleId: string;
|
|
424
|
+
}): Promise<{}>;
|
|
425
|
+
/**
|
|
426
|
+
* Delete a WAF rule.
|
|
427
|
+
*
|
|
428
|
+
*
|
|
429
|
+
* @param {string} ruleId - Rule ID.
|
|
430
|
+
* @throws {AppwriteException}
|
|
431
|
+
* @returns {Promise<{}>}
|
|
432
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
433
|
+
*/
|
|
434
|
+
deleteRule(ruleId: string): Promise<{}>;
|
|
435
|
+
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare enum HealthQueueName {
|
|
2
|
-
V1database = "v1-database",
|
|
3
|
-
V1deletes = "v1-deletes",
|
|
4
|
-
V1audits = "v1-audits",
|
|
5
|
-
V1mails = "v1-mails",
|
|
6
|
-
V1functions = "v1-functions",
|
|
7
|
-
V1statsresources = "v1-stats-resources",
|
|
8
|
-
V1statsusage = "v1-stats-usage",
|
|
9
|
-
V1webhooks = "v1-webhooks",
|
|
10
|
-
V1certificates = "v1-certificates",
|
|
11
|
-
V1builds = "v1-builds",
|
|
12
|
-
V1screenshots = "v1-screenshots",
|
|
13
|
-
V1messaging = "v1-messaging",
|
|
14
|
-
V1migrations = "v1-migrations",
|
|
15
|
-
V1notifications = "v1-notifications"
|
|
16
|
-
}
|