@appwrite.io/console 15.7.0 → 15.8.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 +1 -1
- package/dist/cjs/sdk.js +80 -33
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +80 -33
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +80 -33
- package/package.json +2 -2
- package/types/enums/build-runtime.d.ts +1 -0
- package/types/enums/runtime.d.ts +1 -0
- package/types/models.d.ts +87 -15
- package/types/services/documents-db.d.ts +8 -2
- package/types/services/mongo.d.ts +1 -4
- package/types/services/mysql.d.ts +3 -6
- package/types/services/postgresql.d.ts +3 -6
- package/types/services/project.d.ts +10 -10
- package/types/services/tables-db.d.ts +8 -2
- package/types/services/vectors-db.d.ts +8 -2
- package/types/services/waf.d.ts +30 -12
|
@@ -36,6 +36,7 @@ export declare class DocumentsDB {
|
|
|
36
36
|
* @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.
|
|
37
37
|
* @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.
|
|
38
38
|
* @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
|
+
* @param {string} params.syncMode - Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
|
|
39
40
|
* @throws {AppwriteException}
|
|
40
41
|
* @returns {Promise<Models.Database>}
|
|
41
42
|
*/
|
|
@@ -45,6 +46,7 @@ export declare class DocumentsDB {
|
|
|
45
46
|
enabled?: boolean;
|
|
46
47
|
specification?: string;
|
|
47
48
|
replicas?: number;
|
|
49
|
+
syncMode?: string;
|
|
48
50
|
}): Promise<Models.Database>;
|
|
49
51
|
/**
|
|
50
52
|
* Create a new Database.
|
|
@@ -55,11 +57,12 @@ export declare class DocumentsDB {
|
|
|
55
57
|
* @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.
|
|
56
58
|
* @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.
|
|
57
59
|
* @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.
|
|
60
|
+
* @param {string} syncMode - Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
|
|
58
61
|
* @throws {AppwriteException}
|
|
59
62
|
* @returns {Promise<Models.Database>}
|
|
60
63
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
61
64
|
*/
|
|
62
|
-
create(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number): Promise<Models.Database>;
|
|
65
|
+
create(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number, syncMode?: string): Promise<Models.Database>;
|
|
63
66
|
/**
|
|
64
67
|
* 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.
|
|
65
68
|
*
|
|
@@ -195,6 +198,7 @@ export declare class DocumentsDB {
|
|
|
195
198
|
* @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.
|
|
196
199
|
* @param {string} params.specification - Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.
|
|
197
200
|
* @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.
|
|
201
|
+
* @param {string} params.syncMode - Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
|
|
198
202
|
* @throws {AppwriteException}
|
|
199
203
|
* @returns {Promise<Models.Database>}
|
|
200
204
|
*/
|
|
@@ -204,6 +208,7 @@ export declare class DocumentsDB {
|
|
|
204
208
|
enabled?: boolean;
|
|
205
209
|
specification?: string;
|
|
206
210
|
replicas?: number;
|
|
211
|
+
syncMode?: string;
|
|
207
212
|
}): Promise<Models.Database>;
|
|
208
213
|
/**
|
|
209
214
|
* Update a database by its unique ID.
|
|
@@ -213,11 +218,12 @@ export declare class DocumentsDB {
|
|
|
213
218
|
* @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.
|
|
214
219
|
* @param {string} specification - Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.
|
|
215
220
|
* @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.
|
|
221
|
+
* @param {string} syncMode - Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
|
|
216
222
|
* @throws {AppwriteException}
|
|
217
223
|
* @returns {Promise<Models.Database>}
|
|
218
224
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
219
225
|
*/
|
|
220
|
-
update(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number): Promise<Models.Database>;
|
|
226
|
+
update(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number, syncMode?: string): Promise<Models.Database>;
|
|
221
227
|
/**
|
|
222
228
|
* Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
|
|
223
229
|
*
|
|
@@ -40,7 +40,6 @@ export declare class Mongo {
|
|
|
40
40
|
* @param {boolean} params.storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
|
|
41
41
|
* @param {number} params.storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
|
|
42
42
|
* @param {number} params.storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
|
|
43
|
-
* @param {string} params.api - Product API that owns this database: tablesdb, documentsdb, or vectorsdb. Omit for a raw database reached directly; its api is its engine. tablesdb/documentsdb/vectorsdb databases are reached only through their product APIs.
|
|
44
43
|
* @throws {AppwriteException}
|
|
45
44
|
* @returns {Promise<Models.DedicatedDatabase>}
|
|
46
45
|
*/
|
|
@@ -60,7 +59,6 @@ export declare class Mongo {
|
|
|
60
59
|
storageAutoscaling?: boolean;
|
|
61
60
|
storageAutoscalingThresholdPercent?: number;
|
|
62
61
|
storageAutoscalingMaxGb?: number;
|
|
63
|
-
api?: string;
|
|
64
62
|
}): Promise<Models.DedicatedDatabase>;
|
|
65
63
|
/**
|
|
66
64
|
* Create a new dedicated database with the chosen engine and configuration. Status will be 'provisioning' until the database is ready.
|
|
@@ -80,12 +78,11 @@ export declare class Mongo {
|
|
|
80
78
|
* @param {boolean} storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
|
|
81
79
|
* @param {number} storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
|
|
82
80
|
* @param {number} storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
|
|
83
|
-
* @param {string} api - Product API that owns this database: tablesdb, documentsdb, or vectorsdb. Omit for a raw database reached directly; its api is its engine. tablesdb/documentsdb/vectorsdb databases are reached only through their product APIs.
|
|
84
81
|
* @throws {AppwriteException}
|
|
85
82
|
* @returns {Promise<Models.DedicatedDatabase>}
|
|
86
83
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
87
84
|
*/
|
|
88
|
-
create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number
|
|
85
|
+
create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number): Promise<Models.DedicatedDatabase>;
|
|
89
86
|
/**
|
|
90
87
|
* 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.
|
|
91
88
|
*
|
|
@@ -40,7 +40,6 @@ export declare class Mysql {
|
|
|
40
40
|
* @param {boolean} params.storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
|
|
41
41
|
* @param {number} params.storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
|
|
42
42
|
* @param {number} params.storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
|
|
43
|
-
* @param {string} params.api - Product API that owns this database: tablesdb, documentsdb, or vectorsdb. Omit for a raw database reached directly; its api is its engine. tablesdb/documentsdb/vectorsdb databases are reached only through their product APIs.
|
|
44
43
|
* @throws {AppwriteException}
|
|
45
44
|
* @returns {Promise<Models.DedicatedDatabase>}
|
|
46
45
|
*/
|
|
@@ -60,7 +59,6 @@ export declare class Mysql {
|
|
|
60
59
|
storageAutoscaling?: boolean;
|
|
61
60
|
storageAutoscalingThresholdPercent?: number;
|
|
62
61
|
storageAutoscalingMaxGb?: number;
|
|
63
|
-
api?: string;
|
|
64
62
|
}): Promise<Models.DedicatedDatabase>;
|
|
65
63
|
/**
|
|
66
64
|
* Create a new dedicated database with the chosen engine and configuration. Status will be 'provisioning' until the database is ready.
|
|
@@ -80,12 +78,11 @@ export declare class Mysql {
|
|
|
80
78
|
* @param {boolean} storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
|
|
81
79
|
* @param {number} storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
|
|
82
80
|
* @param {number} storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
|
|
83
|
-
* @param {string} api - Product API that owns this database: tablesdb, documentsdb, or vectorsdb. Omit for a raw database reached directly; its api is its engine. tablesdb/documentsdb/vectorsdb databases are reached only through their product APIs.
|
|
84
81
|
* @throws {AppwriteException}
|
|
85
82
|
* @returns {Promise<Models.DedicatedDatabase>}
|
|
86
83
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
87
84
|
*/
|
|
88
|
-
create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number
|
|
85
|
+
create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number): Promise<Models.DedicatedDatabase>;
|
|
89
86
|
/**
|
|
90
87
|
* 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.
|
|
91
88
|
*
|
|
@@ -737,7 +734,7 @@ export declare class Mysql {
|
|
|
737
734
|
*
|
|
738
735
|
* @param {string} params.databaseId - Database ID.
|
|
739
736
|
* @param {string} params.mode - Connection pool mode. Allowed values: transaction, session. Transaction mode returns connections to the pool after each transaction; session mode holds connections for the entire session lifetime.
|
|
740
|
-
* @param {number} params.maxConnections -
|
|
737
|
+
* @param {number} params.maxConnections - Client-connection ceiling the pooler accepts. Supported on MySQL and MariaDB only; the PostgreSQL pooler has no client cap, so set networkMaxConnections on the database instead.
|
|
741
738
|
* @param {number} params.defaultPoolSize - Default pool size per user.
|
|
742
739
|
* @param {boolean} params.readWriteSplitting - Route SELECTs to HA replicas, writes and locked reads to the primary. Defaults to true when HA is enabled.
|
|
743
740
|
* @param {string} params.poolerCpuRequest - Pooler sidecar CPU request override (Kubernetes quantity, e.g. "250m" or "1"). Leave null for the proportional default (5% of DB CPU, floor 100m).
|
|
@@ -763,7 +760,7 @@ export declare class Mysql {
|
|
|
763
760
|
*
|
|
764
761
|
* @param {string} databaseId - Database ID.
|
|
765
762
|
* @param {string} mode - Connection pool mode. Allowed values: transaction, session. Transaction mode returns connections to the pool after each transaction; session mode holds connections for the entire session lifetime.
|
|
766
|
-
* @param {number} maxConnections -
|
|
763
|
+
* @param {number} maxConnections - Client-connection ceiling the pooler accepts. Supported on MySQL and MariaDB only; the PostgreSQL pooler has no client cap, so set networkMaxConnections on the database instead.
|
|
767
764
|
* @param {number} defaultPoolSize - Default pool size per user.
|
|
768
765
|
* @param {boolean} readWriteSplitting - Route SELECTs to HA replicas, writes and locked reads to the primary. Defaults to true when HA is enabled.
|
|
769
766
|
* @param {string} poolerCpuRequest - Pooler sidecar CPU request override (Kubernetes quantity, e.g. "250m" or "1"). Leave null for the proportional default (5% of DB CPU, floor 100m).
|
|
@@ -40,7 +40,6 @@ export declare class Postgresql {
|
|
|
40
40
|
* @param {boolean} params.storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
|
|
41
41
|
* @param {number} params.storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
|
|
42
42
|
* @param {number} params.storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
|
|
43
|
-
* @param {string} params.api - Product API that owns this database: tablesdb, documentsdb, or vectorsdb. Omit for a raw database reached directly; its api is its engine. tablesdb/documentsdb/vectorsdb databases are reached only through their product APIs.
|
|
44
43
|
* @throws {AppwriteException}
|
|
45
44
|
* @returns {Promise<Models.DedicatedDatabase>}
|
|
46
45
|
*/
|
|
@@ -60,7 +59,6 @@ export declare class Postgresql {
|
|
|
60
59
|
storageAutoscaling?: boolean;
|
|
61
60
|
storageAutoscalingThresholdPercent?: number;
|
|
62
61
|
storageAutoscalingMaxGb?: number;
|
|
63
|
-
api?: string;
|
|
64
62
|
}): Promise<Models.DedicatedDatabase>;
|
|
65
63
|
/**
|
|
66
64
|
* Create a new dedicated database with the chosen engine and configuration. Status will be 'provisioning' until the database is ready.
|
|
@@ -80,12 +78,11 @@ export declare class Postgresql {
|
|
|
80
78
|
* @param {boolean} storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
|
|
81
79
|
* @param {number} storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
|
|
82
80
|
* @param {number} storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
|
|
83
|
-
* @param {string} api - Product API that owns this database: tablesdb, documentsdb, or vectorsdb. Omit for a raw database reached directly; its api is its engine. tablesdb/documentsdb/vectorsdb databases are reached only through their product APIs.
|
|
84
81
|
* @throws {AppwriteException}
|
|
85
82
|
* @returns {Promise<Models.DedicatedDatabase>}
|
|
86
83
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
87
84
|
*/
|
|
88
|
-
create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number
|
|
85
|
+
create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number): Promise<Models.DedicatedDatabase>;
|
|
89
86
|
/**
|
|
90
87
|
* 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.
|
|
91
88
|
*
|
|
@@ -800,7 +797,7 @@ export declare class Postgresql {
|
|
|
800
797
|
*
|
|
801
798
|
* @param {string} params.databaseId - Database ID.
|
|
802
799
|
* @param {string} params.mode - Connection pool mode. Allowed values: transaction, session. Transaction mode returns connections to the pool after each transaction; session mode holds connections for the entire session lifetime.
|
|
803
|
-
* @param {number} params.maxConnections -
|
|
800
|
+
* @param {number} params.maxConnections - Client-connection ceiling the pooler accepts. Supported on MySQL and MariaDB only; the PostgreSQL pooler has no client cap, so set networkMaxConnections on the database instead.
|
|
804
801
|
* @param {number} params.defaultPoolSize - Default pool size per user.
|
|
805
802
|
* @param {boolean} params.readWriteSplitting - Route SELECTs to HA replicas, writes and locked reads to the primary. Defaults to true when HA is enabled.
|
|
806
803
|
* @param {string} params.poolerCpuRequest - Pooler sidecar CPU request override (Kubernetes quantity, e.g. "250m" or "1"). Leave null for the proportional default (5% of DB CPU, floor 100m).
|
|
@@ -826,7 +823,7 @@ export declare class Postgresql {
|
|
|
826
823
|
*
|
|
827
824
|
* @param {string} databaseId - Database ID.
|
|
828
825
|
* @param {string} mode - Connection pool mode. Allowed values: transaction, session. Transaction mode returns connections to the pool after each transaction; session mode holds connections for the entire session lifetime.
|
|
829
|
-
* @param {number} maxConnections -
|
|
826
|
+
* @param {number} maxConnections - Client-connection ceiling the pooler accepts. Supported on MySQL and MariaDB only; the PostgreSQL pooler has no client cap, so set networkMaxConnections on the database instead.
|
|
830
827
|
* @param {number} defaultPoolSize - Default pool size per user.
|
|
831
828
|
* @param {boolean} readWriteSplitting - Route SELECTs to HA replicas, writes and locked reads to the primary. Defaults to true when HA is enabled.
|
|
832
829
|
* @param {string} poolerCpuRequest - Pooler sidecar CPU request override (Kubernetes quantity, e.g. "250m" or "1"). Leave null for the proportional default (5% of DB CPU, floor 100m).
|
|
@@ -2017,7 +2017,7 @@ export declare class Project {
|
|
|
2017
2017
|
*
|
|
2018
2018
|
* Keep in mind, while password history policy is disabled, the history is not being stored. Enabling the policy will not have any history on existing users, and it will only start to collect and enforce the policy on password changes since the policy is enabled.
|
|
2019
2019
|
*
|
|
2020
|
-
* @param {number} params.total - Set the password history length per user. Value can be between 1 and
|
|
2020
|
+
* @param {number} params.total - Set the password history length per user. Value can be between 1 and 20, or null to disable the limit.
|
|
2021
2021
|
* @throws {AppwriteException}
|
|
2022
2022
|
* @returns {Promise<Models.Project>}
|
|
2023
2023
|
*/
|
|
@@ -2029,7 +2029,7 @@ export declare class Project {
|
|
|
2029
2029
|
*
|
|
2030
2030
|
* Keep in mind, while password history policy is disabled, the history is not being stored. Enabling the policy will not have any history on existing users, and it will only start to collect and enforce the policy on password changes since the policy is enabled.
|
|
2031
2031
|
*
|
|
2032
|
-
* @param {number} total - Set the password history length per user. Value can be between 1 and
|
|
2032
|
+
* @param {number} total - Set the password history length per user. Value can be between 1 and 20, or null to disable the limit.
|
|
2033
2033
|
* @throws {AppwriteException}
|
|
2034
2034
|
* @returns {Promise<Models.Project>}
|
|
2035
2035
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
@@ -2107,7 +2107,7 @@ export declare class Project {
|
|
|
2107
2107
|
/**
|
|
2108
2108
|
* Update maximum duration how long sessions created within a project should stay active for.
|
|
2109
2109
|
*
|
|
2110
|
-
* @param {number} params.duration - Maximum session length in seconds. Minium allowed value is
|
|
2110
|
+
* @param {number} params.duration - Maximum session length in seconds. Minium allowed value is 60 seconds, and maximum is 1 year, which is 31536000 seconds.
|
|
2111
2111
|
* @throws {AppwriteException}
|
|
2112
2112
|
* @returns {Promise<Models.Project>}
|
|
2113
2113
|
*/
|
|
@@ -2117,7 +2117,7 @@ export declare class Project {
|
|
|
2117
2117
|
/**
|
|
2118
2118
|
* Update maximum duration how long sessions created within a project should stay active for.
|
|
2119
2119
|
*
|
|
2120
|
-
* @param {number} duration - Maximum session length in seconds. Minium allowed value is
|
|
2120
|
+
* @param {number} duration - Maximum session length in seconds. Minium allowed value is 60 seconds, and maximum is 1 year, which is 31536000 seconds.
|
|
2121
2121
|
* @throws {AppwriteException}
|
|
2122
2122
|
* @returns {Promise<Models.Project>}
|
|
2123
2123
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
@@ -2145,26 +2145,26 @@ export declare class Project {
|
|
|
2145
2145
|
/**
|
|
2146
2146
|
* Update the maximum number of sessions allowed per user. When the limit is hit, the oldest session will be deleted to make room for new one.
|
|
2147
2147
|
*
|
|
2148
|
-
* @param {number} params.total - Set the maximum number of sessions allowed per user. Value can be between 1 and
|
|
2148
|
+
* @param {number} params.total - Set the maximum number of sessions allowed per user. Value can be between 1 and 100.
|
|
2149
2149
|
* @throws {AppwriteException}
|
|
2150
2150
|
* @returns {Promise<Models.Project>}
|
|
2151
2151
|
*/
|
|
2152
2152
|
updateSessionLimitPolicy(params: {
|
|
2153
|
-
total
|
|
2153
|
+
total: number;
|
|
2154
2154
|
}): Promise<Models.Project>;
|
|
2155
2155
|
/**
|
|
2156
2156
|
* Update the maximum number of sessions allowed per user. When the limit is hit, the oldest session will be deleted to make room for new one.
|
|
2157
2157
|
*
|
|
2158
|
-
* @param {number} total - Set the maximum number of sessions allowed per user. Value can be between 1 and
|
|
2158
|
+
* @param {number} total - Set the maximum number of sessions allowed per user. Value can be between 1 and 100.
|
|
2159
2159
|
* @throws {AppwriteException}
|
|
2160
2160
|
* @returns {Promise<Models.Project>}
|
|
2161
2161
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2162
2162
|
*/
|
|
2163
|
-
updateSessionLimitPolicy(total
|
|
2163
|
+
updateSessionLimitPolicy(total: number): Promise<Models.Project>;
|
|
2164
2164
|
/**
|
|
2165
2165
|
* Update the maximum number of users in the project. When the limit is hit or amount of existing users already exceeded the limit, all users remain active, but new user sign up will be prohibited.
|
|
2166
2166
|
*
|
|
2167
|
-
* @param {number} params.total - Set the maximum number of users allowed in the project. Value can be between
|
|
2167
|
+
* @param {number} params.total - Set the maximum number of users allowed in the project. Value can be between 0 and 10000. Use 0 or null to disable the limit.
|
|
2168
2168
|
* @throws {AppwriteException}
|
|
2169
2169
|
* @returns {Promise<Models.Project>}
|
|
2170
2170
|
*/
|
|
@@ -2174,7 +2174,7 @@ export declare class Project {
|
|
|
2174
2174
|
/**
|
|
2175
2175
|
* Update the maximum number of users in the project. When the limit is hit or amount of existing users already exceeded the limit, all users remain active, but new user sign up will be prohibited.
|
|
2176
2176
|
*
|
|
2177
|
-
* @param {number} total - Set the maximum number of users allowed in the project. Value can be between
|
|
2177
|
+
* @param {number} total - Set the maximum number of users allowed in the project. Value can be between 0 and 10000. Use 0 or null to disable the limit.
|
|
2178
2178
|
* @throws {AppwriteException}
|
|
2179
2179
|
* @returns {Promise<Models.Project>}
|
|
2180
2180
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
@@ -41,6 +41,7 @@ export declare class TablesDB {
|
|
|
41
41
|
* @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.
|
|
42
42
|
* @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.
|
|
43
43
|
* @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.
|
|
44
|
+
* @param {string} params.syncMode - Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
|
|
44
45
|
* @throws {AppwriteException}
|
|
45
46
|
* @returns {Promise<Models.Database>}
|
|
46
47
|
*/
|
|
@@ -50,6 +51,7 @@ export declare class TablesDB {
|
|
|
50
51
|
enabled?: boolean;
|
|
51
52
|
specification?: string;
|
|
52
53
|
replicas?: number;
|
|
54
|
+
syncMode?: string;
|
|
53
55
|
}): Promise<Models.Database>;
|
|
54
56
|
/**
|
|
55
57
|
* Create a new Database.
|
|
@@ -60,11 +62,12 @@ export declare class TablesDB {
|
|
|
60
62
|
* @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.
|
|
61
63
|
* @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.
|
|
62
64
|
* @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.
|
|
65
|
+
* @param {string} syncMode - Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
|
|
63
66
|
* @throws {AppwriteException}
|
|
64
67
|
* @returns {Promise<Models.Database>}
|
|
65
68
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
66
69
|
*/
|
|
67
|
-
create(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number): Promise<Models.Database>;
|
|
70
|
+
create(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number, syncMode?: string): Promise<Models.Database>;
|
|
68
71
|
/**
|
|
69
72
|
* 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.
|
|
70
73
|
*
|
|
@@ -222,6 +225,7 @@ export declare class TablesDB {
|
|
|
222
225
|
* @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.
|
|
223
226
|
* @param {string} params.specification - Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.
|
|
224
227
|
* @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.
|
|
228
|
+
* @param {string} params.syncMode - Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
|
|
225
229
|
* @throws {AppwriteException}
|
|
226
230
|
* @returns {Promise<Models.Database>}
|
|
227
231
|
*/
|
|
@@ -231,6 +235,7 @@ export declare class TablesDB {
|
|
|
231
235
|
enabled?: boolean;
|
|
232
236
|
specification?: string;
|
|
233
237
|
replicas?: number;
|
|
238
|
+
syncMode?: string;
|
|
234
239
|
}): Promise<Models.Database>;
|
|
235
240
|
/**
|
|
236
241
|
* Update a database by its unique ID.
|
|
@@ -240,11 +245,12 @@ export declare class TablesDB {
|
|
|
240
245
|
* @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.
|
|
241
246
|
* @param {string} specification - Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.
|
|
242
247
|
* @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.
|
|
248
|
+
* @param {string} syncMode - Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
|
|
243
249
|
* @throws {AppwriteException}
|
|
244
250
|
* @returns {Promise<Models.Database>}
|
|
245
251
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
246
252
|
*/
|
|
247
|
-
update(databaseId: string, name?: string, enabled?: boolean, specification?: string, replicas?: number): Promise<Models.Database>;
|
|
253
|
+
update(databaseId: string, name?: string, enabled?: boolean, specification?: string, replicas?: number, syncMode?: string): Promise<Models.Database>;
|
|
248
254
|
/**
|
|
249
255
|
* Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
|
|
250
256
|
*
|
|
@@ -37,6 +37,7 @@ export declare class VectorsDB {
|
|
|
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
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.
|
|
40
|
+
* @param {string} params.syncMode - Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
|
|
40
41
|
* @throws {AppwriteException}
|
|
41
42
|
* @returns {Promise<Models.Database>}
|
|
42
43
|
*/
|
|
@@ -46,6 +47,7 @@ export declare class VectorsDB {
|
|
|
46
47
|
enabled?: boolean;
|
|
47
48
|
specification?: string;
|
|
48
49
|
replicas?: number;
|
|
50
|
+
syncMode?: string;
|
|
49
51
|
}): Promise<Models.Database>;
|
|
50
52
|
/**
|
|
51
53
|
* Create a new Database.
|
|
@@ -56,11 +58,12 @@ export declare class VectorsDB {
|
|
|
56
58
|
* @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.
|
|
57
59
|
* @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
60
|
* @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.
|
|
61
|
+
* @param {string} syncMode - Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
|
|
59
62
|
* @throws {AppwriteException}
|
|
60
63
|
* @returns {Promise<Models.Database>}
|
|
61
64
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
62
65
|
*/
|
|
63
|
-
create(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number): Promise<Models.Database>;
|
|
66
|
+
create(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number, syncMode?: string): Promise<Models.Database>;
|
|
64
67
|
/**
|
|
65
68
|
* 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.
|
|
66
69
|
*
|
|
@@ -242,6 +245,7 @@ export declare class VectorsDB {
|
|
|
242
245
|
* @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
246
|
* @param {string} params.specification - Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.
|
|
244
247
|
* @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.
|
|
248
|
+
* @param {string} params.syncMode - Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
|
|
245
249
|
* @throws {AppwriteException}
|
|
246
250
|
* @returns {Promise<Models.Database>}
|
|
247
251
|
*/
|
|
@@ -251,6 +255,7 @@ export declare class VectorsDB {
|
|
|
251
255
|
enabled?: boolean;
|
|
252
256
|
specification?: string;
|
|
253
257
|
replicas?: number;
|
|
258
|
+
syncMode?: string;
|
|
254
259
|
}): Promise<Models.Database>;
|
|
255
260
|
/**
|
|
256
261
|
* Update a database by its unique ID.
|
|
@@ -260,11 +265,12 @@ export declare class VectorsDB {
|
|
|
260
265
|
* @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.
|
|
261
266
|
* @param {string} specification - Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.
|
|
262
267
|
* @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.
|
|
268
|
+
* @param {string} syncMode - Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
|
|
263
269
|
* @throws {AppwriteException}
|
|
264
270
|
* @returns {Promise<Models.Database>}
|
|
265
271
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
266
272
|
*/
|
|
267
|
-
update(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number): Promise<Models.Database>;
|
|
273
|
+
update(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number, syncMode?: string): Promise<Models.Database>;
|
|
268
274
|
/**
|
|
269
275
|
* Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
|
|
270
276
|
*
|
package/types/services/waf.d.ts
CHANGED
|
@@ -115,7 +115,7 @@ export declare class Waf {
|
|
|
115
115
|
*/
|
|
116
116
|
updateBypassRule(ruleId: string, resourceType?: string, resourceId?: string, name?: string, description?: string, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleBypass>;
|
|
117
117
|
/**
|
|
118
|
-
* Create a challenge WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
118
|
+
* Create a challenge WAF rule. Use `difficulty` (1 easiest to 5 hardest) to tune the client-side proof-of-work cost, and `ttl` to control how long, in seconds, a visitor stays cleared after passing the challenge before being challenged again. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
119
119
|
*
|
|
120
120
|
*
|
|
121
121
|
* @param {string} params.ruleId - Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.
|
|
@@ -127,6 +127,8 @@ export declare class Waf {
|
|
|
127
127
|
* @param {number} params.priority - Evaluation priority. Lower numbers run earlier.
|
|
128
128
|
* @param {boolean} params.enabled - Set to false to create the rule in a disabled state.
|
|
129
129
|
* @param {string} params.conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
130
|
+
* @param {number} params.difficulty - Challenge difficulty from 1 (easiest) to 5 (hardest). Higher values demand more client-side proof-of-work.
|
|
131
|
+
* @param {number} params.ttl - How long, in seconds, a visitor stays cleared after passing the challenge before being challenged again.
|
|
130
132
|
* @throws {AppwriteException}
|
|
131
133
|
* @returns {Promise<Models.WafRuleChallenge>}
|
|
132
134
|
*/
|
|
@@ -140,9 +142,11 @@ export declare class Waf {
|
|
|
140
142
|
priority?: number;
|
|
141
143
|
enabled?: boolean;
|
|
142
144
|
conditions?: string;
|
|
145
|
+
difficulty?: number;
|
|
146
|
+
ttl?: number;
|
|
143
147
|
}): Promise<Models.WafRuleChallenge>;
|
|
144
148
|
/**
|
|
145
|
-
* Create a challenge WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
149
|
+
* Create a challenge WAF rule. Use `difficulty` (1 easiest to 5 hardest) to tune the client-side proof-of-work cost, and `ttl` to control how long, in seconds, a visitor stays cleared after passing the challenge before being challenged again. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
146
150
|
*
|
|
147
151
|
*
|
|
148
152
|
* @param {string} ruleId - Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.
|
|
@@ -154,13 +158,15 @@ export declare class Waf {
|
|
|
154
158
|
* @param {number} priority - Evaluation priority. Lower numbers run earlier.
|
|
155
159
|
* @param {boolean} enabled - Set to false to create the rule in a disabled state.
|
|
156
160
|
* @param {string} conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
161
|
+
* @param {number} difficulty - Challenge difficulty from 1 (easiest) to 5 (hardest). Higher values demand more client-side proof-of-work.
|
|
162
|
+
* @param {number} ttl - How long, in seconds, a visitor stays cleared after passing the challenge before being challenged again.
|
|
157
163
|
* @throws {AppwriteException}
|
|
158
164
|
* @returns {Promise<Models.WafRuleChallenge>}
|
|
159
165
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
160
166
|
*/
|
|
161
|
-
createChallengeRule(ruleId: string, resourceType: string, name: string, resourceId?: string, description?: string, challengeType?: string, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleChallenge>;
|
|
167
|
+
createChallengeRule(ruleId: string, resourceType: string, name: string, resourceId?: string, description?: string, challengeType?: string, priority?: number, enabled?: boolean, conditions?: string, difficulty?: number, ttl?: number): Promise<Models.WafRuleChallenge>;
|
|
162
168
|
/**
|
|
163
|
-
* Update a challenge WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
169
|
+
* Update a challenge WAF rule. Use `difficulty` (1 easiest to 5 hardest) to tune the client-side proof-of-work cost, and `ttl` to control how long, in seconds, a visitor stays cleared after passing the challenge before being challenged again. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
164
170
|
*
|
|
165
171
|
*
|
|
166
172
|
* @param {string} params.ruleId - Rule ID.
|
|
@@ -172,6 +178,8 @@ export declare class Waf {
|
|
|
172
178
|
* @param {number} params.priority - Evaluation priority. Lower numbers run earlier.
|
|
173
179
|
* @param {boolean} params.enabled - Set to false to disable the rule.
|
|
174
180
|
* @param {string} params.conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
181
|
+
* @param {number} params.difficulty - Challenge difficulty from 1 (easiest) to 5 (hardest). Higher values demand more client-side proof-of-work.
|
|
182
|
+
* @param {number} params.ttl - How long, in seconds, a visitor stays cleared after passing the challenge before being challenged again.
|
|
175
183
|
* @throws {AppwriteException}
|
|
176
184
|
* @returns {Promise<Models.WafRuleChallenge>}
|
|
177
185
|
*/
|
|
@@ -185,9 +193,11 @@ export declare class Waf {
|
|
|
185
193
|
priority?: number;
|
|
186
194
|
enabled?: boolean;
|
|
187
195
|
conditions?: string;
|
|
196
|
+
difficulty?: number;
|
|
197
|
+
ttl?: number;
|
|
188
198
|
}): Promise<Models.WafRuleChallenge>;
|
|
189
199
|
/**
|
|
190
|
-
* Update a challenge WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
200
|
+
* Update a challenge WAF rule. Use `difficulty` (1 easiest to 5 hardest) to tune the client-side proof-of-work cost, and `ttl` to control how long, in seconds, a visitor stays cleared after passing the challenge before being challenged again. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
191
201
|
*
|
|
192
202
|
*
|
|
193
203
|
* @param {string} ruleId - Rule ID.
|
|
@@ -199,11 +209,13 @@ export declare class Waf {
|
|
|
199
209
|
* @param {number} priority - Evaluation priority. Lower numbers run earlier.
|
|
200
210
|
* @param {boolean} enabled - Set to false to disable the rule.
|
|
201
211
|
* @param {string} conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
212
|
+
* @param {number} difficulty - Challenge difficulty from 1 (easiest) to 5 (hardest). Higher values demand more client-side proof-of-work.
|
|
213
|
+
* @param {number} ttl - How long, in seconds, a visitor stays cleared after passing the challenge before being challenged again.
|
|
202
214
|
* @throws {AppwriteException}
|
|
203
215
|
* @returns {Promise<Models.WafRuleChallenge>}
|
|
204
216
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
205
217
|
*/
|
|
206
|
-
updateChallengeRule(ruleId: string, resourceType?: string, resourceId?: string, name?: string, description?: string, challengeType?: string, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleChallenge>;
|
|
218
|
+
updateChallengeRule(ruleId: string, resourceType?: string, resourceId?: string, name?: string, description?: string, challengeType?: string, priority?: number, enabled?: boolean, conditions?: string, difficulty?: number, ttl?: number): Promise<Models.WafRuleChallenge>;
|
|
207
219
|
/**
|
|
208
220
|
* Create a deny WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
209
221
|
*
|
|
@@ -289,7 +301,7 @@ export declare class Waf {
|
|
|
289
301
|
*/
|
|
290
302
|
updateDenyRule(ruleId: string, resourceType?: string, resourceId?: string, name?: string, description?: string, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleDeny>;
|
|
291
303
|
/**
|
|
292
|
-
* Create a rate limit WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
304
|
+
* Create a rate limit WAF rule. Use `key` to choose the counter: `ip` limits per client IP, while `userId` limits per authenticated user (requests without an authenticated user skip `userId` rules). Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
293
305
|
*
|
|
294
306
|
*
|
|
295
307
|
* @param {string} params.ruleId - Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.
|
|
@@ -299,6 +311,7 @@ export declare class Waf {
|
|
|
299
311
|
* @param {number} params.interval - Interval in seconds used for rate limiting.
|
|
300
312
|
* @param {string} params.resourceId - Resource identifier. Required for functions and sites.
|
|
301
313
|
* @param {string} params.description - Optional description for the rule.
|
|
314
|
+
* @param {string} params.key - Rate limit key. Use `ip` to limit per client IP or `userId` to limit per authenticated user. Requests without an authenticated user skip `userId` rules.
|
|
302
315
|
* @param {number} params.priority - Evaluation priority. Lower numbers run earlier.
|
|
303
316
|
* @param {boolean} params.enabled - Set to false to create the rule in a disabled state.
|
|
304
317
|
* @param {string} params.conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
@@ -313,12 +326,13 @@ export declare class Waf {
|
|
|
313
326
|
interval: number;
|
|
314
327
|
resourceId?: string;
|
|
315
328
|
description?: string;
|
|
329
|
+
key?: string;
|
|
316
330
|
priority?: number;
|
|
317
331
|
enabled?: boolean;
|
|
318
332
|
conditions?: string;
|
|
319
333
|
}): Promise<Models.WafRuleRateLimit>;
|
|
320
334
|
/**
|
|
321
|
-
* Create a rate limit WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
335
|
+
* Create a rate limit WAF rule. Use `key` to choose the counter: `ip` limits per client IP, while `userId` limits per authenticated user (requests without an authenticated user skip `userId` rules). Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
322
336
|
*
|
|
323
337
|
*
|
|
324
338
|
* @param {string} ruleId - Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.
|
|
@@ -328,6 +342,7 @@ export declare class Waf {
|
|
|
328
342
|
* @param {number} interval - Interval in seconds used for rate limiting.
|
|
329
343
|
* @param {string} resourceId - Resource identifier. Required for functions and sites.
|
|
330
344
|
* @param {string} description - Optional description for the rule.
|
|
345
|
+
* @param {string} key - Rate limit key. Use `ip` to limit per client IP or `userId` to limit per authenticated user. Requests without an authenticated user skip `userId` rules.
|
|
331
346
|
* @param {number} priority - Evaluation priority. Lower numbers run earlier.
|
|
332
347
|
* @param {boolean} enabled - Set to false to create the rule in a disabled state.
|
|
333
348
|
* @param {string} conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
@@ -335,9 +350,9 @@ export declare class Waf {
|
|
|
335
350
|
* @returns {Promise<Models.WafRuleRateLimit>}
|
|
336
351
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
337
352
|
*/
|
|
338
|
-
createRateLimitRule(ruleId: string, resourceType: string, name: string, limit: number, interval: number, resourceId?: string, description?: string, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleRateLimit>;
|
|
353
|
+
createRateLimitRule(ruleId: string, resourceType: string, name: string, limit: number, interval: number, resourceId?: string, description?: string, key?: string, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleRateLimit>;
|
|
339
354
|
/**
|
|
340
|
-
* Update a rate limit WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
355
|
+
* Update a rate limit WAF rule. Use `key` to choose the counter: `ip` limits per client IP, while `userId` limits per authenticated user (requests without an authenticated user skip `userId` rules). Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
341
356
|
*
|
|
342
357
|
*
|
|
343
358
|
* @param {string} params.ruleId - Rule ID.
|
|
@@ -347,6 +362,7 @@ export declare class Waf {
|
|
|
347
362
|
* @param {string} params.description - Optional description for the rule.
|
|
348
363
|
* @param {number} params.limit - Maximum number of matching requests allowed in the configured interval.
|
|
349
364
|
* @param {number} params.interval - Interval in seconds used for rate limiting.
|
|
365
|
+
* @param {string} params.key - Rate limit key. Use `ip` to limit per client IP or `userId` to limit per authenticated user. Requests without an authenticated user skip `userId` rules.
|
|
350
366
|
* @param {number} params.priority - Evaluation priority. Lower numbers run earlier.
|
|
351
367
|
* @param {boolean} params.enabled - Set to false to disable the rule.
|
|
352
368
|
* @param {string} params.conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
@@ -361,12 +377,13 @@ export declare class Waf {
|
|
|
361
377
|
description?: string;
|
|
362
378
|
limit?: number;
|
|
363
379
|
interval?: number;
|
|
380
|
+
key?: string;
|
|
364
381
|
priority?: number;
|
|
365
382
|
enabled?: boolean;
|
|
366
383
|
conditions?: string;
|
|
367
384
|
}): Promise<Models.WafRuleRateLimit>;
|
|
368
385
|
/**
|
|
369
|
-
* Update a rate limit WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
386
|
+
* Update a rate limit WAF rule. Use `key` to choose the counter: `ip` limits per client IP, while `userId` limits per authenticated user (requests without an authenticated user skip `userId` rules). Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
370
387
|
*
|
|
371
388
|
*
|
|
372
389
|
* @param {string} ruleId - Rule ID.
|
|
@@ -376,6 +393,7 @@ export declare class Waf {
|
|
|
376
393
|
* @param {string} description - Optional description for the rule.
|
|
377
394
|
* @param {number} limit - Maximum number of matching requests allowed in the configured interval.
|
|
378
395
|
* @param {number} interval - Interval in seconds used for rate limiting.
|
|
396
|
+
* @param {string} key - Rate limit key. Use `ip` to limit per client IP or `userId` to limit per authenticated user. Requests without an authenticated user skip `userId` rules.
|
|
379
397
|
* @param {number} priority - Evaluation priority. Lower numbers run earlier.
|
|
380
398
|
* @param {boolean} enabled - Set to false to disable the rule.
|
|
381
399
|
* @param {string} conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
|
|
@@ -383,7 +401,7 @@ export declare class Waf {
|
|
|
383
401
|
* @returns {Promise<Models.WafRuleRateLimit>}
|
|
384
402
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
385
403
|
*/
|
|
386
|
-
updateRateLimitRule(ruleId: string, resourceType?: string, resourceId?: string, name?: string, description?: string, limit?: number, interval?: number, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleRateLimit>;
|
|
404
|
+
updateRateLimitRule(ruleId: string, resourceType?: string, resourceId?: string, name?: string, description?: string, limit?: number, interval?: number, key?: string, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleRateLimit>;
|
|
387
405
|
/**
|
|
388
406
|
* Create a redirect WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
|
|
389
407
|
*
|