@appwrite.io/console 18.4.0-rc.2 → 18.4.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 +2 -2
- package/dist/cjs/sdk.js +463 -2814
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +464 -2811
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +463 -2814
- package/package.json +1 -1
- package/types/enums/project-auth-method-id.d.ts +1 -2
- package/types/enums/project-key-scopes.d.ts +1 -5
- package/types/enums/project-policy-id.d.ts +1 -2
- package/types/enums/proxy-rule-deployment-resource-type.d.ts +1 -2
- package/types/enums/query-suggestion-resource.d.ts +0 -8
- package/types/enums/usage-event-metric.d.ts +0 -3
- package/types/enums/usage-gauge-metric.d.ts +0 -1
- package/types/index.d.ts +0 -11
- package/types/models.d.ts +85 -533
- package/types/service.d.ts +11 -0
- package/types/services/account.d.ts +9 -12
- package/types/services/project.d.ts +19 -28
- package/types/services/push.d.ts +2 -2
- package/types/services/teams.d.ts +1 -4
- package/types/services/users.d.ts +27 -2
- package/types/enums/analytics-dimension.d.ts +0 -24
- package/types/enums/analytics-interval.d.ts +0 -6
- package/types/enums/platform-resource-type.d.ts +0 -11
- package/types/enums/project-resource-type.d.ts +0 -13
- package/types/enums/video-output.d.ts +0 -5
- package/types/enums/video-rendition-status.d.ts +0 -9
- package/types/services/admin.d.ts +0 -80
- package/types/services/analytics-tracking.d.ts +0 -211
- package/types/services/analytics.d.ts +0 -254
- package/types/services/videos.d.ts +0 -860
package/dist/esm/sdk.js
CHANGED
|
@@ -667,7 +667,7 @@ class Client {
|
|
|
667
667
|
'x-sdk-name': 'Console',
|
|
668
668
|
'x-sdk-platform': 'console',
|
|
669
669
|
'x-sdk-language': 'web',
|
|
670
|
-
'x-sdk-version': '18.4.0
|
|
670
|
+
'x-sdk-version': '18.4.0',
|
|
671
671
|
'X-Appwrite-Response-Format': '2.3.0',
|
|
672
672
|
};
|
|
673
673
|
this.realtime = {
|
|
@@ -1520,6 +1520,29 @@ class Client {
|
|
|
1520
1520
|
}
|
|
1521
1521
|
Client.CHUNK_SIZE = 1024 * 1024 * 5;
|
|
1522
1522
|
|
|
1523
|
+
class Service {
|
|
1524
|
+
constructor(client) {
|
|
1525
|
+
this.client = client;
|
|
1526
|
+
}
|
|
1527
|
+
static flatten(data, prefix = '') {
|
|
1528
|
+
let output = {};
|
|
1529
|
+
for (const [key, value] of Object.entries(data)) {
|
|
1530
|
+
const finalKey = prefix ? prefix + '[' + key + ']' : key;
|
|
1531
|
+
if (Array.isArray(value)) {
|
|
1532
|
+
output = Object.assign(Object.assign({}, output), Service.flatten(value, finalKey));
|
|
1533
|
+
}
|
|
1534
|
+
else {
|
|
1535
|
+
output[finalKey] = value;
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
return output;
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
/**
|
|
1542
|
+
* The size for chunked uploads in bytes.
|
|
1543
|
+
*/
|
|
1544
|
+
Service.CHUNK_SIZE = 5 * 1024 * 1024; // 5MB
|
|
1545
|
+
|
|
1523
1546
|
class Account {
|
|
1524
1547
|
constructor(client) {
|
|
1525
1548
|
this.client = client;
|
|
@@ -2996,27 +3019,19 @@ class Account {
|
|
|
2996
3019
|
else {
|
|
2997
3020
|
params = {
|
|
2998
3021
|
passkeyId: paramsOrFirst,
|
|
2999
|
-
|
|
3000
|
-
credential: rest[1],
|
|
3022
|
+
credential: rest[0],
|
|
3001
3023
|
};
|
|
3002
3024
|
}
|
|
3003
3025
|
const passkeyId = params.passkeyId;
|
|
3004
|
-
const challengeId = params.challengeId;
|
|
3005
3026
|
const credential = params.credential;
|
|
3006
3027
|
if (typeof passkeyId === 'undefined' || passkeyId === '') {
|
|
3007
3028
|
throw new AppwriteException('Missing required parameter: "passkeyId"');
|
|
3008
3029
|
}
|
|
3009
|
-
if (typeof challengeId === 'undefined') {
|
|
3010
|
-
throw new AppwriteException('Missing required parameter: "challengeId"');
|
|
3011
|
-
}
|
|
3012
3030
|
if (typeof credential === 'undefined') {
|
|
3013
3031
|
throw new AppwriteException('Missing required parameter: "credential"');
|
|
3014
3032
|
}
|
|
3015
3033
|
const apiPath = '/account/passkeys/{passkeyId}/verification'.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
|
|
3016
3034
|
const apiPayload = {};
|
|
3017
|
-
if (typeof challengeId !== 'undefined') {
|
|
3018
|
-
apiPayload['challengeId'] = challengeId;
|
|
3019
|
-
}
|
|
3020
3035
|
if (typeof credential !== 'undefined') {
|
|
3021
3036
|
apiPayload['credential'] = credential;
|
|
3022
3037
|
}
|
|
@@ -3771,7 +3786,7 @@ class Account {
|
|
|
3771
3786
|
}
|
|
3772
3787
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3773
3788
|
apiPayload['project'] = this.client.config.project;
|
|
3774
|
-
for (const [key, value] of Object.entries(
|
|
3789
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
3775
3790
|
uri.searchParams.append(key, value);
|
|
3776
3791
|
}
|
|
3777
3792
|
if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.location)) {
|
|
@@ -4180,7 +4195,7 @@ class Account {
|
|
|
4180
4195
|
}
|
|
4181
4196
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4182
4197
|
apiPayload['project'] = this.client.config.project;
|
|
4183
|
-
for (const [key, value] of Object.entries(
|
|
4198
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
4184
4199
|
uri.searchParams.append(key, value);
|
|
4185
4200
|
}
|
|
4186
4201
|
if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.location)) {
|
|
@@ -4591,135 +4606,6 @@ class Activities {
|
|
|
4591
4606
|
}
|
|
4592
4607
|
}
|
|
4593
4608
|
|
|
4594
|
-
class Admin {
|
|
4595
|
-
constructor(client) {
|
|
4596
|
-
this.client = client;
|
|
4597
|
-
}
|
|
4598
|
-
/**
|
|
4599
|
-
* Delete everything cached from the platform database in the region serving the request.
|
|
4600
|
-
*
|
|
4601
|
-
* @throws {AppwriteException}
|
|
4602
|
-
* @returns {Promise<{}>}
|
|
4603
|
-
*/
|
|
4604
|
-
deletePlatformCache() {
|
|
4605
|
-
const apiPath = '/admin/cache/platform';
|
|
4606
|
-
const apiPayload = {};
|
|
4607
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4608
|
-
const apiHeaders = {
|
|
4609
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
4610
|
-
'content-type': 'application/json',
|
|
4611
|
-
accept: 'application/json',
|
|
4612
|
-
};
|
|
4613
|
-
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
4614
|
-
}
|
|
4615
|
-
deletePlatformResourceCache(paramsOrFirst, ...rest) {
|
|
4616
|
-
let params;
|
|
4617
|
-
if (paramsOrFirst &&
|
|
4618
|
-
typeof paramsOrFirst === 'object' &&
|
|
4619
|
-
!Array.isArray(paramsOrFirst) &&
|
|
4620
|
-
('resourceType' in paramsOrFirst || 'resourceId' in paramsOrFirst)) {
|
|
4621
|
-
params = (paramsOrFirst || {});
|
|
4622
|
-
}
|
|
4623
|
-
else {
|
|
4624
|
-
params = {
|
|
4625
|
-
resourceType: paramsOrFirst,
|
|
4626
|
-
resourceId: rest[0],
|
|
4627
|
-
};
|
|
4628
|
-
}
|
|
4629
|
-
const resourceType = params.resourceType;
|
|
4630
|
-
const resourceId = params.resourceId;
|
|
4631
|
-
if (typeof resourceType === 'undefined') {
|
|
4632
|
-
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
4633
|
-
}
|
|
4634
|
-
const apiPath = '/admin/cache/platform/resources';
|
|
4635
|
-
const apiPayload = {};
|
|
4636
|
-
if (typeof resourceType !== 'undefined') {
|
|
4637
|
-
apiPayload['resourceType'] = resourceType;
|
|
4638
|
-
}
|
|
4639
|
-
if (typeof resourceId !== 'undefined') {
|
|
4640
|
-
apiPayload['resourceId'] = resourceId;
|
|
4641
|
-
}
|
|
4642
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4643
|
-
const apiHeaders = {
|
|
4644
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
4645
|
-
'content-type': 'application/json',
|
|
4646
|
-
accept: 'application/json',
|
|
4647
|
-
};
|
|
4648
|
-
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
4649
|
-
}
|
|
4650
|
-
deleteProjectCache(paramsOrFirst) {
|
|
4651
|
-
let params;
|
|
4652
|
-
if (paramsOrFirst &&
|
|
4653
|
-
typeof paramsOrFirst === 'object' &&
|
|
4654
|
-
!Array.isArray(paramsOrFirst)) {
|
|
4655
|
-
params = (paramsOrFirst || {});
|
|
4656
|
-
}
|
|
4657
|
-
else {
|
|
4658
|
-
params = {
|
|
4659
|
-
projectId: paramsOrFirst,
|
|
4660
|
-
};
|
|
4661
|
-
}
|
|
4662
|
-
const projectId = params.projectId;
|
|
4663
|
-
if (typeof projectId === 'undefined') {
|
|
4664
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
4665
|
-
}
|
|
4666
|
-
const apiPath = '/admin/cache/project';
|
|
4667
|
-
const apiPayload = {};
|
|
4668
|
-
if (typeof projectId !== 'undefined') {
|
|
4669
|
-
apiPayload['projectId'] = projectId;
|
|
4670
|
-
}
|
|
4671
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4672
|
-
const apiHeaders = {
|
|
4673
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
4674
|
-
'content-type': 'application/json',
|
|
4675
|
-
accept: 'application/json',
|
|
4676
|
-
};
|
|
4677
|
-
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
4678
|
-
}
|
|
4679
|
-
deleteProjectResourceCache(paramsOrFirst, ...rest) {
|
|
4680
|
-
let params;
|
|
4681
|
-
if (paramsOrFirst &&
|
|
4682
|
-
typeof paramsOrFirst === 'object' &&
|
|
4683
|
-
!Array.isArray(paramsOrFirst)) {
|
|
4684
|
-
params = (paramsOrFirst || {});
|
|
4685
|
-
}
|
|
4686
|
-
else {
|
|
4687
|
-
params = {
|
|
4688
|
-
projectId: paramsOrFirst,
|
|
4689
|
-
resourceType: rest[0],
|
|
4690
|
-
resourceId: rest[1],
|
|
4691
|
-
};
|
|
4692
|
-
}
|
|
4693
|
-
const projectId = params.projectId;
|
|
4694
|
-
const resourceType = params.resourceType;
|
|
4695
|
-
const resourceId = params.resourceId;
|
|
4696
|
-
if (typeof projectId === 'undefined') {
|
|
4697
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
4698
|
-
}
|
|
4699
|
-
if (typeof resourceType === 'undefined') {
|
|
4700
|
-
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
4701
|
-
}
|
|
4702
|
-
const apiPath = '/admin/cache/project/resources';
|
|
4703
|
-
const apiPayload = {};
|
|
4704
|
-
if (typeof projectId !== 'undefined') {
|
|
4705
|
-
apiPayload['projectId'] = projectId;
|
|
4706
|
-
}
|
|
4707
|
-
if (typeof resourceType !== 'undefined') {
|
|
4708
|
-
apiPayload['resourceType'] = resourceType;
|
|
4709
|
-
}
|
|
4710
|
-
if (typeof resourceId !== 'undefined') {
|
|
4711
|
-
apiPayload['resourceId'] = resourceId;
|
|
4712
|
-
}
|
|
4713
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4714
|
-
const apiHeaders = {
|
|
4715
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
4716
|
-
'content-type': 'application/json',
|
|
4717
|
-
accept: 'application/json',
|
|
4718
|
-
};
|
|
4719
|
-
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
4720
|
-
}
|
|
4721
|
-
}
|
|
4722
|
-
|
|
4723
4609
|
class Affiliates {
|
|
4724
4610
|
constructor(client) {
|
|
4725
4611
|
this.client = client;
|
|
@@ -4931,369 +4817,6 @@ class Affiliates {
|
|
|
4931
4817
|
}
|
|
4932
4818
|
}
|
|
4933
4819
|
|
|
4934
|
-
class Analytics {
|
|
4935
|
-
constructor(client) {
|
|
4936
|
-
this.client = client;
|
|
4937
|
-
}
|
|
4938
|
-
listProperties(paramsOrFirst, ...rest) {
|
|
4939
|
-
let params;
|
|
4940
|
-
if ((typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
|
|
4941
|
-
(paramsOrFirst &&
|
|
4942
|
-
typeof paramsOrFirst === 'object' &&
|
|
4943
|
-
!Array.isArray(paramsOrFirst))) {
|
|
4944
|
-
params = (paramsOrFirst || {});
|
|
4945
|
-
}
|
|
4946
|
-
else {
|
|
4947
|
-
params = {
|
|
4948
|
-
queries: paramsOrFirst,
|
|
4949
|
-
search: rest[0],
|
|
4950
|
-
total: rest[1],
|
|
4951
|
-
};
|
|
4952
|
-
}
|
|
4953
|
-
const queries = params.queries;
|
|
4954
|
-
const search = params.search;
|
|
4955
|
-
const total = params.total;
|
|
4956
|
-
const apiPath = '/analytics/properties';
|
|
4957
|
-
const apiPayload = {};
|
|
4958
|
-
if (typeof queries !== 'undefined') {
|
|
4959
|
-
apiPayload['queries'] = queries;
|
|
4960
|
-
}
|
|
4961
|
-
if (typeof search !== 'undefined') {
|
|
4962
|
-
apiPayload['search'] = search;
|
|
4963
|
-
}
|
|
4964
|
-
if (typeof total !== 'undefined') {
|
|
4965
|
-
apiPayload['total'] = total;
|
|
4966
|
-
}
|
|
4967
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4968
|
-
const apiHeaders = {
|
|
4969
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
4970
|
-
accept: 'application/json',
|
|
4971
|
-
};
|
|
4972
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
4973
|
-
}
|
|
4974
|
-
createProperty(paramsOrFirst, ...rest) {
|
|
4975
|
-
let params;
|
|
4976
|
-
if (paramsOrFirst &&
|
|
4977
|
-
typeof paramsOrFirst === 'object' &&
|
|
4978
|
-
!Array.isArray(paramsOrFirst)) {
|
|
4979
|
-
params = (paramsOrFirst || {});
|
|
4980
|
-
}
|
|
4981
|
-
else {
|
|
4982
|
-
params = {
|
|
4983
|
-
propertyId: paramsOrFirst,
|
|
4984
|
-
name: rest[0],
|
|
4985
|
-
domain: rest[1],
|
|
4986
|
-
timezone: rest[2],
|
|
4987
|
-
enabled: rest[3],
|
|
4988
|
-
xpublic: rest[4],
|
|
4989
|
-
allowedOrigins: rest[5],
|
|
4990
|
-
};
|
|
4991
|
-
}
|
|
4992
|
-
const propertyId = params.propertyId;
|
|
4993
|
-
const name = params.name;
|
|
4994
|
-
const domain = params.domain;
|
|
4995
|
-
const timezone = params.timezone;
|
|
4996
|
-
const enabled = params.enabled;
|
|
4997
|
-
const xpublic = params.xpublic;
|
|
4998
|
-
const allowedOrigins = params.allowedOrigins;
|
|
4999
|
-
if (typeof propertyId === 'undefined') {
|
|
5000
|
-
throw new AppwriteException('Missing required parameter: "propertyId"');
|
|
5001
|
-
}
|
|
5002
|
-
if (typeof name === 'undefined') {
|
|
5003
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
5004
|
-
}
|
|
5005
|
-
const apiPath = '/analytics/properties';
|
|
5006
|
-
const apiPayload = {};
|
|
5007
|
-
if (typeof propertyId !== 'undefined') {
|
|
5008
|
-
apiPayload['propertyId'] = propertyId;
|
|
5009
|
-
}
|
|
5010
|
-
if (typeof name !== 'undefined') {
|
|
5011
|
-
apiPayload['name'] = name;
|
|
5012
|
-
}
|
|
5013
|
-
if (typeof domain !== 'undefined') {
|
|
5014
|
-
apiPayload['domain'] = domain;
|
|
5015
|
-
}
|
|
5016
|
-
if (typeof timezone !== 'undefined') {
|
|
5017
|
-
apiPayload['timezone'] = timezone;
|
|
5018
|
-
}
|
|
5019
|
-
if (typeof enabled !== 'undefined') {
|
|
5020
|
-
apiPayload['enabled'] = enabled;
|
|
5021
|
-
}
|
|
5022
|
-
if (typeof xpublic !== 'undefined') {
|
|
5023
|
-
apiPayload['public'] = xpublic;
|
|
5024
|
-
}
|
|
5025
|
-
if (typeof allowedOrigins !== 'undefined') {
|
|
5026
|
-
apiPayload['allowedOrigins'] = allowedOrigins;
|
|
5027
|
-
}
|
|
5028
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5029
|
-
const apiHeaders = {
|
|
5030
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
5031
|
-
'content-type': 'application/json',
|
|
5032
|
-
accept: 'application/json',
|
|
5033
|
-
};
|
|
5034
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
5035
|
-
}
|
|
5036
|
-
getProperty(paramsOrFirst) {
|
|
5037
|
-
let params;
|
|
5038
|
-
if (paramsOrFirst &&
|
|
5039
|
-
typeof paramsOrFirst === 'object' &&
|
|
5040
|
-
!Array.isArray(paramsOrFirst)) {
|
|
5041
|
-
params = (paramsOrFirst || {});
|
|
5042
|
-
}
|
|
5043
|
-
else {
|
|
5044
|
-
params = {
|
|
5045
|
-
propertyId: paramsOrFirst,
|
|
5046
|
-
};
|
|
5047
|
-
}
|
|
5048
|
-
const propertyId = params.propertyId;
|
|
5049
|
-
if (typeof propertyId === 'undefined' || propertyId === '') {
|
|
5050
|
-
throw new AppwriteException('Missing required parameter: "propertyId"');
|
|
5051
|
-
}
|
|
5052
|
-
const apiPath = '/analytics/properties/{propertyId}'.replace('{propertyId}', encodeURIComponent(String(propertyId)));
|
|
5053
|
-
const apiPayload = {};
|
|
5054
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5055
|
-
const apiHeaders = {
|
|
5056
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
5057
|
-
accept: 'application/json',
|
|
5058
|
-
};
|
|
5059
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
5060
|
-
}
|
|
5061
|
-
updateProperty(paramsOrFirst, ...rest) {
|
|
5062
|
-
let params;
|
|
5063
|
-
if (paramsOrFirst &&
|
|
5064
|
-
typeof paramsOrFirst === 'object' &&
|
|
5065
|
-
!Array.isArray(paramsOrFirst)) {
|
|
5066
|
-
params = (paramsOrFirst || {});
|
|
5067
|
-
}
|
|
5068
|
-
else {
|
|
5069
|
-
params = {
|
|
5070
|
-
propertyId: paramsOrFirst,
|
|
5071
|
-
name: rest[0],
|
|
5072
|
-
domain: rest[1],
|
|
5073
|
-
timezone: rest[2],
|
|
5074
|
-
enabled: rest[3],
|
|
5075
|
-
xpublic: rest[4],
|
|
5076
|
-
allowedOrigins: rest[5],
|
|
5077
|
-
};
|
|
5078
|
-
}
|
|
5079
|
-
const propertyId = params.propertyId;
|
|
5080
|
-
const name = params.name;
|
|
5081
|
-
const domain = params.domain;
|
|
5082
|
-
const timezone = params.timezone;
|
|
5083
|
-
const enabled = params.enabled;
|
|
5084
|
-
const xpublic = params.xpublic;
|
|
5085
|
-
const allowedOrigins = params.allowedOrigins;
|
|
5086
|
-
if (typeof propertyId === 'undefined' || propertyId === '') {
|
|
5087
|
-
throw new AppwriteException('Missing required parameter: "propertyId"');
|
|
5088
|
-
}
|
|
5089
|
-
const apiPath = '/analytics/properties/{propertyId}'.replace('{propertyId}', encodeURIComponent(String(propertyId)));
|
|
5090
|
-
const apiPayload = {};
|
|
5091
|
-
if (typeof name !== 'undefined') {
|
|
5092
|
-
apiPayload['name'] = name;
|
|
5093
|
-
}
|
|
5094
|
-
if (typeof domain !== 'undefined') {
|
|
5095
|
-
apiPayload['domain'] = domain;
|
|
5096
|
-
}
|
|
5097
|
-
if (typeof timezone !== 'undefined') {
|
|
5098
|
-
apiPayload['timezone'] = timezone;
|
|
5099
|
-
}
|
|
5100
|
-
if (typeof enabled !== 'undefined') {
|
|
5101
|
-
apiPayload['enabled'] = enabled;
|
|
5102
|
-
}
|
|
5103
|
-
if (typeof xpublic !== 'undefined') {
|
|
5104
|
-
apiPayload['public'] = xpublic;
|
|
5105
|
-
}
|
|
5106
|
-
if (typeof allowedOrigins !== 'undefined') {
|
|
5107
|
-
apiPayload['allowedOrigins'] = allowedOrigins;
|
|
5108
|
-
}
|
|
5109
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5110
|
-
const apiHeaders = {
|
|
5111
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
5112
|
-
'content-type': 'application/json',
|
|
5113
|
-
accept: 'application/json',
|
|
5114
|
-
};
|
|
5115
|
-
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
5116
|
-
}
|
|
5117
|
-
deleteProperty(paramsOrFirst) {
|
|
5118
|
-
let params;
|
|
5119
|
-
if (paramsOrFirst &&
|
|
5120
|
-
typeof paramsOrFirst === 'object' &&
|
|
5121
|
-
!Array.isArray(paramsOrFirst)) {
|
|
5122
|
-
params = (paramsOrFirst || {});
|
|
5123
|
-
}
|
|
5124
|
-
else {
|
|
5125
|
-
params = {
|
|
5126
|
-
propertyId: paramsOrFirst,
|
|
5127
|
-
};
|
|
5128
|
-
}
|
|
5129
|
-
const propertyId = params.propertyId;
|
|
5130
|
-
if (typeof propertyId === 'undefined' || propertyId === '') {
|
|
5131
|
-
throw new AppwriteException('Missing required parameter: "propertyId"');
|
|
5132
|
-
}
|
|
5133
|
-
const apiPath = '/analytics/properties/{propertyId}'.replace('{propertyId}', encodeURIComponent(String(propertyId)));
|
|
5134
|
-
const apiPayload = {};
|
|
5135
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5136
|
-
const apiHeaders = {
|
|
5137
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
5138
|
-
'content-type': 'application/json',
|
|
5139
|
-
accept: 'application/json',
|
|
5140
|
-
};
|
|
5141
|
-
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
5142
|
-
}
|
|
5143
|
-
createEvent(paramsOrFirst, ...rest) {
|
|
5144
|
-
let params;
|
|
5145
|
-
if (paramsOrFirst &&
|
|
5146
|
-
typeof paramsOrFirst === 'object' &&
|
|
5147
|
-
!Array.isArray(paramsOrFirst)) {
|
|
5148
|
-
params = (paramsOrFirst || {});
|
|
5149
|
-
}
|
|
5150
|
-
else {
|
|
5151
|
-
params = {
|
|
5152
|
-
propertyId: paramsOrFirst,
|
|
5153
|
-
name: rest[0],
|
|
5154
|
-
url: rest[1],
|
|
5155
|
-
domain: rest[2],
|
|
5156
|
-
referrer: rest[3],
|
|
5157
|
-
screenWidth: rest[4],
|
|
5158
|
-
sessionHash: rest[5],
|
|
5159
|
-
scrollDepth: rest[6],
|
|
5160
|
-
engagementTime: rest[7],
|
|
5161
|
-
props: rest[8],
|
|
5162
|
-
userId: rest[9],
|
|
5163
|
-
ip: rest[10],
|
|
5164
|
-
userAgent: rest[11],
|
|
5165
|
-
};
|
|
5166
|
-
}
|
|
5167
|
-
const propertyId = params.propertyId;
|
|
5168
|
-
const name = params.name;
|
|
5169
|
-
const url = params.url;
|
|
5170
|
-
const domain = params.domain;
|
|
5171
|
-
const referrer = params.referrer;
|
|
5172
|
-
const screenWidth = params.screenWidth;
|
|
5173
|
-
const sessionHash = params.sessionHash;
|
|
5174
|
-
const scrollDepth = params.scrollDepth;
|
|
5175
|
-
const engagementTime = params.engagementTime;
|
|
5176
|
-
const props = params.props;
|
|
5177
|
-
const userId = params.userId;
|
|
5178
|
-
const ip = params.ip;
|
|
5179
|
-
const userAgent = params.userAgent;
|
|
5180
|
-
if (typeof propertyId === 'undefined' || propertyId === '') {
|
|
5181
|
-
throw new AppwriteException('Missing required parameter: "propertyId"');
|
|
5182
|
-
}
|
|
5183
|
-
if (typeof name === 'undefined') {
|
|
5184
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
5185
|
-
}
|
|
5186
|
-
if (typeof url === 'undefined') {
|
|
5187
|
-
throw new AppwriteException('Missing required parameter: "url"');
|
|
5188
|
-
}
|
|
5189
|
-
const apiPath = '/analytics/properties/{propertyId}/events'.replace('{propertyId}', encodeURIComponent(String(propertyId)));
|
|
5190
|
-
const apiPayload = {};
|
|
5191
|
-
if (typeof name !== 'undefined') {
|
|
5192
|
-
apiPayload['name'] = name;
|
|
5193
|
-
}
|
|
5194
|
-
if (typeof url !== 'undefined') {
|
|
5195
|
-
apiPayload['url'] = url;
|
|
5196
|
-
}
|
|
5197
|
-
if (typeof domain !== 'undefined') {
|
|
5198
|
-
apiPayload['domain'] = domain;
|
|
5199
|
-
}
|
|
5200
|
-
if (typeof referrer !== 'undefined') {
|
|
5201
|
-
apiPayload['referrer'] = referrer;
|
|
5202
|
-
}
|
|
5203
|
-
if (typeof screenWidth !== 'undefined') {
|
|
5204
|
-
apiPayload['screenWidth'] = screenWidth;
|
|
5205
|
-
}
|
|
5206
|
-
if (typeof sessionHash !== 'undefined') {
|
|
5207
|
-
apiPayload['sessionHash'] = sessionHash;
|
|
5208
|
-
}
|
|
5209
|
-
if (typeof scrollDepth !== 'undefined') {
|
|
5210
|
-
apiPayload['scrollDepth'] = scrollDepth;
|
|
5211
|
-
}
|
|
5212
|
-
if (typeof engagementTime !== 'undefined') {
|
|
5213
|
-
apiPayload['engagementTime'] = engagementTime;
|
|
5214
|
-
}
|
|
5215
|
-
if (typeof props !== 'undefined') {
|
|
5216
|
-
apiPayload['props'] = props;
|
|
5217
|
-
}
|
|
5218
|
-
if (typeof userId !== 'undefined') {
|
|
5219
|
-
apiPayload['userId'] = userId;
|
|
5220
|
-
}
|
|
5221
|
-
if (typeof ip !== 'undefined') {
|
|
5222
|
-
apiPayload['ip'] = ip;
|
|
5223
|
-
}
|
|
5224
|
-
if (typeof userAgent !== 'undefined') {
|
|
5225
|
-
apiPayload['userAgent'] = userAgent;
|
|
5226
|
-
}
|
|
5227
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5228
|
-
const apiHeaders = {
|
|
5229
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
5230
|
-
'content-type': 'application/json',
|
|
5231
|
-
accept: 'application/json',
|
|
5232
|
-
};
|
|
5233
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
5234
|
-
}
|
|
5235
|
-
listMetrics(paramsOrFirst, ...rest) {
|
|
5236
|
-
let params;
|
|
5237
|
-
if (paramsOrFirst &&
|
|
5238
|
-
typeof paramsOrFirst === 'object' &&
|
|
5239
|
-
!Array.isArray(paramsOrFirst)) {
|
|
5240
|
-
params = (paramsOrFirst || {});
|
|
5241
|
-
}
|
|
5242
|
-
else {
|
|
5243
|
-
params = {
|
|
5244
|
-
propertyId: paramsOrFirst,
|
|
5245
|
-
queries: rest[0],
|
|
5246
|
-
interval: rest[1],
|
|
5247
|
-
dimensions: rest[2],
|
|
5248
|
-
dateRange: rest[3],
|
|
5249
|
-
startAt: rest[4],
|
|
5250
|
-
endAt: rest[5],
|
|
5251
|
-
limit: rest[6],
|
|
5252
|
-
};
|
|
5253
|
-
}
|
|
5254
|
-
const propertyId = params.propertyId;
|
|
5255
|
-
const queries = params.queries;
|
|
5256
|
-
const interval = params.interval;
|
|
5257
|
-
const dimensions = params.dimensions;
|
|
5258
|
-
const dateRange = params.dateRange;
|
|
5259
|
-
const startAt = params.startAt;
|
|
5260
|
-
const endAt = params.endAt;
|
|
5261
|
-
const limit = params.limit;
|
|
5262
|
-
if (typeof propertyId === 'undefined' || propertyId === '') {
|
|
5263
|
-
throw new AppwriteException('Missing required parameter: "propertyId"');
|
|
5264
|
-
}
|
|
5265
|
-
const apiPath = '/analytics/properties/{propertyId}/metrics'.replace('{propertyId}', encodeURIComponent(String(propertyId)));
|
|
5266
|
-
const apiPayload = {};
|
|
5267
|
-
if (typeof queries !== 'undefined') {
|
|
5268
|
-
apiPayload['queries'] = queries;
|
|
5269
|
-
}
|
|
5270
|
-
if (typeof interval !== 'undefined') {
|
|
5271
|
-
apiPayload['interval'] = interval;
|
|
5272
|
-
}
|
|
5273
|
-
if (typeof dimensions !== 'undefined') {
|
|
5274
|
-
apiPayload['dimensions'] = dimensions;
|
|
5275
|
-
}
|
|
5276
|
-
if (typeof dateRange !== 'undefined') {
|
|
5277
|
-
apiPayload['dateRange'] = dateRange;
|
|
5278
|
-
}
|
|
5279
|
-
if (typeof startAt !== 'undefined') {
|
|
5280
|
-
apiPayload['startAt'] = startAt;
|
|
5281
|
-
}
|
|
5282
|
-
if (typeof endAt !== 'undefined') {
|
|
5283
|
-
apiPayload['endAt'] = endAt;
|
|
5284
|
-
}
|
|
5285
|
-
if (typeof limit !== 'undefined') {
|
|
5286
|
-
apiPayload['limit'] = limit;
|
|
5287
|
-
}
|
|
5288
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5289
|
-
const apiHeaders = {
|
|
5290
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
5291
|
-
accept: 'application/json',
|
|
5292
|
-
};
|
|
5293
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
5294
|
-
}
|
|
5295
|
-
}
|
|
5296
|
-
|
|
5297
4820
|
class Apps {
|
|
5298
4821
|
constructor(client) {
|
|
5299
4822
|
this.client = client;
|
|
@@ -6186,7 +5709,7 @@ class Avatars {
|
|
|
6186
5709
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6187
5710
|
apiPayload['project'] = this.client.config.project;
|
|
6188
5711
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6189
|
-
for (const [key, value] of Object.entries(
|
|
5712
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6190
5713
|
uri.searchParams.append(key, value);
|
|
6191
5714
|
}
|
|
6192
5715
|
return uri.toString();
|
|
@@ -6231,7 +5754,7 @@ class Avatars {
|
|
|
6231
5754
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6232
5755
|
apiPayload['project'] = this.client.config.project;
|
|
6233
5756
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6234
|
-
for (const [key, value] of Object.entries(
|
|
5757
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6235
5758
|
uri.searchParams.append(key, value);
|
|
6236
5759
|
}
|
|
6237
5760
|
return uri.toString();
|
|
@@ -6260,7 +5783,7 @@ class Avatars {
|
|
|
6260
5783
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6261
5784
|
apiPayload['project'] = this.client.config.project;
|
|
6262
5785
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6263
|
-
for (const [key, value] of Object.entries(
|
|
5786
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6264
5787
|
uri.searchParams.append(key, value);
|
|
6265
5788
|
}
|
|
6266
5789
|
return uri.toString();
|
|
@@ -6305,7 +5828,7 @@ class Avatars {
|
|
|
6305
5828
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6306
5829
|
apiPayload['project'] = this.client.config.project;
|
|
6307
5830
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6308
|
-
for (const [key, value] of Object.entries(
|
|
5831
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6309
5832
|
uri.searchParams.append(key, value);
|
|
6310
5833
|
}
|
|
6311
5834
|
return uri.toString();
|
|
@@ -6344,7 +5867,7 @@ class Avatars {
|
|
|
6344
5867
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6345
5868
|
apiPayload['project'] = this.client.config.project;
|
|
6346
5869
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6347
|
-
for (const [key, value] of Object.entries(
|
|
5870
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6348
5871
|
uri.searchParams.append(key, value);
|
|
6349
5872
|
}
|
|
6350
5873
|
return uri.toString();
|
|
@@ -6386,7 +5909,7 @@ class Avatars {
|
|
|
6386
5909
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6387
5910
|
apiPayload['project'] = this.client.config.project;
|
|
6388
5911
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6389
|
-
for (const [key, value] of Object.entries(
|
|
5912
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6390
5913
|
uri.searchParams.append(key, value);
|
|
6391
5914
|
}
|
|
6392
5915
|
return uri.toString();
|
|
@@ -6448,7 +5971,7 @@ class Avatars {
|
|
|
6448
5971
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6449
5972
|
apiPayload['project'] = this.client.config.project;
|
|
6450
5973
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6451
|
-
for (const [key, value] of Object.entries(
|
|
5974
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6452
5975
|
uri.searchParams.append(key, value);
|
|
6453
5976
|
}
|
|
6454
5977
|
return uri.toString();
|
|
@@ -6542,7 +6065,7 @@ class Avatars {
|
|
|
6542
6065
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6543
6066
|
apiPayload['project'] = this.client.config.project;
|
|
6544
6067
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6545
|
-
for (const [key, value] of Object.entries(
|
|
6068
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6546
6069
|
uri.searchParams.append(key, value);
|
|
6547
6070
|
}
|
|
6548
6071
|
return uri.toString();
|
|
@@ -6666,7 +6189,7 @@ class Avatars {
|
|
|
6666
6189
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6667
6190
|
apiPayload['project'] = this.client.config.project;
|
|
6668
6191
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6669
|
-
for (const [key, value] of Object.entries(
|
|
6192
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6670
6193
|
uri.searchParams.append(key, value);
|
|
6671
6194
|
}
|
|
6672
6195
|
return uri.toString();
|
|
@@ -16252,7 +15775,7 @@ class Functions {
|
|
|
16252
15775
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
16253
15776
|
apiPayload['project'] = this.client.config.project;
|
|
16254
15777
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
16255
|
-
for (const [key, value] of Object.entries(
|
|
15778
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
16256
15779
|
uri.searchParams.append(key, value);
|
|
16257
15780
|
}
|
|
16258
15781
|
return uri.toString();
|
|
@@ -26891,7 +26414,7 @@ class Organizations {
|
|
|
26891
26414
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
26892
26415
|
apiPayload['project'] = this.client.config.project;
|
|
26893
26416
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
26894
|
-
for (const [key, value] of Object.entries(
|
|
26417
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
26895
26418
|
uri.searchParams.append(key, value);
|
|
26896
26419
|
}
|
|
26897
26420
|
return uri.toString();
|
|
@@ -26998,7 +26521,7 @@ class Organizations {
|
|
|
26998
26521
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
26999
26522
|
apiPayload['project'] = this.client.config.project;
|
|
27000
26523
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
27001
|
-
for (const [key, value] of Object.entries(
|
|
26524
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
27002
26525
|
uri.searchParams.append(key, value);
|
|
27003
26526
|
}
|
|
27004
26527
|
return uri.toString();
|
|
@@ -31779,13 +31302,11 @@ class Project {
|
|
|
31779
31302
|
platformId: paramsOrFirst,
|
|
31780
31303
|
name: rest[0],
|
|
31781
31304
|
applicationId: rest[1],
|
|
31782
|
-
fingerprints: rest[2],
|
|
31783
31305
|
};
|
|
31784
31306
|
}
|
|
31785
31307
|
const platformId = params.platformId;
|
|
31786
31308
|
const name = params.name;
|
|
31787
31309
|
const applicationId = params.applicationId;
|
|
31788
|
-
const fingerprints = params.fingerprints;
|
|
31789
31310
|
if (typeof platformId === 'undefined') {
|
|
31790
31311
|
throw new AppwriteException('Missing required parameter: "platformId"');
|
|
31791
31312
|
}
|
|
@@ -31806,9 +31327,6 @@ class Project {
|
|
|
31806
31327
|
if (typeof applicationId !== 'undefined') {
|
|
31807
31328
|
apiPayload['applicationId'] = applicationId;
|
|
31808
31329
|
}
|
|
31809
|
-
if (typeof fingerprints !== 'undefined') {
|
|
31810
|
-
apiPayload['fingerprints'] = fingerprints;
|
|
31811
|
-
}
|
|
31812
31330
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
31813
31331
|
const apiHeaders = {
|
|
31814
31332
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -31829,13 +31347,11 @@ class Project {
|
|
|
31829
31347
|
platformId: paramsOrFirst,
|
|
31830
31348
|
name: rest[0],
|
|
31831
31349
|
applicationId: rest[1],
|
|
31832
|
-
fingerprints: rest[2],
|
|
31833
31350
|
};
|
|
31834
31351
|
}
|
|
31835
31352
|
const platformId = params.platformId;
|
|
31836
31353
|
const name = params.name;
|
|
31837
31354
|
const applicationId = params.applicationId;
|
|
31838
|
-
const fingerprints = params.fingerprints;
|
|
31839
31355
|
if (typeof platformId === 'undefined' || platformId === '') {
|
|
31840
31356
|
throw new AppwriteException('Missing required parameter: "platformId"');
|
|
31841
31357
|
}
|
|
@@ -31853,9 +31369,6 @@ class Project {
|
|
|
31853
31369
|
if (typeof applicationId !== 'undefined') {
|
|
31854
31370
|
apiPayload['applicationId'] = applicationId;
|
|
31855
31371
|
}
|
|
31856
|
-
if (typeof fingerprints !== 'undefined') {
|
|
31857
|
-
apiPayload['fingerprints'] = fingerprints;
|
|
31858
|
-
}
|
|
31859
31372
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
31860
31373
|
const apiHeaders = {
|
|
31861
31374
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -32504,30 +32017,27 @@ class Project {
|
|
|
32504
32017
|
};
|
|
32505
32018
|
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
32506
32019
|
}
|
|
32507
|
-
updatePasskeyPolicy(paramsOrFirst
|
|
32020
|
+
updatePasskeyPolicy(paramsOrFirst) {
|
|
32508
32021
|
let params;
|
|
32509
|
-
if (
|
|
32510
|
-
|
|
32511
|
-
|
|
32512
|
-
!Array.isArray(paramsOrFirst))) {
|
|
32022
|
+
if (paramsOrFirst &&
|
|
32023
|
+
typeof paramsOrFirst === 'object' &&
|
|
32024
|
+
!Array.isArray(paramsOrFirst)) {
|
|
32513
32025
|
params = (paramsOrFirst || {});
|
|
32514
32026
|
}
|
|
32515
32027
|
else {
|
|
32516
32028
|
params = {
|
|
32517
32029
|
rpId: paramsOrFirst,
|
|
32518
|
-
origins: rest[0],
|
|
32519
32030
|
};
|
|
32520
32031
|
}
|
|
32521
32032
|
const rpId = params.rpId;
|
|
32522
|
-
|
|
32033
|
+
if (typeof rpId === 'undefined') {
|
|
32034
|
+
throw new AppwriteException('Missing required parameter: "rpId"');
|
|
32035
|
+
}
|
|
32523
32036
|
const apiPath = '/project/policies/passkey';
|
|
32524
32037
|
const apiPayload = {};
|
|
32525
32038
|
if (typeof rpId !== 'undefined') {
|
|
32526
32039
|
apiPayload['rpId'] = rpId;
|
|
32527
32040
|
}
|
|
32528
|
-
if (typeof origins !== 'undefined') {
|
|
32529
|
-
apiPayload['origins'] = origins;
|
|
32530
|
-
}
|
|
32531
32041
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
32532
32042
|
const apiHeaders = {
|
|
32533
32043
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -35226,7 +34736,7 @@ class Sites {
|
|
|
35226
34736
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
35227
34737
|
apiPayload['project'] = this.client.config.project;
|
|
35228
34738
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
35229
|
-
for (const [key, value] of Object.entries(
|
|
34739
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
35230
34740
|
uri.searchParams.append(key, value);
|
|
35231
34741
|
}
|
|
35232
34742
|
return uri.toString();
|
|
@@ -36057,7 +35567,7 @@ class Storage {
|
|
|
36057
35567
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
36058
35568
|
apiPayload['project'] = this.client.config.project;
|
|
36059
35569
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
36060
|
-
for (const [key, value] of Object.entries(
|
|
35570
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
36061
35571
|
uri.searchParams.append(key, value);
|
|
36062
35572
|
}
|
|
36063
35573
|
return uri.toString();
|
|
@@ -36150,7 +35660,7 @@ class Storage {
|
|
|
36150
35660
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
36151
35661
|
apiPayload['project'] = this.client.config.project;
|
|
36152
35662
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
36153
|
-
for (const [key, value] of Object.entries(
|
|
35663
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
36154
35664
|
uri.searchParams.append(key, value);
|
|
36155
35665
|
}
|
|
36156
35666
|
return uri.toString();
|
|
@@ -36188,7 +35698,7 @@ class Storage {
|
|
|
36188
35698
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
36189
35699
|
apiPayload['project'] = this.client.config.project;
|
|
36190
35700
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
36191
|
-
for (const [key, value] of Object.entries(
|
|
35701
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
36192
35702
|
uri.searchParams.append(key, value);
|
|
36193
35703
|
}
|
|
36194
35704
|
return uri.toString();
|
|
@@ -40659,17 +40169,15 @@ class Teams {
|
|
|
40659
40169
|
params = {
|
|
40660
40170
|
teamId: paramsOrFirst,
|
|
40661
40171
|
roles: rest[0],
|
|
40662
|
-
|
|
40663
|
-
|
|
40664
|
-
|
|
40665
|
-
|
|
40666
|
-
|
|
40667
|
-
name: rest[6],
|
|
40172
|
+
email: rest[1],
|
|
40173
|
+
userId: rest[2],
|
|
40174
|
+
phone: rest[3],
|
|
40175
|
+
url: rest[4],
|
|
40176
|
+
name: rest[5],
|
|
40668
40177
|
};
|
|
40669
40178
|
}
|
|
40670
40179
|
const teamId = params.teamId;
|
|
40671
40180
|
const roles = params.roles;
|
|
40672
|
-
const membershipId = params.membershipId;
|
|
40673
40181
|
const email = params.email;
|
|
40674
40182
|
const userId = params.userId;
|
|
40675
40183
|
const phone = params.phone;
|
|
@@ -40683,9 +40191,6 @@ class Teams {
|
|
|
40683
40191
|
}
|
|
40684
40192
|
const apiPath = '/teams/{teamId}/memberships'.replace('{teamId}', encodeURIComponent(String(teamId)));
|
|
40685
40193
|
const apiPayload = {};
|
|
40686
|
-
if (typeof membershipId !== 'undefined') {
|
|
40687
|
-
apiPayload['membershipId'] = membershipId;
|
|
40688
|
-
}
|
|
40689
40194
|
if (typeof email !== 'undefined') {
|
|
40690
40195
|
apiPayload['email'] = email;
|
|
40691
40196
|
}
|
|
@@ -42571,6 +42076,47 @@ class Users {
|
|
|
42571
42076
|
};
|
|
42572
42077
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
42573
42078
|
}
|
|
42079
|
+
updatePasskey(paramsOrFirst, ...rest) {
|
|
42080
|
+
let params;
|
|
42081
|
+
if (paramsOrFirst &&
|
|
42082
|
+
typeof paramsOrFirst === 'object' &&
|
|
42083
|
+
!Array.isArray(paramsOrFirst)) {
|
|
42084
|
+
params = (paramsOrFirst || {});
|
|
42085
|
+
}
|
|
42086
|
+
else {
|
|
42087
|
+
params = {
|
|
42088
|
+
userId: paramsOrFirst,
|
|
42089
|
+
passkeyId: rest[0],
|
|
42090
|
+
name: rest[1],
|
|
42091
|
+
};
|
|
42092
|
+
}
|
|
42093
|
+
const userId = params.userId;
|
|
42094
|
+
const passkeyId = params.passkeyId;
|
|
42095
|
+
const name = params.name;
|
|
42096
|
+
if (typeof userId === 'undefined' || userId === '') {
|
|
42097
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
42098
|
+
}
|
|
42099
|
+
if (typeof passkeyId === 'undefined' || passkeyId === '') {
|
|
42100
|
+
throw new AppwriteException('Missing required parameter: "passkeyId"');
|
|
42101
|
+
}
|
|
42102
|
+
if (typeof name === 'undefined') {
|
|
42103
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
42104
|
+
}
|
|
42105
|
+
const apiPath = '/users/{userId}/passkeys/{passkeyId}'
|
|
42106
|
+
.replace('{userId}', encodeURIComponent(String(userId)))
|
|
42107
|
+
.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
|
|
42108
|
+
const apiPayload = {};
|
|
42109
|
+
if (typeof name !== 'undefined') {
|
|
42110
|
+
apiPayload['name'] = name;
|
|
42111
|
+
}
|
|
42112
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
42113
|
+
const apiHeaders = {
|
|
42114
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
42115
|
+
'content-type': 'application/json',
|
|
42116
|
+
accept: 'application/json',
|
|
42117
|
+
};
|
|
42118
|
+
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
42119
|
+
}
|
|
42574
42120
|
deletePasskey(paramsOrFirst, ...rest) {
|
|
42575
42121
|
let params;
|
|
42576
42122
|
if (paramsOrFirst &&
|
|
@@ -45110,11 +44656,11 @@ class VectorsDB {
|
|
|
45110
44656
|
}
|
|
45111
44657
|
}
|
|
45112
44658
|
|
|
45113
|
-
class
|
|
44659
|
+
class Waf {
|
|
45114
44660
|
constructor(client) {
|
|
45115
44661
|
this.client = client;
|
|
45116
44662
|
}
|
|
45117
|
-
|
|
44663
|
+
listRules(paramsOrFirst, ...rest) {
|
|
45118
44664
|
let params;
|
|
45119
44665
|
if ((typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
|
|
45120
44666
|
(paramsOrFirst &&
|
|
@@ -45132,7 +44678,7 @@ class Videos {
|
|
|
45132
44678
|
const queries = params.queries;
|
|
45133
44679
|
const search = params.search;
|
|
45134
44680
|
const total = params.total;
|
|
45135
|
-
const apiPath = '/
|
|
44681
|
+
const apiPath = '/waf/rules';
|
|
45136
44682
|
const apiPayload = {};
|
|
45137
44683
|
if (typeof queries !== 'undefined') {
|
|
45138
44684
|
apiPayload['queries'] = queries;
|
|
@@ -45150,7 +44696,7 @@ class Videos {
|
|
|
45150
44696
|
};
|
|
45151
44697
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
45152
44698
|
}
|
|
45153
|
-
|
|
44699
|
+
createBypassRule(paramsOrFirst, ...rest) {
|
|
45154
44700
|
let params;
|
|
45155
44701
|
if (paramsOrFirst &&
|
|
45156
44702
|
typeof paramsOrFirst === 'object' &&
|
|
@@ -45159,31 +44705,59 @@ class Videos {
|
|
|
45159
44705
|
}
|
|
45160
44706
|
else {
|
|
45161
44707
|
params = {
|
|
45162
|
-
|
|
45163
|
-
|
|
44708
|
+
ruleId: paramsOrFirst,
|
|
44709
|
+
resourceType: rest[0],
|
|
45164
44710
|
name: rest[1],
|
|
44711
|
+
resourceId: rest[2],
|
|
44712
|
+
description: rest[3],
|
|
44713
|
+
priority: rest[4],
|
|
44714
|
+
enabled: rest[5],
|
|
44715
|
+
conditions: rest[6],
|
|
45165
44716
|
};
|
|
45166
44717
|
}
|
|
45167
|
-
const
|
|
45168
|
-
const
|
|
44718
|
+
const ruleId = params.ruleId;
|
|
44719
|
+
const resourceType = params.resourceType;
|
|
45169
44720
|
const name = params.name;
|
|
45170
|
-
|
|
45171
|
-
|
|
44721
|
+
const resourceId = params.resourceId;
|
|
44722
|
+
const description = params.description;
|
|
44723
|
+
const priority = params.priority;
|
|
44724
|
+
const enabled = params.enabled;
|
|
44725
|
+
const conditions = params.conditions;
|
|
44726
|
+
if (typeof ruleId === 'undefined') {
|
|
44727
|
+
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
45172
44728
|
}
|
|
45173
|
-
if (typeof
|
|
45174
|
-
throw new AppwriteException('Missing required parameter: "
|
|
44729
|
+
if (typeof resourceType === 'undefined') {
|
|
44730
|
+
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
44731
|
+
}
|
|
44732
|
+
if (typeof name === 'undefined') {
|
|
44733
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
45175
44734
|
}
|
|
45176
|
-
const apiPath = '/
|
|
44735
|
+
const apiPath = '/waf/rules/bypass';
|
|
45177
44736
|
const apiPayload = {};
|
|
45178
|
-
if (typeof
|
|
45179
|
-
apiPayload['
|
|
44737
|
+
if (typeof ruleId !== 'undefined') {
|
|
44738
|
+
apiPayload['ruleId'] = ruleId;
|
|
45180
44739
|
}
|
|
45181
|
-
if (typeof
|
|
45182
|
-
apiPayload['
|
|
44740
|
+
if (typeof resourceType !== 'undefined') {
|
|
44741
|
+
apiPayload['resourceType'] = resourceType;
|
|
44742
|
+
}
|
|
44743
|
+
if (typeof resourceId !== 'undefined') {
|
|
44744
|
+
apiPayload['resourceId'] = resourceId;
|
|
45183
44745
|
}
|
|
45184
44746
|
if (typeof name !== 'undefined') {
|
|
45185
44747
|
apiPayload['name'] = name;
|
|
45186
44748
|
}
|
|
44749
|
+
if (typeof description !== 'undefined') {
|
|
44750
|
+
apiPayload['description'] = description;
|
|
44751
|
+
}
|
|
44752
|
+
if (typeof priority !== 'undefined') {
|
|
44753
|
+
apiPayload['priority'] = priority;
|
|
44754
|
+
}
|
|
44755
|
+
if (typeof enabled !== 'undefined') {
|
|
44756
|
+
apiPayload['enabled'] = enabled;
|
|
44757
|
+
}
|
|
44758
|
+
if (typeof conditions !== 'undefined') {
|
|
44759
|
+
apiPayload['conditions'] = conditions;
|
|
44760
|
+
}
|
|
45187
44761
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45188
44762
|
const apiHeaders = {
|
|
45189
44763
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -45192,33 +44766,68 @@ class Videos {
|
|
|
45192
44766
|
};
|
|
45193
44767
|
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
45194
44768
|
}
|
|
45195
|
-
|
|
44769
|
+
updateBypassRule(paramsOrFirst, ...rest) {
|
|
45196
44770
|
let params;
|
|
45197
|
-
if (
|
|
45198
|
-
|
|
45199
|
-
|
|
45200
|
-
!Array.isArray(paramsOrFirst))) {
|
|
44771
|
+
if (paramsOrFirst &&
|
|
44772
|
+
typeof paramsOrFirst === 'object' &&
|
|
44773
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45201
44774
|
params = (paramsOrFirst || {});
|
|
45202
44775
|
}
|
|
45203
44776
|
else {
|
|
45204
44777
|
params = {
|
|
45205
|
-
|
|
44778
|
+
ruleId: paramsOrFirst,
|
|
44779
|
+
resourceType: rest[0],
|
|
44780
|
+
resourceId: rest[1],
|
|
44781
|
+
name: rest[2],
|
|
44782
|
+
description: rest[3],
|
|
44783
|
+
priority: rest[4],
|
|
44784
|
+
enabled: rest[5],
|
|
44785
|
+
conditions: rest[6],
|
|
45206
44786
|
};
|
|
45207
44787
|
}
|
|
45208
|
-
const
|
|
45209
|
-
const
|
|
44788
|
+
const ruleId = params.ruleId;
|
|
44789
|
+
const resourceType = params.resourceType;
|
|
44790
|
+
const resourceId = params.resourceId;
|
|
44791
|
+
const name = params.name;
|
|
44792
|
+
const description = params.description;
|
|
44793
|
+
const priority = params.priority;
|
|
44794
|
+
const enabled = params.enabled;
|
|
44795
|
+
const conditions = params.conditions;
|
|
44796
|
+
if (typeof ruleId === 'undefined' || ruleId === '') {
|
|
44797
|
+
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
44798
|
+
}
|
|
44799
|
+
const apiPath = '/waf/rules/bypass/{ruleId}'.replace('{ruleId}', encodeURIComponent(String(ruleId)));
|
|
45210
44800
|
const apiPayload = {};
|
|
45211
|
-
if (typeof
|
|
45212
|
-
apiPayload['
|
|
44801
|
+
if (typeof resourceType !== 'undefined') {
|
|
44802
|
+
apiPayload['resourceType'] = resourceType;
|
|
44803
|
+
}
|
|
44804
|
+
if (typeof resourceId !== 'undefined') {
|
|
44805
|
+
apiPayload['resourceId'] = resourceId;
|
|
44806
|
+
}
|
|
44807
|
+
if (typeof name !== 'undefined') {
|
|
44808
|
+
apiPayload['name'] = name;
|
|
44809
|
+
}
|
|
44810
|
+
if (typeof description !== 'undefined') {
|
|
44811
|
+
apiPayload['description'] = description;
|
|
44812
|
+
}
|
|
44813
|
+
if (typeof priority !== 'undefined') {
|
|
44814
|
+
apiPayload['priority'] = priority;
|
|
44815
|
+
}
|
|
44816
|
+
if (typeof enabled !== 'undefined') {
|
|
44817
|
+
apiPayload['enabled'] = enabled;
|
|
44818
|
+
}
|
|
44819
|
+
if (typeof conditions !== 'undefined') {
|
|
44820
|
+
apiPayload['conditions'] = conditions;
|
|
45213
44821
|
}
|
|
45214
44822
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45215
44823
|
const apiHeaders = {
|
|
45216
44824
|
'X-Appwrite-Project': this.client.config.project,
|
|
44825
|
+
'content-type': 'application/json',
|
|
45217
44826
|
accept: 'application/json',
|
|
45218
44827
|
};
|
|
45219
|
-
return this.client.call('
|
|
44828
|
+
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
45220
44829
|
}
|
|
45221
|
-
|
|
44830
|
+
createChallengeRule(paramsOrFirst, ...rest) {
|
|
45222
44831
|
let params;
|
|
45223
44832
|
if (paramsOrFirst &&
|
|
45224
44833
|
typeof paramsOrFirst === 'object' &&
|
|
@@ -45227,49 +44836,73 @@ class Videos {
|
|
|
45227
44836
|
}
|
|
45228
44837
|
else {
|
|
45229
44838
|
params = {
|
|
45230
|
-
|
|
45231
|
-
|
|
45232
|
-
|
|
45233
|
-
|
|
45234
|
-
|
|
44839
|
+
ruleId: paramsOrFirst,
|
|
44840
|
+
resourceType: rest[0],
|
|
44841
|
+
name: rest[1],
|
|
44842
|
+
resourceId: rest[2],
|
|
44843
|
+
description: rest[3],
|
|
44844
|
+
challengeType: rest[4],
|
|
44845
|
+
priority: rest[5],
|
|
44846
|
+
enabled: rest[6],
|
|
44847
|
+
conditions: rest[7],
|
|
44848
|
+
difficulty: rest[8],
|
|
44849
|
+
ttl: rest[9],
|
|
45235
44850
|
};
|
|
45236
44851
|
}
|
|
44852
|
+
const ruleId = params.ruleId;
|
|
44853
|
+
const resourceType = params.resourceType;
|
|
45237
44854
|
const name = params.name;
|
|
45238
|
-
const
|
|
45239
|
-
const
|
|
45240
|
-
const
|
|
45241
|
-
const
|
|
44855
|
+
const resourceId = params.resourceId;
|
|
44856
|
+
const description = params.description;
|
|
44857
|
+
const challengeType = params.challengeType;
|
|
44858
|
+
const priority = params.priority;
|
|
44859
|
+
const enabled = params.enabled;
|
|
44860
|
+
const conditions = params.conditions;
|
|
44861
|
+
const difficulty = params.difficulty;
|
|
44862
|
+
const ttl = params.ttl;
|
|
44863
|
+
if (typeof ruleId === 'undefined') {
|
|
44864
|
+
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
44865
|
+
}
|
|
44866
|
+
if (typeof resourceType === 'undefined') {
|
|
44867
|
+
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
44868
|
+
}
|
|
45242
44869
|
if (typeof name === 'undefined') {
|
|
45243
44870
|
throw new AppwriteException('Missing required parameter: "name"');
|
|
45244
44871
|
}
|
|
45245
|
-
|
|
45246
|
-
|
|
45247
|
-
|
|
45248
|
-
|
|
45249
|
-
throw new AppwriteException('Missing required parameter: "audioBitRate"');
|
|
44872
|
+
const apiPath = '/waf/rules/challenge';
|
|
44873
|
+
const apiPayload = {};
|
|
44874
|
+
if (typeof ruleId !== 'undefined') {
|
|
44875
|
+
apiPayload['ruleId'] = ruleId;
|
|
45250
44876
|
}
|
|
45251
|
-
if (typeof
|
|
45252
|
-
|
|
44877
|
+
if (typeof resourceType !== 'undefined') {
|
|
44878
|
+
apiPayload['resourceType'] = resourceType;
|
|
45253
44879
|
}
|
|
45254
|
-
if (typeof
|
|
45255
|
-
|
|
44880
|
+
if (typeof resourceId !== 'undefined') {
|
|
44881
|
+
apiPayload['resourceId'] = resourceId;
|
|
45256
44882
|
}
|
|
45257
|
-
const apiPath = '/videos/profiles';
|
|
45258
|
-
const apiPayload = {};
|
|
45259
44883
|
if (typeof name !== 'undefined') {
|
|
45260
44884
|
apiPayload['name'] = name;
|
|
45261
44885
|
}
|
|
45262
|
-
if (typeof
|
|
45263
|
-
apiPayload['
|
|
44886
|
+
if (typeof description !== 'undefined') {
|
|
44887
|
+
apiPayload['description'] = description;
|
|
45264
44888
|
}
|
|
45265
|
-
if (typeof
|
|
45266
|
-
apiPayload['
|
|
44889
|
+
if (typeof challengeType !== 'undefined') {
|
|
44890
|
+
apiPayload['challengeType'] = challengeType;
|
|
45267
44891
|
}
|
|
45268
|
-
if (typeof
|
|
45269
|
-
apiPayload['
|
|
44892
|
+
if (typeof priority !== 'undefined') {
|
|
44893
|
+
apiPayload['priority'] = priority;
|
|
45270
44894
|
}
|
|
45271
|
-
if (typeof
|
|
45272
|
-
apiPayload['
|
|
44895
|
+
if (typeof enabled !== 'undefined') {
|
|
44896
|
+
apiPayload['enabled'] = enabled;
|
|
44897
|
+
}
|
|
44898
|
+
if (typeof conditions !== 'undefined') {
|
|
44899
|
+
apiPayload['conditions'] = conditions;
|
|
44900
|
+
}
|
|
44901
|
+
if (typeof difficulty !== 'undefined') {
|
|
44902
|
+
apiPayload['difficulty'] = difficulty;
|
|
44903
|
+
}
|
|
44904
|
+
if (typeof ttl !== 'undefined') {
|
|
44905
|
+
apiPayload['ttl'] = ttl;
|
|
45273
44906
|
}
|
|
45274
44907
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45275
44908
|
const apiHeaders = {
|
|
@@ -45279,7 +44912,7 @@ class Videos {
|
|
|
45279
44912
|
};
|
|
45280
44913
|
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
45281
44914
|
}
|
|
45282
|
-
|
|
44915
|
+
updateChallengeRule(paramsOrFirst, ...rest) {
|
|
45283
44916
|
let params;
|
|
45284
44917
|
if (paramsOrFirst &&
|
|
45285
44918
|
typeof paramsOrFirst === 'object' &&
|
|
@@ -45288,23 +44921,74 @@ class Videos {
|
|
|
45288
44921
|
}
|
|
45289
44922
|
else {
|
|
45290
44923
|
params = {
|
|
45291
|
-
|
|
44924
|
+
ruleId: paramsOrFirst,
|
|
44925
|
+
resourceType: rest[0],
|
|
44926
|
+
resourceId: rest[1],
|
|
44927
|
+
name: rest[2],
|
|
44928
|
+
description: rest[3],
|
|
44929
|
+
challengeType: rest[4],
|
|
44930
|
+
priority: rest[5],
|
|
44931
|
+
enabled: rest[6],
|
|
44932
|
+
conditions: rest[7],
|
|
44933
|
+
difficulty: rest[8],
|
|
44934
|
+
ttl: rest[9],
|
|
45292
44935
|
};
|
|
45293
44936
|
}
|
|
45294
|
-
const
|
|
45295
|
-
|
|
45296
|
-
|
|
44937
|
+
const ruleId = params.ruleId;
|
|
44938
|
+
const resourceType = params.resourceType;
|
|
44939
|
+
const resourceId = params.resourceId;
|
|
44940
|
+
const name = params.name;
|
|
44941
|
+
const description = params.description;
|
|
44942
|
+
const challengeType = params.challengeType;
|
|
44943
|
+
const priority = params.priority;
|
|
44944
|
+
const enabled = params.enabled;
|
|
44945
|
+
const conditions = params.conditions;
|
|
44946
|
+
const difficulty = params.difficulty;
|
|
44947
|
+
const ttl = params.ttl;
|
|
44948
|
+
if (typeof ruleId === 'undefined' || ruleId === '') {
|
|
44949
|
+
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
45297
44950
|
}
|
|
45298
|
-
const apiPath = '/
|
|
44951
|
+
const apiPath = '/waf/rules/challenge/{ruleId}'.replace('{ruleId}', encodeURIComponent(String(ruleId)));
|
|
45299
44952
|
const apiPayload = {};
|
|
44953
|
+
if (typeof resourceType !== 'undefined') {
|
|
44954
|
+
apiPayload['resourceType'] = resourceType;
|
|
44955
|
+
}
|
|
44956
|
+
if (typeof resourceId !== 'undefined') {
|
|
44957
|
+
apiPayload['resourceId'] = resourceId;
|
|
44958
|
+
}
|
|
44959
|
+
if (typeof name !== 'undefined') {
|
|
44960
|
+
apiPayload['name'] = name;
|
|
44961
|
+
}
|
|
44962
|
+
if (typeof description !== 'undefined') {
|
|
44963
|
+
apiPayload['description'] = description;
|
|
44964
|
+
}
|
|
44965
|
+
if (typeof challengeType !== 'undefined') {
|
|
44966
|
+
apiPayload['challengeType'] = challengeType;
|
|
44967
|
+
}
|
|
44968
|
+
if (typeof priority !== 'undefined') {
|
|
44969
|
+
apiPayload['priority'] = priority;
|
|
44970
|
+
}
|
|
44971
|
+
if (typeof enabled !== 'undefined') {
|
|
44972
|
+
apiPayload['enabled'] = enabled;
|
|
44973
|
+
}
|
|
44974
|
+
if (typeof conditions !== 'undefined') {
|
|
44975
|
+
apiPayload['conditions'] = conditions;
|
|
44976
|
+
}
|
|
44977
|
+
if (typeof difficulty !== 'undefined') {
|
|
44978
|
+
apiPayload['difficulty'] = difficulty;
|
|
44979
|
+
}
|
|
44980
|
+
if (typeof ttl !== 'undefined') {
|
|
44981
|
+
apiPayload['ttl'] = ttl;
|
|
44982
|
+
}
|
|
45300
44983
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45301
44984
|
const apiHeaders = {
|
|
45302
44985
|
'X-Appwrite-Project': this.client.config.project,
|
|
44986
|
+
'content-type': 'application/json',
|
|
45303
44987
|
accept: 'application/json',
|
|
45304
44988
|
};
|
|
45305
|
-
return this.client.call('
|
|
44989
|
+
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
45306
44990
|
}
|
|
45307
|
-
|
|
44991
|
+
createDenyRule(paramsOrFirst, ...rest) {
|
|
45308
44992
|
let params;
|
|
45309
44993
|
if (paramsOrFirst &&
|
|
45310
44994
|
typeof paramsOrFirst === 'object' &&
|
|
@@ -45313,54 +44997,58 @@ class Videos {
|
|
|
45313
44997
|
}
|
|
45314
44998
|
else {
|
|
45315
44999
|
params = {
|
|
45316
|
-
|
|
45317
|
-
|
|
45318
|
-
|
|
45319
|
-
|
|
45320
|
-
|
|
45321
|
-
|
|
45000
|
+
ruleId: paramsOrFirst,
|
|
45001
|
+
resourceType: rest[0],
|
|
45002
|
+
name: rest[1],
|
|
45003
|
+
resourceId: rest[2],
|
|
45004
|
+
description: rest[3],
|
|
45005
|
+
priority: rest[4],
|
|
45006
|
+
enabled: rest[5],
|
|
45007
|
+
conditions: rest[6],
|
|
45322
45008
|
};
|
|
45323
45009
|
}
|
|
45324
|
-
const
|
|
45010
|
+
const ruleId = params.ruleId;
|
|
45011
|
+
const resourceType = params.resourceType;
|
|
45325
45012
|
const name = params.name;
|
|
45326
|
-
const
|
|
45327
|
-
const
|
|
45328
|
-
const
|
|
45329
|
-
const
|
|
45330
|
-
|
|
45331
|
-
|
|
45013
|
+
const resourceId = params.resourceId;
|
|
45014
|
+
const description = params.description;
|
|
45015
|
+
const priority = params.priority;
|
|
45016
|
+
const enabled = params.enabled;
|
|
45017
|
+
const conditions = params.conditions;
|
|
45018
|
+
if (typeof ruleId === 'undefined') {
|
|
45019
|
+
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
45020
|
+
}
|
|
45021
|
+
if (typeof resourceType === 'undefined') {
|
|
45022
|
+
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
45332
45023
|
}
|
|
45333
45024
|
if (typeof name === 'undefined') {
|
|
45334
45025
|
throw new AppwriteException('Missing required parameter: "name"');
|
|
45335
45026
|
}
|
|
45336
|
-
|
|
45337
|
-
|
|
45338
|
-
|
|
45339
|
-
|
|
45340
|
-
throw new AppwriteException('Missing required parameter: "audioBitRate"');
|
|
45027
|
+
const apiPath = '/waf/rules/deny';
|
|
45028
|
+
const apiPayload = {};
|
|
45029
|
+
if (typeof ruleId !== 'undefined') {
|
|
45030
|
+
apiPayload['ruleId'] = ruleId;
|
|
45341
45031
|
}
|
|
45342
|
-
if (typeof
|
|
45343
|
-
|
|
45032
|
+
if (typeof resourceType !== 'undefined') {
|
|
45033
|
+
apiPayload['resourceType'] = resourceType;
|
|
45344
45034
|
}
|
|
45345
|
-
if (typeof
|
|
45346
|
-
|
|
45035
|
+
if (typeof resourceId !== 'undefined') {
|
|
45036
|
+
apiPayload['resourceId'] = resourceId;
|
|
45347
45037
|
}
|
|
45348
|
-
const apiPath = '/videos/profiles/{profileId}'.replace('{profileId}', encodeURIComponent(String(profileId)));
|
|
45349
|
-
const apiPayload = {};
|
|
45350
45038
|
if (typeof name !== 'undefined') {
|
|
45351
45039
|
apiPayload['name'] = name;
|
|
45352
45040
|
}
|
|
45353
|
-
if (typeof
|
|
45354
|
-
apiPayload['
|
|
45041
|
+
if (typeof description !== 'undefined') {
|
|
45042
|
+
apiPayload['description'] = description;
|
|
45355
45043
|
}
|
|
45356
|
-
if (typeof
|
|
45357
|
-
apiPayload['
|
|
45044
|
+
if (typeof priority !== 'undefined') {
|
|
45045
|
+
apiPayload['priority'] = priority;
|
|
45358
45046
|
}
|
|
45359
|
-
if (typeof
|
|
45360
|
-
apiPayload['
|
|
45047
|
+
if (typeof enabled !== 'undefined') {
|
|
45048
|
+
apiPayload['enabled'] = enabled;
|
|
45361
45049
|
}
|
|
45362
|
-
if (typeof
|
|
45363
|
-
apiPayload['
|
|
45050
|
+
if (typeof conditions !== 'undefined') {
|
|
45051
|
+
apiPayload['conditions'] = conditions;
|
|
45364
45052
|
}
|
|
45365
45053
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45366
45054
|
const apiHeaders = {
|
|
@@ -45368,9 +45056,9 @@ class Videos {
|
|
|
45368
45056
|
'content-type': 'application/json',
|
|
45369
45057
|
accept: 'application/json',
|
|
45370
45058
|
};
|
|
45371
|
-
return this.client.call('
|
|
45059
|
+
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
45372
45060
|
}
|
|
45373
|
-
|
|
45061
|
+
updateDenyRule(paramsOrFirst, ...rest) {
|
|
45374
45062
|
let params;
|
|
45375
45063
|
if (paramsOrFirst &&
|
|
45376
45064
|
typeof paramsOrFirst === 'object' &&
|
|
@@ -45379,49 +45067,59 @@ class Videos {
|
|
|
45379
45067
|
}
|
|
45380
45068
|
else {
|
|
45381
45069
|
params = {
|
|
45382
|
-
|
|
45070
|
+
ruleId: paramsOrFirst,
|
|
45071
|
+
resourceType: rest[0],
|
|
45072
|
+
resourceId: rest[1],
|
|
45073
|
+
name: rest[2],
|
|
45074
|
+
description: rest[3],
|
|
45075
|
+
priority: rest[4],
|
|
45076
|
+
enabled: rest[5],
|
|
45077
|
+
conditions: rest[6],
|
|
45383
45078
|
};
|
|
45384
45079
|
}
|
|
45385
|
-
const
|
|
45386
|
-
|
|
45387
|
-
|
|
45080
|
+
const ruleId = params.ruleId;
|
|
45081
|
+
const resourceType = params.resourceType;
|
|
45082
|
+
const resourceId = params.resourceId;
|
|
45083
|
+
const name = params.name;
|
|
45084
|
+
const description = params.description;
|
|
45085
|
+
const priority = params.priority;
|
|
45086
|
+
const enabled = params.enabled;
|
|
45087
|
+
const conditions = params.conditions;
|
|
45088
|
+
if (typeof ruleId === 'undefined' || ruleId === '') {
|
|
45089
|
+
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
45388
45090
|
}
|
|
45389
|
-
const apiPath = '/
|
|
45091
|
+
const apiPath = '/waf/rules/deny/{ruleId}'.replace('{ruleId}', encodeURIComponent(String(ruleId)));
|
|
45390
45092
|
const apiPayload = {};
|
|
45391
|
-
|
|
45392
|
-
|
|
45393
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
45394
|
-
'content-type': 'application/json',
|
|
45395
|
-
accept: 'application/json',
|
|
45396
|
-
};
|
|
45397
|
-
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
45398
|
-
}
|
|
45399
|
-
get(paramsOrFirst) {
|
|
45400
|
-
let params;
|
|
45401
|
-
if (paramsOrFirst &&
|
|
45402
|
-
typeof paramsOrFirst === 'object' &&
|
|
45403
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45404
|
-
params = (paramsOrFirst || {});
|
|
45093
|
+
if (typeof resourceType !== 'undefined') {
|
|
45094
|
+
apiPayload['resourceType'] = resourceType;
|
|
45405
45095
|
}
|
|
45406
|
-
|
|
45407
|
-
|
|
45408
|
-
videoId: paramsOrFirst,
|
|
45409
|
-
};
|
|
45096
|
+
if (typeof resourceId !== 'undefined') {
|
|
45097
|
+
apiPayload['resourceId'] = resourceId;
|
|
45410
45098
|
}
|
|
45411
|
-
|
|
45412
|
-
|
|
45413
|
-
|
|
45099
|
+
if (typeof name !== 'undefined') {
|
|
45100
|
+
apiPayload['name'] = name;
|
|
45101
|
+
}
|
|
45102
|
+
if (typeof description !== 'undefined') {
|
|
45103
|
+
apiPayload['description'] = description;
|
|
45104
|
+
}
|
|
45105
|
+
if (typeof priority !== 'undefined') {
|
|
45106
|
+
apiPayload['priority'] = priority;
|
|
45107
|
+
}
|
|
45108
|
+
if (typeof enabled !== 'undefined') {
|
|
45109
|
+
apiPayload['enabled'] = enabled;
|
|
45110
|
+
}
|
|
45111
|
+
if (typeof conditions !== 'undefined') {
|
|
45112
|
+
apiPayload['conditions'] = conditions;
|
|
45414
45113
|
}
|
|
45415
|
-
const apiPath = '/videos/{videoId}'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45416
|
-
const apiPayload = {};
|
|
45417
45114
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45418
45115
|
const apiHeaders = {
|
|
45419
45116
|
'X-Appwrite-Project': this.client.config.project,
|
|
45117
|
+
'content-type': 'application/json',
|
|
45420
45118
|
accept: 'application/json',
|
|
45421
45119
|
};
|
|
45422
|
-
return this.client.call('
|
|
45120
|
+
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
45423
45121
|
}
|
|
45424
|
-
|
|
45122
|
+
createRateLimitRule(paramsOrFirst, ...rest) {
|
|
45425
45123
|
let params;
|
|
45426
45124
|
if (paramsOrFirst &&
|
|
45427
45125
|
typeof paramsOrFirst === 'object' &&
|
|
@@ -45430,58 +45128,99 @@ class Videos {
|
|
|
45430
45128
|
}
|
|
45431
45129
|
else {
|
|
45432
45130
|
params = {
|
|
45433
|
-
|
|
45434
|
-
|
|
45131
|
+
ruleId: paramsOrFirst,
|
|
45132
|
+
resourceType: rest[0],
|
|
45133
|
+
name: rest[1],
|
|
45134
|
+
limit: rest[2],
|
|
45135
|
+
interval: rest[3],
|
|
45136
|
+
resourceId: rest[4],
|
|
45137
|
+
description: rest[5],
|
|
45138
|
+
key: rest[6],
|
|
45139
|
+
strategy: rest[7],
|
|
45140
|
+
maxBucketSize: rest[8],
|
|
45141
|
+
priority: rest[9],
|
|
45142
|
+
enabled: rest[10],
|
|
45143
|
+
conditions: rest[11],
|
|
45435
45144
|
};
|
|
45436
45145
|
}
|
|
45437
|
-
const
|
|
45146
|
+
const ruleId = params.ruleId;
|
|
45147
|
+
const resourceType = params.resourceType;
|
|
45438
45148
|
const name = params.name;
|
|
45439
|
-
|
|
45440
|
-
|
|
45149
|
+
const limit = params.limit;
|
|
45150
|
+
const interval = params.interval;
|
|
45151
|
+
const resourceId = params.resourceId;
|
|
45152
|
+
const description = params.description;
|
|
45153
|
+
const key = params.key;
|
|
45154
|
+
const strategy = params.strategy;
|
|
45155
|
+
const maxBucketSize = params.maxBucketSize;
|
|
45156
|
+
const priority = params.priority;
|
|
45157
|
+
const enabled = params.enabled;
|
|
45158
|
+
const conditions = params.conditions;
|
|
45159
|
+
if (typeof ruleId === 'undefined') {
|
|
45160
|
+
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
45161
|
+
}
|
|
45162
|
+
if (typeof resourceType === 'undefined') {
|
|
45163
|
+
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
45441
45164
|
}
|
|
45442
45165
|
if (typeof name === 'undefined') {
|
|
45443
45166
|
throw new AppwriteException('Missing required parameter: "name"');
|
|
45444
45167
|
}
|
|
45445
|
-
|
|
45168
|
+
if (typeof limit === 'undefined') {
|
|
45169
|
+
throw new AppwriteException('Missing required parameter: "limit"');
|
|
45170
|
+
}
|
|
45171
|
+
if (typeof interval === 'undefined') {
|
|
45172
|
+
throw new AppwriteException('Missing required parameter: "interval"');
|
|
45173
|
+
}
|
|
45174
|
+
const apiPath = '/waf/rules/rate-limit';
|
|
45446
45175
|
const apiPayload = {};
|
|
45176
|
+
if (typeof ruleId !== 'undefined') {
|
|
45177
|
+
apiPayload['ruleId'] = ruleId;
|
|
45178
|
+
}
|
|
45179
|
+
if (typeof resourceType !== 'undefined') {
|
|
45180
|
+
apiPayload['resourceType'] = resourceType;
|
|
45181
|
+
}
|
|
45182
|
+
if (typeof resourceId !== 'undefined') {
|
|
45183
|
+
apiPayload['resourceId'] = resourceId;
|
|
45184
|
+
}
|
|
45447
45185
|
if (typeof name !== 'undefined') {
|
|
45448
45186
|
apiPayload['name'] = name;
|
|
45449
45187
|
}
|
|
45450
|
-
|
|
45451
|
-
|
|
45452
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
45453
|
-
'content-type': 'application/json',
|
|
45454
|
-
accept: 'application/json',
|
|
45455
|
-
};
|
|
45456
|
-
return this.client.call('put', uri, apiHeaders, apiPayload);
|
|
45457
|
-
}
|
|
45458
|
-
delete(paramsOrFirst) {
|
|
45459
|
-
let params;
|
|
45460
|
-
if (paramsOrFirst &&
|
|
45461
|
-
typeof paramsOrFirst === 'object' &&
|
|
45462
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45463
|
-
params = (paramsOrFirst || {});
|
|
45188
|
+
if (typeof description !== 'undefined') {
|
|
45189
|
+
apiPayload['description'] = description;
|
|
45464
45190
|
}
|
|
45465
|
-
|
|
45466
|
-
|
|
45467
|
-
videoId: paramsOrFirst,
|
|
45468
|
-
};
|
|
45191
|
+
if (typeof limit !== 'undefined') {
|
|
45192
|
+
apiPayload['limit'] = limit;
|
|
45469
45193
|
}
|
|
45470
|
-
|
|
45471
|
-
|
|
45472
|
-
|
|
45194
|
+
if (typeof interval !== 'undefined') {
|
|
45195
|
+
apiPayload['interval'] = interval;
|
|
45196
|
+
}
|
|
45197
|
+
if (typeof key !== 'undefined') {
|
|
45198
|
+
apiPayload['key'] = key;
|
|
45199
|
+
}
|
|
45200
|
+
if (typeof strategy !== 'undefined') {
|
|
45201
|
+
apiPayload['strategy'] = strategy;
|
|
45202
|
+
}
|
|
45203
|
+
if (typeof maxBucketSize !== 'undefined') {
|
|
45204
|
+
apiPayload['maxBucketSize'] = maxBucketSize;
|
|
45205
|
+
}
|
|
45206
|
+
if (typeof priority !== 'undefined') {
|
|
45207
|
+
apiPayload['priority'] = priority;
|
|
45208
|
+
}
|
|
45209
|
+
if (typeof enabled !== 'undefined') {
|
|
45210
|
+
apiPayload['enabled'] = enabled;
|
|
45211
|
+
}
|
|
45212
|
+
if (typeof conditions !== 'undefined') {
|
|
45213
|
+
apiPayload['conditions'] = conditions;
|
|
45473
45214
|
}
|
|
45474
|
-
const apiPath = '/videos/{videoId}'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45475
|
-
const apiPayload = {};
|
|
45476
45215
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45477
45216
|
const apiHeaders = {
|
|
45478
45217
|
'X-Appwrite-Project': this.client.config.project,
|
|
45479
45218
|
'content-type': 'application/json',
|
|
45480
45219
|
accept: 'application/json',
|
|
45481
45220
|
};
|
|
45482
|
-
return this.client.call('
|
|
45221
|
+
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
45483
45222
|
}
|
|
45484
|
-
|
|
45223
|
+
updateRateLimitRule(paramsOrFirst, ...rest) {
|
|
45485
45224
|
let params;
|
|
45486
45225
|
if (paramsOrFirst &&
|
|
45487
45226
|
typeof paramsOrFirst === 'object' &&
|
|
@@ -45490,1341 +45229,18 @@ class Videos {
|
|
|
45490
45229
|
}
|
|
45491
45230
|
else {
|
|
45492
45231
|
params = {
|
|
45493
|
-
|
|
45494
|
-
|
|
45495
|
-
|
|
45496
|
-
|
|
45497
|
-
|
|
45498
|
-
|
|
45499
|
-
|
|
45500
|
-
|
|
45501
|
-
|
|
45502
|
-
|
|
45503
|
-
|
|
45504
|
-
|
|
45505
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45506
|
-
uri.searchParams.append(key, value);
|
|
45507
|
-
}
|
|
45508
|
-
return uri.toString();
|
|
45509
|
-
}
|
|
45510
|
-
getCmafDashManifest(paramsOrFirst) {
|
|
45511
|
-
let params;
|
|
45512
|
-
if (paramsOrFirst &&
|
|
45513
|
-
typeof paramsOrFirst === 'object' &&
|
|
45514
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45515
|
-
params = (paramsOrFirst || {});
|
|
45516
|
-
}
|
|
45517
|
-
else {
|
|
45518
|
-
params = {
|
|
45519
|
-
videoId: paramsOrFirst,
|
|
45520
|
-
};
|
|
45521
|
-
}
|
|
45522
|
-
const videoId = params.videoId;
|
|
45523
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45524
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45525
|
-
}
|
|
45526
|
-
const apiPath = '/videos/{videoId}/outputs/cmaf/master.mpd'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45527
|
-
const apiPayload = {};
|
|
45528
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45529
|
-
apiPayload['project'] = this.client.config.project;
|
|
45530
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45531
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45532
|
-
uri.searchParams.append(key, value);
|
|
45533
|
-
}
|
|
45534
|
-
return uri.toString();
|
|
45535
|
-
}
|
|
45536
|
-
getCmafStreamManifest(paramsOrFirst, ...rest) {
|
|
45537
|
-
let params;
|
|
45538
|
-
if (paramsOrFirst &&
|
|
45539
|
-
typeof paramsOrFirst === 'object' &&
|
|
45540
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45541
|
-
params = (paramsOrFirst || {});
|
|
45542
|
-
}
|
|
45543
|
-
else {
|
|
45544
|
-
params = {
|
|
45545
|
-
videoId: paramsOrFirst,
|
|
45546
|
-
renditionId: rest[0],
|
|
45547
|
-
streamId: rest[1],
|
|
45548
|
-
};
|
|
45549
|
-
}
|
|
45550
|
-
const videoId = params.videoId;
|
|
45551
|
-
const renditionId = params.renditionId;
|
|
45552
|
-
const streamId = params.streamId;
|
|
45553
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45554
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45555
|
-
}
|
|
45556
|
-
if (typeof renditionId === 'undefined' || renditionId === '') {
|
|
45557
|
-
throw new AppwriteException('Missing required parameter: "renditionId"');
|
|
45558
|
-
}
|
|
45559
|
-
if (typeof streamId === 'undefined') {
|
|
45560
|
-
throw new AppwriteException('Missing required parameter: "streamId"');
|
|
45561
|
-
}
|
|
45562
|
-
const apiPath = '/videos/{videoId}/outputs/cmaf/renditions/{renditionId}/streams/{streamId}/playlist.m3u8'
|
|
45563
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45564
|
-
.replace('{renditionId}', encodeURIComponent(String(renditionId)))
|
|
45565
|
-
.replace('{streamId}', encodeURIComponent(String(streamId)));
|
|
45566
|
-
const apiPayload = {};
|
|
45567
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45568
|
-
apiPayload['project'] = this.client.config.project;
|
|
45569
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45570
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45571
|
-
uri.searchParams.append(key, value);
|
|
45572
|
-
}
|
|
45573
|
-
return uri.toString();
|
|
45574
|
-
}
|
|
45575
|
-
getDashManifest(paramsOrFirst) {
|
|
45576
|
-
let params;
|
|
45577
|
-
if (paramsOrFirst &&
|
|
45578
|
-
typeof paramsOrFirst === 'object' &&
|
|
45579
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45580
|
-
params = (paramsOrFirst || {});
|
|
45581
|
-
}
|
|
45582
|
-
else {
|
|
45583
|
-
params = {
|
|
45584
|
-
videoId: paramsOrFirst,
|
|
45585
|
-
};
|
|
45586
|
-
}
|
|
45587
|
-
const videoId = params.videoId;
|
|
45588
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45589
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45590
|
-
}
|
|
45591
|
-
const apiPath = '/videos/{videoId}/outputs/dash/master.mpd'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45592
|
-
const apiPayload = {};
|
|
45593
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45594
|
-
apiPayload['project'] = this.client.config.project;
|
|
45595
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45596
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45597
|
-
uri.searchParams.append(key, value);
|
|
45598
|
-
}
|
|
45599
|
-
return uri.toString();
|
|
45600
|
-
}
|
|
45601
|
-
getHlsManifest(paramsOrFirst) {
|
|
45602
|
-
let params;
|
|
45603
|
-
if (paramsOrFirst &&
|
|
45604
|
-
typeof paramsOrFirst === 'object' &&
|
|
45605
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45606
|
-
params = (paramsOrFirst || {});
|
|
45607
|
-
}
|
|
45608
|
-
else {
|
|
45609
|
-
params = {
|
|
45610
|
-
videoId: paramsOrFirst,
|
|
45611
|
-
};
|
|
45612
|
-
}
|
|
45613
|
-
const videoId = params.videoId;
|
|
45614
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45615
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45616
|
-
}
|
|
45617
|
-
const apiPath = '/videos/{videoId}/outputs/hls/master.m3u8'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45618
|
-
const apiPayload = {};
|
|
45619
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45620
|
-
apiPayload['project'] = this.client.config.project;
|
|
45621
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45622
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45623
|
-
uri.searchParams.append(key, value);
|
|
45624
|
-
}
|
|
45625
|
-
return uri.toString();
|
|
45626
|
-
}
|
|
45627
|
-
getStreamManifest(paramsOrFirst, ...rest) {
|
|
45628
|
-
let params;
|
|
45629
|
-
if (paramsOrFirst &&
|
|
45630
|
-
typeof paramsOrFirst === 'object' &&
|
|
45631
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45632
|
-
params = (paramsOrFirst || {});
|
|
45633
|
-
}
|
|
45634
|
-
else {
|
|
45635
|
-
params = {
|
|
45636
|
-
videoId: paramsOrFirst,
|
|
45637
|
-
renditionId: rest[0],
|
|
45638
|
-
streamId: rest[1],
|
|
45639
|
-
};
|
|
45640
|
-
}
|
|
45641
|
-
const videoId = params.videoId;
|
|
45642
|
-
const renditionId = params.renditionId;
|
|
45643
|
-
const streamId = params.streamId;
|
|
45644
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45645
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45646
|
-
}
|
|
45647
|
-
if (typeof renditionId === 'undefined' || renditionId === '') {
|
|
45648
|
-
throw new AppwriteException('Missing required parameter: "renditionId"');
|
|
45649
|
-
}
|
|
45650
|
-
if (typeof streamId === 'undefined') {
|
|
45651
|
-
throw new AppwriteException('Missing required parameter: "streamId"');
|
|
45652
|
-
}
|
|
45653
|
-
const apiPath = '/videos/{videoId}/outputs/hls/renditions/{renditionId}/streams/{streamId}/playlist.m3u8'
|
|
45654
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45655
|
-
.replace('{renditionId}', encodeURIComponent(String(renditionId)))
|
|
45656
|
-
.replace('{streamId}', encodeURIComponent(String(streamId)));
|
|
45657
|
-
const apiPayload = {};
|
|
45658
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45659
|
-
apiPayload['project'] = this.client.config.project;
|
|
45660
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45661
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45662
|
-
uri.searchParams.append(key, value);
|
|
45663
|
-
}
|
|
45664
|
-
return uri.toString();
|
|
45665
|
-
}
|
|
45666
|
-
getSegment(paramsOrFirst, ...rest) {
|
|
45667
|
-
let params;
|
|
45668
|
-
if (paramsOrFirst &&
|
|
45669
|
-
typeof paramsOrFirst === 'object' &&
|
|
45670
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45671
|
-
params = (paramsOrFirst || {});
|
|
45672
|
-
}
|
|
45673
|
-
else {
|
|
45674
|
-
params = {
|
|
45675
|
-
videoId: paramsOrFirst,
|
|
45676
|
-
output: rest[0],
|
|
45677
|
-
renditionId: rest[1],
|
|
45678
|
-
segmentId: rest[2],
|
|
45679
|
-
};
|
|
45680
|
-
}
|
|
45681
|
-
const videoId = params.videoId;
|
|
45682
|
-
const output = params.output;
|
|
45683
|
-
const renditionId = params.renditionId;
|
|
45684
|
-
const segmentId = params.segmentId;
|
|
45685
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45686
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45687
|
-
}
|
|
45688
|
-
if (typeof output === 'undefined') {
|
|
45689
|
-
throw new AppwriteException('Missing required parameter: "output"');
|
|
45690
|
-
}
|
|
45691
|
-
if (typeof renditionId === 'undefined' || renditionId === '') {
|
|
45692
|
-
throw new AppwriteException('Missing required parameter: "renditionId"');
|
|
45693
|
-
}
|
|
45694
|
-
if (typeof segmentId === 'undefined' || segmentId === '') {
|
|
45695
|
-
throw new AppwriteException('Missing required parameter: "segmentId"');
|
|
45696
|
-
}
|
|
45697
|
-
const apiPath = '/videos/{videoId}/outputs/{output}/renditions/{renditionId}/segments/{segmentId}'
|
|
45698
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45699
|
-
.replace('{output}', encodeURIComponent(String(output)))
|
|
45700
|
-
.replace('{renditionId}', encodeURIComponent(String(renditionId)))
|
|
45701
|
-
.replace('{segmentId}', encodeURIComponent(String(segmentId)));
|
|
45702
|
-
const apiPayload = {};
|
|
45703
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45704
|
-
apiPayload['project'] = this.client.config.project;
|
|
45705
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45706
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45707
|
-
uri.searchParams.append(key, value);
|
|
45708
|
-
}
|
|
45709
|
-
return uri.toString();
|
|
45710
|
-
}
|
|
45711
|
-
getSubtitleManifest(paramsOrFirst, ...rest) {
|
|
45712
|
-
let params;
|
|
45713
|
-
if (paramsOrFirst &&
|
|
45714
|
-
typeof paramsOrFirst === 'object' &&
|
|
45715
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45716
|
-
params = (paramsOrFirst || {});
|
|
45717
|
-
}
|
|
45718
|
-
else {
|
|
45719
|
-
params = {
|
|
45720
|
-
videoId: paramsOrFirst,
|
|
45721
|
-
output: rest[0],
|
|
45722
|
-
subtitleId: rest[1],
|
|
45723
|
-
};
|
|
45724
|
-
}
|
|
45725
|
-
const videoId = params.videoId;
|
|
45726
|
-
const output = params.output;
|
|
45727
|
-
const subtitleId = params.subtitleId;
|
|
45728
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45729
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45730
|
-
}
|
|
45731
|
-
if (typeof output === 'undefined') {
|
|
45732
|
-
throw new AppwriteException('Missing required parameter: "output"');
|
|
45733
|
-
}
|
|
45734
|
-
if (typeof subtitleId === 'undefined' || subtitleId === '') {
|
|
45735
|
-
throw new AppwriteException('Missing required parameter: "subtitleId"');
|
|
45736
|
-
}
|
|
45737
|
-
const apiPath = '/videos/{videoId}/outputs/{output}/subtitles/{subtitleId}/manifest'
|
|
45738
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45739
|
-
.replace('{output}', encodeURIComponent(String(output)))
|
|
45740
|
-
.replace('{subtitleId}', encodeURIComponent(String(subtitleId)));
|
|
45741
|
-
const apiPayload = {};
|
|
45742
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45743
|
-
apiPayload['project'] = this.client.config.project;
|
|
45744
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45745
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45746
|
-
uri.searchParams.append(key, value);
|
|
45747
|
-
}
|
|
45748
|
-
return uri.toString();
|
|
45749
|
-
}
|
|
45750
|
-
getSubtitleSegment(paramsOrFirst, ...rest) {
|
|
45751
|
-
let params;
|
|
45752
|
-
if (paramsOrFirst &&
|
|
45753
|
-
typeof paramsOrFirst === 'object' &&
|
|
45754
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45755
|
-
params = (paramsOrFirst || {});
|
|
45756
|
-
}
|
|
45757
|
-
else {
|
|
45758
|
-
params = {
|
|
45759
|
-
videoId: paramsOrFirst,
|
|
45760
|
-
output: rest[0],
|
|
45761
|
-
subtitleId: rest[1],
|
|
45762
|
-
segmentId: rest[2],
|
|
45763
|
-
};
|
|
45764
|
-
}
|
|
45765
|
-
const videoId = params.videoId;
|
|
45766
|
-
const output = params.output;
|
|
45767
|
-
const subtitleId = params.subtitleId;
|
|
45768
|
-
const segmentId = params.segmentId;
|
|
45769
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45770
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45771
|
-
}
|
|
45772
|
-
if (typeof output === 'undefined') {
|
|
45773
|
-
throw new AppwriteException('Missing required parameter: "output"');
|
|
45774
|
-
}
|
|
45775
|
-
if (typeof subtitleId === 'undefined' || subtitleId === '') {
|
|
45776
|
-
throw new AppwriteException('Missing required parameter: "subtitleId"');
|
|
45777
|
-
}
|
|
45778
|
-
if (typeof segmentId === 'undefined' || segmentId === '') {
|
|
45779
|
-
throw new AppwriteException('Missing required parameter: "segmentId"');
|
|
45780
|
-
}
|
|
45781
|
-
const apiPath = '/videos/{videoId}/outputs/{output}/subtitles/{subtitleId}/segments/{segmentId}'
|
|
45782
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45783
|
-
.replace('{output}', encodeURIComponent(String(output)))
|
|
45784
|
-
.replace('{subtitleId}', encodeURIComponent(String(subtitleId)))
|
|
45785
|
-
.replace('{segmentId}', encodeURIComponent(String(segmentId)));
|
|
45786
|
-
const apiPayload = {};
|
|
45787
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45788
|
-
apiPayload['project'] = this.client.config.project;
|
|
45789
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45790
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45791
|
-
uri.searchParams.append(key, value);
|
|
45792
|
-
}
|
|
45793
|
-
return uri.toString();
|
|
45794
|
-
}
|
|
45795
|
-
getPreview(paramsOrFirst, ...rest) {
|
|
45796
|
-
let params;
|
|
45797
|
-
if (paramsOrFirst &&
|
|
45798
|
-
typeof paramsOrFirst === 'object' &&
|
|
45799
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45800
|
-
params = (paramsOrFirst || {});
|
|
45801
|
-
}
|
|
45802
|
-
else {
|
|
45803
|
-
params = {
|
|
45804
|
-
videoId: paramsOrFirst,
|
|
45805
|
-
previewId: rest[0],
|
|
45806
|
-
width: rest[1],
|
|
45807
|
-
height: rest[2],
|
|
45808
|
-
output: rest[3],
|
|
45809
|
-
};
|
|
45810
|
-
}
|
|
45811
|
-
const videoId = params.videoId;
|
|
45812
|
-
const previewId = params.previewId;
|
|
45813
|
-
const width = params.width;
|
|
45814
|
-
const height = params.height;
|
|
45815
|
-
const output = params.output;
|
|
45816
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45817
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45818
|
-
}
|
|
45819
|
-
if (typeof previewId === 'undefined' || previewId === '') {
|
|
45820
|
-
throw new AppwriteException('Missing required parameter: "previewId"');
|
|
45821
|
-
}
|
|
45822
|
-
const apiPath = '/videos/{videoId}/previews/{previewId}'
|
|
45823
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45824
|
-
.replace('{previewId}', encodeURIComponent(String(previewId)));
|
|
45825
|
-
const apiPayload = {};
|
|
45826
|
-
if (typeof width !== 'undefined') {
|
|
45827
|
-
apiPayload['width'] = width;
|
|
45828
|
-
}
|
|
45829
|
-
if (typeof height !== 'undefined') {
|
|
45830
|
-
apiPayload['height'] = height;
|
|
45831
|
-
}
|
|
45832
|
-
if (typeof output !== 'undefined') {
|
|
45833
|
-
apiPayload['output'] = output;
|
|
45834
|
-
}
|
|
45835
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45836
|
-
apiPayload['project'] = this.client.config.project;
|
|
45837
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45838
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45839
|
-
uri.searchParams.append(key, value);
|
|
45840
|
-
}
|
|
45841
|
-
return uri.toString();
|
|
45842
|
-
}
|
|
45843
|
-
listRenditions(paramsOrFirst, ...rest) {
|
|
45844
|
-
let params;
|
|
45845
|
-
if (paramsOrFirst &&
|
|
45846
|
-
typeof paramsOrFirst === 'object' &&
|
|
45847
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45848
|
-
params = (paramsOrFirst || {});
|
|
45849
|
-
}
|
|
45850
|
-
else {
|
|
45851
|
-
params = {
|
|
45852
|
-
videoId: paramsOrFirst,
|
|
45853
|
-
output: rest[0],
|
|
45854
|
-
status: rest[1],
|
|
45855
|
-
};
|
|
45856
|
-
}
|
|
45857
|
-
const videoId = params.videoId;
|
|
45858
|
-
const output = params.output;
|
|
45859
|
-
const status = params.status;
|
|
45860
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45861
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45862
|
-
}
|
|
45863
|
-
const apiPath = '/videos/{videoId}/renditions'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45864
|
-
const apiPayload = {};
|
|
45865
|
-
if (typeof output !== 'undefined') {
|
|
45866
|
-
apiPayload['output'] = output;
|
|
45867
|
-
}
|
|
45868
|
-
if (typeof status !== 'undefined') {
|
|
45869
|
-
apiPayload['status'] = status;
|
|
45870
|
-
}
|
|
45871
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45872
|
-
const apiHeaders = {
|
|
45873
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
45874
|
-
accept: 'application/json',
|
|
45875
|
-
};
|
|
45876
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
45877
|
-
}
|
|
45878
|
-
createRendition(paramsOrFirst, ...rest) {
|
|
45879
|
-
let params;
|
|
45880
|
-
if (paramsOrFirst &&
|
|
45881
|
-
typeof paramsOrFirst === 'object' &&
|
|
45882
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45883
|
-
params = (paramsOrFirst || {});
|
|
45884
|
-
}
|
|
45885
|
-
else {
|
|
45886
|
-
params = {
|
|
45887
|
-
videoId: paramsOrFirst,
|
|
45888
|
-
profileId: rest[0],
|
|
45889
|
-
output: rest[1],
|
|
45890
|
-
};
|
|
45891
|
-
}
|
|
45892
|
-
const videoId = params.videoId;
|
|
45893
|
-
const profileId = params.profileId;
|
|
45894
|
-
const output = params.output;
|
|
45895
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45896
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45897
|
-
}
|
|
45898
|
-
if (typeof profileId === 'undefined') {
|
|
45899
|
-
throw new AppwriteException('Missing required parameter: "profileId"');
|
|
45900
|
-
}
|
|
45901
|
-
if (typeof output === 'undefined') {
|
|
45902
|
-
throw new AppwriteException('Missing required parameter: "output"');
|
|
45903
|
-
}
|
|
45904
|
-
const apiPath = '/videos/{videoId}/renditions'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45905
|
-
const apiPayload = {};
|
|
45906
|
-
if (typeof profileId !== 'undefined') {
|
|
45907
|
-
apiPayload['profileId'] = profileId;
|
|
45908
|
-
}
|
|
45909
|
-
if (typeof output !== 'undefined') {
|
|
45910
|
-
apiPayload['output'] = output;
|
|
45911
|
-
}
|
|
45912
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45913
|
-
const apiHeaders = {
|
|
45914
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
45915
|
-
'content-type': 'application/json',
|
|
45916
|
-
accept: 'application/json',
|
|
45917
|
-
};
|
|
45918
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
45919
|
-
}
|
|
45920
|
-
getRendition(paramsOrFirst, ...rest) {
|
|
45921
|
-
let params;
|
|
45922
|
-
if (paramsOrFirst &&
|
|
45923
|
-
typeof paramsOrFirst === 'object' &&
|
|
45924
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45925
|
-
params = (paramsOrFirst || {});
|
|
45926
|
-
}
|
|
45927
|
-
else {
|
|
45928
|
-
params = {
|
|
45929
|
-
videoId: paramsOrFirst,
|
|
45930
|
-
renditionId: rest[0],
|
|
45931
|
-
};
|
|
45932
|
-
}
|
|
45933
|
-
const videoId = params.videoId;
|
|
45934
|
-
const renditionId = params.renditionId;
|
|
45935
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45936
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45937
|
-
}
|
|
45938
|
-
if (typeof renditionId === 'undefined' || renditionId === '') {
|
|
45939
|
-
throw new AppwriteException('Missing required parameter: "renditionId"');
|
|
45940
|
-
}
|
|
45941
|
-
const apiPath = '/videos/{videoId}/renditions/{renditionId}'
|
|
45942
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45943
|
-
.replace('{renditionId}', encodeURIComponent(String(renditionId)));
|
|
45944
|
-
const apiPayload = {};
|
|
45945
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45946
|
-
const apiHeaders = {
|
|
45947
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
45948
|
-
accept: 'application/json',
|
|
45949
|
-
};
|
|
45950
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
45951
|
-
}
|
|
45952
|
-
deleteRendition(paramsOrFirst, ...rest) {
|
|
45953
|
-
let params;
|
|
45954
|
-
if (paramsOrFirst &&
|
|
45955
|
-
typeof paramsOrFirst === 'object' &&
|
|
45956
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45957
|
-
params = (paramsOrFirst || {});
|
|
45958
|
-
}
|
|
45959
|
-
else {
|
|
45960
|
-
params = {
|
|
45961
|
-
videoId: paramsOrFirst,
|
|
45962
|
-
renditionId: rest[0],
|
|
45963
|
-
};
|
|
45964
|
-
}
|
|
45965
|
-
const videoId = params.videoId;
|
|
45966
|
-
const renditionId = params.renditionId;
|
|
45967
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45968
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45969
|
-
}
|
|
45970
|
-
if (typeof renditionId === 'undefined' || renditionId === '') {
|
|
45971
|
-
throw new AppwriteException('Missing required parameter: "renditionId"');
|
|
45972
|
-
}
|
|
45973
|
-
const apiPath = '/videos/{videoId}/renditions/{renditionId}'
|
|
45974
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45975
|
-
.replace('{renditionId}', encodeURIComponent(String(renditionId)));
|
|
45976
|
-
const apiPayload = {};
|
|
45977
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45978
|
-
const apiHeaders = {
|
|
45979
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
45980
|
-
'content-type': 'application/json',
|
|
45981
|
-
accept: 'application/json',
|
|
45982
|
-
};
|
|
45983
|
-
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
45984
|
-
}
|
|
45985
|
-
createSource(paramsOrFirst) {
|
|
45986
|
-
let params;
|
|
45987
|
-
if (paramsOrFirst &&
|
|
45988
|
-
typeof paramsOrFirst === 'object' &&
|
|
45989
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45990
|
-
params = (paramsOrFirst || {});
|
|
45991
|
-
}
|
|
45992
|
-
else {
|
|
45993
|
-
params = {
|
|
45994
|
-
videoId: paramsOrFirst,
|
|
45995
|
-
};
|
|
45996
|
-
}
|
|
45997
|
-
const videoId = params.videoId;
|
|
45998
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45999
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
46000
|
-
}
|
|
46001
|
-
const apiPath = '/videos/{videoId}/source'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
46002
|
-
const apiPayload = {};
|
|
46003
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46004
|
-
const apiHeaders = {
|
|
46005
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46006
|
-
'content-type': 'application/json',
|
|
46007
|
-
accept: 'application/json',
|
|
46008
|
-
};
|
|
46009
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
46010
|
-
}
|
|
46011
|
-
listSubtitles(paramsOrFirst) {
|
|
46012
|
-
let params;
|
|
46013
|
-
if (paramsOrFirst &&
|
|
46014
|
-
typeof paramsOrFirst === 'object' &&
|
|
46015
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46016
|
-
params = (paramsOrFirst || {});
|
|
46017
|
-
}
|
|
46018
|
-
else {
|
|
46019
|
-
params = {
|
|
46020
|
-
videoId: paramsOrFirst,
|
|
46021
|
-
};
|
|
46022
|
-
}
|
|
46023
|
-
const videoId = params.videoId;
|
|
46024
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
46025
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
46026
|
-
}
|
|
46027
|
-
const apiPath = '/videos/{videoId}/subtitles'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
46028
|
-
const apiPayload = {};
|
|
46029
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46030
|
-
const apiHeaders = {
|
|
46031
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46032
|
-
accept: 'application/json',
|
|
46033
|
-
};
|
|
46034
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
46035
|
-
}
|
|
46036
|
-
createSubtitle(paramsOrFirst, ...rest) {
|
|
46037
|
-
let params;
|
|
46038
|
-
if (paramsOrFirst &&
|
|
46039
|
-
typeof paramsOrFirst === 'object' &&
|
|
46040
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46041
|
-
params = (paramsOrFirst || {});
|
|
46042
|
-
}
|
|
46043
|
-
else {
|
|
46044
|
-
params = {
|
|
46045
|
-
videoId: paramsOrFirst,
|
|
46046
|
-
bucketId: rest[0],
|
|
46047
|
-
fileId: rest[1],
|
|
46048
|
-
name: rest[2],
|
|
46049
|
-
code: rest[3],
|
|
46050
|
-
xdefault: rest[4],
|
|
46051
|
-
};
|
|
46052
|
-
}
|
|
46053
|
-
const videoId = params.videoId;
|
|
46054
|
-
const bucketId = params.bucketId;
|
|
46055
|
-
const fileId = params.fileId;
|
|
46056
|
-
const name = params.name;
|
|
46057
|
-
const code = params.code;
|
|
46058
|
-
const xdefault = params.xdefault;
|
|
46059
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
46060
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
46061
|
-
}
|
|
46062
|
-
if (typeof bucketId === 'undefined') {
|
|
46063
|
-
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
46064
|
-
}
|
|
46065
|
-
if (typeof fileId === 'undefined') {
|
|
46066
|
-
throw new AppwriteException('Missing required parameter: "fileId"');
|
|
46067
|
-
}
|
|
46068
|
-
if (typeof name === 'undefined') {
|
|
46069
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
46070
|
-
}
|
|
46071
|
-
if (typeof code === 'undefined') {
|
|
46072
|
-
throw new AppwriteException('Missing required parameter: "code"');
|
|
46073
|
-
}
|
|
46074
|
-
const apiPath = '/videos/{videoId}/subtitles'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
46075
|
-
const apiPayload = {};
|
|
46076
|
-
if (typeof bucketId !== 'undefined') {
|
|
46077
|
-
apiPayload['bucketId'] = bucketId;
|
|
46078
|
-
}
|
|
46079
|
-
if (typeof fileId !== 'undefined') {
|
|
46080
|
-
apiPayload['fileId'] = fileId;
|
|
46081
|
-
}
|
|
46082
|
-
if (typeof name !== 'undefined') {
|
|
46083
|
-
apiPayload['name'] = name;
|
|
46084
|
-
}
|
|
46085
|
-
if (typeof code !== 'undefined') {
|
|
46086
|
-
apiPayload['code'] = code;
|
|
46087
|
-
}
|
|
46088
|
-
if (typeof xdefault !== 'undefined') {
|
|
46089
|
-
apiPayload['default'] = xdefault;
|
|
46090
|
-
}
|
|
46091
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46092
|
-
const apiHeaders = {
|
|
46093
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46094
|
-
'content-type': 'application/json',
|
|
46095
|
-
accept: 'application/json',
|
|
46096
|
-
};
|
|
46097
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
46098
|
-
}
|
|
46099
|
-
updateSubtitle(paramsOrFirst, ...rest) {
|
|
46100
|
-
let params;
|
|
46101
|
-
if (paramsOrFirst &&
|
|
46102
|
-
typeof paramsOrFirst === 'object' &&
|
|
46103
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46104
|
-
params = (paramsOrFirst || {});
|
|
46105
|
-
}
|
|
46106
|
-
else {
|
|
46107
|
-
params = {
|
|
46108
|
-
videoId: paramsOrFirst,
|
|
46109
|
-
subtitleId: rest[0],
|
|
46110
|
-
bucketId: rest[1],
|
|
46111
|
-
fileId: rest[2],
|
|
46112
|
-
name: rest[3],
|
|
46113
|
-
code: rest[4],
|
|
46114
|
-
xdefault: rest[5],
|
|
46115
|
-
};
|
|
46116
|
-
}
|
|
46117
|
-
const videoId = params.videoId;
|
|
46118
|
-
const subtitleId = params.subtitleId;
|
|
46119
|
-
const bucketId = params.bucketId;
|
|
46120
|
-
const fileId = params.fileId;
|
|
46121
|
-
const name = params.name;
|
|
46122
|
-
const code = params.code;
|
|
46123
|
-
const xdefault = params.xdefault;
|
|
46124
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
46125
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
46126
|
-
}
|
|
46127
|
-
if (typeof subtitleId === 'undefined' || subtitleId === '') {
|
|
46128
|
-
throw new AppwriteException('Missing required parameter: "subtitleId"');
|
|
46129
|
-
}
|
|
46130
|
-
const apiPath = '/videos/{videoId}/subtitles/{subtitleId}'
|
|
46131
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
46132
|
-
.replace('{subtitleId}', encodeURIComponent(String(subtitleId)));
|
|
46133
|
-
const apiPayload = {};
|
|
46134
|
-
if (typeof bucketId !== 'undefined') {
|
|
46135
|
-
apiPayload['bucketId'] = bucketId;
|
|
46136
|
-
}
|
|
46137
|
-
if (typeof fileId !== 'undefined') {
|
|
46138
|
-
apiPayload['fileId'] = fileId;
|
|
46139
|
-
}
|
|
46140
|
-
if (typeof name !== 'undefined') {
|
|
46141
|
-
apiPayload['name'] = name;
|
|
46142
|
-
}
|
|
46143
|
-
if (typeof code !== 'undefined') {
|
|
46144
|
-
apiPayload['code'] = code;
|
|
46145
|
-
}
|
|
46146
|
-
if (typeof xdefault !== 'undefined') {
|
|
46147
|
-
apiPayload['default'] = xdefault;
|
|
46148
|
-
}
|
|
46149
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46150
|
-
const apiHeaders = {
|
|
46151
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46152
|
-
'content-type': 'application/json',
|
|
46153
|
-
accept: 'application/json',
|
|
46154
|
-
};
|
|
46155
|
-
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
46156
|
-
}
|
|
46157
|
-
deleteSubtitle(paramsOrFirst, ...rest) {
|
|
46158
|
-
let params;
|
|
46159
|
-
if (paramsOrFirst &&
|
|
46160
|
-
typeof paramsOrFirst === 'object' &&
|
|
46161
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46162
|
-
params = (paramsOrFirst || {});
|
|
46163
|
-
}
|
|
46164
|
-
else {
|
|
46165
|
-
params = {
|
|
46166
|
-
videoId: paramsOrFirst,
|
|
46167
|
-
subtitleId: rest[0],
|
|
46168
|
-
};
|
|
46169
|
-
}
|
|
46170
|
-
const videoId = params.videoId;
|
|
46171
|
-
const subtitleId = params.subtitleId;
|
|
46172
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
46173
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
46174
|
-
}
|
|
46175
|
-
if (typeof subtitleId === 'undefined' || subtitleId === '') {
|
|
46176
|
-
throw new AppwriteException('Missing required parameter: "subtitleId"');
|
|
46177
|
-
}
|
|
46178
|
-
const apiPath = '/videos/{videoId}/subtitles/{subtitleId}'
|
|
46179
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
46180
|
-
.replace('{subtitleId}', encodeURIComponent(String(subtitleId)));
|
|
46181
|
-
const apiPayload = {};
|
|
46182
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46183
|
-
const apiHeaders = {
|
|
46184
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46185
|
-
'content-type': 'application/json',
|
|
46186
|
-
accept: 'application/json',
|
|
46187
|
-
};
|
|
46188
|
-
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
46189
|
-
}
|
|
46190
|
-
getTimeline(paramsOrFirst) {
|
|
46191
|
-
let params;
|
|
46192
|
-
if (paramsOrFirst &&
|
|
46193
|
-
typeof paramsOrFirst === 'object' &&
|
|
46194
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46195
|
-
params = (paramsOrFirst || {});
|
|
46196
|
-
}
|
|
46197
|
-
else {
|
|
46198
|
-
params = {
|
|
46199
|
-
videoId: paramsOrFirst,
|
|
46200
|
-
};
|
|
46201
|
-
}
|
|
46202
|
-
const videoId = params.videoId;
|
|
46203
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
46204
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
46205
|
-
}
|
|
46206
|
-
const apiPath = '/videos/{videoId}/timeline'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
46207
|
-
const apiPayload = {};
|
|
46208
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46209
|
-
const apiHeaders = {
|
|
46210
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46211
|
-
accept: 'text/plain',
|
|
46212
|
-
};
|
|
46213
|
-
return this.client.call('get', uri, apiHeaders, apiPayload, 'text');
|
|
46214
|
-
}
|
|
46215
|
-
createTimeline(paramsOrFirst) {
|
|
46216
|
-
let params;
|
|
46217
|
-
if (paramsOrFirst &&
|
|
46218
|
-
typeof paramsOrFirst === 'object' &&
|
|
46219
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46220
|
-
params = (paramsOrFirst || {});
|
|
46221
|
-
}
|
|
46222
|
-
else {
|
|
46223
|
-
params = {
|
|
46224
|
-
videoId: paramsOrFirst,
|
|
46225
|
-
};
|
|
46226
|
-
}
|
|
46227
|
-
const videoId = params.videoId;
|
|
46228
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
46229
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
46230
|
-
}
|
|
46231
|
-
const apiPath = '/videos/{videoId}/timeline'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
46232
|
-
const apiPayload = {};
|
|
46233
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46234
|
-
const apiHeaders = {
|
|
46235
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46236
|
-
'content-type': 'application/json',
|
|
46237
|
-
accept: 'application/json',
|
|
46238
|
-
};
|
|
46239
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
46240
|
-
}
|
|
46241
|
-
}
|
|
46242
|
-
|
|
46243
|
-
class Waf {
|
|
46244
|
-
constructor(client) {
|
|
46245
|
-
this.client = client;
|
|
46246
|
-
}
|
|
46247
|
-
listRules(paramsOrFirst, ...rest) {
|
|
46248
|
-
let params;
|
|
46249
|
-
if ((typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
|
|
46250
|
-
(paramsOrFirst &&
|
|
46251
|
-
typeof paramsOrFirst === 'object' &&
|
|
46252
|
-
!Array.isArray(paramsOrFirst))) {
|
|
46253
|
-
params = (paramsOrFirst || {});
|
|
46254
|
-
}
|
|
46255
|
-
else {
|
|
46256
|
-
params = {
|
|
46257
|
-
queries: paramsOrFirst,
|
|
46258
|
-
search: rest[0],
|
|
46259
|
-
total: rest[1],
|
|
46260
|
-
};
|
|
46261
|
-
}
|
|
46262
|
-
const queries = params.queries;
|
|
46263
|
-
const search = params.search;
|
|
46264
|
-
const total = params.total;
|
|
46265
|
-
const apiPath = '/waf/rules';
|
|
46266
|
-
const apiPayload = {};
|
|
46267
|
-
if (typeof queries !== 'undefined') {
|
|
46268
|
-
apiPayload['queries'] = queries;
|
|
46269
|
-
}
|
|
46270
|
-
if (typeof search !== 'undefined') {
|
|
46271
|
-
apiPayload['search'] = search;
|
|
46272
|
-
}
|
|
46273
|
-
if (typeof total !== 'undefined') {
|
|
46274
|
-
apiPayload['total'] = total;
|
|
46275
|
-
}
|
|
46276
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46277
|
-
const apiHeaders = {
|
|
46278
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46279
|
-
accept: 'application/json',
|
|
46280
|
-
};
|
|
46281
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
46282
|
-
}
|
|
46283
|
-
createBypassRule(paramsOrFirst, ...rest) {
|
|
46284
|
-
let params;
|
|
46285
|
-
if (paramsOrFirst &&
|
|
46286
|
-
typeof paramsOrFirst === 'object' &&
|
|
46287
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46288
|
-
params = (paramsOrFirst || {});
|
|
46289
|
-
}
|
|
46290
|
-
else {
|
|
46291
|
-
params = {
|
|
46292
|
-
ruleId: paramsOrFirst,
|
|
46293
|
-
resourceType: rest[0],
|
|
46294
|
-
name: rest[1],
|
|
46295
|
-
resourceId: rest[2],
|
|
46296
|
-
description: rest[3],
|
|
46297
|
-
priority: rest[4],
|
|
46298
|
-
enabled: rest[5],
|
|
46299
|
-
conditions: rest[6],
|
|
46300
|
-
};
|
|
46301
|
-
}
|
|
46302
|
-
const ruleId = params.ruleId;
|
|
46303
|
-
const resourceType = params.resourceType;
|
|
46304
|
-
const name = params.name;
|
|
46305
|
-
const resourceId = params.resourceId;
|
|
46306
|
-
const description = params.description;
|
|
46307
|
-
const priority = params.priority;
|
|
46308
|
-
const enabled = params.enabled;
|
|
46309
|
-
const conditions = params.conditions;
|
|
46310
|
-
if (typeof ruleId === 'undefined') {
|
|
46311
|
-
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
46312
|
-
}
|
|
46313
|
-
if (typeof resourceType === 'undefined') {
|
|
46314
|
-
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
46315
|
-
}
|
|
46316
|
-
if (typeof name === 'undefined') {
|
|
46317
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
46318
|
-
}
|
|
46319
|
-
const apiPath = '/waf/rules/bypass';
|
|
46320
|
-
const apiPayload = {};
|
|
46321
|
-
if (typeof ruleId !== 'undefined') {
|
|
46322
|
-
apiPayload['ruleId'] = ruleId;
|
|
46323
|
-
}
|
|
46324
|
-
if (typeof resourceType !== 'undefined') {
|
|
46325
|
-
apiPayload['resourceType'] = resourceType;
|
|
46326
|
-
}
|
|
46327
|
-
if (typeof resourceId !== 'undefined') {
|
|
46328
|
-
apiPayload['resourceId'] = resourceId;
|
|
46329
|
-
}
|
|
46330
|
-
if (typeof name !== 'undefined') {
|
|
46331
|
-
apiPayload['name'] = name;
|
|
46332
|
-
}
|
|
46333
|
-
if (typeof description !== 'undefined') {
|
|
46334
|
-
apiPayload['description'] = description;
|
|
46335
|
-
}
|
|
46336
|
-
if (typeof priority !== 'undefined') {
|
|
46337
|
-
apiPayload['priority'] = priority;
|
|
46338
|
-
}
|
|
46339
|
-
if (typeof enabled !== 'undefined') {
|
|
46340
|
-
apiPayload['enabled'] = enabled;
|
|
46341
|
-
}
|
|
46342
|
-
if (typeof conditions !== 'undefined') {
|
|
46343
|
-
apiPayload['conditions'] = conditions;
|
|
46344
|
-
}
|
|
46345
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46346
|
-
const apiHeaders = {
|
|
46347
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46348
|
-
'content-type': 'application/json',
|
|
46349
|
-
accept: 'application/json',
|
|
46350
|
-
};
|
|
46351
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
46352
|
-
}
|
|
46353
|
-
updateBypassRule(paramsOrFirst, ...rest) {
|
|
46354
|
-
let params;
|
|
46355
|
-
if (paramsOrFirst &&
|
|
46356
|
-
typeof paramsOrFirst === 'object' &&
|
|
46357
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46358
|
-
params = (paramsOrFirst || {});
|
|
46359
|
-
}
|
|
46360
|
-
else {
|
|
46361
|
-
params = {
|
|
46362
|
-
ruleId: paramsOrFirst,
|
|
46363
|
-
resourceType: rest[0],
|
|
46364
|
-
resourceId: rest[1],
|
|
46365
|
-
name: rest[2],
|
|
46366
|
-
description: rest[3],
|
|
46367
|
-
priority: rest[4],
|
|
46368
|
-
enabled: rest[5],
|
|
46369
|
-
conditions: rest[6],
|
|
46370
|
-
};
|
|
46371
|
-
}
|
|
46372
|
-
const ruleId = params.ruleId;
|
|
46373
|
-
const resourceType = params.resourceType;
|
|
46374
|
-
const resourceId = params.resourceId;
|
|
46375
|
-
const name = params.name;
|
|
46376
|
-
const description = params.description;
|
|
46377
|
-
const priority = params.priority;
|
|
46378
|
-
const enabled = params.enabled;
|
|
46379
|
-
const conditions = params.conditions;
|
|
46380
|
-
if (typeof ruleId === 'undefined' || ruleId === '') {
|
|
46381
|
-
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
46382
|
-
}
|
|
46383
|
-
const apiPath = '/waf/rules/bypass/{ruleId}'.replace('{ruleId}', encodeURIComponent(String(ruleId)));
|
|
46384
|
-
const apiPayload = {};
|
|
46385
|
-
if (typeof resourceType !== 'undefined') {
|
|
46386
|
-
apiPayload['resourceType'] = resourceType;
|
|
46387
|
-
}
|
|
46388
|
-
if (typeof resourceId !== 'undefined') {
|
|
46389
|
-
apiPayload['resourceId'] = resourceId;
|
|
46390
|
-
}
|
|
46391
|
-
if (typeof name !== 'undefined') {
|
|
46392
|
-
apiPayload['name'] = name;
|
|
46393
|
-
}
|
|
46394
|
-
if (typeof description !== 'undefined') {
|
|
46395
|
-
apiPayload['description'] = description;
|
|
46396
|
-
}
|
|
46397
|
-
if (typeof priority !== 'undefined') {
|
|
46398
|
-
apiPayload['priority'] = priority;
|
|
46399
|
-
}
|
|
46400
|
-
if (typeof enabled !== 'undefined') {
|
|
46401
|
-
apiPayload['enabled'] = enabled;
|
|
46402
|
-
}
|
|
46403
|
-
if (typeof conditions !== 'undefined') {
|
|
46404
|
-
apiPayload['conditions'] = conditions;
|
|
46405
|
-
}
|
|
46406
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46407
|
-
const apiHeaders = {
|
|
46408
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46409
|
-
'content-type': 'application/json',
|
|
46410
|
-
accept: 'application/json',
|
|
46411
|
-
};
|
|
46412
|
-
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
46413
|
-
}
|
|
46414
|
-
createChallengeRule(paramsOrFirst, ...rest) {
|
|
46415
|
-
let params;
|
|
46416
|
-
if (paramsOrFirst &&
|
|
46417
|
-
typeof paramsOrFirst === 'object' &&
|
|
46418
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46419
|
-
params = (paramsOrFirst || {});
|
|
46420
|
-
}
|
|
46421
|
-
else {
|
|
46422
|
-
params = {
|
|
46423
|
-
ruleId: paramsOrFirst,
|
|
46424
|
-
resourceType: rest[0],
|
|
46425
|
-
name: rest[1],
|
|
46426
|
-
resourceId: rest[2],
|
|
46427
|
-
description: rest[3],
|
|
46428
|
-
challengeType: rest[4],
|
|
46429
|
-
priority: rest[5],
|
|
46430
|
-
enabled: rest[6],
|
|
46431
|
-
conditions: rest[7],
|
|
46432
|
-
difficulty: rest[8],
|
|
46433
|
-
ttl: rest[9],
|
|
46434
|
-
};
|
|
46435
|
-
}
|
|
46436
|
-
const ruleId = params.ruleId;
|
|
46437
|
-
const resourceType = params.resourceType;
|
|
46438
|
-
const name = params.name;
|
|
46439
|
-
const resourceId = params.resourceId;
|
|
46440
|
-
const description = params.description;
|
|
46441
|
-
const challengeType = params.challengeType;
|
|
46442
|
-
const priority = params.priority;
|
|
46443
|
-
const enabled = params.enabled;
|
|
46444
|
-
const conditions = params.conditions;
|
|
46445
|
-
const difficulty = params.difficulty;
|
|
46446
|
-
const ttl = params.ttl;
|
|
46447
|
-
if (typeof ruleId === 'undefined') {
|
|
46448
|
-
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
46449
|
-
}
|
|
46450
|
-
if (typeof resourceType === 'undefined') {
|
|
46451
|
-
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
46452
|
-
}
|
|
46453
|
-
if (typeof name === 'undefined') {
|
|
46454
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
46455
|
-
}
|
|
46456
|
-
const apiPath = '/waf/rules/challenge';
|
|
46457
|
-
const apiPayload = {};
|
|
46458
|
-
if (typeof ruleId !== 'undefined') {
|
|
46459
|
-
apiPayload['ruleId'] = ruleId;
|
|
46460
|
-
}
|
|
46461
|
-
if (typeof resourceType !== 'undefined') {
|
|
46462
|
-
apiPayload['resourceType'] = resourceType;
|
|
46463
|
-
}
|
|
46464
|
-
if (typeof resourceId !== 'undefined') {
|
|
46465
|
-
apiPayload['resourceId'] = resourceId;
|
|
46466
|
-
}
|
|
46467
|
-
if (typeof name !== 'undefined') {
|
|
46468
|
-
apiPayload['name'] = name;
|
|
46469
|
-
}
|
|
46470
|
-
if (typeof description !== 'undefined') {
|
|
46471
|
-
apiPayload['description'] = description;
|
|
46472
|
-
}
|
|
46473
|
-
if (typeof challengeType !== 'undefined') {
|
|
46474
|
-
apiPayload['challengeType'] = challengeType;
|
|
46475
|
-
}
|
|
46476
|
-
if (typeof priority !== 'undefined') {
|
|
46477
|
-
apiPayload['priority'] = priority;
|
|
46478
|
-
}
|
|
46479
|
-
if (typeof enabled !== 'undefined') {
|
|
46480
|
-
apiPayload['enabled'] = enabled;
|
|
46481
|
-
}
|
|
46482
|
-
if (typeof conditions !== 'undefined') {
|
|
46483
|
-
apiPayload['conditions'] = conditions;
|
|
46484
|
-
}
|
|
46485
|
-
if (typeof difficulty !== 'undefined') {
|
|
46486
|
-
apiPayload['difficulty'] = difficulty;
|
|
46487
|
-
}
|
|
46488
|
-
if (typeof ttl !== 'undefined') {
|
|
46489
|
-
apiPayload['ttl'] = ttl;
|
|
46490
|
-
}
|
|
46491
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46492
|
-
const apiHeaders = {
|
|
46493
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46494
|
-
'content-type': 'application/json',
|
|
46495
|
-
accept: 'application/json',
|
|
46496
|
-
};
|
|
46497
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
46498
|
-
}
|
|
46499
|
-
updateChallengeRule(paramsOrFirst, ...rest) {
|
|
46500
|
-
let params;
|
|
46501
|
-
if (paramsOrFirst &&
|
|
46502
|
-
typeof paramsOrFirst === 'object' &&
|
|
46503
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46504
|
-
params = (paramsOrFirst || {});
|
|
46505
|
-
}
|
|
46506
|
-
else {
|
|
46507
|
-
params = {
|
|
46508
|
-
ruleId: paramsOrFirst,
|
|
46509
|
-
resourceType: rest[0],
|
|
46510
|
-
resourceId: rest[1],
|
|
46511
|
-
name: rest[2],
|
|
46512
|
-
description: rest[3],
|
|
46513
|
-
challengeType: rest[4],
|
|
46514
|
-
priority: rest[5],
|
|
46515
|
-
enabled: rest[6],
|
|
46516
|
-
conditions: rest[7],
|
|
46517
|
-
difficulty: rest[8],
|
|
46518
|
-
ttl: rest[9],
|
|
46519
|
-
};
|
|
46520
|
-
}
|
|
46521
|
-
const ruleId = params.ruleId;
|
|
46522
|
-
const resourceType = params.resourceType;
|
|
46523
|
-
const resourceId = params.resourceId;
|
|
46524
|
-
const name = params.name;
|
|
46525
|
-
const description = params.description;
|
|
46526
|
-
const challengeType = params.challengeType;
|
|
46527
|
-
const priority = params.priority;
|
|
46528
|
-
const enabled = params.enabled;
|
|
46529
|
-
const conditions = params.conditions;
|
|
46530
|
-
const difficulty = params.difficulty;
|
|
46531
|
-
const ttl = params.ttl;
|
|
46532
|
-
if (typeof ruleId === 'undefined' || ruleId === '') {
|
|
46533
|
-
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
46534
|
-
}
|
|
46535
|
-
const apiPath = '/waf/rules/challenge/{ruleId}'.replace('{ruleId}', encodeURIComponent(String(ruleId)));
|
|
46536
|
-
const apiPayload = {};
|
|
46537
|
-
if (typeof resourceType !== 'undefined') {
|
|
46538
|
-
apiPayload['resourceType'] = resourceType;
|
|
46539
|
-
}
|
|
46540
|
-
if (typeof resourceId !== 'undefined') {
|
|
46541
|
-
apiPayload['resourceId'] = resourceId;
|
|
46542
|
-
}
|
|
46543
|
-
if (typeof name !== 'undefined') {
|
|
46544
|
-
apiPayload['name'] = name;
|
|
46545
|
-
}
|
|
46546
|
-
if (typeof description !== 'undefined') {
|
|
46547
|
-
apiPayload['description'] = description;
|
|
46548
|
-
}
|
|
46549
|
-
if (typeof challengeType !== 'undefined') {
|
|
46550
|
-
apiPayload['challengeType'] = challengeType;
|
|
46551
|
-
}
|
|
46552
|
-
if (typeof priority !== 'undefined') {
|
|
46553
|
-
apiPayload['priority'] = priority;
|
|
46554
|
-
}
|
|
46555
|
-
if (typeof enabled !== 'undefined') {
|
|
46556
|
-
apiPayload['enabled'] = enabled;
|
|
46557
|
-
}
|
|
46558
|
-
if (typeof conditions !== 'undefined') {
|
|
46559
|
-
apiPayload['conditions'] = conditions;
|
|
46560
|
-
}
|
|
46561
|
-
if (typeof difficulty !== 'undefined') {
|
|
46562
|
-
apiPayload['difficulty'] = difficulty;
|
|
46563
|
-
}
|
|
46564
|
-
if (typeof ttl !== 'undefined') {
|
|
46565
|
-
apiPayload['ttl'] = ttl;
|
|
46566
|
-
}
|
|
46567
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46568
|
-
const apiHeaders = {
|
|
46569
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46570
|
-
'content-type': 'application/json',
|
|
46571
|
-
accept: 'application/json',
|
|
46572
|
-
};
|
|
46573
|
-
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
46574
|
-
}
|
|
46575
|
-
createDenyRule(paramsOrFirst, ...rest) {
|
|
46576
|
-
let params;
|
|
46577
|
-
if (paramsOrFirst &&
|
|
46578
|
-
typeof paramsOrFirst === 'object' &&
|
|
46579
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46580
|
-
params = (paramsOrFirst || {});
|
|
46581
|
-
}
|
|
46582
|
-
else {
|
|
46583
|
-
params = {
|
|
46584
|
-
ruleId: paramsOrFirst,
|
|
46585
|
-
resourceType: rest[0],
|
|
46586
|
-
name: rest[1],
|
|
46587
|
-
resourceId: rest[2],
|
|
46588
|
-
description: rest[3],
|
|
46589
|
-
priority: rest[4],
|
|
46590
|
-
enabled: rest[5],
|
|
46591
|
-
conditions: rest[6],
|
|
46592
|
-
};
|
|
46593
|
-
}
|
|
46594
|
-
const ruleId = params.ruleId;
|
|
46595
|
-
const resourceType = params.resourceType;
|
|
46596
|
-
const name = params.name;
|
|
46597
|
-
const resourceId = params.resourceId;
|
|
46598
|
-
const description = params.description;
|
|
46599
|
-
const priority = params.priority;
|
|
46600
|
-
const enabled = params.enabled;
|
|
46601
|
-
const conditions = params.conditions;
|
|
46602
|
-
if (typeof ruleId === 'undefined') {
|
|
46603
|
-
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
46604
|
-
}
|
|
46605
|
-
if (typeof resourceType === 'undefined') {
|
|
46606
|
-
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
46607
|
-
}
|
|
46608
|
-
if (typeof name === 'undefined') {
|
|
46609
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
46610
|
-
}
|
|
46611
|
-
const apiPath = '/waf/rules/deny';
|
|
46612
|
-
const apiPayload = {};
|
|
46613
|
-
if (typeof ruleId !== 'undefined') {
|
|
46614
|
-
apiPayload['ruleId'] = ruleId;
|
|
46615
|
-
}
|
|
46616
|
-
if (typeof resourceType !== 'undefined') {
|
|
46617
|
-
apiPayload['resourceType'] = resourceType;
|
|
46618
|
-
}
|
|
46619
|
-
if (typeof resourceId !== 'undefined') {
|
|
46620
|
-
apiPayload['resourceId'] = resourceId;
|
|
46621
|
-
}
|
|
46622
|
-
if (typeof name !== 'undefined') {
|
|
46623
|
-
apiPayload['name'] = name;
|
|
46624
|
-
}
|
|
46625
|
-
if (typeof description !== 'undefined') {
|
|
46626
|
-
apiPayload['description'] = description;
|
|
46627
|
-
}
|
|
46628
|
-
if (typeof priority !== 'undefined') {
|
|
46629
|
-
apiPayload['priority'] = priority;
|
|
46630
|
-
}
|
|
46631
|
-
if (typeof enabled !== 'undefined') {
|
|
46632
|
-
apiPayload['enabled'] = enabled;
|
|
46633
|
-
}
|
|
46634
|
-
if (typeof conditions !== 'undefined') {
|
|
46635
|
-
apiPayload['conditions'] = conditions;
|
|
46636
|
-
}
|
|
46637
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46638
|
-
const apiHeaders = {
|
|
46639
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46640
|
-
'content-type': 'application/json',
|
|
46641
|
-
accept: 'application/json',
|
|
46642
|
-
};
|
|
46643
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
46644
|
-
}
|
|
46645
|
-
updateDenyRule(paramsOrFirst, ...rest) {
|
|
46646
|
-
let params;
|
|
46647
|
-
if (paramsOrFirst &&
|
|
46648
|
-
typeof paramsOrFirst === 'object' &&
|
|
46649
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46650
|
-
params = (paramsOrFirst || {});
|
|
46651
|
-
}
|
|
46652
|
-
else {
|
|
46653
|
-
params = {
|
|
46654
|
-
ruleId: paramsOrFirst,
|
|
46655
|
-
resourceType: rest[0],
|
|
46656
|
-
resourceId: rest[1],
|
|
46657
|
-
name: rest[2],
|
|
46658
|
-
description: rest[3],
|
|
46659
|
-
priority: rest[4],
|
|
46660
|
-
enabled: rest[5],
|
|
46661
|
-
conditions: rest[6],
|
|
46662
|
-
};
|
|
46663
|
-
}
|
|
46664
|
-
const ruleId = params.ruleId;
|
|
46665
|
-
const resourceType = params.resourceType;
|
|
46666
|
-
const resourceId = params.resourceId;
|
|
46667
|
-
const name = params.name;
|
|
46668
|
-
const description = params.description;
|
|
46669
|
-
const priority = params.priority;
|
|
46670
|
-
const enabled = params.enabled;
|
|
46671
|
-
const conditions = params.conditions;
|
|
46672
|
-
if (typeof ruleId === 'undefined' || ruleId === '') {
|
|
46673
|
-
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
46674
|
-
}
|
|
46675
|
-
const apiPath = '/waf/rules/deny/{ruleId}'.replace('{ruleId}', encodeURIComponent(String(ruleId)));
|
|
46676
|
-
const apiPayload = {};
|
|
46677
|
-
if (typeof resourceType !== 'undefined') {
|
|
46678
|
-
apiPayload['resourceType'] = resourceType;
|
|
46679
|
-
}
|
|
46680
|
-
if (typeof resourceId !== 'undefined') {
|
|
46681
|
-
apiPayload['resourceId'] = resourceId;
|
|
46682
|
-
}
|
|
46683
|
-
if (typeof name !== 'undefined') {
|
|
46684
|
-
apiPayload['name'] = name;
|
|
46685
|
-
}
|
|
46686
|
-
if (typeof description !== 'undefined') {
|
|
46687
|
-
apiPayload['description'] = description;
|
|
46688
|
-
}
|
|
46689
|
-
if (typeof priority !== 'undefined') {
|
|
46690
|
-
apiPayload['priority'] = priority;
|
|
46691
|
-
}
|
|
46692
|
-
if (typeof enabled !== 'undefined') {
|
|
46693
|
-
apiPayload['enabled'] = enabled;
|
|
46694
|
-
}
|
|
46695
|
-
if (typeof conditions !== 'undefined') {
|
|
46696
|
-
apiPayload['conditions'] = conditions;
|
|
46697
|
-
}
|
|
46698
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46699
|
-
const apiHeaders = {
|
|
46700
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46701
|
-
'content-type': 'application/json',
|
|
46702
|
-
accept: 'application/json',
|
|
46703
|
-
};
|
|
46704
|
-
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
46705
|
-
}
|
|
46706
|
-
createRateLimitRule(paramsOrFirst, ...rest) {
|
|
46707
|
-
let params;
|
|
46708
|
-
if (paramsOrFirst &&
|
|
46709
|
-
typeof paramsOrFirst === 'object' &&
|
|
46710
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46711
|
-
params = (paramsOrFirst || {});
|
|
46712
|
-
}
|
|
46713
|
-
else {
|
|
46714
|
-
params = {
|
|
46715
|
-
ruleId: paramsOrFirst,
|
|
46716
|
-
resourceType: rest[0],
|
|
46717
|
-
name: rest[1],
|
|
46718
|
-
limit: rest[2],
|
|
46719
|
-
interval: rest[3],
|
|
46720
|
-
resourceId: rest[4],
|
|
46721
|
-
description: rest[5],
|
|
46722
|
-
key: rest[6],
|
|
46723
|
-
strategy: rest[7],
|
|
46724
|
-
maxBucketSize: rest[8],
|
|
46725
|
-
priority: rest[9],
|
|
46726
|
-
enabled: rest[10],
|
|
46727
|
-
conditions: rest[11],
|
|
46728
|
-
};
|
|
46729
|
-
}
|
|
46730
|
-
const ruleId = params.ruleId;
|
|
46731
|
-
const resourceType = params.resourceType;
|
|
46732
|
-
const name = params.name;
|
|
46733
|
-
const limit = params.limit;
|
|
46734
|
-
const interval = params.interval;
|
|
46735
|
-
const resourceId = params.resourceId;
|
|
46736
|
-
const description = params.description;
|
|
46737
|
-
const key = params.key;
|
|
46738
|
-
const strategy = params.strategy;
|
|
46739
|
-
const maxBucketSize = params.maxBucketSize;
|
|
46740
|
-
const priority = params.priority;
|
|
46741
|
-
const enabled = params.enabled;
|
|
46742
|
-
const conditions = params.conditions;
|
|
46743
|
-
if (typeof ruleId === 'undefined') {
|
|
46744
|
-
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
46745
|
-
}
|
|
46746
|
-
if (typeof resourceType === 'undefined') {
|
|
46747
|
-
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
46748
|
-
}
|
|
46749
|
-
if (typeof name === 'undefined') {
|
|
46750
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
46751
|
-
}
|
|
46752
|
-
if (typeof limit === 'undefined') {
|
|
46753
|
-
throw new AppwriteException('Missing required parameter: "limit"');
|
|
46754
|
-
}
|
|
46755
|
-
if (typeof interval === 'undefined') {
|
|
46756
|
-
throw new AppwriteException('Missing required parameter: "interval"');
|
|
46757
|
-
}
|
|
46758
|
-
const apiPath = '/waf/rules/rate-limit';
|
|
46759
|
-
const apiPayload = {};
|
|
46760
|
-
if (typeof ruleId !== 'undefined') {
|
|
46761
|
-
apiPayload['ruleId'] = ruleId;
|
|
46762
|
-
}
|
|
46763
|
-
if (typeof resourceType !== 'undefined') {
|
|
46764
|
-
apiPayload['resourceType'] = resourceType;
|
|
46765
|
-
}
|
|
46766
|
-
if (typeof resourceId !== 'undefined') {
|
|
46767
|
-
apiPayload['resourceId'] = resourceId;
|
|
46768
|
-
}
|
|
46769
|
-
if (typeof name !== 'undefined') {
|
|
46770
|
-
apiPayload['name'] = name;
|
|
46771
|
-
}
|
|
46772
|
-
if (typeof description !== 'undefined') {
|
|
46773
|
-
apiPayload['description'] = description;
|
|
46774
|
-
}
|
|
46775
|
-
if (typeof limit !== 'undefined') {
|
|
46776
|
-
apiPayload['limit'] = limit;
|
|
46777
|
-
}
|
|
46778
|
-
if (typeof interval !== 'undefined') {
|
|
46779
|
-
apiPayload['interval'] = interval;
|
|
46780
|
-
}
|
|
46781
|
-
if (typeof key !== 'undefined') {
|
|
46782
|
-
apiPayload['key'] = key;
|
|
46783
|
-
}
|
|
46784
|
-
if (typeof strategy !== 'undefined') {
|
|
46785
|
-
apiPayload['strategy'] = strategy;
|
|
46786
|
-
}
|
|
46787
|
-
if (typeof maxBucketSize !== 'undefined') {
|
|
46788
|
-
apiPayload['maxBucketSize'] = maxBucketSize;
|
|
46789
|
-
}
|
|
46790
|
-
if (typeof priority !== 'undefined') {
|
|
46791
|
-
apiPayload['priority'] = priority;
|
|
46792
|
-
}
|
|
46793
|
-
if (typeof enabled !== 'undefined') {
|
|
46794
|
-
apiPayload['enabled'] = enabled;
|
|
46795
|
-
}
|
|
46796
|
-
if (typeof conditions !== 'undefined') {
|
|
46797
|
-
apiPayload['conditions'] = conditions;
|
|
46798
|
-
}
|
|
46799
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46800
|
-
const apiHeaders = {
|
|
46801
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46802
|
-
'content-type': 'application/json',
|
|
46803
|
-
accept: 'application/json',
|
|
46804
|
-
};
|
|
46805
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
46806
|
-
}
|
|
46807
|
-
updateRateLimitRule(paramsOrFirst, ...rest) {
|
|
46808
|
-
let params;
|
|
46809
|
-
if (paramsOrFirst &&
|
|
46810
|
-
typeof paramsOrFirst === 'object' &&
|
|
46811
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46812
|
-
params = (paramsOrFirst || {});
|
|
46813
|
-
}
|
|
46814
|
-
else {
|
|
46815
|
-
params = {
|
|
46816
|
-
ruleId: paramsOrFirst,
|
|
46817
|
-
resourceType: rest[0],
|
|
46818
|
-
resourceId: rest[1],
|
|
46819
|
-
name: rest[2],
|
|
46820
|
-
description: rest[3],
|
|
46821
|
-
limit: rest[4],
|
|
46822
|
-
interval: rest[5],
|
|
46823
|
-
key: rest[6],
|
|
46824
|
-
maxBucketSize: rest[7],
|
|
46825
|
-
priority: rest[8],
|
|
46826
|
-
enabled: rest[9],
|
|
46827
|
-
conditions: rest[10],
|
|
45232
|
+
ruleId: paramsOrFirst,
|
|
45233
|
+
resourceType: rest[0],
|
|
45234
|
+
resourceId: rest[1],
|
|
45235
|
+
name: rest[2],
|
|
45236
|
+
description: rest[3],
|
|
45237
|
+
limit: rest[4],
|
|
45238
|
+
interval: rest[5],
|
|
45239
|
+
key: rest[6],
|
|
45240
|
+
maxBucketSize: rest[7],
|
|
45241
|
+
priority: rest[8],
|
|
45242
|
+
enabled: rest[9],
|
|
45243
|
+
conditions: rest[10],
|
|
46828
45244
|
};
|
|
46829
45245
|
}
|
|
46830
45246
|
const ruleId = params.ruleId;
|
|
@@ -48002,8 +46418,9 @@ const RECONNECT_PERIOD_MS = 2000;
|
|
|
48002
46418
|
* );
|
|
48003
46419
|
* // sub.update({ background: true }); sub.unsubscribe();
|
|
48004
46420
|
*/
|
|
48005
|
-
class Push {
|
|
46421
|
+
class Push extends Service {
|
|
48006
46422
|
constructor(client) {
|
|
46423
|
+
super(client);
|
|
48007
46424
|
this.mqtt = null;
|
|
48008
46425
|
this.connecting = null;
|
|
48009
46426
|
this.Buffer = null;
|
|
@@ -48033,7 +46450,6 @@ class Push {
|
|
|
48033
46450
|
this.connectedKey = '';
|
|
48034
46451
|
this.connectionEpoch = 0;
|
|
48035
46452
|
this.subscriptions = new Map();
|
|
48036
|
-
this.client = client;
|
|
48037
46453
|
}
|
|
48038
46454
|
// The broker subscription for a filter uses the highest QoS any local subscription on
|
|
48039
46455
|
// it wants, so a QoS-0 subscription never downgrades a QoS-1 one sharing the filter.
|
|
@@ -48773,670 +47189,6 @@ function matches(filter, topic) {
|
|
|
48773
47189
|
return filterParts.length === topicParts.length;
|
|
48774
47190
|
}
|
|
48775
47191
|
|
|
48776
|
-
/**
|
|
48777
|
-
* Analytics auto-tracking helpers.
|
|
48778
|
-
*
|
|
48779
|
-
* These are hand-written companions to the generated `Analytics` service.
|
|
48780
|
-
* The generated service exposes `createEvent(params)` for arbitrary events;
|
|
48781
|
-
* this module wires up common auto-tracking behaviours (pageviews, outbound
|
|
48782
|
-
* links, downloads, scroll depth, active engagement) on top of it.
|
|
48783
|
-
*
|
|
48784
|
-
* The tracking helpers accept a plain event-emitter function so they do not
|
|
48785
|
-
* hard-couple to the generated `Analytics` class. The emitter adapts this
|
|
48786
|
-
* module's option shape to `createEvent`: `url` is required there, and `props`
|
|
48787
|
-
* is a flat alternating key/value list rather than an object.
|
|
48788
|
-
*
|
|
48789
|
-
* ```ts
|
|
48790
|
-
* const analytics = new Analytics(client);
|
|
48791
|
-
* const tracking = new AnalyticsTracking(
|
|
48792
|
-
* (name, options) => analytics.createEvent({
|
|
48793
|
-
* propertyId: options?.propertyId ?? '<PROPERTY_ID>',
|
|
48794
|
-
* name,
|
|
48795
|
-
* url: options?.url ?? window.location.href,
|
|
48796
|
-
* referrer: options?.referrer,
|
|
48797
|
-
* scrollDepth: options?.scrollDepth,
|
|
48798
|
-
* engagementTime: options?.engagementTime,
|
|
48799
|
-
* props: Object.entries(options?.props ?? {}).flatMap(
|
|
48800
|
-
* ([key, value]) => [key, String(value)],
|
|
48801
|
-
* ),
|
|
48802
|
-
* }),
|
|
48803
|
-
* { propertyId: '<PROPERTY_ID>' }
|
|
48804
|
-
* );
|
|
48805
|
-
* tracking.enableAllAutoTracking();
|
|
48806
|
-
* ```
|
|
48807
|
-
*
|
|
48808
|
-
* `propertyId` is optional: when set it is merged into the options of every
|
|
48809
|
-
* emitted event, so an emitter that forwards `options.propertyId` (as above)
|
|
48810
|
-
* picks it up instead of every caller hand-rolling it into the closure.
|
|
48811
|
-
* Per-event `propertyId` always wins over the configured default.
|
|
48812
|
-
*
|
|
48813
|
-
* All helpers respect `navigator.doNotTrack === '1'` by default; opt out with
|
|
48814
|
-
* `respectDoNotTrack: false` in the constructor options.
|
|
48815
|
-
*
|
|
48816
|
-
* Engagement time follows Plausible's model: rather than one total at unload,
|
|
48817
|
-
* a delta is emitted at every natural checkpoint of the visit (tab hidden, SPA
|
|
48818
|
-
* route change, unload). See `enableAutoEngagementTime` for details.
|
|
48819
|
-
*
|
|
48820
|
-
* Auto-emitted event names follow `snake_case` + lowercase (`pageview`,
|
|
48821
|
-
* `outbound_link`, `file_download`, `screen_view`, etc.). Any prop keys use
|
|
48822
|
-
* camelCase to match the endpoint's parameter naming. Callers can pass any
|
|
48823
|
-
* custom event name; the auto-track methods only own the events they emit
|
|
48824
|
-
* themselves.
|
|
48825
|
-
*/
|
|
48826
|
-
const DEFAULT_DOWNLOAD_EXTENSIONS = [
|
|
48827
|
-
'pdf',
|
|
48828
|
-
'zip',
|
|
48829
|
-
'rar',
|
|
48830
|
-
'7z',
|
|
48831
|
-
'tar',
|
|
48832
|
-
'gz',
|
|
48833
|
-
'csv',
|
|
48834
|
-
'tsv',
|
|
48835
|
-
'xls',
|
|
48836
|
-
'xlsx',
|
|
48837
|
-
'doc',
|
|
48838
|
-
'docx',
|
|
48839
|
-
'ppt',
|
|
48840
|
-
'pptx',
|
|
48841
|
-
'dmg',
|
|
48842
|
-
'exe',
|
|
48843
|
-
'msi',
|
|
48844
|
-
'pkg',
|
|
48845
|
-
'deb',
|
|
48846
|
-
'rpm',
|
|
48847
|
-
'apk',
|
|
48848
|
-
'mp3',
|
|
48849
|
-
'wav',
|
|
48850
|
-
'flac',
|
|
48851
|
-
'mp4',
|
|
48852
|
-
'mov',
|
|
48853
|
-
'avi',
|
|
48854
|
-
'mkv',
|
|
48855
|
-
'webm',
|
|
48856
|
-
];
|
|
48857
|
-
/**
|
|
48858
|
-
* Two-part public suffixes common enough to matter for outbound-link detection.
|
|
48859
|
-
* See `rootDomain()` for why this is a short list rather than the Public Suffix
|
|
48860
|
-
* List.
|
|
48861
|
-
*/
|
|
48862
|
-
const MULTI_PART_SUFFIXES = new Set([
|
|
48863
|
-
'co.uk',
|
|
48864
|
-
'org.uk',
|
|
48865
|
-
'ac.uk',
|
|
48866
|
-
'gov.uk',
|
|
48867
|
-
'me.uk',
|
|
48868
|
-
'net.uk',
|
|
48869
|
-
'sch.uk',
|
|
48870
|
-
'co.jp',
|
|
48871
|
-
'ne.jp',
|
|
48872
|
-
'or.jp',
|
|
48873
|
-
'ac.jp',
|
|
48874
|
-
'go.jp',
|
|
48875
|
-
'com.au',
|
|
48876
|
-
'net.au',
|
|
48877
|
-
'org.au',
|
|
48878
|
-
'edu.au',
|
|
48879
|
-
'gov.au',
|
|
48880
|
-
'com.br',
|
|
48881
|
-
'net.br',
|
|
48882
|
-
'org.br',
|
|
48883
|
-
'com.cn',
|
|
48884
|
-
'net.cn',
|
|
48885
|
-
'org.cn',
|
|
48886
|
-
'gov.cn',
|
|
48887
|
-
'co.in',
|
|
48888
|
-
'net.in',
|
|
48889
|
-
'org.in',
|
|
48890
|
-
'co.nz',
|
|
48891
|
-
'net.nz',
|
|
48892
|
-
'org.nz',
|
|
48893
|
-
'co.za',
|
|
48894
|
-
'org.za',
|
|
48895
|
-
'com.mx',
|
|
48896
|
-
'com.ar',
|
|
48897
|
-
'com.co',
|
|
48898
|
-
'com.pe',
|
|
48899
|
-
'com.tr',
|
|
48900
|
-
'com.tw',
|
|
48901
|
-
'com.sg',
|
|
48902
|
-
'com.hk',
|
|
48903
|
-
'com.my',
|
|
48904
|
-
'com.ph',
|
|
48905
|
-
'com.vn',
|
|
48906
|
-
'co.kr',
|
|
48907
|
-
'co.il',
|
|
48908
|
-
'co.id',
|
|
48909
|
-
'co.th',
|
|
48910
|
-
'com.ua',
|
|
48911
|
-
'com.pl',
|
|
48912
|
-
'com.es',
|
|
48913
|
-
]);
|
|
48914
|
-
const SCROLL_DEPTH_THROTTLE_MS = 200;
|
|
48915
|
-
class AnalyticsTracking {
|
|
48916
|
-
constructor(emit, options = {}) {
|
|
48917
|
-
this.pageviewCleanups = [];
|
|
48918
|
-
this.scrollCleanups = [];
|
|
48919
|
-
this.engagementCleanups = [];
|
|
48920
|
-
this.maxScrollDepth = 0;
|
|
48921
|
-
this.scrollTicking = false;
|
|
48922
|
-
this.lastScrollReport = 0;
|
|
48923
|
-
this.engagementStart = 0;
|
|
48924
|
-
this.engagementAccumulatedMs = 0;
|
|
48925
|
-
this.engagementActive = false;
|
|
48926
|
-
this.emit = emit;
|
|
48927
|
-
this.respectDoNotTrack = options.respectDoNotTrack !== false;
|
|
48928
|
-
this.propertyId = options.propertyId;
|
|
48929
|
-
}
|
|
48930
|
-
/**
|
|
48931
|
-
* Enable the opinionated default auto-tracking set: pageviews, outbound
|
|
48932
|
-
* links, scroll depth and active engagement time. Downloads must be opted
|
|
48933
|
-
* into separately via `enableAutoDownloadTracking()` because the extension
|
|
48934
|
-
* list is application-specific.
|
|
48935
|
-
*/
|
|
48936
|
-
enableAllAutoTracking() {
|
|
48937
|
-
this.enableAutoPageviews();
|
|
48938
|
-
this.enableAutoOutboundTracking();
|
|
48939
|
-
this.enableAutoScrollDepth();
|
|
48940
|
-
this.enableAutoEngagementTime();
|
|
48941
|
-
}
|
|
48942
|
-
/**
|
|
48943
|
-
* Track an event manually. Respects the DNT setting and swallows emitter
|
|
48944
|
-
* exceptions so tracking failures never surface to the host page.
|
|
48945
|
-
*/
|
|
48946
|
-
track(name, options) {
|
|
48947
|
-
if (!this.canTrack()) {
|
|
48948
|
-
return;
|
|
48949
|
-
}
|
|
48950
|
-
try {
|
|
48951
|
-
this.emit(name, this.withPropertyId(options));
|
|
48952
|
-
}
|
|
48953
|
-
catch (error) {
|
|
48954
|
-
console.warn('AnalyticsTracking: emitter threw', error);
|
|
48955
|
-
}
|
|
48956
|
-
}
|
|
48957
|
-
/**
|
|
48958
|
-
* Convenience wrapper for pageview-shaped events.
|
|
48959
|
-
*/
|
|
48960
|
-
pageview(url, referrer) {
|
|
48961
|
-
this.track('pageview', {
|
|
48962
|
-
url: url !== null && url !== void 0 ? url : this.currentPageUrl(),
|
|
48963
|
-
referrer: referrer !== null && referrer !== void 0 ? referrer : (typeof document !== 'undefined'
|
|
48964
|
-
? document.referrer
|
|
48965
|
-
: undefined),
|
|
48966
|
-
});
|
|
48967
|
-
}
|
|
48968
|
-
/**
|
|
48969
|
-
* Enable SPA-aware pageview tracking. Fires an initial pageview on
|
|
48970
|
-
* enable, then again on every `pushState`, `replaceState`, `popstate`
|
|
48971
|
-
* or hashchange. Idempotent — repeat calls no-op.
|
|
48972
|
-
*/
|
|
48973
|
-
enableAutoPageviews() {
|
|
48974
|
-
if (this.pageviewCleanups.length > 0) {
|
|
48975
|
-
return;
|
|
48976
|
-
}
|
|
48977
|
-
if (typeof window === 'undefined' || typeof history === 'undefined') {
|
|
48978
|
-
return;
|
|
48979
|
-
}
|
|
48980
|
-
this.currentPath = this.currentPageUrl();
|
|
48981
|
-
this.pageview();
|
|
48982
|
-
const handleNavigation = () => {
|
|
48983
|
-
const nextPath = this.currentPageUrl();
|
|
48984
|
-
if (nextPath === this.currentPath) {
|
|
48985
|
-
return;
|
|
48986
|
-
}
|
|
48987
|
-
const previous = this.currentPath;
|
|
48988
|
-
this.currentPath = nextPath;
|
|
48989
|
-
this.flushScrollDepth(previous);
|
|
48990
|
-
this.flushEngagement(previous);
|
|
48991
|
-
this.pageview(nextPath);
|
|
48992
|
-
// flushEngagement no longer auto-restarts the timer (see its
|
|
48993
|
-
// implementation note re: bfcache). SPA navigation stays on the
|
|
48994
|
-
// same document, so restart engagement tracking for the new
|
|
48995
|
-
// route as long as the tab is visible.
|
|
48996
|
-
if (this.engagementCleanups.length > 0 &&
|
|
48997
|
-
(typeof document === 'undefined' ||
|
|
48998
|
-
document.visibilityState !== 'hidden')) {
|
|
48999
|
-
this.startEngagement();
|
|
49000
|
-
}
|
|
49001
|
-
};
|
|
49002
|
-
const originalPushState = history.pushState.bind(history);
|
|
49003
|
-
const originalReplaceState = history.replaceState.bind(history);
|
|
49004
|
-
// Our wrappers stay reachable after cleanup whenever another library
|
|
49005
|
-
// patched on top of ours, so they have to be switchable off rather than
|
|
49006
|
-
// merely unreferenced.
|
|
49007
|
-
let patchActive = true;
|
|
49008
|
-
const patchedPushState = (data, unused, url) => {
|
|
49009
|
-
originalPushState(data, unused, url);
|
|
49010
|
-
if (patchActive) {
|
|
49011
|
-
handleNavigation();
|
|
49012
|
-
}
|
|
49013
|
-
};
|
|
49014
|
-
const patchedReplaceState = (data, unused, url) => {
|
|
49015
|
-
originalReplaceState(data, unused, url);
|
|
49016
|
-
if (patchActive) {
|
|
49017
|
-
handleNavigation();
|
|
49018
|
-
}
|
|
49019
|
-
};
|
|
49020
|
-
history.pushState = patchedPushState;
|
|
49021
|
-
history.replaceState = patchedReplaceState;
|
|
49022
|
-
const popstateHandler = () => handleNavigation();
|
|
49023
|
-
const hashchangeHandler = () => handleNavigation();
|
|
49024
|
-
window.addEventListener('popstate', popstateHandler);
|
|
49025
|
-
window.addEventListener('hashchange', hashchangeHandler);
|
|
49026
|
-
this.pageviewCleanups.push(() => {
|
|
49027
|
-
// Only unwind our own patch. A router (Next.js App Router, React
|
|
49028
|
-
// Router, …) that patched these after us owns the current value,
|
|
49029
|
-
// and assigning our saved reference back would silently throw its
|
|
49030
|
-
// wrapper away. In that case ours stays in the chain, which is why
|
|
49031
|
-
// `patchActive` exists: the wrapper keeps delegating to the original
|
|
49032
|
-
// but stops reporting.
|
|
49033
|
-
patchActive = false;
|
|
49034
|
-
if (history.pushState === patchedPushState) {
|
|
49035
|
-
history.pushState = originalPushState;
|
|
49036
|
-
}
|
|
49037
|
-
if (history.replaceState === patchedReplaceState) {
|
|
49038
|
-
history.replaceState = originalReplaceState;
|
|
49039
|
-
}
|
|
49040
|
-
window.removeEventListener('popstate', popstateHandler);
|
|
49041
|
-
window.removeEventListener('hashchange', hashchangeHandler);
|
|
49042
|
-
});
|
|
49043
|
-
}
|
|
49044
|
-
/**
|
|
49045
|
-
* Disable auto-pageview tracking installed by `enableAutoPageviews`.
|
|
49046
|
-
* Safe to call when auto-pageviews were never enabled.
|
|
49047
|
-
*/
|
|
49048
|
-
disableAutoPageviews() {
|
|
49049
|
-
for (const cleanup of this.pageviewCleanups) {
|
|
49050
|
-
cleanup();
|
|
49051
|
-
}
|
|
49052
|
-
this.pageviewCleanups = [];
|
|
49053
|
-
}
|
|
49054
|
-
/**
|
|
49055
|
-
* Enable click-based outbound link tracking. Detects anchor clicks that
|
|
49056
|
-
* navigate to a different origin and fires an `outbound_link` event
|
|
49057
|
-
* (with `hostname` and `href` props) before the browser navigates.
|
|
49058
|
-
*/
|
|
49059
|
-
enableAutoOutboundTracking(options = {}) {
|
|
49060
|
-
if (this.outboundCleanup) {
|
|
49061
|
-
return;
|
|
49062
|
-
}
|
|
49063
|
-
if (typeof document === 'undefined') {
|
|
49064
|
-
return;
|
|
49065
|
-
}
|
|
49066
|
-
const includeSubdomains = options.includeSubdomains === true;
|
|
49067
|
-
const clickHandler = (event) => {
|
|
49068
|
-
const anchor = this.findAnchor(event.target);
|
|
49069
|
-
if (!anchor || !anchor.href) {
|
|
49070
|
-
return;
|
|
49071
|
-
}
|
|
49072
|
-
const target = this.parseUrl(anchor.href);
|
|
49073
|
-
if (!target || !this.isExternal(target, includeSubdomains)) {
|
|
49074
|
-
return;
|
|
49075
|
-
}
|
|
49076
|
-
this.track('outbound_link', {
|
|
49077
|
-
url: target.href,
|
|
49078
|
-
props: { hostname: target.hostname, href: target.href },
|
|
49079
|
-
});
|
|
49080
|
-
};
|
|
49081
|
-
document.addEventListener('click', clickHandler, { capture: true });
|
|
49082
|
-
this.outboundCleanup = () => document.removeEventListener('click', clickHandler, {
|
|
49083
|
-
capture: true,
|
|
49084
|
-
});
|
|
49085
|
-
}
|
|
49086
|
-
/**
|
|
49087
|
-
* Disable outbound-link tracking installed by `enableAutoOutboundTracking`.
|
|
49088
|
-
* Safe to call when auto-outbound was never enabled.
|
|
49089
|
-
*/
|
|
49090
|
-
disableAutoOutboundTracking() {
|
|
49091
|
-
if (this.outboundCleanup) {
|
|
49092
|
-
this.outboundCleanup();
|
|
49093
|
-
this.outboundCleanup = undefined;
|
|
49094
|
-
}
|
|
49095
|
-
}
|
|
49096
|
-
/**
|
|
49097
|
-
* Enable click-based download tracking. Detects anchor clicks that point
|
|
49098
|
-
* at a file whose extension appears in the configured list and fires a
|
|
49099
|
-
* `file_download` event with `filename`, `extension` and `href` props.
|
|
49100
|
-
*/
|
|
49101
|
-
enableAutoDownloadTracking(options = {}) {
|
|
49102
|
-
var _a;
|
|
49103
|
-
if (this.downloadCleanup) {
|
|
49104
|
-
return;
|
|
49105
|
-
}
|
|
49106
|
-
if (typeof document === 'undefined') {
|
|
49107
|
-
return;
|
|
49108
|
-
}
|
|
49109
|
-
const extensions = ((_a = options.extensions) !== null && _a !== void 0 ? _a : DEFAULT_DOWNLOAD_EXTENSIONS).map((ext) => ext.toLowerCase().replace(/^\./, ''));
|
|
49110
|
-
const extensionSet = new Set(extensions);
|
|
49111
|
-
const clickHandler = (event) => {
|
|
49112
|
-
var _a, _b;
|
|
49113
|
-
const anchor = this.findAnchor(event.target);
|
|
49114
|
-
if (!anchor || !anchor.href) {
|
|
49115
|
-
return;
|
|
49116
|
-
}
|
|
49117
|
-
const url = this.parseUrl(anchor.href);
|
|
49118
|
-
if (!url) {
|
|
49119
|
-
return;
|
|
49120
|
-
}
|
|
49121
|
-
const filename = (_a = url.pathname.split('/').pop()) !== null && _a !== void 0 ? _a : '';
|
|
49122
|
-
const extension = filename.includes('.')
|
|
49123
|
-
? (_b = filename.split('.').pop()) === null || _b === void 0 ? void 0 : _b.toLowerCase()
|
|
49124
|
-
: undefined;
|
|
49125
|
-
if (!extension || !extensionSet.has(extension)) {
|
|
49126
|
-
return;
|
|
49127
|
-
}
|
|
49128
|
-
this.track('file_download', {
|
|
49129
|
-
url: url.href,
|
|
49130
|
-
props: { filename, extension, href: url.href },
|
|
49131
|
-
});
|
|
49132
|
-
};
|
|
49133
|
-
document.addEventListener('click', clickHandler, { capture: true });
|
|
49134
|
-
this.downloadCleanup = () => document.removeEventListener('click', clickHandler, {
|
|
49135
|
-
capture: true,
|
|
49136
|
-
});
|
|
49137
|
-
}
|
|
49138
|
-
/**
|
|
49139
|
-
* Disable file-download tracking installed by `enableAutoDownloadTracking`.
|
|
49140
|
-
* Safe to call when auto-download was never enabled.
|
|
49141
|
-
*/
|
|
49142
|
-
disableAutoDownloadTracking() {
|
|
49143
|
-
if (this.downloadCleanup) {
|
|
49144
|
-
this.downloadCleanup();
|
|
49145
|
-
this.downloadCleanup = undefined;
|
|
49146
|
-
}
|
|
49147
|
-
}
|
|
49148
|
-
/**
|
|
49149
|
-
* Enable passive scroll-depth tracking. Records the maximum percent of the
|
|
49150
|
-
* document scrolled and reports it on `beforeunload` and on SPA route
|
|
49151
|
-
* changes. Uses a throttled passive listener so it is safe on hot paths.
|
|
49152
|
-
*/
|
|
49153
|
-
enableAutoScrollDepth() {
|
|
49154
|
-
if (this.scrollCleanups.length > 0) {
|
|
49155
|
-
return;
|
|
49156
|
-
}
|
|
49157
|
-
if (typeof window === 'undefined' || typeof document === 'undefined') {
|
|
49158
|
-
return;
|
|
49159
|
-
}
|
|
49160
|
-
this.maxScrollDepth = 0;
|
|
49161
|
-
this.lastScrollReport = 0;
|
|
49162
|
-
const scrollHandler = () => {
|
|
49163
|
-
if (this.scrollTicking) {
|
|
49164
|
-
return;
|
|
49165
|
-
}
|
|
49166
|
-
this.scrollTicking = true;
|
|
49167
|
-
window.requestAnimationFrame(() => {
|
|
49168
|
-
const now = Date.now();
|
|
49169
|
-
if (now - this.lastScrollReport < SCROLL_DEPTH_THROTTLE_MS) {
|
|
49170
|
-
this.scrollTicking = false;
|
|
49171
|
-
return;
|
|
49172
|
-
}
|
|
49173
|
-
this.lastScrollReport = now;
|
|
49174
|
-
const depth = this.computeScrollDepth();
|
|
49175
|
-
if (depth > this.maxScrollDepth) {
|
|
49176
|
-
this.maxScrollDepth = depth;
|
|
49177
|
-
}
|
|
49178
|
-
this.scrollTicking = false;
|
|
49179
|
-
});
|
|
49180
|
-
};
|
|
49181
|
-
const unloadHandler = () => {
|
|
49182
|
-
this.flushScrollDepth(this.currentPageUrl());
|
|
49183
|
-
};
|
|
49184
|
-
window.addEventListener('scroll', scrollHandler, { passive: true });
|
|
49185
|
-
window.addEventListener('beforeunload', unloadHandler);
|
|
49186
|
-
window.addEventListener('pagehide', unloadHandler);
|
|
49187
|
-
this.scrollCleanups.push(() => {
|
|
49188
|
-
window.removeEventListener('scroll', scrollHandler);
|
|
49189
|
-
window.removeEventListener('beforeunload', unloadHandler);
|
|
49190
|
-
window.removeEventListener('pagehide', unloadHandler);
|
|
49191
|
-
});
|
|
49192
|
-
}
|
|
49193
|
-
/**
|
|
49194
|
-
* Disable scroll-depth tracking installed by `enableAutoScrollDepth`. Safe
|
|
49195
|
-
* to call when auto-scroll-depth was never enabled. Any accumulated depth
|
|
49196
|
-
* for the current page is dropped.
|
|
49197
|
-
*/
|
|
49198
|
-
disableAutoScrollDepth() {
|
|
49199
|
-
for (const cleanup of this.scrollCleanups) {
|
|
49200
|
-
cleanup();
|
|
49201
|
-
}
|
|
49202
|
-
this.scrollCleanups = [];
|
|
49203
|
-
this.maxScrollDepth = 0;
|
|
49204
|
-
this.scrollTicking = false;
|
|
49205
|
-
this.lastScrollReport = 0;
|
|
49206
|
-
}
|
|
49207
|
-
/**
|
|
49208
|
-
* Enable active engagement-time tracking. Counts time the tab is visible
|
|
49209
|
-
* and uses `visibilitychange` to exclude background time.
|
|
49210
|
-
*
|
|
49211
|
-
* Delivery follows Plausible's model rather than a single total at the
|
|
49212
|
-
* end of the visit: an `engagement_time` event is emitted at every natural
|
|
49213
|
-
* checkpoint — the tab going hidden, an SPA route change, and finally
|
|
49214
|
-
* `beforeunload`/`pagehide`. Unload is kept only as a best-effort last
|
|
49215
|
-
* flush; it is the least reliable moment to send anything (browsers
|
|
49216
|
-
* routinely cancel in-flight requests there, and `sendBeacon` cannot set
|
|
49217
|
-
* the `X-Appwrite-Project` header the endpoint requires), so it must never
|
|
49218
|
-
* be the only delivery.
|
|
49219
|
-
*
|
|
49220
|
-
* Each event carries a **delta** — the seconds accrued since the previous
|
|
49221
|
-
* flush, not a running total — so the values are additive per session and
|
|
49222
|
-
* a lost event costs only its own slice.
|
|
49223
|
-
*
|
|
49224
|
-
* There is deliberately no periodic ping. The cadence is driven by
|
|
49225
|
-
* navigation and tab switches, so request volume tracks what the visitor
|
|
49226
|
-
* actually does instead of multiplying with time on page.
|
|
49227
|
-
*/
|
|
49228
|
-
enableAutoEngagementTime() {
|
|
49229
|
-
if (this.engagementCleanups.length > 0) {
|
|
49230
|
-
return;
|
|
49231
|
-
}
|
|
49232
|
-
if (typeof window === 'undefined' || typeof document === 'undefined') {
|
|
49233
|
-
return;
|
|
49234
|
-
}
|
|
49235
|
-
this.engagementAccumulatedMs = 0;
|
|
49236
|
-
// Do not start the clock for a tab that is already hidden (prerender,
|
|
49237
|
-
// background tab restore); `visibilitychange` starts it when it is
|
|
49238
|
-
// actually looked at.
|
|
49239
|
-
if (document.visibilityState !== 'hidden') {
|
|
49240
|
-
this.startEngagement();
|
|
49241
|
-
}
|
|
49242
|
-
const visibilityHandler = () => {
|
|
49243
|
-
if (document.visibilityState === 'hidden') {
|
|
49244
|
-
// Flush, don't just pause. The page is still fully alive here,
|
|
49245
|
-
// which makes this the most reliable delivery point in the
|
|
49246
|
-
// whole visit — and it is the same moment Plausible reports on.
|
|
49247
|
-
this.flushEngagement(this.currentPageUrl());
|
|
49248
|
-
}
|
|
49249
|
-
else if (document.visibilityState === 'visible') {
|
|
49250
|
-
this.startEngagement();
|
|
49251
|
-
}
|
|
49252
|
-
};
|
|
49253
|
-
const unloadHandler = () => {
|
|
49254
|
-
this.flushEngagement(this.currentPageUrl());
|
|
49255
|
-
};
|
|
49256
|
-
const pageshowHandler = (event) => {
|
|
49257
|
-
// When the page is restored from the back-forward cache the
|
|
49258
|
-
// engagement timer is in a stopped state (flushEngagement paused
|
|
49259
|
-
// it on pagehide and does not auto-restart). Kick off a fresh
|
|
49260
|
-
// engagementStart so bfcache dwell time is not billed as
|
|
49261
|
-
// engagement.
|
|
49262
|
-
if (event.persisted) {
|
|
49263
|
-
this.startEngagement();
|
|
49264
|
-
}
|
|
49265
|
-
};
|
|
49266
|
-
document.addEventListener('visibilitychange', visibilityHandler);
|
|
49267
|
-
window.addEventListener('beforeunload', unloadHandler);
|
|
49268
|
-
window.addEventListener('pagehide', unloadHandler);
|
|
49269
|
-
window.addEventListener('pageshow', pageshowHandler);
|
|
49270
|
-
this.engagementCleanups.push(() => {
|
|
49271
|
-
document.removeEventListener('visibilitychange', visibilityHandler);
|
|
49272
|
-
window.removeEventListener('beforeunload', unloadHandler);
|
|
49273
|
-
window.removeEventListener('pagehide', unloadHandler);
|
|
49274
|
-
window.removeEventListener('pageshow', pageshowHandler);
|
|
49275
|
-
});
|
|
49276
|
-
}
|
|
49277
|
-
/**
|
|
49278
|
-
* Disable engagement-time tracking installed by `enableAutoEngagementTime`.
|
|
49279
|
-
* Safe to call when auto-engagement was never enabled. Any accumulated
|
|
49280
|
-
* engagement time is dropped without being emitted.
|
|
49281
|
-
*/
|
|
49282
|
-
disableAutoEngagementTime() {
|
|
49283
|
-
for (const cleanup of this.engagementCleanups) {
|
|
49284
|
-
cleanup();
|
|
49285
|
-
}
|
|
49286
|
-
this.engagementCleanups = [];
|
|
49287
|
-
this.engagementActive = false;
|
|
49288
|
-
this.engagementAccumulatedMs = 0;
|
|
49289
|
-
this.engagementStart = 0;
|
|
49290
|
-
}
|
|
49291
|
-
/**
|
|
49292
|
-
* Merge the configured `propertyId` into an event's options. Returns the
|
|
49293
|
-
* caller's object untouched when no default is configured (or the event
|
|
49294
|
-
* already carries one), so emitters written against the pre-`propertyId`
|
|
49295
|
-
* shape keep receiving exactly what they received before.
|
|
49296
|
-
*/
|
|
49297
|
-
withPropertyId(options) {
|
|
49298
|
-
if (this.propertyId === undefined ||
|
|
49299
|
-
(options === null || options === void 0 ? void 0 : options.propertyId) !== undefined) {
|
|
49300
|
-
return options;
|
|
49301
|
-
}
|
|
49302
|
-
return Object.assign(Object.assign({}, (options !== null && options !== void 0 ? options : {})), { propertyId: this.propertyId });
|
|
49303
|
-
}
|
|
49304
|
-
canTrack() {
|
|
49305
|
-
if (!this.respectDoNotTrack) {
|
|
49306
|
-
return true;
|
|
49307
|
-
}
|
|
49308
|
-
if (typeof navigator === 'undefined') {
|
|
49309
|
-
return true;
|
|
49310
|
-
}
|
|
49311
|
-
return navigator.doNotTrack !== '1';
|
|
49312
|
-
}
|
|
49313
|
-
currentPageUrl() {
|
|
49314
|
-
if (typeof window === 'undefined' || !window.location) {
|
|
49315
|
-
return '';
|
|
49316
|
-
}
|
|
49317
|
-
return window.location.href;
|
|
49318
|
-
}
|
|
49319
|
-
findAnchor(target) {
|
|
49320
|
-
let node = target;
|
|
49321
|
-
while (node) {
|
|
49322
|
-
if (node.tagName === 'A') {
|
|
49323
|
-
return node;
|
|
49324
|
-
}
|
|
49325
|
-
node = node.parentNode;
|
|
49326
|
-
}
|
|
49327
|
-
return null;
|
|
49328
|
-
}
|
|
49329
|
-
parseUrl(href) {
|
|
49330
|
-
try {
|
|
49331
|
-
return new URL(href, window.location.href);
|
|
49332
|
-
}
|
|
49333
|
-
catch (_a) {
|
|
49334
|
-
return null;
|
|
49335
|
-
}
|
|
49336
|
-
}
|
|
49337
|
-
isExternal(target, includeSubdomains) {
|
|
49338
|
-
if (target.protocol !== 'http:' && target.protocol !== 'https:') {
|
|
49339
|
-
return false;
|
|
49340
|
-
}
|
|
49341
|
-
if (target.hostname === window.location.hostname) {
|
|
49342
|
-
return false;
|
|
49343
|
-
}
|
|
49344
|
-
if (includeSubdomains) {
|
|
49345
|
-
return true;
|
|
49346
|
-
}
|
|
49347
|
-
const root = this.rootDomain(window.location.hostname);
|
|
49348
|
-
return this.rootDomain(target.hostname) !== root;
|
|
49349
|
-
}
|
|
49350
|
-
rootDomain(hostname) {
|
|
49351
|
-
const parts = hostname.split('.');
|
|
49352
|
-
if (parts.length <= 2) {
|
|
49353
|
-
return hostname;
|
|
49354
|
-
}
|
|
49355
|
-
// Taking the last two labels is wrong wherever the registry sells names
|
|
49356
|
-
// one level down: `shop.example.co.uk` and `google.co.uk` both reduce to
|
|
49357
|
-
// `co.uk`, so every outbound click between two `.co.uk` sites looks
|
|
49358
|
-
// internal and is dropped. Take three labels after a known two-part
|
|
49359
|
-
// suffix instead.
|
|
49360
|
-
//
|
|
49361
|
-
// This is a heuristic, not the Public Suffix List — the full list is
|
|
49362
|
-
// orders of magnitude larger than this whole file, and a tracking
|
|
49363
|
-
// snippet cannot carry it. Sites on a suffix that is missing here can
|
|
49364
|
-
// pass `includeSubdomains: true` to treat every other host as outbound.
|
|
49365
|
-
const suffix = parts.slice(-2).join('.');
|
|
49366
|
-
if (parts.length > 2 && MULTI_PART_SUFFIXES.has(suffix)) {
|
|
49367
|
-
return parts.slice(-3).join('.');
|
|
49368
|
-
}
|
|
49369
|
-
return suffix;
|
|
49370
|
-
}
|
|
49371
|
-
computeScrollDepth() {
|
|
49372
|
-
const scrollTop = window.scrollY || document.documentElement.scrollTop;
|
|
49373
|
-
const viewport = window.innerHeight || document.documentElement.clientHeight;
|
|
49374
|
-
const total = document.documentElement.scrollHeight;
|
|
49375
|
-
if (total <= viewport) {
|
|
49376
|
-
return 100;
|
|
49377
|
-
}
|
|
49378
|
-
const depth = Math.round(((scrollTop + viewport) / total) * 100);
|
|
49379
|
-
return Math.max(0, Math.min(100, depth));
|
|
49380
|
-
}
|
|
49381
|
-
flushScrollDepth(url) {
|
|
49382
|
-
if (this.scrollCleanups.length === 0) {
|
|
49383
|
-
return;
|
|
49384
|
-
}
|
|
49385
|
-
if (this.maxScrollDepth <= 0) {
|
|
49386
|
-
return;
|
|
49387
|
-
}
|
|
49388
|
-
this.track('scroll_depth', {
|
|
49389
|
-
url,
|
|
49390
|
-
scrollDepth: this.maxScrollDepth,
|
|
49391
|
-
});
|
|
49392
|
-
this.maxScrollDepth = 0;
|
|
49393
|
-
}
|
|
49394
|
-
startEngagement() {
|
|
49395
|
-
if (this.engagementActive) {
|
|
49396
|
-
return;
|
|
49397
|
-
}
|
|
49398
|
-
this.engagementActive = true;
|
|
49399
|
-
this.engagementStart = Date.now();
|
|
49400
|
-
}
|
|
49401
|
-
pauseEngagement() {
|
|
49402
|
-
if (!this.engagementActive) {
|
|
49403
|
-
return;
|
|
49404
|
-
}
|
|
49405
|
-
this.engagementActive = false;
|
|
49406
|
-
this.engagementAccumulatedMs += Date.now() - this.engagementStart;
|
|
49407
|
-
}
|
|
49408
|
-
flushEngagement(url) {
|
|
49409
|
-
if (this.engagementCleanups.length === 0) {
|
|
49410
|
-
return;
|
|
49411
|
-
}
|
|
49412
|
-
this.pauseEngagement();
|
|
49413
|
-
// Deltas, not a running total: emit only what accrued since the last
|
|
49414
|
-
// flush. `floor` plus keeping the sub-second remainder in the
|
|
49415
|
-
// accumulator is what makes repeated flushes safe — nothing is emitted
|
|
49416
|
-
// twice, and a visit chopped into many short segments does not lose a
|
|
49417
|
-
// fraction of a second to rounding on every one of them.
|
|
49418
|
-
const seconds = Math.floor(this.engagementAccumulatedMs / 1000);
|
|
49419
|
-
if (seconds > 0) {
|
|
49420
|
-
// Deduct before emitting so a synchronous emitter that re-enters
|
|
49421
|
-
// (or throws) can never bill the same seconds again.
|
|
49422
|
-
this.engagementAccumulatedMs -= seconds * 1000;
|
|
49423
|
-
this.track('engagement_time', {
|
|
49424
|
-
url,
|
|
49425
|
-
engagementTime: seconds,
|
|
49426
|
-
});
|
|
49427
|
-
}
|
|
49428
|
-
// NOTE: intentionally do NOT call startEngagement() here. flushEngagement
|
|
49429
|
-
// runs on `pagehide`, which is also the last hook before the browser
|
|
49430
|
-
// may freeze the page into the back-forward cache. Auto-restarting
|
|
49431
|
-
// would snapshot engagementStart just before the freeze; the next
|
|
49432
|
-
// pauseEngagement (after bfcache restore) would then bill the entire
|
|
49433
|
-
// bfcache dwell as active engagement. Restart is driven by explicit
|
|
49434
|
-
// resume signals: `pageshow` (with `persisted === true`),
|
|
49435
|
-
// `visibilitychange` back to visible, or the SPA navigation flow in
|
|
49436
|
-
// `enableAutoPageviews`.
|
|
49437
|
-
}
|
|
49438
|
-
}
|
|
49439
|
-
|
|
49440
47192
|
/**
|
|
49441
47193
|
* Helper class to generate permission strings for resources.
|
|
49442
47194
|
*/
|
|
@@ -50143,68 +47895,6 @@ var OAuthProvider;
|
|
|
50143
47895
|
OAuthProvider["Zoom"] = "zoom";
|
|
50144
47896
|
})(OAuthProvider || (OAuthProvider = {}));
|
|
50145
47897
|
|
|
50146
|
-
var PlatformResourceType;
|
|
50147
|
-
(function (PlatformResourceType) {
|
|
50148
|
-
PlatformResourceType["Projects"] = "projects";
|
|
50149
|
-
PlatformResourceType["Organizations"] = "organizations";
|
|
50150
|
-
PlatformResourceType["Users"] = "users";
|
|
50151
|
-
PlatformResourceType["Memberships"] = "memberships";
|
|
50152
|
-
PlatformResourceType["Rules"] = "rules";
|
|
50153
|
-
PlatformResourceType["Keys"] = "keys";
|
|
50154
|
-
PlatformResourceType["Platforms"] = "platforms";
|
|
50155
|
-
PlatformResourceType["Webhooks"] = "webhooks";
|
|
50156
|
-
PlatformResourceType["Certificates"] = "certificates";
|
|
50157
|
-
})(PlatformResourceType || (PlatformResourceType = {}));
|
|
50158
|
-
|
|
50159
|
-
var ProjectResourceType;
|
|
50160
|
-
(function (ProjectResourceType) {
|
|
50161
|
-
ProjectResourceType["Users"] = "users";
|
|
50162
|
-
ProjectResourceType["Teams"] = "teams";
|
|
50163
|
-
ProjectResourceType["Memberships"] = "memberships";
|
|
50164
|
-
ProjectResourceType["Databases"] = "databases";
|
|
50165
|
-
ProjectResourceType["Buckets"] = "buckets";
|
|
50166
|
-
ProjectResourceType["Functions"] = "functions";
|
|
50167
|
-
ProjectResourceType["Sites"] = "sites";
|
|
50168
|
-
ProjectResourceType["Deployments"] = "deployments";
|
|
50169
|
-
ProjectResourceType["Topics"] = "topics";
|
|
50170
|
-
ProjectResourceType["Providers"] = "providers";
|
|
50171
|
-
ProjectResourceType["Messages"] = "messages";
|
|
50172
|
-
})(ProjectResourceType || (ProjectResourceType = {}));
|
|
50173
|
-
|
|
50174
|
-
var AnalyticsInterval;
|
|
50175
|
-
(function (AnalyticsInterval) {
|
|
50176
|
-
AnalyticsInterval["OneHour"] = "1h";
|
|
50177
|
-
AnalyticsInterval["OneDay"] = "1d";
|
|
50178
|
-
AnalyticsInterval["OneWeek"] = "1w";
|
|
50179
|
-
AnalyticsInterval["OneMonth"] = "1m";
|
|
50180
|
-
})(AnalyticsInterval || (AnalyticsInterval = {}));
|
|
50181
|
-
|
|
50182
|
-
var AnalyticsDimension;
|
|
50183
|
-
(function (AnalyticsDimension) {
|
|
50184
|
-
AnalyticsDimension["Country"] = "country";
|
|
50185
|
-
AnalyticsDimension["Region"] = "region";
|
|
50186
|
-
AnalyticsDimension["City"] = "city";
|
|
50187
|
-
AnalyticsDimension["Browser"] = "browser";
|
|
50188
|
-
AnalyticsDimension["OperatingSystem"] = "operatingSystem";
|
|
50189
|
-
AnalyticsDimension["Device"] = "device";
|
|
50190
|
-
AnalyticsDimension["ScreenSize"] = "screenSize";
|
|
50191
|
-
AnalyticsDimension["ReferrerSource"] = "referrerSource";
|
|
50192
|
-
AnalyticsDimension["Channel"] = "channel";
|
|
50193
|
-
AnalyticsDimension["UtmSource"] = "utmSource";
|
|
50194
|
-
AnalyticsDimension["UtmMedium"] = "utmMedium";
|
|
50195
|
-
AnalyticsDimension["UtmCampaign"] = "utmCampaign";
|
|
50196
|
-
AnalyticsDimension["UtmContent"] = "utmContent";
|
|
50197
|
-
AnalyticsDimension["UtmTerm"] = "utmTerm";
|
|
50198
|
-
AnalyticsDimension["Page"] = "page";
|
|
50199
|
-
AnalyticsDimension["Hostname"] = "hostname";
|
|
50200
|
-
AnalyticsDimension["EntryPage"] = "entryPage";
|
|
50201
|
-
AnalyticsDimension["ExitPage"] = "exitPage";
|
|
50202
|
-
AnalyticsDimension["TrafficType"] = "trafficType";
|
|
50203
|
-
AnalyticsDimension["BotName"] = "botName";
|
|
50204
|
-
AnalyticsDimension["BotCategory"] = "botCategory";
|
|
50205
|
-
AnalyticsDimension["EventName"] = "eventName";
|
|
50206
|
-
})(AnalyticsDimension || (AnalyticsDimension = {}));
|
|
50207
|
-
|
|
50208
47898
|
var Browser;
|
|
50209
47899
|
(function (Browser) {
|
|
50210
47900
|
Browser["AvantBrowser"] = "aa";
|
|
@@ -51020,14 +48710,6 @@ var QuerySuggestionResource;
|
|
|
51020
48710
|
QuerySuggestionResource["ResourceTokens"] = "resourcetokens";
|
|
51021
48711
|
QuerySuggestionResource["Transactions"] = "transactions";
|
|
51022
48712
|
QuerySuggestionResource["TransactionLogs"] = "transactionlogs";
|
|
51023
|
-
QuerySuggestionResource["Videos"] = "videos";
|
|
51024
|
-
QuerySuggestionResource["VideosPreviews"] = "videos_previews";
|
|
51025
|
-
QuerySuggestionResource["VideosRenditions"] = "videos_renditions";
|
|
51026
|
-
QuerySuggestionResource["VideosRenditionsSegments"] = "videos_renditions_segments";
|
|
51027
|
-
QuerySuggestionResource["VideosProfiles"] = "videos_profiles";
|
|
51028
|
-
QuerySuggestionResource["VideosSubtitles"] = "videos_subtitles";
|
|
51029
|
-
QuerySuggestionResource["VideosSubtitlesSegments"] = "videos_subtitles_segments";
|
|
51030
|
-
QuerySuggestionResource["AnalyticsProperties"] = "analyticsproperties";
|
|
51031
48713
|
QuerySuggestionResource["DedicatedDatabases"] = "dedicateddatabases";
|
|
51032
48714
|
QuerySuggestionResource["DedicatedDatabaseConfigs"] = "dedicateddatabaseconfigs";
|
|
51033
48715
|
QuerySuggestionResource["DedicatedDatabaseRuntimes"] = "dedicateddatabaseruntimes";
|
|
@@ -51450,8 +49132,6 @@ var ProjectKeyScopes;
|
|
|
51450
49132
|
ProjectKeyScopes["ReportsWrite"] = "reports.write";
|
|
51451
49133
|
ProjectKeyScopes["PresencesRead"] = "presences.read";
|
|
51452
49134
|
ProjectKeyScopes["PresencesWrite"] = "presences.write";
|
|
51453
|
-
ProjectKeyScopes["VideosRead"] = "videos.read";
|
|
51454
|
-
ProjectKeyScopes["VideosWrite"] = "videos.write";
|
|
51455
49135
|
ProjectKeyScopes["DedicatedDatabasesExecute"] = "dedicatedDatabases.execute";
|
|
51456
49136
|
ProjectKeyScopes["BackupsPoliciesRead"] = "backups.policies.read";
|
|
51457
49137
|
ProjectKeyScopes["BackupsPoliciesWrite"] = "backups.policies.write";
|
|
@@ -51470,8 +49150,6 @@ var ProjectKeyScopes;
|
|
|
51470
49150
|
ProjectKeyScopes["Oauth2Read"] = "oauth2.read";
|
|
51471
49151
|
ProjectKeyScopes["Oauth2Write"] = "oauth2.write";
|
|
51472
49152
|
ProjectKeyScopes["Oauth2Introspect"] = "oauth2.introspect";
|
|
51473
|
-
ProjectKeyScopes["AnalyticsRead"] = "analytics.read";
|
|
51474
|
-
ProjectKeyScopes["AnalyticsWrite"] = "analytics.write";
|
|
51475
49153
|
})(ProjectKeyScopes || (ProjectKeyScopes = {}));
|
|
51476
49154
|
|
|
51477
49155
|
var FunctionTemplateUseCase;
|
|
@@ -51721,7 +49399,6 @@ var ProjectAuthMethodId;
|
|
|
51721
49399
|
ProjectAuthMethodId["Invites"] = "invites";
|
|
51722
49400
|
ProjectAuthMethodId["Jwt"] = "jwt";
|
|
51723
49401
|
ProjectAuthMethodId["Phone"] = "phone";
|
|
51724
|
-
ProjectAuthMethodId["Passkey"] = "passkey";
|
|
51725
49402
|
})(ProjectAuthMethodId || (ProjectAuthMethodId = {}));
|
|
51726
49403
|
|
|
51727
49404
|
var ProjectOAuth2Auth0Prompt;
|
|
@@ -51863,7 +49540,6 @@ var ProjectPolicyId;
|
|
|
51863
49540
|
ProjectPolicyId["Denydisposableemail"] = "deny-disposable-email";
|
|
51864
49541
|
ProjectPolicyId["Denyfreeemail"] = "deny-free-email";
|
|
51865
49542
|
ProjectPolicyId["Denycorporateemail"] = "deny-corporate-email";
|
|
51866
|
-
ProjectPolicyId["Passkey"] = "passkey";
|
|
51867
49543
|
})(ProjectPolicyId || (ProjectPolicyId = {}));
|
|
51868
49544
|
|
|
51869
49545
|
var ProjectProtocolId;
|
|
@@ -52108,9 +49784,6 @@ var TablesDBIndexType;
|
|
|
52108
49784
|
|
|
52109
49785
|
var UsageEventMetric;
|
|
52110
49786
|
(function (UsageEventMetric) {
|
|
52111
|
-
UsageEventMetric["AnalyticsEvents"] = "analytics.events";
|
|
52112
|
-
UsageEventMetric["AnalyticsPageviews"] = "analytics.pageviews";
|
|
52113
|
-
UsageEventMetric["AnalyticsBotsEvents"] = "analytics.bots.events";
|
|
52114
49787
|
UsageEventMetric["NetworkRequests"] = "network.requests";
|
|
52115
49788
|
UsageEventMetric["NetworkInbound"] = "network.inbound";
|
|
52116
49789
|
UsageEventMetric["NetworkOutbound"] = "network.outbound";
|
|
@@ -52228,7 +49901,6 @@ var UsageOrderDirection;
|
|
|
52228
49901
|
|
|
52229
49902
|
var UsageGaugeMetric;
|
|
52230
49903
|
(function (UsageGaugeMetric) {
|
|
52231
|
-
UsageGaugeMetric["AnalyticsProperties"] = "analytics.properties";
|
|
52232
49904
|
UsageGaugeMetric["Teams"] = "teams";
|
|
52233
49905
|
UsageGaugeMetric["Users"] = "users";
|
|
52234
49906
|
UsageGaugeMetric["Messages"] = "messages";
|
|
@@ -52326,24 +49998,6 @@ var VectorsDBIndexType;
|
|
|
52326
49998
|
VectorsDBIndexType["Unique"] = "unique";
|
|
52327
49999
|
})(VectorsDBIndexType || (VectorsDBIndexType = {}));
|
|
52328
50000
|
|
|
52329
|
-
var VideoOutput;
|
|
52330
|
-
(function (VideoOutput) {
|
|
52331
|
-
VideoOutput["Hls"] = "hls";
|
|
52332
|
-
VideoOutput["Dash"] = "dash";
|
|
52333
|
-
VideoOutput["Cmaf"] = "cmaf";
|
|
52334
|
-
})(VideoOutput || (VideoOutput = {}));
|
|
52335
|
-
|
|
52336
|
-
var VideoRenditionStatus;
|
|
52337
|
-
(function (VideoRenditionStatus) {
|
|
52338
|
-
VideoRenditionStatus["Pending"] = "pending";
|
|
52339
|
-
VideoRenditionStatus["Started"] = "started";
|
|
52340
|
-
VideoRenditionStatus["Ended"] = "ended";
|
|
52341
|
-
VideoRenditionStatus["Uploading"] = "uploading";
|
|
52342
|
-
VideoRenditionStatus["Ready"] = "ready";
|
|
52343
|
-
VideoRenditionStatus["Error"] = "error";
|
|
52344
|
-
VideoRenditionStatus["Aborted"] = "aborted";
|
|
52345
|
-
})(VideoRenditionStatus || (VideoRenditionStatus = {}));
|
|
52346
|
-
|
|
52347
50001
|
var DatabaseType;
|
|
52348
50002
|
(function (DatabaseType) {
|
|
52349
50003
|
DatabaseType["Legacy"] = "legacy";
|
|
@@ -52522,7 +50176,6 @@ var ProxyRuleDeploymentResourceType;
|
|
|
52522
50176
|
(function (ProxyRuleDeploymentResourceType) {
|
|
52523
50177
|
ProxyRuleDeploymentResourceType["Function"] = "function";
|
|
52524
50178
|
ProxyRuleDeploymentResourceType["Site"] = "site";
|
|
52525
|
-
ProxyRuleDeploymentResourceType["DedicatedDatabase"] = "dedicatedDatabase";
|
|
52526
50179
|
})(ProxyRuleDeploymentResourceType || (ProxyRuleDeploymentResourceType = {}));
|
|
52527
50180
|
|
|
52528
50181
|
var ProxyRuleStatus;
|
|
@@ -52578,5 +50231,5 @@ var WafRuleAction;
|
|
|
52578
50231
|
WafRuleAction["Redirect"] = "redirect";
|
|
52579
50232
|
})(WafRuleAction || (WafRuleAction = {}));
|
|
52580
50233
|
|
|
52581
|
-
export { Account, AccountKeyScopes, Activities, Adapter, AddonKey,
|
|
50234
|
+
export { Account, AccountKeyScopes, Activities, Adapter, AddonKey, Advisor, Affiliates, Apps, AppwriteException, AppwriteMigrationResource, Assistant, AttributeStatus, AuthenticationFactor, AuthenticatorType, Avatars, BackupServices, Backups, BillingPlanGroup, BlockMode, BlockResourceType, Browser, BrowserPermission, BrowserTheme, BuildRuntime, CacheDatabase, CacheTarget, Channel, Client, ColumnStatus, Compression, Condition, Console, ConsoleResourceType, ConversationType, CreditCard, DatabaseStatus, DatabaseType, Databases, DatabasesIndexType, DeploymentDownloadType, DeploymentStatus, DetectionFrameworkType, DetectionRuntimeType, DocumentsDB, DocumentsDBIndexType, DomainPurchaseStatus, DomainRegistrationType, DomainSuggestionType, DomainTransferStatusEnum, Domains, EmbeddingModel, Embeddings, ExecutionMethod, ExecutionResourceType, ExecutionStatus, ExecutionTrigger, FirebaseMigrationResource, Flag, Framework, FunctionTemplateUseCase, Functions, Graphql, Growth, ID, IdTokenProvider, ImageFormat, ImageGravity, IndexStatus, InvalidationType, Locale, Manager, MessagePriority, MessageStatus, Messaging, MessagingProviderType, Migrations, Mongo, Mysql, NHostMigrationResource, Notifications, OAuth2Auth0Prompt, OAuth2DiscordPrompt, OAuth2GithubPrompt, OAuth2GooglePrompt, OAuth2KakaoPrompt, OAuth2MicrosoftPrompt, OAuth2OidcPrompt, OAuth2OktaPrompt, OAuth2SalesforcePrompt, OAuth2ZohoPrompt, OAuthProvider, Oauth2, OnDuplicate, Operator, OrderBy, Organization, OrganizationKeyScopes, Organizations, PasswordHash, Permission, Platform, PlatformType, Postgresql, Presences, Project, ProjectAuthMethodId, ProjectEmailTemplateId, ProjectEmailTemplateLocale, ProjectKeyScopes, ProjectOAuth2Auth0Prompt, ProjectOAuth2DiscordPrompt, ProjectOAuth2GitHubPrompt, ProjectOAuth2GooglePrompt, ProjectOAuth2KakaoPrompt, ProjectOAuth2MicrosoftPrompt, ProjectOAuth2OidcPrompt, ProjectOAuth2OktaPrompt, ProjectOAuth2SalesforcePrompt, ProjectOAuth2ZohoPrompt, ProjectOAuthProviderId, ProjectPolicyId, ProjectProtocolId, ProjectSMTPSecure, ProjectServiceId, Projects, Proxy, ProxyResourceType, ProxyRuleDeploymentResourceType, ProxyRuleStatus, Push, Query, QuerySuggestionResource, Realtime, Region, RelationMutate, RelationshipType, ResolvedTopic, Role, Runtime, ScheduleResourceType, SiteTemplateUseCase, Sites, SmtpEncryption, Status, StatusCode, Storage, SupabaseMigrationResource, TablesDB, TablesDBIndexType, Teams, TemplateReferenceType, Timezone, Tokens, Topic, Usage, UsageEventDimension, UsageEventMetric, UsageGaugeDimension, UsageGaugeMetric, UsageInterval, UsageOrderBy, UsageOrderDirection, UsageRange, Users, VCSDetectionType, VCSReferenceType, Vcs, VectorsDB, VectorsDBIndexType, Waf, WafRuleAction, Webhooks };
|
|
52582
50235
|
//# sourceMappingURL=sdk.js.map
|