@appwrite.io/console 15.6.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 +237 -33
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +237 -33
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +237 -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 +152 -15
- package/types/services/backups.d.ts +6 -6
- package/types/services/documents-db.d.ts +13 -4
- package/types/services/mongo.d.ts +3 -6
- package/types/services/mysql.d.ts +5 -8
- package/types/services/postgresql.d.ts +5 -8
- package/types/services/project.d.ts +10 -10
- package/types/services/storage.d.ts +4 -1
- package/types/services/tables-db.d.ts +13 -4
- package/types/services/vectors-db.d.ts +13 -4
- package/types/services/waf.d.ts +126 -18
package/dist/esm/sdk.js
CHANGED
|
@@ -645,7 +645,7 @@ class Client {
|
|
|
645
645
|
'x-sdk-name': 'Console',
|
|
646
646
|
'x-sdk-platform': 'console',
|
|
647
647
|
'x-sdk-language': 'web',
|
|
648
|
-
'x-sdk-version': '15.
|
|
648
|
+
'x-sdk-version': '15.8.0',
|
|
649
649
|
'X-Appwrite-Response-Format': '1.9.5',
|
|
650
650
|
};
|
|
651
651
|
this.realtime = {
|
|
@@ -9515,7 +9515,8 @@ class DocumentsDB {
|
|
|
9515
9515
|
name: rest[0],
|
|
9516
9516
|
enabled: rest[1],
|
|
9517
9517
|
specification: rest[2],
|
|
9518
|
-
replicas: rest[3]
|
|
9518
|
+
replicas: rest[3],
|
|
9519
|
+
syncMode: rest[4]
|
|
9519
9520
|
};
|
|
9520
9521
|
}
|
|
9521
9522
|
const databaseId = params.databaseId;
|
|
@@ -9523,6 +9524,7 @@ class DocumentsDB {
|
|
|
9523
9524
|
const enabled = params.enabled;
|
|
9524
9525
|
const specification = params.specification;
|
|
9525
9526
|
const replicas = params.replicas;
|
|
9527
|
+
const syncMode = params.syncMode;
|
|
9526
9528
|
if (typeof databaseId === 'undefined') {
|
|
9527
9529
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
9528
9530
|
}
|
|
@@ -9546,6 +9548,9 @@ class DocumentsDB {
|
|
|
9546
9548
|
if (typeof replicas !== 'undefined') {
|
|
9547
9549
|
payload['replicas'] = replicas;
|
|
9548
9550
|
}
|
|
9551
|
+
if (typeof syncMode !== 'undefined') {
|
|
9552
|
+
payload['syncMode'] = syncMode;
|
|
9553
|
+
}
|
|
9549
9554
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9550
9555
|
const apiHeaders = {
|
|
9551
9556
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -9730,13 +9735,17 @@ class DocumentsDB {
|
|
|
9730
9735
|
databaseId: paramsOrFirst,
|
|
9731
9736
|
name: rest[0],
|
|
9732
9737
|
enabled: rest[1],
|
|
9733
|
-
|
|
9738
|
+
specification: rest[2],
|
|
9739
|
+
replicas: rest[3],
|
|
9740
|
+
syncMode: rest[4]
|
|
9734
9741
|
};
|
|
9735
9742
|
}
|
|
9736
9743
|
const databaseId = params.databaseId;
|
|
9737
9744
|
const name = params.name;
|
|
9738
9745
|
const enabled = params.enabled;
|
|
9746
|
+
const specification = params.specification;
|
|
9739
9747
|
const replicas = params.replicas;
|
|
9748
|
+
const syncMode = params.syncMode;
|
|
9740
9749
|
if (typeof databaseId === 'undefined') {
|
|
9741
9750
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
9742
9751
|
}
|
|
@@ -9751,9 +9760,15 @@ class DocumentsDB {
|
|
|
9751
9760
|
if (typeof enabled !== 'undefined') {
|
|
9752
9761
|
payload['enabled'] = enabled;
|
|
9753
9762
|
}
|
|
9763
|
+
if (typeof specification !== 'undefined') {
|
|
9764
|
+
payload['specification'] = specification;
|
|
9765
|
+
}
|
|
9754
9766
|
if (typeof replicas !== 'undefined') {
|
|
9755
9767
|
payload['replicas'] = replicas;
|
|
9756
9768
|
}
|
|
9769
|
+
if (typeof syncMode !== 'undefined') {
|
|
9770
|
+
payload['syncMode'] = syncMode;
|
|
9771
|
+
}
|
|
9757
9772
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9758
9773
|
const apiHeaders = {
|
|
9759
9774
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -18474,8 +18489,7 @@ class Mongo {
|
|
|
18474
18489
|
pitrRetentionDays: rest[10],
|
|
18475
18490
|
storageAutoscaling: rest[11],
|
|
18476
18491
|
storageAutoscalingThresholdPercent: rest[12],
|
|
18477
|
-
storageAutoscalingMaxGb: rest[13]
|
|
18478
|
-
api: rest[14]
|
|
18492
|
+
storageAutoscalingMaxGb: rest[13]
|
|
18479
18493
|
};
|
|
18480
18494
|
}
|
|
18481
18495
|
const databaseId = params.databaseId;
|
|
@@ -18493,7 +18507,6 @@ class Mongo {
|
|
|
18493
18507
|
const storageAutoscaling = params.storageAutoscaling;
|
|
18494
18508
|
const storageAutoscalingThresholdPercent = params.storageAutoscalingThresholdPercent;
|
|
18495
18509
|
const storageAutoscalingMaxGb = params.storageAutoscalingMaxGb;
|
|
18496
|
-
const api = params.api;
|
|
18497
18510
|
if (typeof databaseId === 'undefined') {
|
|
18498
18511
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
18499
18512
|
}
|
|
@@ -18547,9 +18560,6 @@ class Mongo {
|
|
|
18547
18560
|
if (typeof storageAutoscalingMaxGb !== 'undefined') {
|
|
18548
18561
|
payload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb;
|
|
18549
18562
|
}
|
|
18550
|
-
if (typeof api !== 'undefined') {
|
|
18551
|
-
payload['api'] = api;
|
|
18552
|
-
}
|
|
18553
18563
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
18554
18564
|
const apiHeaders = {
|
|
18555
18565
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -19655,8 +19665,7 @@ class Mysql {
|
|
|
19655
19665
|
pitrRetentionDays: rest[10],
|
|
19656
19666
|
storageAutoscaling: rest[11],
|
|
19657
19667
|
storageAutoscalingThresholdPercent: rest[12],
|
|
19658
|
-
storageAutoscalingMaxGb: rest[13]
|
|
19659
|
-
api: rest[14]
|
|
19668
|
+
storageAutoscalingMaxGb: rest[13]
|
|
19660
19669
|
};
|
|
19661
19670
|
}
|
|
19662
19671
|
const databaseId = params.databaseId;
|
|
@@ -19674,7 +19683,6 @@ class Mysql {
|
|
|
19674
19683
|
const storageAutoscaling = params.storageAutoscaling;
|
|
19675
19684
|
const storageAutoscalingThresholdPercent = params.storageAutoscalingThresholdPercent;
|
|
19676
19685
|
const storageAutoscalingMaxGb = params.storageAutoscalingMaxGb;
|
|
19677
|
-
const api = params.api;
|
|
19678
19686
|
if (typeof databaseId === 'undefined') {
|
|
19679
19687
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
19680
19688
|
}
|
|
@@ -19728,9 +19736,6 @@ class Mysql {
|
|
|
19728
19736
|
if (typeof storageAutoscalingMaxGb !== 'undefined') {
|
|
19729
19737
|
payload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb;
|
|
19730
19738
|
}
|
|
19731
|
-
if (typeof api !== 'undefined') {
|
|
19732
|
-
payload['api'] = api;
|
|
19733
|
-
}
|
|
19734
19739
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
19735
19740
|
const apiHeaders = {
|
|
19736
19741
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -23844,8 +23849,7 @@ class Postgresql {
|
|
|
23844
23849
|
pitrRetentionDays: rest[10],
|
|
23845
23850
|
storageAutoscaling: rest[11],
|
|
23846
23851
|
storageAutoscalingThresholdPercent: rest[12],
|
|
23847
|
-
storageAutoscalingMaxGb: rest[13]
|
|
23848
|
-
api: rest[14]
|
|
23852
|
+
storageAutoscalingMaxGb: rest[13]
|
|
23849
23853
|
};
|
|
23850
23854
|
}
|
|
23851
23855
|
const databaseId = params.databaseId;
|
|
@@ -23863,7 +23867,6 @@ class Postgresql {
|
|
|
23863
23867
|
const storageAutoscaling = params.storageAutoscaling;
|
|
23864
23868
|
const storageAutoscalingThresholdPercent = params.storageAutoscalingThresholdPercent;
|
|
23865
23869
|
const storageAutoscalingMaxGb = params.storageAutoscalingMaxGb;
|
|
23866
|
-
const api = params.api;
|
|
23867
23870
|
if (typeof databaseId === 'undefined') {
|
|
23868
23871
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
23869
23872
|
}
|
|
@@ -23917,9 +23920,6 @@ class Postgresql {
|
|
|
23917
23920
|
if (typeof storageAutoscalingMaxGb !== 'undefined') {
|
|
23918
23921
|
payload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb;
|
|
23919
23922
|
}
|
|
23920
|
-
if (typeof api !== 'undefined') {
|
|
23921
|
-
payload['api'] = api;
|
|
23922
|
-
}
|
|
23923
23923
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
23924
23924
|
const apiHeaders = {
|
|
23925
23925
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -31375,14 +31375,16 @@ class Storage {
|
|
|
31375
31375
|
bucketId: paramsOrFirst,
|
|
31376
31376
|
fileId: rest[0],
|
|
31377
31377
|
file: rest[1],
|
|
31378
|
-
permissions: rest[2]
|
|
31378
|
+
permissions: rest[2],
|
|
31379
|
+
folder: rest[3]
|
|
31379
31380
|
};
|
|
31380
|
-
onProgress = rest[
|
|
31381
|
+
onProgress = rest[4];
|
|
31381
31382
|
}
|
|
31382
31383
|
const bucketId = params.bucketId;
|
|
31383
31384
|
const fileId = params.fileId;
|
|
31384
31385
|
const file = params.file;
|
|
31385
31386
|
const permissions = params.permissions;
|
|
31387
|
+
const folder = params.folder;
|
|
31386
31388
|
if (typeof bucketId === 'undefined') {
|
|
31387
31389
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
31388
31390
|
}
|
|
@@ -31403,6 +31405,9 @@ class Storage {
|
|
|
31403
31405
|
if (typeof permissions !== 'undefined') {
|
|
31404
31406
|
payload['permissions'] = permissions;
|
|
31405
31407
|
}
|
|
31408
|
+
if (typeof folder !== 'undefined') {
|
|
31409
|
+
payload['folder'] = folder;
|
|
31410
|
+
}
|
|
31406
31411
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
31407
31412
|
const apiHeaders = {
|
|
31408
31413
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -31719,7 +31724,8 @@ class TablesDB {
|
|
|
31719
31724
|
name: rest[0],
|
|
31720
31725
|
enabled: rest[1],
|
|
31721
31726
|
specification: rest[2],
|
|
31722
|
-
replicas: rest[3]
|
|
31727
|
+
replicas: rest[3],
|
|
31728
|
+
syncMode: rest[4]
|
|
31723
31729
|
};
|
|
31724
31730
|
}
|
|
31725
31731
|
const databaseId = params.databaseId;
|
|
@@ -31727,6 +31733,7 @@ class TablesDB {
|
|
|
31727
31733
|
const enabled = params.enabled;
|
|
31728
31734
|
const specification = params.specification;
|
|
31729
31735
|
const replicas = params.replicas;
|
|
31736
|
+
const syncMode = params.syncMode;
|
|
31730
31737
|
if (typeof databaseId === 'undefined') {
|
|
31731
31738
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
31732
31739
|
}
|
|
@@ -31750,6 +31757,9 @@ class TablesDB {
|
|
|
31750
31757
|
if (typeof replicas !== 'undefined') {
|
|
31751
31758
|
payload['replicas'] = replicas;
|
|
31752
31759
|
}
|
|
31760
|
+
if (typeof syncMode !== 'undefined') {
|
|
31761
|
+
payload['syncMode'] = syncMode;
|
|
31762
|
+
}
|
|
31753
31763
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
31754
31764
|
const apiHeaders = {
|
|
31755
31765
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -31963,13 +31973,17 @@ class TablesDB {
|
|
|
31963
31973
|
databaseId: paramsOrFirst,
|
|
31964
31974
|
name: rest[0],
|
|
31965
31975
|
enabled: rest[1],
|
|
31966
|
-
|
|
31976
|
+
specification: rest[2],
|
|
31977
|
+
replicas: rest[3],
|
|
31978
|
+
syncMode: rest[4]
|
|
31967
31979
|
};
|
|
31968
31980
|
}
|
|
31969
31981
|
const databaseId = params.databaseId;
|
|
31970
31982
|
const name = params.name;
|
|
31971
31983
|
const enabled = params.enabled;
|
|
31984
|
+
const specification = params.specification;
|
|
31972
31985
|
const replicas = params.replicas;
|
|
31986
|
+
const syncMode = params.syncMode;
|
|
31973
31987
|
if (typeof databaseId === 'undefined') {
|
|
31974
31988
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
31975
31989
|
}
|
|
@@ -31981,9 +31995,15 @@ class TablesDB {
|
|
|
31981
31995
|
if (typeof enabled !== 'undefined') {
|
|
31982
31996
|
payload['enabled'] = enabled;
|
|
31983
31997
|
}
|
|
31998
|
+
if (typeof specification !== 'undefined') {
|
|
31999
|
+
payload['specification'] = specification;
|
|
32000
|
+
}
|
|
31984
32001
|
if (typeof replicas !== 'undefined') {
|
|
31985
32002
|
payload['replicas'] = replicas;
|
|
31986
32003
|
}
|
|
32004
|
+
if (typeof syncMode !== 'undefined') {
|
|
32005
|
+
payload['syncMode'] = syncMode;
|
|
32006
|
+
}
|
|
31987
32007
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
31988
32008
|
const apiHeaders = {
|
|
31989
32009
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -38438,7 +38458,8 @@ class VectorsDB {
|
|
|
38438
38458
|
name: rest[0],
|
|
38439
38459
|
enabled: rest[1],
|
|
38440
38460
|
specification: rest[2],
|
|
38441
|
-
replicas: rest[3]
|
|
38461
|
+
replicas: rest[3],
|
|
38462
|
+
syncMode: rest[4]
|
|
38442
38463
|
};
|
|
38443
38464
|
}
|
|
38444
38465
|
const databaseId = params.databaseId;
|
|
@@ -38446,6 +38467,7 @@ class VectorsDB {
|
|
|
38446
38467
|
const enabled = params.enabled;
|
|
38447
38468
|
const specification = params.specification;
|
|
38448
38469
|
const replicas = params.replicas;
|
|
38470
|
+
const syncMode = params.syncMode;
|
|
38449
38471
|
if (typeof databaseId === 'undefined') {
|
|
38450
38472
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
38451
38473
|
}
|
|
@@ -38469,6 +38491,9 @@ class VectorsDB {
|
|
|
38469
38491
|
if (typeof replicas !== 'undefined') {
|
|
38470
38492
|
payload['replicas'] = replicas;
|
|
38471
38493
|
}
|
|
38494
|
+
if (typeof syncMode !== 'undefined') {
|
|
38495
|
+
payload['syncMode'] = syncMode;
|
|
38496
|
+
}
|
|
38472
38497
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
38473
38498
|
const apiHeaders = {
|
|
38474
38499
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -38714,13 +38739,17 @@ class VectorsDB {
|
|
|
38714
38739
|
databaseId: paramsOrFirst,
|
|
38715
38740
|
name: rest[0],
|
|
38716
38741
|
enabled: rest[1],
|
|
38717
|
-
|
|
38742
|
+
specification: rest[2],
|
|
38743
|
+
replicas: rest[3],
|
|
38744
|
+
syncMode: rest[4]
|
|
38718
38745
|
};
|
|
38719
38746
|
}
|
|
38720
38747
|
const databaseId = params.databaseId;
|
|
38721
38748
|
const name = params.name;
|
|
38722
38749
|
const enabled = params.enabled;
|
|
38750
|
+
const specification = params.specification;
|
|
38723
38751
|
const replicas = params.replicas;
|
|
38752
|
+
const syncMode = params.syncMode;
|
|
38724
38753
|
if (typeof databaseId === 'undefined') {
|
|
38725
38754
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
38726
38755
|
}
|
|
@@ -38735,9 +38764,15 @@ class VectorsDB {
|
|
|
38735
38764
|
if (typeof enabled !== 'undefined') {
|
|
38736
38765
|
payload['enabled'] = enabled;
|
|
38737
38766
|
}
|
|
38767
|
+
if (typeof specification !== 'undefined') {
|
|
38768
|
+
payload['specification'] = specification;
|
|
38769
|
+
}
|
|
38738
38770
|
if (typeof replicas !== 'undefined') {
|
|
38739
38771
|
payload['replicas'] = replicas;
|
|
38740
38772
|
}
|
|
38773
|
+
if (typeof syncMode !== 'undefined') {
|
|
38774
|
+
payload['syncMode'] = syncMode;
|
|
38775
|
+
}
|
|
38741
38776
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
38742
38777
|
const apiHeaders = {
|
|
38743
38778
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -39917,6 +39952,163 @@ class Waf {
|
|
|
39917
39952
|
};
|
|
39918
39953
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
39919
39954
|
}
|
|
39955
|
+
createChallengeRule(paramsOrFirst, ...rest) {
|
|
39956
|
+
let params;
|
|
39957
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
39958
|
+
params = (paramsOrFirst || {});
|
|
39959
|
+
}
|
|
39960
|
+
else {
|
|
39961
|
+
params = {
|
|
39962
|
+
ruleId: paramsOrFirst,
|
|
39963
|
+
resourceType: rest[0],
|
|
39964
|
+
name: rest[1],
|
|
39965
|
+
resourceId: rest[2],
|
|
39966
|
+
description: rest[3],
|
|
39967
|
+
challengeType: rest[4],
|
|
39968
|
+
priority: rest[5],
|
|
39969
|
+
enabled: rest[6],
|
|
39970
|
+
conditions: rest[7],
|
|
39971
|
+
difficulty: rest[8],
|
|
39972
|
+
ttl: rest[9]
|
|
39973
|
+
};
|
|
39974
|
+
}
|
|
39975
|
+
const ruleId = params.ruleId;
|
|
39976
|
+
const resourceType = params.resourceType;
|
|
39977
|
+
const name = params.name;
|
|
39978
|
+
const resourceId = params.resourceId;
|
|
39979
|
+
const description = params.description;
|
|
39980
|
+
const challengeType = params.challengeType;
|
|
39981
|
+
const priority = params.priority;
|
|
39982
|
+
const enabled = params.enabled;
|
|
39983
|
+
const conditions = params.conditions;
|
|
39984
|
+
const difficulty = params.difficulty;
|
|
39985
|
+
const ttl = params.ttl;
|
|
39986
|
+
if (typeof ruleId === 'undefined') {
|
|
39987
|
+
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
39988
|
+
}
|
|
39989
|
+
if (typeof resourceType === 'undefined') {
|
|
39990
|
+
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
39991
|
+
}
|
|
39992
|
+
if (typeof name === 'undefined') {
|
|
39993
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
39994
|
+
}
|
|
39995
|
+
const apiPath = '/waf/rules/challenge';
|
|
39996
|
+
const payload = {};
|
|
39997
|
+
if (typeof ruleId !== 'undefined') {
|
|
39998
|
+
payload['ruleId'] = ruleId;
|
|
39999
|
+
}
|
|
40000
|
+
if (typeof resourceType !== 'undefined') {
|
|
40001
|
+
payload['resourceType'] = resourceType;
|
|
40002
|
+
}
|
|
40003
|
+
if (typeof resourceId !== 'undefined') {
|
|
40004
|
+
payload['resourceId'] = resourceId;
|
|
40005
|
+
}
|
|
40006
|
+
if (typeof name !== 'undefined') {
|
|
40007
|
+
payload['name'] = name;
|
|
40008
|
+
}
|
|
40009
|
+
if (typeof description !== 'undefined') {
|
|
40010
|
+
payload['description'] = description;
|
|
40011
|
+
}
|
|
40012
|
+
if (typeof challengeType !== 'undefined') {
|
|
40013
|
+
payload['challengeType'] = challengeType;
|
|
40014
|
+
}
|
|
40015
|
+
if (typeof priority !== 'undefined') {
|
|
40016
|
+
payload['priority'] = priority;
|
|
40017
|
+
}
|
|
40018
|
+
if (typeof enabled !== 'undefined') {
|
|
40019
|
+
payload['enabled'] = enabled;
|
|
40020
|
+
}
|
|
40021
|
+
if (typeof conditions !== 'undefined') {
|
|
40022
|
+
payload['conditions'] = conditions;
|
|
40023
|
+
}
|
|
40024
|
+
if (typeof difficulty !== 'undefined') {
|
|
40025
|
+
payload['difficulty'] = difficulty;
|
|
40026
|
+
}
|
|
40027
|
+
if (typeof ttl !== 'undefined') {
|
|
40028
|
+
payload['ttl'] = ttl;
|
|
40029
|
+
}
|
|
40030
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
40031
|
+
const apiHeaders = {
|
|
40032
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
40033
|
+
'content-type': 'application/json',
|
|
40034
|
+
'accept': 'application/json',
|
|
40035
|
+
};
|
|
40036
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
40037
|
+
}
|
|
40038
|
+
updateChallengeRule(paramsOrFirst, ...rest) {
|
|
40039
|
+
let params;
|
|
40040
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
40041
|
+
params = (paramsOrFirst || {});
|
|
40042
|
+
}
|
|
40043
|
+
else {
|
|
40044
|
+
params = {
|
|
40045
|
+
ruleId: paramsOrFirst,
|
|
40046
|
+
resourceType: rest[0],
|
|
40047
|
+
resourceId: rest[1],
|
|
40048
|
+
name: rest[2],
|
|
40049
|
+
description: rest[3],
|
|
40050
|
+
challengeType: rest[4],
|
|
40051
|
+
priority: rest[5],
|
|
40052
|
+
enabled: rest[6],
|
|
40053
|
+
conditions: rest[7],
|
|
40054
|
+
difficulty: rest[8],
|
|
40055
|
+
ttl: rest[9]
|
|
40056
|
+
};
|
|
40057
|
+
}
|
|
40058
|
+
const ruleId = params.ruleId;
|
|
40059
|
+
const resourceType = params.resourceType;
|
|
40060
|
+
const resourceId = params.resourceId;
|
|
40061
|
+
const name = params.name;
|
|
40062
|
+
const description = params.description;
|
|
40063
|
+
const challengeType = params.challengeType;
|
|
40064
|
+
const priority = params.priority;
|
|
40065
|
+
const enabled = params.enabled;
|
|
40066
|
+
const conditions = params.conditions;
|
|
40067
|
+
const difficulty = params.difficulty;
|
|
40068
|
+
const ttl = params.ttl;
|
|
40069
|
+
if (typeof ruleId === 'undefined') {
|
|
40070
|
+
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
40071
|
+
}
|
|
40072
|
+
const apiPath = '/waf/rules/challenge/{ruleId}'.replace('{ruleId}', encodeURIComponent(String(ruleId)));
|
|
40073
|
+
const payload = {};
|
|
40074
|
+
if (typeof resourceType !== 'undefined') {
|
|
40075
|
+
payload['resourceType'] = resourceType;
|
|
40076
|
+
}
|
|
40077
|
+
if (typeof resourceId !== 'undefined') {
|
|
40078
|
+
payload['resourceId'] = resourceId;
|
|
40079
|
+
}
|
|
40080
|
+
if (typeof name !== 'undefined') {
|
|
40081
|
+
payload['name'] = name;
|
|
40082
|
+
}
|
|
40083
|
+
if (typeof description !== 'undefined') {
|
|
40084
|
+
payload['description'] = description;
|
|
40085
|
+
}
|
|
40086
|
+
if (typeof challengeType !== 'undefined') {
|
|
40087
|
+
payload['challengeType'] = challengeType;
|
|
40088
|
+
}
|
|
40089
|
+
if (typeof priority !== 'undefined') {
|
|
40090
|
+
payload['priority'] = priority;
|
|
40091
|
+
}
|
|
40092
|
+
if (typeof enabled !== 'undefined') {
|
|
40093
|
+
payload['enabled'] = enabled;
|
|
40094
|
+
}
|
|
40095
|
+
if (typeof conditions !== 'undefined') {
|
|
40096
|
+
payload['conditions'] = conditions;
|
|
40097
|
+
}
|
|
40098
|
+
if (typeof difficulty !== 'undefined') {
|
|
40099
|
+
payload['difficulty'] = difficulty;
|
|
40100
|
+
}
|
|
40101
|
+
if (typeof ttl !== 'undefined') {
|
|
40102
|
+
payload['ttl'] = ttl;
|
|
40103
|
+
}
|
|
40104
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
40105
|
+
const apiHeaders = {
|
|
40106
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
40107
|
+
'content-type': 'application/json',
|
|
40108
|
+
'accept': 'application/json',
|
|
40109
|
+
};
|
|
40110
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
40111
|
+
}
|
|
39920
40112
|
createDenyRule(paramsOrFirst, ...rest) {
|
|
39921
40113
|
let params;
|
|
39922
40114
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -40058,9 +40250,10 @@ class Waf {
|
|
|
40058
40250
|
interval: rest[3],
|
|
40059
40251
|
resourceId: rest[4],
|
|
40060
40252
|
description: rest[5],
|
|
40061
|
-
|
|
40062
|
-
|
|
40063
|
-
|
|
40253
|
+
key: rest[6],
|
|
40254
|
+
priority: rest[7],
|
|
40255
|
+
enabled: rest[8],
|
|
40256
|
+
conditions: rest[9]
|
|
40064
40257
|
};
|
|
40065
40258
|
}
|
|
40066
40259
|
const ruleId = params.ruleId;
|
|
@@ -40070,6 +40263,7 @@ class Waf {
|
|
|
40070
40263
|
const interval = params.interval;
|
|
40071
40264
|
const resourceId = params.resourceId;
|
|
40072
40265
|
const description = params.description;
|
|
40266
|
+
const key = params.key;
|
|
40073
40267
|
const priority = params.priority;
|
|
40074
40268
|
const enabled = params.enabled;
|
|
40075
40269
|
const conditions = params.conditions;
|
|
@@ -40111,6 +40305,9 @@ class Waf {
|
|
|
40111
40305
|
if (typeof interval !== 'undefined') {
|
|
40112
40306
|
payload['interval'] = interval;
|
|
40113
40307
|
}
|
|
40308
|
+
if (typeof key !== 'undefined') {
|
|
40309
|
+
payload['key'] = key;
|
|
40310
|
+
}
|
|
40114
40311
|
if (typeof priority !== 'undefined') {
|
|
40115
40312
|
payload['priority'] = priority;
|
|
40116
40313
|
}
|
|
@@ -40142,9 +40339,10 @@ class Waf {
|
|
|
40142
40339
|
description: rest[3],
|
|
40143
40340
|
limit: rest[4],
|
|
40144
40341
|
interval: rest[5],
|
|
40145
|
-
|
|
40146
|
-
|
|
40147
|
-
|
|
40342
|
+
key: rest[6],
|
|
40343
|
+
priority: rest[7],
|
|
40344
|
+
enabled: rest[8],
|
|
40345
|
+
conditions: rest[9]
|
|
40148
40346
|
};
|
|
40149
40347
|
}
|
|
40150
40348
|
const ruleId = params.ruleId;
|
|
@@ -40154,6 +40352,7 @@ class Waf {
|
|
|
40154
40352
|
const description = params.description;
|
|
40155
40353
|
const limit = params.limit;
|
|
40156
40354
|
const interval = params.interval;
|
|
40355
|
+
const key = params.key;
|
|
40157
40356
|
const priority = params.priority;
|
|
40158
40357
|
const enabled = params.enabled;
|
|
40159
40358
|
const conditions = params.conditions;
|
|
@@ -40180,6 +40379,9 @@ class Waf {
|
|
|
40180
40379
|
if (typeof interval !== 'undefined') {
|
|
40181
40380
|
payload['interval'] = interval;
|
|
40182
40381
|
}
|
|
40382
|
+
if (typeof key !== 'undefined') {
|
|
40383
|
+
payload['key'] = key;
|
|
40384
|
+
}
|
|
40183
40385
|
if (typeof priority !== 'undefined') {
|
|
40184
40386
|
payload['priority'] = priority;
|
|
40185
40387
|
}
|
|
@@ -42862,6 +43064,7 @@ var Runtime;
|
|
|
42862
43064
|
Runtime["Node23"] = "node-23";
|
|
42863
43065
|
Runtime["Node24"] = "node-24";
|
|
42864
43066
|
Runtime["Node25"] = "node-25";
|
|
43067
|
+
Runtime["Node26"] = "node-26";
|
|
42865
43068
|
Runtime["Php80"] = "php-8.0";
|
|
42866
43069
|
Runtime["Php81"] = "php-8.1";
|
|
42867
43070
|
Runtime["Php82"] = "php-8.2";
|
|
@@ -43475,6 +43678,7 @@ var BuildRuntime;
|
|
|
43475
43678
|
BuildRuntime["Node23"] = "node-23";
|
|
43476
43679
|
BuildRuntime["Node24"] = "node-24";
|
|
43477
43680
|
BuildRuntime["Node25"] = "node-25";
|
|
43681
|
+
BuildRuntime["Node26"] = "node-26";
|
|
43478
43682
|
BuildRuntime["Php80"] = "php-8.0";
|
|
43479
43683
|
BuildRuntime["Php81"] = "php-8.1";
|
|
43480
43684
|
BuildRuntime["Php82"] = "php-8.2";
|