@appwrite.io/console 18.3.0-rc.2 → 18.3.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 +344 -3074
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +345 -3071
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +344 -3074
- 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 +67 -591
- package/types/service.d.ts +11 -0
- package/types/services/account.d.ts +0 -158
- package/types/services/functions.d.ts +12 -6
- package/types/services/project.d.ts +8 -30
- package/types/services/projects.d.ts +7 -4
- package/types/services/push.d.ts +2 -2
- package/types/services/users.d.ts +0 -69
- 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/cjs/sdk.js
CHANGED
|
@@ -669,7 +669,7 @@ class Client {
|
|
|
669
669
|
'x-sdk-name': 'Console',
|
|
670
670
|
'x-sdk-platform': 'console',
|
|
671
671
|
'x-sdk-language': 'web',
|
|
672
|
-
'x-sdk-version': '18.3.0
|
|
672
|
+
'x-sdk-version': '18.3.0',
|
|
673
673
|
'X-Appwrite-Response-Format': '2.3.0',
|
|
674
674
|
};
|
|
675
675
|
this.realtime = {
|
|
@@ -1522,6 +1522,29 @@ class Client {
|
|
|
1522
1522
|
}
|
|
1523
1523
|
Client.CHUNK_SIZE = 1024 * 1024 * 5;
|
|
1524
1524
|
|
|
1525
|
+
class Service {
|
|
1526
|
+
constructor(client) {
|
|
1527
|
+
this.client = client;
|
|
1528
|
+
}
|
|
1529
|
+
static flatten(data, prefix = '') {
|
|
1530
|
+
let output = {};
|
|
1531
|
+
for (const [key, value] of Object.entries(data)) {
|
|
1532
|
+
const finalKey = prefix ? prefix + '[' + key + ']' : key;
|
|
1533
|
+
if (Array.isArray(value)) {
|
|
1534
|
+
output = Object.assign(Object.assign({}, output), Service.flatten(value, finalKey));
|
|
1535
|
+
}
|
|
1536
|
+
else {
|
|
1537
|
+
output[finalKey] = value;
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
return output;
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
/**
|
|
1544
|
+
* The size for chunked uploads in bytes.
|
|
1545
|
+
*/
|
|
1546
|
+
Service.CHUNK_SIZE = 5 * 1024 * 1024; // 5MB
|
|
1547
|
+
|
|
1525
1548
|
class Account {
|
|
1526
1549
|
constructor(client) {
|
|
1527
1550
|
this.client = client;
|
|
@@ -2840,196 +2863,6 @@ class Account {
|
|
|
2840
2863
|
};
|
|
2841
2864
|
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
2842
2865
|
}
|
|
2843
|
-
listPasskeys(paramsOrFirst, ...rest) {
|
|
2844
|
-
let params;
|
|
2845
|
-
if ((typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
|
|
2846
|
-
(paramsOrFirst &&
|
|
2847
|
-
typeof paramsOrFirst === 'object' &&
|
|
2848
|
-
!Array.isArray(paramsOrFirst))) {
|
|
2849
|
-
params = (paramsOrFirst || {});
|
|
2850
|
-
}
|
|
2851
|
-
else {
|
|
2852
|
-
params = {
|
|
2853
|
-
queries: paramsOrFirst,
|
|
2854
|
-
total: rest[0],
|
|
2855
|
-
};
|
|
2856
|
-
}
|
|
2857
|
-
const queries = params.queries;
|
|
2858
|
-
const total = params.total;
|
|
2859
|
-
const apiPath = '/account/passkeys';
|
|
2860
|
-
const apiPayload = {};
|
|
2861
|
-
if (typeof queries !== 'undefined') {
|
|
2862
|
-
apiPayload['queries'] = queries;
|
|
2863
|
-
}
|
|
2864
|
-
if (typeof total !== 'undefined') {
|
|
2865
|
-
apiPayload['total'] = total;
|
|
2866
|
-
}
|
|
2867
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2868
|
-
const apiHeaders = {
|
|
2869
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
2870
|
-
accept: 'application/json',
|
|
2871
|
-
};
|
|
2872
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
2873
|
-
}
|
|
2874
|
-
createPasskey(paramsOrFirst, ...rest) {
|
|
2875
|
-
let params;
|
|
2876
|
-
if ((typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
|
|
2877
|
-
(paramsOrFirst &&
|
|
2878
|
-
typeof paramsOrFirst === 'object' &&
|
|
2879
|
-
!Array.isArray(paramsOrFirst))) {
|
|
2880
|
-
params = (paramsOrFirst || {});
|
|
2881
|
-
}
|
|
2882
|
-
else {
|
|
2883
|
-
params = {
|
|
2884
|
-
passkeyId: paramsOrFirst,
|
|
2885
|
-
name: rest[0],
|
|
2886
|
-
};
|
|
2887
|
-
}
|
|
2888
|
-
const passkeyId = params.passkeyId;
|
|
2889
|
-
const name = params.name;
|
|
2890
|
-
const apiPath = '/account/passkeys';
|
|
2891
|
-
const apiPayload = {};
|
|
2892
|
-
if (typeof passkeyId !== 'undefined') {
|
|
2893
|
-
apiPayload['passkeyId'] = passkeyId;
|
|
2894
|
-
}
|
|
2895
|
-
if (typeof name !== 'undefined') {
|
|
2896
|
-
apiPayload['name'] = name;
|
|
2897
|
-
}
|
|
2898
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2899
|
-
const apiHeaders = {
|
|
2900
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
2901
|
-
'content-type': 'application/json',
|
|
2902
|
-
accept: 'application/json',
|
|
2903
|
-
};
|
|
2904
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
2905
|
-
}
|
|
2906
|
-
getPasskey(paramsOrFirst) {
|
|
2907
|
-
let params;
|
|
2908
|
-
if (paramsOrFirst &&
|
|
2909
|
-
typeof paramsOrFirst === 'object' &&
|
|
2910
|
-
!Array.isArray(paramsOrFirst)) {
|
|
2911
|
-
params = (paramsOrFirst || {});
|
|
2912
|
-
}
|
|
2913
|
-
else {
|
|
2914
|
-
params = {
|
|
2915
|
-
passkeyId: paramsOrFirst,
|
|
2916
|
-
};
|
|
2917
|
-
}
|
|
2918
|
-
const passkeyId = params.passkeyId;
|
|
2919
|
-
if (typeof passkeyId === 'undefined' || passkeyId === '') {
|
|
2920
|
-
throw new AppwriteException('Missing required parameter: "passkeyId"');
|
|
2921
|
-
}
|
|
2922
|
-
const apiPath = '/account/passkeys/{passkeyId}'.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
|
|
2923
|
-
const apiPayload = {};
|
|
2924
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2925
|
-
const apiHeaders = {
|
|
2926
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
2927
|
-
accept: 'application/json',
|
|
2928
|
-
};
|
|
2929
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
2930
|
-
}
|
|
2931
|
-
updatePasskey(paramsOrFirst, ...rest) {
|
|
2932
|
-
let params;
|
|
2933
|
-
if (paramsOrFirst &&
|
|
2934
|
-
typeof paramsOrFirst === 'object' &&
|
|
2935
|
-
!Array.isArray(paramsOrFirst)) {
|
|
2936
|
-
params = (paramsOrFirst || {});
|
|
2937
|
-
}
|
|
2938
|
-
else {
|
|
2939
|
-
params = {
|
|
2940
|
-
passkeyId: paramsOrFirst,
|
|
2941
|
-
name: rest[0],
|
|
2942
|
-
};
|
|
2943
|
-
}
|
|
2944
|
-
const passkeyId = params.passkeyId;
|
|
2945
|
-
const name = params.name;
|
|
2946
|
-
if (typeof passkeyId === 'undefined' || passkeyId === '') {
|
|
2947
|
-
throw new AppwriteException('Missing required parameter: "passkeyId"');
|
|
2948
|
-
}
|
|
2949
|
-
if (typeof name === 'undefined') {
|
|
2950
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
2951
|
-
}
|
|
2952
|
-
const apiPath = '/account/passkeys/{passkeyId}'.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
|
|
2953
|
-
const apiPayload = {};
|
|
2954
|
-
if (typeof name !== 'undefined') {
|
|
2955
|
-
apiPayload['name'] = name;
|
|
2956
|
-
}
|
|
2957
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2958
|
-
const apiHeaders = {
|
|
2959
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
2960
|
-
'content-type': 'application/json',
|
|
2961
|
-
accept: 'application/json',
|
|
2962
|
-
};
|
|
2963
|
-
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
2964
|
-
}
|
|
2965
|
-
deletePasskey(paramsOrFirst) {
|
|
2966
|
-
let params;
|
|
2967
|
-
if (paramsOrFirst &&
|
|
2968
|
-
typeof paramsOrFirst === 'object' &&
|
|
2969
|
-
!Array.isArray(paramsOrFirst)) {
|
|
2970
|
-
params = (paramsOrFirst || {});
|
|
2971
|
-
}
|
|
2972
|
-
else {
|
|
2973
|
-
params = {
|
|
2974
|
-
passkeyId: paramsOrFirst,
|
|
2975
|
-
};
|
|
2976
|
-
}
|
|
2977
|
-
const passkeyId = params.passkeyId;
|
|
2978
|
-
if (typeof passkeyId === 'undefined' || passkeyId === '') {
|
|
2979
|
-
throw new AppwriteException('Missing required parameter: "passkeyId"');
|
|
2980
|
-
}
|
|
2981
|
-
const apiPath = '/account/passkeys/{passkeyId}'.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
|
|
2982
|
-
const apiPayload = {};
|
|
2983
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2984
|
-
const apiHeaders = {
|
|
2985
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
2986
|
-
'content-type': 'application/json',
|
|
2987
|
-
accept: 'application/json',
|
|
2988
|
-
};
|
|
2989
|
-
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
2990
|
-
}
|
|
2991
|
-
updatePasskeyVerification(paramsOrFirst, ...rest) {
|
|
2992
|
-
let params;
|
|
2993
|
-
if (paramsOrFirst &&
|
|
2994
|
-
typeof paramsOrFirst === 'object' &&
|
|
2995
|
-
!Array.isArray(paramsOrFirst)) {
|
|
2996
|
-
params = (paramsOrFirst || {});
|
|
2997
|
-
}
|
|
2998
|
-
else {
|
|
2999
|
-
params = {
|
|
3000
|
-
passkeyId: paramsOrFirst,
|
|
3001
|
-
challengeId: rest[0],
|
|
3002
|
-
credential: rest[1],
|
|
3003
|
-
};
|
|
3004
|
-
}
|
|
3005
|
-
const passkeyId = params.passkeyId;
|
|
3006
|
-
const challengeId = params.challengeId;
|
|
3007
|
-
const credential = params.credential;
|
|
3008
|
-
if (typeof passkeyId === 'undefined' || passkeyId === '') {
|
|
3009
|
-
throw new AppwriteException('Missing required parameter: "passkeyId"');
|
|
3010
|
-
}
|
|
3011
|
-
if (typeof challengeId === 'undefined') {
|
|
3012
|
-
throw new AppwriteException('Missing required parameter: "challengeId"');
|
|
3013
|
-
}
|
|
3014
|
-
if (typeof credential === 'undefined') {
|
|
3015
|
-
throw new AppwriteException('Missing required parameter: "credential"');
|
|
3016
|
-
}
|
|
3017
|
-
const apiPath = '/account/passkeys/{passkeyId}/verification'.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
|
|
3018
|
-
const apiPayload = {};
|
|
3019
|
-
if (typeof challengeId !== 'undefined') {
|
|
3020
|
-
apiPayload['challengeId'] = challengeId;
|
|
3021
|
-
}
|
|
3022
|
-
if (typeof credential !== 'undefined') {
|
|
3023
|
-
apiPayload['credential'] = credential;
|
|
3024
|
-
}
|
|
3025
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3026
|
-
const apiHeaders = {
|
|
3027
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
3028
|
-
'content-type': 'application/json',
|
|
3029
|
-
accept: 'application/json',
|
|
3030
|
-
};
|
|
3031
|
-
return this.client.call('put', uri, apiHeaders, apiPayload);
|
|
3032
|
-
}
|
|
3033
2866
|
updatePassword(paramsOrFirst, ...rest) {
|
|
3034
2867
|
let params;
|
|
3035
2868
|
if (paramsOrFirst &&
|
|
@@ -3773,7 +3606,7 @@ class Account {
|
|
|
3773
3606
|
}
|
|
3774
3607
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3775
3608
|
apiPayload['project'] = this.client.config.project;
|
|
3776
|
-
for (const [key, value] of Object.entries(
|
|
3609
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
3777
3610
|
uri.searchParams.append(key, value);
|
|
3778
3611
|
}
|
|
3779
3612
|
if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.location)) {
|
|
@@ -4182,7 +4015,7 @@ class Account {
|
|
|
4182
4015
|
}
|
|
4183
4016
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4184
4017
|
apiPayload['project'] = this.client.config.project;
|
|
4185
|
-
for (const [key, value] of Object.entries(
|
|
4018
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
4186
4019
|
uri.searchParams.append(key, value);
|
|
4187
4020
|
}
|
|
4188
4021
|
if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.location)) {
|
|
@@ -4193,60 +4026,6 @@ class Account {
|
|
|
4193
4026
|
return uri.toString();
|
|
4194
4027
|
}
|
|
4195
4028
|
}
|
|
4196
|
-
/**
|
|
4197
|
-
* Start signing in with a passkey. No email or user ID is needed: pass the returned `publicKey` options to `navigator.credentials.get()` and the user picks one of their passkeys. Then call [Update passkey token](/docs/references/cloud/client-web/account#updatePasskeyToken) with the credential to receive a token, and exchange it with [Create session](/docs/references/cloud/client-web/account#createSession). The challenge expires after 5 minutes.
|
|
4198
|
-
*
|
|
4199
|
-
* @throws {AppwriteException}
|
|
4200
|
-
* @returns {Promise<Models.PasskeyChallenge>}
|
|
4201
|
-
*/
|
|
4202
|
-
createPasskeyToken() {
|
|
4203
|
-
const apiPath = '/account/tokens/passkey';
|
|
4204
|
-
const apiPayload = {};
|
|
4205
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4206
|
-
const apiHeaders = {
|
|
4207
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
4208
|
-
'content-type': 'application/json',
|
|
4209
|
-
accept: 'application/json',
|
|
4210
|
-
};
|
|
4211
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
4212
|
-
}
|
|
4213
|
-
updatePasskeyToken(paramsOrFirst, ...rest) {
|
|
4214
|
-
let params;
|
|
4215
|
-
if (paramsOrFirst &&
|
|
4216
|
-
typeof paramsOrFirst === 'object' &&
|
|
4217
|
-
!Array.isArray(paramsOrFirst)) {
|
|
4218
|
-
params = (paramsOrFirst || {});
|
|
4219
|
-
}
|
|
4220
|
-
else {
|
|
4221
|
-
params = {
|
|
4222
|
-
challengeId: paramsOrFirst,
|
|
4223
|
-
credential: rest[0],
|
|
4224
|
-
};
|
|
4225
|
-
}
|
|
4226
|
-
const challengeId = params.challengeId;
|
|
4227
|
-
const credential = params.credential;
|
|
4228
|
-
if (typeof challengeId === 'undefined') {
|
|
4229
|
-
throw new AppwriteException('Missing required parameter: "challengeId"');
|
|
4230
|
-
}
|
|
4231
|
-
if (typeof credential === 'undefined') {
|
|
4232
|
-
throw new AppwriteException('Missing required parameter: "credential"');
|
|
4233
|
-
}
|
|
4234
|
-
const apiPath = '/account/tokens/passkey';
|
|
4235
|
-
const apiPayload = {};
|
|
4236
|
-
if (typeof challengeId !== 'undefined') {
|
|
4237
|
-
apiPayload['challengeId'] = challengeId;
|
|
4238
|
-
}
|
|
4239
|
-
if (typeof credential !== 'undefined') {
|
|
4240
|
-
apiPayload['credential'] = credential;
|
|
4241
|
-
}
|
|
4242
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4243
|
-
const apiHeaders = {
|
|
4244
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
4245
|
-
'content-type': 'application/json',
|
|
4246
|
-
accept: 'application/json',
|
|
4247
|
-
};
|
|
4248
|
-
return this.client.call('put', uri, apiHeaders, apiPayload);
|
|
4249
|
-
}
|
|
4250
4029
|
createPhoneToken(paramsOrFirst, ...rest) {
|
|
4251
4030
|
let params;
|
|
4252
4031
|
if (paramsOrFirst &&
|
|
@@ -4593,135 +4372,6 @@ class Activities {
|
|
|
4593
4372
|
}
|
|
4594
4373
|
}
|
|
4595
4374
|
|
|
4596
|
-
class Admin {
|
|
4597
|
-
constructor(client) {
|
|
4598
|
-
this.client = client;
|
|
4599
|
-
}
|
|
4600
|
-
/**
|
|
4601
|
-
* Delete everything cached from the platform database in the region serving the request.
|
|
4602
|
-
*
|
|
4603
|
-
* @throws {AppwriteException}
|
|
4604
|
-
* @returns {Promise<{}>}
|
|
4605
|
-
*/
|
|
4606
|
-
deletePlatformCache() {
|
|
4607
|
-
const apiPath = '/admin/cache/platform';
|
|
4608
|
-
const apiPayload = {};
|
|
4609
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4610
|
-
const apiHeaders = {
|
|
4611
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
4612
|
-
'content-type': 'application/json',
|
|
4613
|
-
accept: 'application/json',
|
|
4614
|
-
};
|
|
4615
|
-
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
4616
|
-
}
|
|
4617
|
-
deletePlatformResourceCache(paramsOrFirst, ...rest) {
|
|
4618
|
-
let params;
|
|
4619
|
-
if (paramsOrFirst &&
|
|
4620
|
-
typeof paramsOrFirst === 'object' &&
|
|
4621
|
-
!Array.isArray(paramsOrFirst) &&
|
|
4622
|
-
('resourceType' in paramsOrFirst || 'resourceId' in paramsOrFirst)) {
|
|
4623
|
-
params = (paramsOrFirst || {});
|
|
4624
|
-
}
|
|
4625
|
-
else {
|
|
4626
|
-
params = {
|
|
4627
|
-
resourceType: paramsOrFirst,
|
|
4628
|
-
resourceId: rest[0],
|
|
4629
|
-
};
|
|
4630
|
-
}
|
|
4631
|
-
const resourceType = params.resourceType;
|
|
4632
|
-
const resourceId = params.resourceId;
|
|
4633
|
-
if (typeof resourceType === 'undefined') {
|
|
4634
|
-
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
4635
|
-
}
|
|
4636
|
-
const apiPath = '/admin/cache/platform/resources';
|
|
4637
|
-
const apiPayload = {};
|
|
4638
|
-
if (typeof resourceType !== 'undefined') {
|
|
4639
|
-
apiPayload['resourceType'] = resourceType;
|
|
4640
|
-
}
|
|
4641
|
-
if (typeof resourceId !== 'undefined') {
|
|
4642
|
-
apiPayload['resourceId'] = resourceId;
|
|
4643
|
-
}
|
|
4644
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4645
|
-
const apiHeaders = {
|
|
4646
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
4647
|
-
'content-type': 'application/json',
|
|
4648
|
-
accept: 'application/json',
|
|
4649
|
-
};
|
|
4650
|
-
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
4651
|
-
}
|
|
4652
|
-
deleteProjectCache(paramsOrFirst) {
|
|
4653
|
-
let params;
|
|
4654
|
-
if (paramsOrFirst &&
|
|
4655
|
-
typeof paramsOrFirst === 'object' &&
|
|
4656
|
-
!Array.isArray(paramsOrFirst)) {
|
|
4657
|
-
params = (paramsOrFirst || {});
|
|
4658
|
-
}
|
|
4659
|
-
else {
|
|
4660
|
-
params = {
|
|
4661
|
-
projectId: paramsOrFirst,
|
|
4662
|
-
};
|
|
4663
|
-
}
|
|
4664
|
-
const projectId = params.projectId;
|
|
4665
|
-
if (typeof projectId === 'undefined') {
|
|
4666
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
4667
|
-
}
|
|
4668
|
-
const apiPath = '/admin/cache/project';
|
|
4669
|
-
const apiPayload = {};
|
|
4670
|
-
if (typeof projectId !== 'undefined') {
|
|
4671
|
-
apiPayload['projectId'] = projectId;
|
|
4672
|
-
}
|
|
4673
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4674
|
-
const apiHeaders = {
|
|
4675
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
4676
|
-
'content-type': 'application/json',
|
|
4677
|
-
accept: 'application/json',
|
|
4678
|
-
};
|
|
4679
|
-
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
4680
|
-
}
|
|
4681
|
-
deleteProjectResourceCache(paramsOrFirst, ...rest) {
|
|
4682
|
-
let params;
|
|
4683
|
-
if (paramsOrFirst &&
|
|
4684
|
-
typeof paramsOrFirst === 'object' &&
|
|
4685
|
-
!Array.isArray(paramsOrFirst)) {
|
|
4686
|
-
params = (paramsOrFirst || {});
|
|
4687
|
-
}
|
|
4688
|
-
else {
|
|
4689
|
-
params = {
|
|
4690
|
-
projectId: paramsOrFirst,
|
|
4691
|
-
resourceType: rest[0],
|
|
4692
|
-
resourceId: rest[1],
|
|
4693
|
-
};
|
|
4694
|
-
}
|
|
4695
|
-
const projectId = params.projectId;
|
|
4696
|
-
const resourceType = params.resourceType;
|
|
4697
|
-
const resourceId = params.resourceId;
|
|
4698
|
-
if (typeof projectId === 'undefined') {
|
|
4699
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
4700
|
-
}
|
|
4701
|
-
if (typeof resourceType === 'undefined') {
|
|
4702
|
-
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
4703
|
-
}
|
|
4704
|
-
const apiPath = '/admin/cache/project/resources';
|
|
4705
|
-
const apiPayload = {};
|
|
4706
|
-
if (typeof projectId !== 'undefined') {
|
|
4707
|
-
apiPayload['projectId'] = projectId;
|
|
4708
|
-
}
|
|
4709
|
-
if (typeof resourceType !== 'undefined') {
|
|
4710
|
-
apiPayload['resourceType'] = resourceType;
|
|
4711
|
-
}
|
|
4712
|
-
if (typeof resourceId !== 'undefined') {
|
|
4713
|
-
apiPayload['resourceId'] = resourceId;
|
|
4714
|
-
}
|
|
4715
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4716
|
-
const apiHeaders = {
|
|
4717
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
4718
|
-
'content-type': 'application/json',
|
|
4719
|
-
accept: 'application/json',
|
|
4720
|
-
};
|
|
4721
|
-
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
4722
|
-
}
|
|
4723
|
-
}
|
|
4724
|
-
|
|
4725
4375
|
class Affiliates {
|
|
4726
4376
|
constructor(client) {
|
|
4727
4377
|
this.client = client;
|
|
@@ -4933,369 +4583,6 @@ class Affiliates {
|
|
|
4933
4583
|
}
|
|
4934
4584
|
}
|
|
4935
4585
|
|
|
4936
|
-
class Analytics {
|
|
4937
|
-
constructor(client) {
|
|
4938
|
-
this.client = client;
|
|
4939
|
-
}
|
|
4940
|
-
listProperties(paramsOrFirst, ...rest) {
|
|
4941
|
-
let params;
|
|
4942
|
-
if ((typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
|
|
4943
|
-
(paramsOrFirst &&
|
|
4944
|
-
typeof paramsOrFirst === 'object' &&
|
|
4945
|
-
!Array.isArray(paramsOrFirst))) {
|
|
4946
|
-
params = (paramsOrFirst || {});
|
|
4947
|
-
}
|
|
4948
|
-
else {
|
|
4949
|
-
params = {
|
|
4950
|
-
queries: paramsOrFirst,
|
|
4951
|
-
search: rest[0],
|
|
4952
|
-
total: rest[1],
|
|
4953
|
-
};
|
|
4954
|
-
}
|
|
4955
|
-
const queries = params.queries;
|
|
4956
|
-
const search = params.search;
|
|
4957
|
-
const total = params.total;
|
|
4958
|
-
const apiPath = '/analytics/properties';
|
|
4959
|
-
const apiPayload = {};
|
|
4960
|
-
if (typeof queries !== 'undefined') {
|
|
4961
|
-
apiPayload['queries'] = queries;
|
|
4962
|
-
}
|
|
4963
|
-
if (typeof search !== 'undefined') {
|
|
4964
|
-
apiPayload['search'] = search;
|
|
4965
|
-
}
|
|
4966
|
-
if (typeof total !== 'undefined') {
|
|
4967
|
-
apiPayload['total'] = total;
|
|
4968
|
-
}
|
|
4969
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4970
|
-
const apiHeaders = {
|
|
4971
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
4972
|
-
accept: 'application/json',
|
|
4973
|
-
};
|
|
4974
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
4975
|
-
}
|
|
4976
|
-
createProperty(paramsOrFirst, ...rest) {
|
|
4977
|
-
let params;
|
|
4978
|
-
if (paramsOrFirst &&
|
|
4979
|
-
typeof paramsOrFirst === 'object' &&
|
|
4980
|
-
!Array.isArray(paramsOrFirst)) {
|
|
4981
|
-
params = (paramsOrFirst || {});
|
|
4982
|
-
}
|
|
4983
|
-
else {
|
|
4984
|
-
params = {
|
|
4985
|
-
propertyId: paramsOrFirst,
|
|
4986
|
-
name: rest[0],
|
|
4987
|
-
domain: rest[1],
|
|
4988
|
-
timezone: rest[2],
|
|
4989
|
-
enabled: rest[3],
|
|
4990
|
-
xpublic: rest[4],
|
|
4991
|
-
allowedOrigins: rest[5],
|
|
4992
|
-
};
|
|
4993
|
-
}
|
|
4994
|
-
const propertyId = params.propertyId;
|
|
4995
|
-
const name = params.name;
|
|
4996
|
-
const domain = params.domain;
|
|
4997
|
-
const timezone = params.timezone;
|
|
4998
|
-
const enabled = params.enabled;
|
|
4999
|
-
const xpublic = params.xpublic;
|
|
5000
|
-
const allowedOrigins = params.allowedOrigins;
|
|
5001
|
-
if (typeof propertyId === 'undefined') {
|
|
5002
|
-
throw new AppwriteException('Missing required parameter: "propertyId"');
|
|
5003
|
-
}
|
|
5004
|
-
if (typeof name === 'undefined') {
|
|
5005
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
5006
|
-
}
|
|
5007
|
-
const apiPath = '/analytics/properties';
|
|
5008
|
-
const apiPayload = {};
|
|
5009
|
-
if (typeof propertyId !== 'undefined') {
|
|
5010
|
-
apiPayload['propertyId'] = propertyId;
|
|
5011
|
-
}
|
|
5012
|
-
if (typeof name !== 'undefined') {
|
|
5013
|
-
apiPayload['name'] = name;
|
|
5014
|
-
}
|
|
5015
|
-
if (typeof domain !== 'undefined') {
|
|
5016
|
-
apiPayload['domain'] = domain;
|
|
5017
|
-
}
|
|
5018
|
-
if (typeof timezone !== 'undefined') {
|
|
5019
|
-
apiPayload['timezone'] = timezone;
|
|
5020
|
-
}
|
|
5021
|
-
if (typeof enabled !== 'undefined') {
|
|
5022
|
-
apiPayload['enabled'] = enabled;
|
|
5023
|
-
}
|
|
5024
|
-
if (typeof xpublic !== 'undefined') {
|
|
5025
|
-
apiPayload['public'] = xpublic;
|
|
5026
|
-
}
|
|
5027
|
-
if (typeof allowedOrigins !== 'undefined') {
|
|
5028
|
-
apiPayload['allowedOrigins'] = allowedOrigins;
|
|
5029
|
-
}
|
|
5030
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5031
|
-
const apiHeaders = {
|
|
5032
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
5033
|
-
'content-type': 'application/json',
|
|
5034
|
-
accept: 'application/json',
|
|
5035
|
-
};
|
|
5036
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
5037
|
-
}
|
|
5038
|
-
getProperty(paramsOrFirst) {
|
|
5039
|
-
let params;
|
|
5040
|
-
if (paramsOrFirst &&
|
|
5041
|
-
typeof paramsOrFirst === 'object' &&
|
|
5042
|
-
!Array.isArray(paramsOrFirst)) {
|
|
5043
|
-
params = (paramsOrFirst || {});
|
|
5044
|
-
}
|
|
5045
|
-
else {
|
|
5046
|
-
params = {
|
|
5047
|
-
propertyId: paramsOrFirst,
|
|
5048
|
-
};
|
|
5049
|
-
}
|
|
5050
|
-
const propertyId = params.propertyId;
|
|
5051
|
-
if (typeof propertyId === 'undefined' || propertyId === '') {
|
|
5052
|
-
throw new AppwriteException('Missing required parameter: "propertyId"');
|
|
5053
|
-
}
|
|
5054
|
-
const apiPath = '/analytics/properties/{propertyId}'.replace('{propertyId}', encodeURIComponent(String(propertyId)));
|
|
5055
|
-
const apiPayload = {};
|
|
5056
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5057
|
-
const apiHeaders = {
|
|
5058
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
5059
|
-
accept: 'application/json',
|
|
5060
|
-
};
|
|
5061
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
5062
|
-
}
|
|
5063
|
-
updateProperty(paramsOrFirst, ...rest) {
|
|
5064
|
-
let params;
|
|
5065
|
-
if (paramsOrFirst &&
|
|
5066
|
-
typeof paramsOrFirst === 'object' &&
|
|
5067
|
-
!Array.isArray(paramsOrFirst)) {
|
|
5068
|
-
params = (paramsOrFirst || {});
|
|
5069
|
-
}
|
|
5070
|
-
else {
|
|
5071
|
-
params = {
|
|
5072
|
-
propertyId: paramsOrFirst,
|
|
5073
|
-
name: rest[0],
|
|
5074
|
-
domain: rest[1],
|
|
5075
|
-
timezone: rest[2],
|
|
5076
|
-
enabled: rest[3],
|
|
5077
|
-
xpublic: rest[4],
|
|
5078
|
-
allowedOrigins: rest[5],
|
|
5079
|
-
};
|
|
5080
|
-
}
|
|
5081
|
-
const propertyId = params.propertyId;
|
|
5082
|
-
const name = params.name;
|
|
5083
|
-
const domain = params.domain;
|
|
5084
|
-
const timezone = params.timezone;
|
|
5085
|
-
const enabled = params.enabled;
|
|
5086
|
-
const xpublic = params.xpublic;
|
|
5087
|
-
const allowedOrigins = params.allowedOrigins;
|
|
5088
|
-
if (typeof propertyId === 'undefined' || propertyId === '') {
|
|
5089
|
-
throw new AppwriteException('Missing required parameter: "propertyId"');
|
|
5090
|
-
}
|
|
5091
|
-
const apiPath = '/analytics/properties/{propertyId}'.replace('{propertyId}', encodeURIComponent(String(propertyId)));
|
|
5092
|
-
const apiPayload = {};
|
|
5093
|
-
if (typeof name !== 'undefined') {
|
|
5094
|
-
apiPayload['name'] = name;
|
|
5095
|
-
}
|
|
5096
|
-
if (typeof domain !== 'undefined') {
|
|
5097
|
-
apiPayload['domain'] = domain;
|
|
5098
|
-
}
|
|
5099
|
-
if (typeof timezone !== 'undefined') {
|
|
5100
|
-
apiPayload['timezone'] = timezone;
|
|
5101
|
-
}
|
|
5102
|
-
if (typeof enabled !== 'undefined') {
|
|
5103
|
-
apiPayload['enabled'] = enabled;
|
|
5104
|
-
}
|
|
5105
|
-
if (typeof xpublic !== 'undefined') {
|
|
5106
|
-
apiPayload['public'] = xpublic;
|
|
5107
|
-
}
|
|
5108
|
-
if (typeof allowedOrigins !== 'undefined') {
|
|
5109
|
-
apiPayload['allowedOrigins'] = allowedOrigins;
|
|
5110
|
-
}
|
|
5111
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5112
|
-
const apiHeaders = {
|
|
5113
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
5114
|
-
'content-type': 'application/json',
|
|
5115
|
-
accept: 'application/json',
|
|
5116
|
-
};
|
|
5117
|
-
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
5118
|
-
}
|
|
5119
|
-
deleteProperty(paramsOrFirst) {
|
|
5120
|
-
let params;
|
|
5121
|
-
if (paramsOrFirst &&
|
|
5122
|
-
typeof paramsOrFirst === 'object' &&
|
|
5123
|
-
!Array.isArray(paramsOrFirst)) {
|
|
5124
|
-
params = (paramsOrFirst || {});
|
|
5125
|
-
}
|
|
5126
|
-
else {
|
|
5127
|
-
params = {
|
|
5128
|
-
propertyId: paramsOrFirst,
|
|
5129
|
-
};
|
|
5130
|
-
}
|
|
5131
|
-
const propertyId = params.propertyId;
|
|
5132
|
-
if (typeof propertyId === 'undefined' || propertyId === '') {
|
|
5133
|
-
throw new AppwriteException('Missing required parameter: "propertyId"');
|
|
5134
|
-
}
|
|
5135
|
-
const apiPath = '/analytics/properties/{propertyId}'.replace('{propertyId}', encodeURIComponent(String(propertyId)));
|
|
5136
|
-
const apiPayload = {};
|
|
5137
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5138
|
-
const apiHeaders = {
|
|
5139
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
5140
|
-
'content-type': 'application/json',
|
|
5141
|
-
accept: 'application/json',
|
|
5142
|
-
};
|
|
5143
|
-
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
5144
|
-
}
|
|
5145
|
-
createEvent(paramsOrFirst, ...rest) {
|
|
5146
|
-
let params;
|
|
5147
|
-
if (paramsOrFirst &&
|
|
5148
|
-
typeof paramsOrFirst === 'object' &&
|
|
5149
|
-
!Array.isArray(paramsOrFirst)) {
|
|
5150
|
-
params = (paramsOrFirst || {});
|
|
5151
|
-
}
|
|
5152
|
-
else {
|
|
5153
|
-
params = {
|
|
5154
|
-
propertyId: paramsOrFirst,
|
|
5155
|
-
name: rest[0],
|
|
5156
|
-
url: rest[1],
|
|
5157
|
-
domain: rest[2],
|
|
5158
|
-
referrer: rest[3],
|
|
5159
|
-
screenWidth: rest[4],
|
|
5160
|
-
sessionHash: rest[5],
|
|
5161
|
-
scrollDepth: rest[6],
|
|
5162
|
-
engagementTime: rest[7],
|
|
5163
|
-
props: rest[8],
|
|
5164
|
-
userId: rest[9],
|
|
5165
|
-
ip: rest[10],
|
|
5166
|
-
userAgent: rest[11],
|
|
5167
|
-
};
|
|
5168
|
-
}
|
|
5169
|
-
const propertyId = params.propertyId;
|
|
5170
|
-
const name = params.name;
|
|
5171
|
-
const url = params.url;
|
|
5172
|
-
const domain = params.domain;
|
|
5173
|
-
const referrer = params.referrer;
|
|
5174
|
-
const screenWidth = params.screenWidth;
|
|
5175
|
-
const sessionHash = params.sessionHash;
|
|
5176
|
-
const scrollDepth = params.scrollDepth;
|
|
5177
|
-
const engagementTime = params.engagementTime;
|
|
5178
|
-
const props = params.props;
|
|
5179
|
-
const userId = params.userId;
|
|
5180
|
-
const ip = params.ip;
|
|
5181
|
-
const userAgent = params.userAgent;
|
|
5182
|
-
if (typeof propertyId === 'undefined' || propertyId === '') {
|
|
5183
|
-
throw new AppwriteException('Missing required parameter: "propertyId"');
|
|
5184
|
-
}
|
|
5185
|
-
if (typeof name === 'undefined') {
|
|
5186
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
5187
|
-
}
|
|
5188
|
-
if (typeof url === 'undefined') {
|
|
5189
|
-
throw new AppwriteException('Missing required parameter: "url"');
|
|
5190
|
-
}
|
|
5191
|
-
const apiPath = '/analytics/properties/{propertyId}/events'.replace('{propertyId}', encodeURIComponent(String(propertyId)));
|
|
5192
|
-
const apiPayload = {};
|
|
5193
|
-
if (typeof name !== 'undefined') {
|
|
5194
|
-
apiPayload['name'] = name;
|
|
5195
|
-
}
|
|
5196
|
-
if (typeof url !== 'undefined') {
|
|
5197
|
-
apiPayload['url'] = url;
|
|
5198
|
-
}
|
|
5199
|
-
if (typeof domain !== 'undefined') {
|
|
5200
|
-
apiPayload['domain'] = domain;
|
|
5201
|
-
}
|
|
5202
|
-
if (typeof referrer !== 'undefined') {
|
|
5203
|
-
apiPayload['referrer'] = referrer;
|
|
5204
|
-
}
|
|
5205
|
-
if (typeof screenWidth !== 'undefined') {
|
|
5206
|
-
apiPayload['screenWidth'] = screenWidth;
|
|
5207
|
-
}
|
|
5208
|
-
if (typeof sessionHash !== 'undefined') {
|
|
5209
|
-
apiPayload['sessionHash'] = sessionHash;
|
|
5210
|
-
}
|
|
5211
|
-
if (typeof scrollDepth !== 'undefined') {
|
|
5212
|
-
apiPayload['scrollDepth'] = scrollDepth;
|
|
5213
|
-
}
|
|
5214
|
-
if (typeof engagementTime !== 'undefined') {
|
|
5215
|
-
apiPayload['engagementTime'] = engagementTime;
|
|
5216
|
-
}
|
|
5217
|
-
if (typeof props !== 'undefined') {
|
|
5218
|
-
apiPayload['props'] = props;
|
|
5219
|
-
}
|
|
5220
|
-
if (typeof userId !== 'undefined') {
|
|
5221
|
-
apiPayload['userId'] = userId;
|
|
5222
|
-
}
|
|
5223
|
-
if (typeof ip !== 'undefined') {
|
|
5224
|
-
apiPayload['ip'] = ip;
|
|
5225
|
-
}
|
|
5226
|
-
if (typeof userAgent !== 'undefined') {
|
|
5227
|
-
apiPayload['userAgent'] = userAgent;
|
|
5228
|
-
}
|
|
5229
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5230
|
-
const apiHeaders = {
|
|
5231
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
5232
|
-
'content-type': 'application/json',
|
|
5233
|
-
accept: 'application/json',
|
|
5234
|
-
};
|
|
5235
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
5236
|
-
}
|
|
5237
|
-
listMetrics(paramsOrFirst, ...rest) {
|
|
5238
|
-
let params;
|
|
5239
|
-
if (paramsOrFirst &&
|
|
5240
|
-
typeof paramsOrFirst === 'object' &&
|
|
5241
|
-
!Array.isArray(paramsOrFirst)) {
|
|
5242
|
-
params = (paramsOrFirst || {});
|
|
5243
|
-
}
|
|
5244
|
-
else {
|
|
5245
|
-
params = {
|
|
5246
|
-
propertyId: paramsOrFirst,
|
|
5247
|
-
queries: rest[0],
|
|
5248
|
-
interval: rest[1],
|
|
5249
|
-
dimensions: rest[2],
|
|
5250
|
-
dateRange: rest[3],
|
|
5251
|
-
startAt: rest[4],
|
|
5252
|
-
endAt: rest[5],
|
|
5253
|
-
limit: rest[6],
|
|
5254
|
-
};
|
|
5255
|
-
}
|
|
5256
|
-
const propertyId = params.propertyId;
|
|
5257
|
-
const queries = params.queries;
|
|
5258
|
-
const interval = params.interval;
|
|
5259
|
-
const dimensions = params.dimensions;
|
|
5260
|
-
const dateRange = params.dateRange;
|
|
5261
|
-
const startAt = params.startAt;
|
|
5262
|
-
const endAt = params.endAt;
|
|
5263
|
-
const limit = params.limit;
|
|
5264
|
-
if (typeof propertyId === 'undefined' || propertyId === '') {
|
|
5265
|
-
throw new AppwriteException('Missing required parameter: "propertyId"');
|
|
5266
|
-
}
|
|
5267
|
-
const apiPath = '/analytics/properties/{propertyId}/metrics'.replace('{propertyId}', encodeURIComponent(String(propertyId)));
|
|
5268
|
-
const apiPayload = {};
|
|
5269
|
-
if (typeof queries !== 'undefined') {
|
|
5270
|
-
apiPayload['queries'] = queries;
|
|
5271
|
-
}
|
|
5272
|
-
if (typeof interval !== 'undefined') {
|
|
5273
|
-
apiPayload['interval'] = interval;
|
|
5274
|
-
}
|
|
5275
|
-
if (typeof dimensions !== 'undefined') {
|
|
5276
|
-
apiPayload['dimensions'] = dimensions;
|
|
5277
|
-
}
|
|
5278
|
-
if (typeof dateRange !== 'undefined') {
|
|
5279
|
-
apiPayload['dateRange'] = dateRange;
|
|
5280
|
-
}
|
|
5281
|
-
if (typeof startAt !== 'undefined') {
|
|
5282
|
-
apiPayload['startAt'] = startAt;
|
|
5283
|
-
}
|
|
5284
|
-
if (typeof endAt !== 'undefined') {
|
|
5285
|
-
apiPayload['endAt'] = endAt;
|
|
5286
|
-
}
|
|
5287
|
-
if (typeof limit !== 'undefined') {
|
|
5288
|
-
apiPayload['limit'] = limit;
|
|
5289
|
-
}
|
|
5290
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5291
|
-
const apiHeaders = {
|
|
5292
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
5293
|
-
accept: 'application/json',
|
|
5294
|
-
};
|
|
5295
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
5296
|
-
}
|
|
5297
|
-
}
|
|
5298
|
-
|
|
5299
4586
|
class Apps {
|
|
5300
4587
|
constructor(client) {
|
|
5301
4588
|
this.client = client;
|
|
@@ -6188,7 +5475,7 @@ class Avatars {
|
|
|
6188
5475
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6189
5476
|
apiPayload['project'] = this.client.config.project;
|
|
6190
5477
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6191
|
-
for (const [key, value] of Object.entries(
|
|
5478
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6192
5479
|
uri.searchParams.append(key, value);
|
|
6193
5480
|
}
|
|
6194
5481
|
return uri.toString();
|
|
@@ -6233,7 +5520,7 @@ class Avatars {
|
|
|
6233
5520
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6234
5521
|
apiPayload['project'] = this.client.config.project;
|
|
6235
5522
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6236
|
-
for (const [key, value] of Object.entries(
|
|
5523
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6237
5524
|
uri.searchParams.append(key, value);
|
|
6238
5525
|
}
|
|
6239
5526
|
return uri.toString();
|
|
@@ -6262,7 +5549,7 @@ class Avatars {
|
|
|
6262
5549
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6263
5550
|
apiPayload['project'] = this.client.config.project;
|
|
6264
5551
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6265
|
-
for (const [key, value] of Object.entries(
|
|
5552
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6266
5553
|
uri.searchParams.append(key, value);
|
|
6267
5554
|
}
|
|
6268
5555
|
return uri.toString();
|
|
@@ -6307,7 +5594,7 @@ class Avatars {
|
|
|
6307
5594
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6308
5595
|
apiPayload['project'] = this.client.config.project;
|
|
6309
5596
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6310
|
-
for (const [key, value] of Object.entries(
|
|
5597
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6311
5598
|
uri.searchParams.append(key, value);
|
|
6312
5599
|
}
|
|
6313
5600
|
return uri.toString();
|
|
@@ -6346,7 +5633,7 @@ class Avatars {
|
|
|
6346
5633
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6347
5634
|
apiPayload['project'] = this.client.config.project;
|
|
6348
5635
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6349
|
-
for (const [key, value] of Object.entries(
|
|
5636
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6350
5637
|
uri.searchParams.append(key, value);
|
|
6351
5638
|
}
|
|
6352
5639
|
return uri.toString();
|
|
@@ -6388,7 +5675,7 @@ class Avatars {
|
|
|
6388
5675
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6389
5676
|
apiPayload['project'] = this.client.config.project;
|
|
6390
5677
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6391
|
-
for (const [key, value] of Object.entries(
|
|
5678
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6392
5679
|
uri.searchParams.append(key, value);
|
|
6393
5680
|
}
|
|
6394
5681
|
return uri.toString();
|
|
@@ -6450,7 +5737,7 @@ class Avatars {
|
|
|
6450
5737
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6451
5738
|
apiPayload['project'] = this.client.config.project;
|
|
6452
5739
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6453
|
-
for (const [key, value] of Object.entries(
|
|
5740
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6454
5741
|
uri.searchParams.append(key, value);
|
|
6455
5742
|
}
|
|
6456
5743
|
return uri.toString();
|
|
@@ -6544,7 +5831,7 @@ class Avatars {
|
|
|
6544
5831
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6545
5832
|
apiPayload['project'] = this.client.config.project;
|
|
6546
5833
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6547
|
-
for (const [key, value] of Object.entries(
|
|
5834
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6548
5835
|
uri.searchParams.append(key, value);
|
|
6549
5836
|
}
|
|
6550
5837
|
return uri.toString();
|
|
@@ -6668,7 +5955,7 @@ class Avatars {
|
|
|
6668
5955
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6669
5956
|
apiPayload['project'] = this.client.config.project;
|
|
6670
5957
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
6671
|
-
for (const [key, value] of Object.entries(
|
|
5958
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
6672
5959
|
uri.searchParams.append(key, value);
|
|
6673
5960
|
}
|
|
6674
5961
|
return uri.toString();
|
|
@@ -15428,6 +14715,7 @@ class Functions {
|
|
|
15428
14715
|
buildSpecification: rest[18],
|
|
15429
14716
|
runtimeSpecification: rest[19],
|
|
15430
14717
|
deploymentRetention: rest[20],
|
|
14718
|
+
interval: rest[21],
|
|
15431
14719
|
};
|
|
15432
14720
|
}
|
|
15433
14721
|
const functionId = params.functionId;
|
|
@@ -15452,6 +14740,7 @@ class Functions {
|
|
|
15452
14740
|
const buildSpecification = params.buildSpecification;
|
|
15453
14741
|
const runtimeSpecification = params.runtimeSpecification;
|
|
15454
14742
|
const deploymentRetention = params.deploymentRetention;
|
|
14743
|
+
const interval = params.interval;
|
|
15455
14744
|
if (typeof functionId === 'undefined') {
|
|
15456
14745
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
15457
14746
|
}
|
|
@@ -15529,6 +14818,9 @@ class Functions {
|
|
|
15529
14818
|
if (typeof deploymentRetention !== 'undefined') {
|
|
15530
14819
|
apiPayload['deploymentRetention'] = deploymentRetention;
|
|
15531
14820
|
}
|
|
14821
|
+
if (typeof interval !== 'undefined') {
|
|
14822
|
+
apiPayload['interval'] = interval;
|
|
14823
|
+
}
|
|
15532
14824
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
15533
14825
|
const apiHeaders = {
|
|
15534
14826
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -15726,6 +15018,7 @@ class Functions {
|
|
|
15726
15018
|
buildSpecification: rest[18],
|
|
15727
15019
|
runtimeSpecification: rest[19],
|
|
15728
15020
|
deploymentRetention: rest[20],
|
|
15021
|
+
interval: rest[21],
|
|
15729
15022
|
};
|
|
15730
15023
|
}
|
|
15731
15024
|
const functionId = params.functionId;
|
|
@@ -15750,6 +15043,7 @@ class Functions {
|
|
|
15750
15043
|
const buildSpecification = params.buildSpecification;
|
|
15751
15044
|
const runtimeSpecification = params.runtimeSpecification;
|
|
15752
15045
|
const deploymentRetention = params.deploymentRetention;
|
|
15046
|
+
const interval = params.interval;
|
|
15753
15047
|
if (typeof functionId === 'undefined' || functionId === '') {
|
|
15754
15048
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
15755
15049
|
}
|
|
@@ -15821,6 +15115,9 @@ class Functions {
|
|
|
15821
15115
|
if (typeof deploymentRetention !== 'undefined') {
|
|
15822
15116
|
apiPayload['deploymentRetention'] = deploymentRetention;
|
|
15823
15117
|
}
|
|
15118
|
+
if (typeof interval !== 'undefined') {
|
|
15119
|
+
apiPayload['interval'] = interval;
|
|
15120
|
+
}
|
|
15824
15121
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
15825
15122
|
const apiHeaders = {
|
|
15826
15123
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -16244,7 +15541,7 @@ class Functions {
|
|
|
16244
15541
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
16245
15542
|
apiPayload['project'] = this.client.config.project;
|
|
16246
15543
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
16247
|
-
for (const [key, value] of Object.entries(
|
|
15544
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
16248
15545
|
uri.searchParams.append(key, value);
|
|
16249
15546
|
}
|
|
16250
15547
|
return uri.toString();
|
|
@@ -26883,7 +26180,7 @@ class Organizations {
|
|
|
26883
26180
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
26884
26181
|
apiPayload['project'] = this.client.config.project;
|
|
26885
26182
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
26886
|
-
for (const [key, value] of Object.entries(
|
|
26183
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
26887
26184
|
uri.searchParams.append(key, value);
|
|
26888
26185
|
}
|
|
26889
26186
|
return uri.toString();
|
|
@@ -26990,7 +26287,7 @@ class Organizations {
|
|
|
26990
26287
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
26991
26288
|
apiPayload['project'] = this.client.config.project;
|
|
26992
26289
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
26993
|
-
for (const [key, value] of Object.entries(
|
|
26290
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
26994
26291
|
uri.searchParams.append(key, value);
|
|
26995
26292
|
}
|
|
26996
26293
|
return uri.toString();
|
|
@@ -32486,38 +31783,6 @@ class Project {
|
|
|
32486
31783
|
};
|
|
32487
31784
|
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
32488
31785
|
}
|
|
32489
|
-
updatePasskeyPolicy(paramsOrFirst, ...rest) {
|
|
32490
|
-
let params;
|
|
32491
|
-
if ((typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
|
|
32492
|
-
(paramsOrFirst &&
|
|
32493
|
-
typeof paramsOrFirst === 'object' &&
|
|
32494
|
-
!Array.isArray(paramsOrFirst))) {
|
|
32495
|
-
params = (paramsOrFirst || {});
|
|
32496
|
-
}
|
|
32497
|
-
else {
|
|
32498
|
-
params = {
|
|
32499
|
-
rpId: paramsOrFirst,
|
|
32500
|
-
origins: rest[0],
|
|
32501
|
-
};
|
|
32502
|
-
}
|
|
32503
|
-
const rpId = params.rpId;
|
|
32504
|
-
const origins = params.origins;
|
|
32505
|
-
const apiPath = '/project/policies/passkey';
|
|
32506
|
-
const apiPayload = {};
|
|
32507
|
-
if (typeof rpId !== 'undefined') {
|
|
32508
|
-
apiPayload['rpId'] = rpId;
|
|
32509
|
-
}
|
|
32510
|
-
if (typeof origins !== 'undefined') {
|
|
32511
|
-
apiPayload['origins'] = origins;
|
|
32512
|
-
}
|
|
32513
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
32514
|
-
const apiHeaders = {
|
|
32515
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
32516
|
-
'content-type': 'application/json',
|
|
32517
|
-
accept: 'application/json',
|
|
32518
|
-
};
|
|
32519
|
-
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
32520
|
-
}
|
|
32521
31786
|
updatePasswordDictionaryPolicy(paramsOrFirst) {
|
|
32522
31787
|
let params;
|
|
32523
31788
|
if (paramsOrFirst &&
|
|
@@ -33601,6 +32866,7 @@ class Projects {
|
|
|
33601
32866
|
schedule: rest[2],
|
|
33602
32867
|
active: rest[3],
|
|
33603
32868
|
data: rest[4],
|
|
32869
|
+
interval: rest[5],
|
|
33604
32870
|
};
|
|
33605
32871
|
}
|
|
33606
32872
|
const projectId = params.projectId;
|
|
@@ -33609,6 +32875,7 @@ class Projects {
|
|
|
33609
32875
|
const schedule = params.schedule;
|
|
33610
32876
|
const active = params.active;
|
|
33611
32877
|
const data = params.data;
|
|
32878
|
+
const interval = params.interval;
|
|
33612
32879
|
if (typeof projectId === 'undefined' || projectId === '') {
|
|
33613
32880
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
33614
32881
|
}
|
|
@@ -33618,9 +32885,6 @@ class Projects {
|
|
|
33618
32885
|
if (typeof resourceId === 'undefined') {
|
|
33619
32886
|
throw new AppwriteException('Missing required parameter: "resourceId"');
|
|
33620
32887
|
}
|
|
33621
|
-
if (typeof schedule === 'undefined') {
|
|
33622
|
-
throw new AppwriteException('Missing required parameter: "schedule"');
|
|
33623
|
-
}
|
|
33624
32888
|
const apiPath = '/projects/{projectId}/schedules'.replace('{projectId}', encodeURIComponent(String(projectId)));
|
|
33625
32889
|
const apiPayload = {};
|
|
33626
32890
|
if (typeof resourceType !== 'undefined') {
|
|
@@ -33638,6 +32902,9 @@ class Projects {
|
|
|
33638
32902
|
if (typeof data !== 'undefined') {
|
|
33639
32903
|
apiPayload['data'] = data;
|
|
33640
32904
|
}
|
|
32905
|
+
if (typeof interval !== 'undefined') {
|
|
32906
|
+
apiPayload['interval'] = interval;
|
|
32907
|
+
}
|
|
33641
32908
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
33642
32909
|
const apiHeaders = {
|
|
33643
32910
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -35206,7 +34473,7 @@ class Sites {
|
|
|
35206
34473
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
35207
34474
|
apiPayload['project'] = this.client.config.project;
|
|
35208
34475
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
35209
|
-
for (const [key, value] of Object.entries(
|
|
34476
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
35210
34477
|
uri.searchParams.append(key, value);
|
|
35211
34478
|
}
|
|
35212
34479
|
return uri.toString();
|
|
@@ -36037,7 +35304,7 @@ class Storage {
|
|
|
36037
35304
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
36038
35305
|
apiPayload['project'] = this.client.config.project;
|
|
36039
35306
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
36040
|
-
for (const [key, value] of Object.entries(
|
|
35307
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
36041
35308
|
uri.searchParams.append(key, value);
|
|
36042
35309
|
}
|
|
36043
35310
|
return uri.toString();
|
|
@@ -36130,7 +35397,7 @@ class Storage {
|
|
|
36130
35397
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
36131
35398
|
apiPayload['project'] = this.client.config.project;
|
|
36132
35399
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
36133
|
-
for (const [key, value] of Object.entries(
|
|
35400
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
36134
35401
|
uri.searchParams.append(key, value);
|
|
36135
35402
|
}
|
|
36136
35403
|
return uri.toString();
|
|
@@ -36168,7 +35435,7 @@ class Storage {
|
|
|
36168
35435
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
36169
35436
|
apiPayload['project'] = this.client.config.project;
|
|
36170
35437
|
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
36171
|
-
for (const [key, value] of Object.entries(
|
|
35438
|
+
for (const [key, value] of Object.entries(Service.flatten(apiPayload))) {
|
|
36172
35439
|
uri.searchParams.append(key, value);
|
|
36173
35440
|
}
|
|
36174
35441
|
return uri.toString();
|
|
@@ -42479,106 +41746,6 @@ class Users {
|
|
|
42479
41746
|
};
|
|
42480
41747
|
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
42481
41748
|
}
|
|
42482
|
-
listPasskeys(paramsOrFirst, ...rest) {
|
|
42483
|
-
let params;
|
|
42484
|
-
if (paramsOrFirst &&
|
|
42485
|
-
typeof paramsOrFirst === 'object' &&
|
|
42486
|
-
!Array.isArray(paramsOrFirst)) {
|
|
42487
|
-
params = (paramsOrFirst || {});
|
|
42488
|
-
}
|
|
42489
|
-
else {
|
|
42490
|
-
params = {
|
|
42491
|
-
userId: paramsOrFirst,
|
|
42492
|
-
queries: rest[0],
|
|
42493
|
-
total: rest[1],
|
|
42494
|
-
};
|
|
42495
|
-
}
|
|
42496
|
-
const userId = params.userId;
|
|
42497
|
-
const queries = params.queries;
|
|
42498
|
-
const total = params.total;
|
|
42499
|
-
if (typeof userId === 'undefined' || userId === '') {
|
|
42500
|
-
throw new AppwriteException('Missing required parameter: "userId"');
|
|
42501
|
-
}
|
|
42502
|
-
const apiPath = '/users/{userId}/passkeys'.replace('{userId}', encodeURIComponent(String(userId)));
|
|
42503
|
-
const apiPayload = {};
|
|
42504
|
-
if (typeof queries !== 'undefined') {
|
|
42505
|
-
apiPayload['queries'] = queries;
|
|
42506
|
-
}
|
|
42507
|
-
if (typeof total !== 'undefined') {
|
|
42508
|
-
apiPayload['total'] = total;
|
|
42509
|
-
}
|
|
42510
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
42511
|
-
const apiHeaders = {
|
|
42512
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
42513
|
-
accept: 'application/json',
|
|
42514
|
-
};
|
|
42515
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
42516
|
-
}
|
|
42517
|
-
getPasskey(paramsOrFirst, ...rest) {
|
|
42518
|
-
let params;
|
|
42519
|
-
if (paramsOrFirst &&
|
|
42520
|
-
typeof paramsOrFirst === 'object' &&
|
|
42521
|
-
!Array.isArray(paramsOrFirst)) {
|
|
42522
|
-
params = (paramsOrFirst || {});
|
|
42523
|
-
}
|
|
42524
|
-
else {
|
|
42525
|
-
params = {
|
|
42526
|
-
userId: paramsOrFirst,
|
|
42527
|
-
passkeyId: rest[0],
|
|
42528
|
-
};
|
|
42529
|
-
}
|
|
42530
|
-
const userId = params.userId;
|
|
42531
|
-
const passkeyId = params.passkeyId;
|
|
42532
|
-
if (typeof userId === 'undefined' || userId === '') {
|
|
42533
|
-
throw new AppwriteException('Missing required parameter: "userId"');
|
|
42534
|
-
}
|
|
42535
|
-
if (typeof passkeyId === 'undefined' || passkeyId === '') {
|
|
42536
|
-
throw new AppwriteException('Missing required parameter: "passkeyId"');
|
|
42537
|
-
}
|
|
42538
|
-
const apiPath = '/users/{userId}/passkeys/{passkeyId}'
|
|
42539
|
-
.replace('{userId}', encodeURIComponent(String(userId)))
|
|
42540
|
-
.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
|
|
42541
|
-
const apiPayload = {};
|
|
42542
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
42543
|
-
const apiHeaders = {
|
|
42544
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
42545
|
-
accept: 'application/json',
|
|
42546
|
-
};
|
|
42547
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
42548
|
-
}
|
|
42549
|
-
deletePasskey(paramsOrFirst, ...rest) {
|
|
42550
|
-
let params;
|
|
42551
|
-
if (paramsOrFirst &&
|
|
42552
|
-
typeof paramsOrFirst === 'object' &&
|
|
42553
|
-
!Array.isArray(paramsOrFirst)) {
|
|
42554
|
-
params = (paramsOrFirst || {});
|
|
42555
|
-
}
|
|
42556
|
-
else {
|
|
42557
|
-
params = {
|
|
42558
|
-
userId: paramsOrFirst,
|
|
42559
|
-
passkeyId: rest[0],
|
|
42560
|
-
};
|
|
42561
|
-
}
|
|
42562
|
-
const userId = params.userId;
|
|
42563
|
-
const passkeyId = params.passkeyId;
|
|
42564
|
-
if (typeof userId === 'undefined' || userId === '') {
|
|
42565
|
-
throw new AppwriteException('Missing required parameter: "userId"');
|
|
42566
|
-
}
|
|
42567
|
-
if (typeof passkeyId === 'undefined' || passkeyId === '') {
|
|
42568
|
-
throw new AppwriteException('Missing required parameter: "passkeyId"');
|
|
42569
|
-
}
|
|
42570
|
-
const apiPath = '/users/{userId}/passkeys/{passkeyId}'
|
|
42571
|
-
.replace('{userId}', encodeURIComponent(String(userId)))
|
|
42572
|
-
.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
|
|
42573
|
-
const apiPayload = {};
|
|
42574
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
42575
|
-
const apiHeaders = {
|
|
42576
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
42577
|
-
'content-type': 'application/json',
|
|
42578
|
-
accept: 'application/json',
|
|
42579
|
-
};
|
|
42580
|
-
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
42581
|
-
}
|
|
42582
41749
|
updatePassword(paramsOrFirst, ...rest) {
|
|
42583
41750
|
let params;
|
|
42584
41751
|
if (paramsOrFirst &&
|
|
@@ -45085,11 +44252,11 @@ class VectorsDB {
|
|
|
45085
44252
|
}
|
|
45086
44253
|
}
|
|
45087
44254
|
|
|
45088
|
-
class
|
|
44255
|
+
class Waf {
|
|
45089
44256
|
constructor(client) {
|
|
45090
44257
|
this.client = client;
|
|
45091
44258
|
}
|
|
45092
|
-
|
|
44259
|
+
listRules(paramsOrFirst, ...rest) {
|
|
45093
44260
|
let params;
|
|
45094
44261
|
if ((typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
|
|
45095
44262
|
(paramsOrFirst &&
|
|
@@ -45107,7 +44274,7 @@ class Videos {
|
|
|
45107
44274
|
const queries = params.queries;
|
|
45108
44275
|
const search = params.search;
|
|
45109
44276
|
const total = params.total;
|
|
45110
|
-
const apiPath = '/
|
|
44277
|
+
const apiPath = '/waf/rules';
|
|
45111
44278
|
const apiPayload = {};
|
|
45112
44279
|
if (typeof queries !== 'undefined') {
|
|
45113
44280
|
apiPayload['queries'] = queries;
|
|
@@ -45125,7 +44292,7 @@ class Videos {
|
|
|
45125
44292
|
};
|
|
45126
44293
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
45127
44294
|
}
|
|
45128
|
-
|
|
44295
|
+
createBypassRule(paramsOrFirst, ...rest) {
|
|
45129
44296
|
let params;
|
|
45130
44297
|
if (paramsOrFirst &&
|
|
45131
44298
|
typeof paramsOrFirst === 'object' &&
|
|
@@ -45134,66 +44301,68 @@ class Videos {
|
|
|
45134
44301
|
}
|
|
45135
44302
|
else {
|
|
45136
44303
|
params = {
|
|
45137
|
-
|
|
45138
|
-
|
|
44304
|
+
ruleId: paramsOrFirst,
|
|
44305
|
+
resourceType: rest[0],
|
|
45139
44306
|
name: rest[1],
|
|
44307
|
+
resourceId: rest[2],
|
|
44308
|
+
description: rest[3],
|
|
44309
|
+
priority: rest[4],
|
|
44310
|
+
enabled: rest[5],
|
|
44311
|
+
conditions: rest[6],
|
|
45140
44312
|
};
|
|
45141
44313
|
}
|
|
45142
|
-
const
|
|
45143
|
-
const
|
|
44314
|
+
const ruleId = params.ruleId;
|
|
44315
|
+
const resourceType = params.resourceType;
|
|
45144
44316
|
const name = params.name;
|
|
45145
|
-
|
|
45146
|
-
|
|
44317
|
+
const resourceId = params.resourceId;
|
|
44318
|
+
const description = params.description;
|
|
44319
|
+
const priority = params.priority;
|
|
44320
|
+
const enabled = params.enabled;
|
|
44321
|
+
const conditions = params.conditions;
|
|
44322
|
+
if (typeof ruleId === 'undefined') {
|
|
44323
|
+
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
45147
44324
|
}
|
|
45148
|
-
if (typeof
|
|
45149
|
-
throw new AppwriteException('Missing required parameter: "
|
|
44325
|
+
if (typeof resourceType === 'undefined') {
|
|
44326
|
+
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
44327
|
+
}
|
|
44328
|
+
if (typeof name === 'undefined') {
|
|
44329
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
45150
44330
|
}
|
|
45151
|
-
const apiPath = '/
|
|
44331
|
+
const apiPath = '/waf/rules/bypass';
|
|
45152
44332
|
const apiPayload = {};
|
|
45153
|
-
if (typeof
|
|
45154
|
-
apiPayload['
|
|
44333
|
+
if (typeof ruleId !== 'undefined') {
|
|
44334
|
+
apiPayload['ruleId'] = ruleId;
|
|
45155
44335
|
}
|
|
45156
|
-
if (typeof
|
|
45157
|
-
apiPayload['
|
|
44336
|
+
if (typeof resourceType !== 'undefined') {
|
|
44337
|
+
apiPayload['resourceType'] = resourceType;
|
|
44338
|
+
}
|
|
44339
|
+
if (typeof resourceId !== 'undefined') {
|
|
44340
|
+
apiPayload['resourceId'] = resourceId;
|
|
45158
44341
|
}
|
|
45159
44342
|
if (typeof name !== 'undefined') {
|
|
45160
44343
|
apiPayload['name'] = name;
|
|
45161
44344
|
}
|
|
45162
|
-
|
|
45163
|
-
|
|
45164
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
45165
|
-
'content-type': 'application/json',
|
|
45166
|
-
accept: 'application/json',
|
|
45167
|
-
};
|
|
45168
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
45169
|
-
}
|
|
45170
|
-
listProfiles(paramsOrFirst) {
|
|
45171
|
-
let params;
|
|
45172
|
-
if (typeof paramsOrFirst === 'undefined' ||
|
|
45173
|
-
(paramsOrFirst &&
|
|
45174
|
-
typeof paramsOrFirst === 'object' &&
|
|
45175
|
-
!Array.isArray(paramsOrFirst))) {
|
|
45176
|
-
params = (paramsOrFirst || {});
|
|
44345
|
+
if (typeof description !== 'undefined') {
|
|
44346
|
+
apiPayload['description'] = description;
|
|
45177
44347
|
}
|
|
45178
|
-
|
|
45179
|
-
|
|
45180
|
-
search: paramsOrFirst,
|
|
45181
|
-
};
|
|
44348
|
+
if (typeof priority !== 'undefined') {
|
|
44349
|
+
apiPayload['priority'] = priority;
|
|
45182
44350
|
}
|
|
45183
|
-
|
|
45184
|
-
|
|
45185
|
-
|
|
45186
|
-
if (typeof
|
|
45187
|
-
apiPayload['
|
|
44351
|
+
if (typeof enabled !== 'undefined') {
|
|
44352
|
+
apiPayload['enabled'] = enabled;
|
|
44353
|
+
}
|
|
44354
|
+
if (typeof conditions !== 'undefined') {
|
|
44355
|
+
apiPayload['conditions'] = conditions;
|
|
45188
44356
|
}
|
|
45189
44357
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45190
44358
|
const apiHeaders = {
|
|
45191
44359
|
'X-Appwrite-Project': this.client.config.project,
|
|
44360
|
+
'content-type': 'application/json',
|
|
45192
44361
|
accept: 'application/json',
|
|
45193
44362
|
};
|
|
45194
|
-
return this.client.call('
|
|
44363
|
+
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
45195
44364
|
}
|
|
45196
|
-
|
|
44365
|
+
updateBypassRule(paramsOrFirst, ...rest) {
|
|
45197
44366
|
let params;
|
|
45198
44367
|
if (paramsOrFirst &&
|
|
45199
44368
|
typeof paramsOrFirst === 'object' &&
|
|
@@ -45202,49 +44371,49 @@ class Videos {
|
|
|
45202
44371
|
}
|
|
45203
44372
|
else {
|
|
45204
44373
|
params = {
|
|
45205
|
-
|
|
45206
|
-
|
|
45207
|
-
|
|
45208
|
-
|
|
45209
|
-
|
|
44374
|
+
ruleId: paramsOrFirst,
|
|
44375
|
+
resourceType: rest[0],
|
|
44376
|
+
resourceId: rest[1],
|
|
44377
|
+
name: rest[2],
|
|
44378
|
+
description: rest[3],
|
|
44379
|
+
priority: rest[4],
|
|
44380
|
+
enabled: rest[5],
|
|
44381
|
+
conditions: rest[6],
|
|
45210
44382
|
};
|
|
45211
44383
|
}
|
|
44384
|
+
const ruleId = params.ruleId;
|
|
44385
|
+
const resourceType = params.resourceType;
|
|
44386
|
+
const resourceId = params.resourceId;
|
|
45212
44387
|
const name = params.name;
|
|
45213
|
-
const
|
|
45214
|
-
const
|
|
45215
|
-
const
|
|
45216
|
-
const
|
|
45217
|
-
if (typeof
|
|
45218
|
-
throw new AppwriteException('Missing required parameter: "
|
|
45219
|
-
}
|
|
45220
|
-
if (typeof videoBitRate === 'undefined') {
|
|
45221
|
-
throw new AppwriteException('Missing required parameter: "videoBitRate"');
|
|
45222
|
-
}
|
|
45223
|
-
if (typeof audioBitRate === 'undefined') {
|
|
45224
|
-
throw new AppwriteException('Missing required parameter: "audioBitRate"');
|
|
44388
|
+
const description = params.description;
|
|
44389
|
+
const priority = params.priority;
|
|
44390
|
+
const enabled = params.enabled;
|
|
44391
|
+
const conditions = params.conditions;
|
|
44392
|
+
if (typeof ruleId === 'undefined' || ruleId === '') {
|
|
44393
|
+
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
45225
44394
|
}
|
|
45226
|
-
|
|
45227
|
-
|
|
44395
|
+
const apiPath = '/waf/rules/bypass/{ruleId}'.replace('{ruleId}', encodeURIComponent(String(ruleId)));
|
|
44396
|
+
const apiPayload = {};
|
|
44397
|
+
if (typeof resourceType !== 'undefined') {
|
|
44398
|
+
apiPayload['resourceType'] = resourceType;
|
|
45228
44399
|
}
|
|
45229
|
-
if (typeof
|
|
45230
|
-
|
|
44400
|
+
if (typeof resourceId !== 'undefined') {
|
|
44401
|
+
apiPayload['resourceId'] = resourceId;
|
|
45231
44402
|
}
|
|
45232
|
-
const apiPath = '/videos/profiles';
|
|
45233
|
-
const apiPayload = {};
|
|
45234
44403
|
if (typeof name !== 'undefined') {
|
|
45235
44404
|
apiPayload['name'] = name;
|
|
45236
44405
|
}
|
|
45237
|
-
if (typeof
|
|
45238
|
-
apiPayload['
|
|
44406
|
+
if (typeof description !== 'undefined') {
|
|
44407
|
+
apiPayload['description'] = description;
|
|
45239
44408
|
}
|
|
45240
|
-
if (typeof
|
|
45241
|
-
apiPayload['
|
|
44409
|
+
if (typeof priority !== 'undefined') {
|
|
44410
|
+
apiPayload['priority'] = priority;
|
|
45242
44411
|
}
|
|
45243
|
-
if (typeof
|
|
45244
|
-
apiPayload['
|
|
44412
|
+
if (typeof enabled !== 'undefined') {
|
|
44413
|
+
apiPayload['enabled'] = enabled;
|
|
45245
44414
|
}
|
|
45246
|
-
if (typeof
|
|
45247
|
-
apiPayload['
|
|
44415
|
+
if (typeof conditions !== 'undefined') {
|
|
44416
|
+
apiPayload['conditions'] = conditions;
|
|
45248
44417
|
}
|
|
45249
44418
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45250
44419
|
const apiHeaders = {
|
|
@@ -45252,34 +44421,9 @@ class Videos {
|
|
|
45252
44421
|
'content-type': 'application/json',
|
|
45253
44422
|
accept: 'application/json',
|
|
45254
44423
|
};
|
|
45255
|
-
return this.client.call('
|
|
45256
|
-
}
|
|
45257
|
-
getProfile(paramsOrFirst) {
|
|
45258
|
-
let params;
|
|
45259
|
-
if (paramsOrFirst &&
|
|
45260
|
-
typeof paramsOrFirst === 'object' &&
|
|
45261
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45262
|
-
params = (paramsOrFirst || {});
|
|
45263
|
-
}
|
|
45264
|
-
else {
|
|
45265
|
-
params = {
|
|
45266
|
-
profileId: paramsOrFirst,
|
|
45267
|
-
};
|
|
45268
|
-
}
|
|
45269
|
-
const profileId = params.profileId;
|
|
45270
|
-
if (typeof profileId === 'undefined' || profileId === '') {
|
|
45271
|
-
throw new AppwriteException('Missing required parameter: "profileId"');
|
|
45272
|
-
}
|
|
45273
|
-
const apiPath = '/videos/profiles/{profileId}'.replace('{profileId}', encodeURIComponent(String(profileId)));
|
|
45274
|
-
const apiPayload = {};
|
|
45275
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45276
|
-
const apiHeaders = {
|
|
45277
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
45278
|
-
accept: 'application/json',
|
|
45279
|
-
};
|
|
45280
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
44424
|
+
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
45281
44425
|
}
|
|
45282
|
-
|
|
44426
|
+
createChallengeRule(paramsOrFirst, ...rest) {
|
|
45283
44427
|
let params;
|
|
45284
44428
|
if (paramsOrFirst &&
|
|
45285
44429
|
typeof paramsOrFirst === 'object' &&
|
|
@@ -45288,90 +44432,83 @@ class Videos {
|
|
|
45288
44432
|
}
|
|
45289
44433
|
else {
|
|
45290
44434
|
params = {
|
|
45291
|
-
|
|
45292
|
-
|
|
45293
|
-
|
|
45294
|
-
|
|
45295
|
-
|
|
45296
|
-
|
|
44435
|
+
ruleId: paramsOrFirst,
|
|
44436
|
+
resourceType: rest[0],
|
|
44437
|
+
name: rest[1],
|
|
44438
|
+
resourceId: rest[2],
|
|
44439
|
+
description: rest[3],
|
|
44440
|
+
challengeType: rest[4],
|
|
44441
|
+
priority: rest[5],
|
|
44442
|
+
enabled: rest[6],
|
|
44443
|
+
conditions: rest[7],
|
|
44444
|
+
difficulty: rest[8],
|
|
44445
|
+
ttl: rest[9],
|
|
45297
44446
|
};
|
|
45298
44447
|
}
|
|
45299
|
-
const
|
|
44448
|
+
const ruleId = params.ruleId;
|
|
44449
|
+
const resourceType = params.resourceType;
|
|
45300
44450
|
const name = params.name;
|
|
45301
|
-
const
|
|
45302
|
-
const
|
|
45303
|
-
const
|
|
45304
|
-
const
|
|
45305
|
-
|
|
45306
|
-
|
|
44451
|
+
const resourceId = params.resourceId;
|
|
44452
|
+
const description = params.description;
|
|
44453
|
+
const challengeType = params.challengeType;
|
|
44454
|
+
const priority = params.priority;
|
|
44455
|
+
const enabled = params.enabled;
|
|
44456
|
+
const conditions = params.conditions;
|
|
44457
|
+
const difficulty = params.difficulty;
|
|
44458
|
+
const ttl = params.ttl;
|
|
44459
|
+
if (typeof ruleId === 'undefined') {
|
|
44460
|
+
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
44461
|
+
}
|
|
44462
|
+
if (typeof resourceType === 'undefined') {
|
|
44463
|
+
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
45307
44464
|
}
|
|
45308
44465
|
if (typeof name === 'undefined') {
|
|
45309
44466
|
throw new AppwriteException('Missing required parameter: "name"');
|
|
45310
44467
|
}
|
|
45311
|
-
|
|
45312
|
-
|
|
45313
|
-
|
|
45314
|
-
|
|
45315
|
-
throw new AppwriteException('Missing required parameter: "audioBitRate"');
|
|
44468
|
+
const apiPath = '/waf/rules/challenge';
|
|
44469
|
+
const apiPayload = {};
|
|
44470
|
+
if (typeof ruleId !== 'undefined') {
|
|
44471
|
+
apiPayload['ruleId'] = ruleId;
|
|
45316
44472
|
}
|
|
45317
|
-
if (typeof
|
|
45318
|
-
|
|
44473
|
+
if (typeof resourceType !== 'undefined') {
|
|
44474
|
+
apiPayload['resourceType'] = resourceType;
|
|
45319
44475
|
}
|
|
45320
|
-
if (typeof
|
|
45321
|
-
|
|
44476
|
+
if (typeof resourceId !== 'undefined') {
|
|
44477
|
+
apiPayload['resourceId'] = resourceId;
|
|
45322
44478
|
}
|
|
45323
|
-
const apiPath = '/videos/profiles/{profileId}'.replace('{profileId}', encodeURIComponent(String(profileId)));
|
|
45324
|
-
const apiPayload = {};
|
|
45325
44479
|
if (typeof name !== 'undefined') {
|
|
45326
44480
|
apiPayload['name'] = name;
|
|
45327
44481
|
}
|
|
45328
|
-
if (typeof
|
|
45329
|
-
apiPayload['
|
|
44482
|
+
if (typeof description !== 'undefined') {
|
|
44483
|
+
apiPayload['description'] = description;
|
|
45330
44484
|
}
|
|
45331
|
-
if (typeof
|
|
45332
|
-
apiPayload['
|
|
44485
|
+
if (typeof challengeType !== 'undefined') {
|
|
44486
|
+
apiPayload['challengeType'] = challengeType;
|
|
45333
44487
|
}
|
|
45334
|
-
if (typeof
|
|
45335
|
-
apiPayload['
|
|
44488
|
+
if (typeof priority !== 'undefined') {
|
|
44489
|
+
apiPayload['priority'] = priority;
|
|
45336
44490
|
}
|
|
45337
|
-
if (typeof
|
|
45338
|
-
apiPayload['
|
|
44491
|
+
if (typeof enabled !== 'undefined') {
|
|
44492
|
+
apiPayload['enabled'] = enabled;
|
|
45339
44493
|
}
|
|
45340
|
-
|
|
45341
|
-
|
|
45342
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
45343
|
-
'content-type': 'application/json',
|
|
45344
|
-
accept: 'application/json',
|
|
45345
|
-
};
|
|
45346
|
-
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
45347
|
-
}
|
|
45348
|
-
deleteProfile(paramsOrFirst) {
|
|
45349
|
-
let params;
|
|
45350
|
-
if (paramsOrFirst &&
|
|
45351
|
-
typeof paramsOrFirst === 'object' &&
|
|
45352
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45353
|
-
params = (paramsOrFirst || {});
|
|
44494
|
+
if (typeof conditions !== 'undefined') {
|
|
44495
|
+
apiPayload['conditions'] = conditions;
|
|
45354
44496
|
}
|
|
45355
|
-
|
|
45356
|
-
|
|
45357
|
-
profileId: paramsOrFirst,
|
|
45358
|
-
};
|
|
44497
|
+
if (typeof difficulty !== 'undefined') {
|
|
44498
|
+
apiPayload['difficulty'] = difficulty;
|
|
45359
44499
|
}
|
|
45360
|
-
|
|
45361
|
-
|
|
45362
|
-
throw new AppwriteException('Missing required parameter: "profileId"');
|
|
44500
|
+
if (typeof ttl !== 'undefined') {
|
|
44501
|
+
apiPayload['ttl'] = ttl;
|
|
45363
44502
|
}
|
|
45364
|
-
const apiPath = '/videos/profiles/{profileId}'.replace('{profileId}', encodeURIComponent(String(profileId)));
|
|
45365
|
-
const apiPayload = {};
|
|
45366
44503
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45367
44504
|
const apiHeaders = {
|
|
45368
44505
|
'X-Appwrite-Project': this.client.config.project,
|
|
45369
44506
|
'content-type': 'application/json',
|
|
45370
44507
|
accept: 'application/json',
|
|
45371
44508
|
};
|
|
45372
|
-
return this.client.call('
|
|
44509
|
+
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
45373
44510
|
}
|
|
45374
|
-
|
|
44511
|
+
updateChallengeRule(paramsOrFirst, ...rest) {
|
|
45375
44512
|
let params;
|
|
45376
44513
|
if (paramsOrFirst &&
|
|
45377
44514
|
typeof paramsOrFirst === 'object' &&
|
|
@@ -45380,23 +44517,74 @@ class Videos {
|
|
|
45380
44517
|
}
|
|
45381
44518
|
else {
|
|
45382
44519
|
params = {
|
|
45383
|
-
|
|
44520
|
+
ruleId: paramsOrFirst,
|
|
44521
|
+
resourceType: rest[0],
|
|
44522
|
+
resourceId: rest[1],
|
|
44523
|
+
name: rest[2],
|
|
44524
|
+
description: rest[3],
|
|
44525
|
+
challengeType: rest[4],
|
|
44526
|
+
priority: rest[5],
|
|
44527
|
+
enabled: rest[6],
|
|
44528
|
+
conditions: rest[7],
|
|
44529
|
+
difficulty: rest[8],
|
|
44530
|
+
ttl: rest[9],
|
|
45384
44531
|
};
|
|
45385
44532
|
}
|
|
45386
|
-
const
|
|
45387
|
-
|
|
45388
|
-
|
|
44533
|
+
const ruleId = params.ruleId;
|
|
44534
|
+
const resourceType = params.resourceType;
|
|
44535
|
+
const resourceId = params.resourceId;
|
|
44536
|
+
const name = params.name;
|
|
44537
|
+
const description = params.description;
|
|
44538
|
+
const challengeType = params.challengeType;
|
|
44539
|
+
const priority = params.priority;
|
|
44540
|
+
const enabled = params.enabled;
|
|
44541
|
+
const conditions = params.conditions;
|
|
44542
|
+
const difficulty = params.difficulty;
|
|
44543
|
+
const ttl = params.ttl;
|
|
44544
|
+
if (typeof ruleId === 'undefined' || ruleId === '') {
|
|
44545
|
+
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
45389
44546
|
}
|
|
45390
|
-
const apiPath = '/
|
|
44547
|
+
const apiPath = '/waf/rules/challenge/{ruleId}'.replace('{ruleId}', encodeURIComponent(String(ruleId)));
|
|
45391
44548
|
const apiPayload = {};
|
|
44549
|
+
if (typeof resourceType !== 'undefined') {
|
|
44550
|
+
apiPayload['resourceType'] = resourceType;
|
|
44551
|
+
}
|
|
44552
|
+
if (typeof resourceId !== 'undefined') {
|
|
44553
|
+
apiPayload['resourceId'] = resourceId;
|
|
44554
|
+
}
|
|
44555
|
+
if (typeof name !== 'undefined') {
|
|
44556
|
+
apiPayload['name'] = name;
|
|
44557
|
+
}
|
|
44558
|
+
if (typeof description !== 'undefined') {
|
|
44559
|
+
apiPayload['description'] = description;
|
|
44560
|
+
}
|
|
44561
|
+
if (typeof challengeType !== 'undefined') {
|
|
44562
|
+
apiPayload['challengeType'] = challengeType;
|
|
44563
|
+
}
|
|
44564
|
+
if (typeof priority !== 'undefined') {
|
|
44565
|
+
apiPayload['priority'] = priority;
|
|
44566
|
+
}
|
|
44567
|
+
if (typeof enabled !== 'undefined') {
|
|
44568
|
+
apiPayload['enabled'] = enabled;
|
|
44569
|
+
}
|
|
44570
|
+
if (typeof conditions !== 'undefined') {
|
|
44571
|
+
apiPayload['conditions'] = conditions;
|
|
44572
|
+
}
|
|
44573
|
+
if (typeof difficulty !== 'undefined') {
|
|
44574
|
+
apiPayload['difficulty'] = difficulty;
|
|
44575
|
+
}
|
|
44576
|
+
if (typeof ttl !== 'undefined') {
|
|
44577
|
+
apiPayload['ttl'] = ttl;
|
|
44578
|
+
}
|
|
45392
44579
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45393
44580
|
const apiHeaders = {
|
|
45394
44581
|
'X-Appwrite-Project': this.client.config.project,
|
|
44582
|
+
'content-type': 'application/json',
|
|
45395
44583
|
accept: 'application/json',
|
|
45396
44584
|
};
|
|
45397
|
-
return this.client.call('
|
|
44585
|
+
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
45398
44586
|
}
|
|
45399
|
-
|
|
44587
|
+
createDenyRule(paramsOrFirst, ...rest) {
|
|
45400
44588
|
let params;
|
|
45401
44589
|
if (paramsOrFirst &&
|
|
45402
44590
|
typeof paramsOrFirst === 'object' &&
|
|
@@ -45405,32 +44593,68 @@ class Videos {
|
|
|
45405
44593
|
}
|
|
45406
44594
|
else {
|
|
45407
44595
|
params = {
|
|
45408
|
-
|
|
45409
|
-
|
|
44596
|
+
ruleId: paramsOrFirst,
|
|
44597
|
+
resourceType: rest[0],
|
|
44598
|
+
name: rest[1],
|
|
44599
|
+
resourceId: rest[2],
|
|
44600
|
+
description: rest[3],
|
|
44601
|
+
priority: rest[4],
|
|
44602
|
+
enabled: rest[5],
|
|
44603
|
+
conditions: rest[6],
|
|
45410
44604
|
};
|
|
45411
44605
|
}
|
|
45412
|
-
const
|
|
44606
|
+
const ruleId = params.ruleId;
|
|
44607
|
+
const resourceType = params.resourceType;
|
|
45413
44608
|
const name = params.name;
|
|
45414
|
-
|
|
45415
|
-
|
|
44609
|
+
const resourceId = params.resourceId;
|
|
44610
|
+
const description = params.description;
|
|
44611
|
+
const priority = params.priority;
|
|
44612
|
+
const enabled = params.enabled;
|
|
44613
|
+
const conditions = params.conditions;
|
|
44614
|
+
if (typeof ruleId === 'undefined') {
|
|
44615
|
+
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
44616
|
+
}
|
|
44617
|
+
if (typeof resourceType === 'undefined') {
|
|
44618
|
+
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
45416
44619
|
}
|
|
45417
44620
|
if (typeof name === 'undefined') {
|
|
45418
44621
|
throw new AppwriteException('Missing required parameter: "name"');
|
|
45419
44622
|
}
|
|
45420
|
-
const apiPath = '/
|
|
44623
|
+
const apiPath = '/waf/rules/deny';
|
|
45421
44624
|
const apiPayload = {};
|
|
44625
|
+
if (typeof ruleId !== 'undefined') {
|
|
44626
|
+
apiPayload['ruleId'] = ruleId;
|
|
44627
|
+
}
|
|
44628
|
+
if (typeof resourceType !== 'undefined') {
|
|
44629
|
+
apiPayload['resourceType'] = resourceType;
|
|
44630
|
+
}
|
|
44631
|
+
if (typeof resourceId !== 'undefined') {
|
|
44632
|
+
apiPayload['resourceId'] = resourceId;
|
|
44633
|
+
}
|
|
45422
44634
|
if (typeof name !== 'undefined') {
|
|
45423
44635
|
apiPayload['name'] = name;
|
|
45424
44636
|
}
|
|
44637
|
+
if (typeof description !== 'undefined') {
|
|
44638
|
+
apiPayload['description'] = description;
|
|
44639
|
+
}
|
|
44640
|
+
if (typeof priority !== 'undefined') {
|
|
44641
|
+
apiPayload['priority'] = priority;
|
|
44642
|
+
}
|
|
44643
|
+
if (typeof enabled !== 'undefined') {
|
|
44644
|
+
apiPayload['enabled'] = enabled;
|
|
44645
|
+
}
|
|
44646
|
+
if (typeof conditions !== 'undefined') {
|
|
44647
|
+
apiPayload['conditions'] = conditions;
|
|
44648
|
+
}
|
|
45425
44649
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45426
44650
|
const apiHeaders = {
|
|
45427
44651
|
'X-Appwrite-Project': this.client.config.project,
|
|
45428
44652
|
'content-type': 'application/json',
|
|
45429
44653
|
accept: 'application/json',
|
|
45430
44654
|
};
|
|
45431
|
-
return this.client.call('
|
|
44655
|
+
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
45432
44656
|
}
|
|
45433
|
-
|
|
44657
|
+
updateDenyRule(paramsOrFirst, ...rest) {
|
|
45434
44658
|
let params;
|
|
45435
44659
|
if (paramsOrFirst &&
|
|
45436
44660
|
typeof paramsOrFirst === 'object' &&
|
|
@@ -45439,24 +44663,59 @@ class Videos {
|
|
|
45439
44663
|
}
|
|
45440
44664
|
else {
|
|
45441
44665
|
params = {
|
|
45442
|
-
|
|
44666
|
+
ruleId: paramsOrFirst,
|
|
44667
|
+
resourceType: rest[0],
|
|
44668
|
+
resourceId: rest[1],
|
|
44669
|
+
name: rest[2],
|
|
44670
|
+
description: rest[3],
|
|
44671
|
+
priority: rest[4],
|
|
44672
|
+
enabled: rest[5],
|
|
44673
|
+
conditions: rest[6],
|
|
45443
44674
|
};
|
|
45444
44675
|
}
|
|
45445
|
-
const
|
|
45446
|
-
|
|
45447
|
-
|
|
44676
|
+
const ruleId = params.ruleId;
|
|
44677
|
+
const resourceType = params.resourceType;
|
|
44678
|
+
const resourceId = params.resourceId;
|
|
44679
|
+
const name = params.name;
|
|
44680
|
+
const description = params.description;
|
|
44681
|
+
const priority = params.priority;
|
|
44682
|
+
const enabled = params.enabled;
|
|
44683
|
+
const conditions = params.conditions;
|
|
44684
|
+
if (typeof ruleId === 'undefined' || ruleId === '') {
|
|
44685
|
+
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
45448
44686
|
}
|
|
45449
|
-
const apiPath = '/
|
|
44687
|
+
const apiPath = '/waf/rules/deny/{ruleId}'.replace('{ruleId}', encodeURIComponent(String(ruleId)));
|
|
45450
44688
|
const apiPayload = {};
|
|
44689
|
+
if (typeof resourceType !== 'undefined') {
|
|
44690
|
+
apiPayload['resourceType'] = resourceType;
|
|
44691
|
+
}
|
|
44692
|
+
if (typeof resourceId !== 'undefined') {
|
|
44693
|
+
apiPayload['resourceId'] = resourceId;
|
|
44694
|
+
}
|
|
44695
|
+
if (typeof name !== 'undefined') {
|
|
44696
|
+
apiPayload['name'] = name;
|
|
44697
|
+
}
|
|
44698
|
+
if (typeof description !== 'undefined') {
|
|
44699
|
+
apiPayload['description'] = description;
|
|
44700
|
+
}
|
|
44701
|
+
if (typeof priority !== 'undefined') {
|
|
44702
|
+
apiPayload['priority'] = priority;
|
|
44703
|
+
}
|
|
44704
|
+
if (typeof enabled !== 'undefined') {
|
|
44705
|
+
apiPayload['enabled'] = enabled;
|
|
44706
|
+
}
|
|
44707
|
+
if (typeof conditions !== 'undefined') {
|
|
44708
|
+
apiPayload['conditions'] = conditions;
|
|
44709
|
+
}
|
|
45451
44710
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45452
44711
|
const apiHeaders = {
|
|
45453
44712
|
'X-Appwrite-Project': this.client.config.project,
|
|
45454
44713
|
'content-type': 'application/json',
|
|
45455
44714
|
accept: 'application/json',
|
|
45456
44715
|
};
|
|
45457
|
-
return this.client.call('
|
|
44716
|
+
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
45458
44717
|
}
|
|
45459
|
-
|
|
44718
|
+
createRateLimitRule(paramsOrFirst, ...rest) {
|
|
45460
44719
|
let params;
|
|
45461
44720
|
if (paramsOrFirst &&
|
|
45462
44721
|
typeof paramsOrFirst === 'object' &&
|
|
@@ -45465,1241 +44724,19 @@ class Videos {
|
|
|
45465
44724
|
}
|
|
45466
44725
|
else {
|
|
45467
44726
|
params = {
|
|
45468
|
-
|
|
45469
|
-
|
|
45470
|
-
|
|
45471
|
-
|
|
45472
|
-
|
|
45473
|
-
|
|
45474
|
-
|
|
45475
|
-
|
|
45476
|
-
|
|
45477
|
-
|
|
45478
|
-
|
|
45479
|
-
|
|
45480
|
-
|
|
45481
|
-
uri.searchParams.append(key, value);
|
|
45482
|
-
}
|
|
45483
|
-
return uri.toString();
|
|
45484
|
-
}
|
|
45485
|
-
getCmafDashManifest(paramsOrFirst) {
|
|
45486
|
-
let params;
|
|
45487
|
-
if (paramsOrFirst &&
|
|
45488
|
-
typeof paramsOrFirst === 'object' &&
|
|
45489
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45490
|
-
params = (paramsOrFirst || {});
|
|
45491
|
-
}
|
|
45492
|
-
else {
|
|
45493
|
-
params = {
|
|
45494
|
-
videoId: paramsOrFirst,
|
|
45495
|
-
};
|
|
45496
|
-
}
|
|
45497
|
-
const videoId = params.videoId;
|
|
45498
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45499
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45500
|
-
}
|
|
45501
|
-
const apiPath = '/videos/{videoId}/outputs/cmaf/master.mpd'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45502
|
-
const apiPayload = {};
|
|
45503
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45504
|
-
apiPayload['project'] = this.client.config.project;
|
|
45505
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45506
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45507
|
-
uri.searchParams.append(key, value);
|
|
45508
|
-
}
|
|
45509
|
-
return uri.toString();
|
|
45510
|
-
}
|
|
45511
|
-
getCmafStreamManifest(paramsOrFirst, ...rest) {
|
|
45512
|
-
let params;
|
|
45513
|
-
if (paramsOrFirst &&
|
|
45514
|
-
typeof paramsOrFirst === 'object' &&
|
|
45515
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45516
|
-
params = (paramsOrFirst || {});
|
|
45517
|
-
}
|
|
45518
|
-
else {
|
|
45519
|
-
params = {
|
|
45520
|
-
videoId: paramsOrFirst,
|
|
45521
|
-
renditionId: rest[0],
|
|
45522
|
-
streamId: rest[1],
|
|
45523
|
-
};
|
|
45524
|
-
}
|
|
45525
|
-
const videoId = params.videoId;
|
|
45526
|
-
const renditionId = params.renditionId;
|
|
45527
|
-
const streamId = params.streamId;
|
|
45528
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45529
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45530
|
-
}
|
|
45531
|
-
if (typeof renditionId === 'undefined' || renditionId === '') {
|
|
45532
|
-
throw new AppwriteException('Missing required parameter: "renditionId"');
|
|
45533
|
-
}
|
|
45534
|
-
if (typeof streamId === 'undefined') {
|
|
45535
|
-
throw new AppwriteException('Missing required parameter: "streamId"');
|
|
45536
|
-
}
|
|
45537
|
-
const apiPath = '/videos/{videoId}/outputs/cmaf/renditions/{renditionId}/streams/{streamId}/playlist.m3u8'
|
|
45538
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45539
|
-
.replace('{renditionId}', encodeURIComponent(String(renditionId)))
|
|
45540
|
-
.replace('{streamId}', encodeURIComponent(String(streamId)));
|
|
45541
|
-
const apiPayload = {};
|
|
45542
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45543
|
-
apiPayload['project'] = this.client.config.project;
|
|
45544
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45545
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45546
|
-
uri.searchParams.append(key, value);
|
|
45547
|
-
}
|
|
45548
|
-
return uri.toString();
|
|
45549
|
-
}
|
|
45550
|
-
getDashManifest(paramsOrFirst) {
|
|
45551
|
-
let params;
|
|
45552
|
-
if (paramsOrFirst &&
|
|
45553
|
-
typeof paramsOrFirst === 'object' &&
|
|
45554
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45555
|
-
params = (paramsOrFirst || {});
|
|
45556
|
-
}
|
|
45557
|
-
else {
|
|
45558
|
-
params = {
|
|
45559
|
-
videoId: paramsOrFirst,
|
|
45560
|
-
};
|
|
45561
|
-
}
|
|
45562
|
-
const videoId = params.videoId;
|
|
45563
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45564
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45565
|
-
}
|
|
45566
|
-
const apiPath = '/videos/{videoId}/outputs/dash/master.mpd'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45567
|
-
const apiPayload = {};
|
|
45568
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45569
|
-
apiPayload['project'] = this.client.config.project;
|
|
45570
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45571
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45572
|
-
uri.searchParams.append(key, value);
|
|
45573
|
-
}
|
|
45574
|
-
return uri.toString();
|
|
45575
|
-
}
|
|
45576
|
-
getHlsManifest(paramsOrFirst) {
|
|
45577
|
-
let params;
|
|
45578
|
-
if (paramsOrFirst &&
|
|
45579
|
-
typeof paramsOrFirst === 'object' &&
|
|
45580
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45581
|
-
params = (paramsOrFirst || {});
|
|
45582
|
-
}
|
|
45583
|
-
else {
|
|
45584
|
-
params = {
|
|
45585
|
-
videoId: paramsOrFirst,
|
|
45586
|
-
};
|
|
45587
|
-
}
|
|
45588
|
-
const videoId = params.videoId;
|
|
45589
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45590
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45591
|
-
}
|
|
45592
|
-
const apiPath = '/videos/{videoId}/outputs/hls/master.m3u8'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45593
|
-
const apiPayload = {};
|
|
45594
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45595
|
-
apiPayload['project'] = this.client.config.project;
|
|
45596
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45597
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45598
|
-
uri.searchParams.append(key, value);
|
|
45599
|
-
}
|
|
45600
|
-
return uri.toString();
|
|
45601
|
-
}
|
|
45602
|
-
getStreamManifest(paramsOrFirst, ...rest) {
|
|
45603
|
-
let params;
|
|
45604
|
-
if (paramsOrFirst &&
|
|
45605
|
-
typeof paramsOrFirst === 'object' &&
|
|
45606
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45607
|
-
params = (paramsOrFirst || {});
|
|
45608
|
-
}
|
|
45609
|
-
else {
|
|
45610
|
-
params = {
|
|
45611
|
-
videoId: paramsOrFirst,
|
|
45612
|
-
renditionId: rest[0],
|
|
45613
|
-
streamId: rest[1],
|
|
45614
|
-
};
|
|
45615
|
-
}
|
|
45616
|
-
const videoId = params.videoId;
|
|
45617
|
-
const renditionId = params.renditionId;
|
|
45618
|
-
const streamId = params.streamId;
|
|
45619
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45620
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45621
|
-
}
|
|
45622
|
-
if (typeof renditionId === 'undefined' || renditionId === '') {
|
|
45623
|
-
throw new AppwriteException('Missing required parameter: "renditionId"');
|
|
45624
|
-
}
|
|
45625
|
-
if (typeof streamId === 'undefined') {
|
|
45626
|
-
throw new AppwriteException('Missing required parameter: "streamId"');
|
|
45627
|
-
}
|
|
45628
|
-
const apiPath = '/videos/{videoId}/outputs/hls/renditions/{renditionId}/streams/{streamId}/playlist.m3u8'
|
|
45629
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45630
|
-
.replace('{renditionId}', encodeURIComponent(String(renditionId)))
|
|
45631
|
-
.replace('{streamId}', encodeURIComponent(String(streamId)));
|
|
45632
|
-
const apiPayload = {};
|
|
45633
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45634
|
-
apiPayload['project'] = this.client.config.project;
|
|
45635
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45636
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45637
|
-
uri.searchParams.append(key, value);
|
|
45638
|
-
}
|
|
45639
|
-
return uri.toString();
|
|
45640
|
-
}
|
|
45641
|
-
getSegment(paramsOrFirst, ...rest) {
|
|
45642
|
-
let params;
|
|
45643
|
-
if (paramsOrFirst &&
|
|
45644
|
-
typeof paramsOrFirst === 'object' &&
|
|
45645
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45646
|
-
params = (paramsOrFirst || {});
|
|
45647
|
-
}
|
|
45648
|
-
else {
|
|
45649
|
-
params = {
|
|
45650
|
-
videoId: paramsOrFirst,
|
|
45651
|
-
output: rest[0],
|
|
45652
|
-
renditionId: rest[1],
|
|
45653
|
-
segmentId: rest[2],
|
|
45654
|
-
};
|
|
45655
|
-
}
|
|
45656
|
-
const videoId = params.videoId;
|
|
45657
|
-
const output = params.output;
|
|
45658
|
-
const renditionId = params.renditionId;
|
|
45659
|
-
const segmentId = params.segmentId;
|
|
45660
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45661
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45662
|
-
}
|
|
45663
|
-
if (typeof output === 'undefined') {
|
|
45664
|
-
throw new AppwriteException('Missing required parameter: "output"');
|
|
45665
|
-
}
|
|
45666
|
-
if (typeof renditionId === 'undefined' || renditionId === '') {
|
|
45667
|
-
throw new AppwriteException('Missing required parameter: "renditionId"');
|
|
45668
|
-
}
|
|
45669
|
-
if (typeof segmentId === 'undefined' || segmentId === '') {
|
|
45670
|
-
throw new AppwriteException('Missing required parameter: "segmentId"');
|
|
45671
|
-
}
|
|
45672
|
-
const apiPath = '/videos/{videoId}/outputs/{output}/renditions/{renditionId}/segments/{segmentId}'
|
|
45673
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45674
|
-
.replace('{output}', encodeURIComponent(String(output)))
|
|
45675
|
-
.replace('{renditionId}', encodeURIComponent(String(renditionId)))
|
|
45676
|
-
.replace('{segmentId}', encodeURIComponent(String(segmentId)));
|
|
45677
|
-
const apiPayload = {};
|
|
45678
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45679
|
-
apiPayload['project'] = this.client.config.project;
|
|
45680
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45681
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45682
|
-
uri.searchParams.append(key, value);
|
|
45683
|
-
}
|
|
45684
|
-
return uri.toString();
|
|
45685
|
-
}
|
|
45686
|
-
getSubtitleManifest(paramsOrFirst, ...rest) {
|
|
45687
|
-
let params;
|
|
45688
|
-
if (paramsOrFirst &&
|
|
45689
|
-
typeof paramsOrFirst === 'object' &&
|
|
45690
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45691
|
-
params = (paramsOrFirst || {});
|
|
45692
|
-
}
|
|
45693
|
-
else {
|
|
45694
|
-
params = {
|
|
45695
|
-
videoId: paramsOrFirst,
|
|
45696
|
-
output: rest[0],
|
|
45697
|
-
subtitleId: rest[1],
|
|
45698
|
-
};
|
|
45699
|
-
}
|
|
45700
|
-
const videoId = params.videoId;
|
|
45701
|
-
const output = params.output;
|
|
45702
|
-
const subtitleId = params.subtitleId;
|
|
45703
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45704
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45705
|
-
}
|
|
45706
|
-
if (typeof output === 'undefined') {
|
|
45707
|
-
throw new AppwriteException('Missing required parameter: "output"');
|
|
45708
|
-
}
|
|
45709
|
-
if (typeof subtitleId === 'undefined' || subtitleId === '') {
|
|
45710
|
-
throw new AppwriteException('Missing required parameter: "subtitleId"');
|
|
45711
|
-
}
|
|
45712
|
-
const apiPath = '/videos/{videoId}/outputs/{output}/subtitles/{subtitleId}/manifest'
|
|
45713
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45714
|
-
.replace('{output}', encodeURIComponent(String(output)))
|
|
45715
|
-
.replace('{subtitleId}', encodeURIComponent(String(subtitleId)));
|
|
45716
|
-
const apiPayload = {};
|
|
45717
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45718
|
-
apiPayload['project'] = this.client.config.project;
|
|
45719
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45720
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45721
|
-
uri.searchParams.append(key, value);
|
|
45722
|
-
}
|
|
45723
|
-
return uri.toString();
|
|
45724
|
-
}
|
|
45725
|
-
getSubtitleSegment(paramsOrFirst, ...rest) {
|
|
45726
|
-
let params;
|
|
45727
|
-
if (paramsOrFirst &&
|
|
45728
|
-
typeof paramsOrFirst === 'object' &&
|
|
45729
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45730
|
-
params = (paramsOrFirst || {});
|
|
45731
|
-
}
|
|
45732
|
-
else {
|
|
45733
|
-
params = {
|
|
45734
|
-
videoId: paramsOrFirst,
|
|
45735
|
-
output: rest[0],
|
|
45736
|
-
subtitleId: rest[1],
|
|
45737
|
-
segmentId: rest[2],
|
|
45738
|
-
};
|
|
45739
|
-
}
|
|
45740
|
-
const videoId = params.videoId;
|
|
45741
|
-
const output = params.output;
|
|
45742
|
-
const subtitleId = params.subtitleId;
|
|
45743
|
-
const segmentId = params.segmentId;
|
|
45744
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45745
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45746
|
-
}
|
|
45747
|
-
if (typeof output === 'undefined') {
|
|
45748
|
-
throw new AppwriteException('Missing required parameter: "output"');
|
|
45749
|
-
}
|
|
45750
|
-
if (typeof subtitleId === 'undefined' || subtitleId === '') {
|
|
45751
|
-
throw new AppwriteException('Missing required parameter: "subtitleId"');
|
|
45752
|
-
}
|
|
45753
|
-
if (typeof segmentId === 'undefined' || segmentId === '') {
|
|
45754
|
-
throw new AppwriteException('Missing required parameter: "segmentId"');
|
|
45755
|
-
}
|
|
45756
|
-
const apiPath = '/videos/{videoId}/outputs/{output}/subtitles/{subtitleId}/segments/{segmentId}'
|
|
45757
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45758
|
-
.replace('{output}', encodeURIComponent(String(output)))
|
|
45759
|
-
.replace('{subtitleId}', encodeURIComponent(String(subtitleId)))
|
|
45760
|
-
.replace('{segmentId}', encodeURIComponent(String(segmentId)));
|
|
45761
|
-
const apiPayload = {};
|
|
45762
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45763
|
-
apiPayload['project'] = this.client.config.project;
|
|
45764
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45765
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45766
|
-
uri.searchParams.append(key, value);
|
|
45767
|
-
}
|
|
45768
|
-
return uri.toString();
|
|
45769
|
-
}
|
|
45770
|
-
getPreview(paramsOrFirst, ...rest) {
|
|
45771
|
-
let params;
|
|
45772
|
-
if (paramsOrFirst &&
|
|
45773
|
-
typeof paramsOrFirst === 'object' &&
|
|
45774
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45775
|
-
params = (paramsOrFirst || {});
|
|
45776
|
-
}
|
|
45777
|
-
else {
|
|
45778
|
-
params = {
|
|
45779
|
-
videoId: paramsOrFirst,
|
|
45780
|
-
previewId: rest[0],
|
|
45781
|
-
width: rest[1],
|
|
45782
|
-
height: rest[2],
|
|
45783
|
-
output: rest[3],
|
|
45784
|
-
};
|
|
45785
|
-
}
|
|
45786
|
-
const videoId = params.videoId;
|
|
45787
|
-
const previewId = params.previewId;
|
|
45788
|
-
const width = params.width;
|
|
45789
|
-
const height = params.height;
|
|
45790
|
-
const output = params.output;
|
|
45791
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45792
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45793
|
-
}
|
|
45794
|
-
if (typeof previewId === 'undefined' || previewId === '') {
|
|
45795
|
-
throw new AppwriteException('Missing required parameter: "previewId"');
|
|
45796
|
-
}
|
|
45797
|
-
const apiPath = '/videos/{videoId}/previews/{previewId}'
|
|
45798
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45799
|
-
.replace('{previewId}', encodeURIComponent(String(previewId)));
|
|
45800
|
-
const apiPayload = {};
|
|
45801
|
-
if (typeof width !== 'undefined') {
|
|
45802
|
-
apiPayload['width'] = width;
|
|
45803
|
-
}
|
|
45804
|
-
if (typeof height !== 'undefined') {
|
|
45805
|
-
apiPayload['height'] = height;
|
|
45806
|
-
}
|
|
45807
|
-
if (typeof output !== 'undefined') {
|
|
45808
|
-
apiPayload['output'] = output;
|
|
45809
|
-
}
|
|
45810
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45811
|
-
apiPayload['project'] = this.client.config.project;
|
|
45812
|
-
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45813
|
-
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45814
|
-
uri.searchParams.append(key, value);
|
|
45815
|
-
}
|
|
45816
|
-
return uri.toString();
|
|
45817
|
-
}
|
|
45818
|
-
listRenditions(paramsOrFirst, ...rest) {
|
|
45819
|
-
let params;
|
|
45820
|
-
if (paramsOrFirst &&
|
|
45821
|
-
typeof paramsOrFirst === 'object' &&
|
|
45822
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45823
|
-
params = (paramsOrFirst || {});
|
|
45824
|
-
}
|
|
45825
|
-
else {
|
|
45826
|
-
params = {
|
|
45827
|
-
videoId: paramsOrFirst,
|
|
45828
|
-
output: rest[0],
|
|
45829
|
-
status: rest[1],
|
|
45830
|
-
};
|
|
45831
|
-
}
|
|
45832
|
-
const videoId = params.videoId;
|
|
45833
|
-
const output = params.output;
|
|
45834
|
-
const status = params.status;
|
|
45835
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45836
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45837
|
-
}
|
|
45838
|
-
const apiPath = '/videos/{videoId}/renditions'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45839
|
-
const apiPayload = {};
|
|
45840
|
-
if (typeof output !== 'undefined') {
|
|
45841
|
-
apiPayload['output'] = output;
|
|
45842
|
-
}
|
|
45843
|
-
if (typeof status !== 'undefined') {
|
|
45844
|
-
apiPayload['status'] = status;
|
|
45845
|
-
}
|
|
45846
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45847
|
-
const apiHeaders = {
|
|
45848
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
45849
|
-
accept: 'application/json',
|
|
45850
|
-
};
|
|
45851
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
45852
|
-
}
|
|
45853
|
-
createRendition(paramsOrFirst, ...rest) {
|
|
45854
|
-
let params;
|
|
45855
|
-
if (paramsOrFirst &&
|
|
45856
|
-
typeof paramsOrFirst === 'object' &&
|
|
45857
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45858
|
-
params = (paramsOrFirst || {});
|
|
45859
|
-
}
|
|
45860
|
-
else {
|
|
45861
|
-
params = {
|
|
45862
|
-
videoId: paramsOrFirst,
|
|
45863
|
-
profileId: rest[0],
|
|
45864
|
-
output: rest[1],
|
|
45865
|
-
};
|
|
45866
|
-
}
|
|
45867
|
-
const videoId = params.videoId;
|
|
45868
|
-
const profileId = params.profileId;
|
|
45869
|
-
const output = params.output;
|
|
45870
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45871
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45872
|
-
}
|
|
45873
|
-
if (typeof profileId === 'undefined') {
|
|
45874
|
-
throw new AppwriteException('Missing required parameter: "profileId"');
|
|
45875
|
-
}
|
|
45876
|
-
if (typeof output === 'undefined') {
|
|
45877
|
-
throw new AppwriteException('Missing required parameter: "output"');
|
|
45878
|
-
}
|
|
45879
|
-
const apiPath = '/videos/{videoId}/renditions'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45880
|
-
const apiPayload = {};
|
|
45881
|
-
if (typeof profileId !== 'undefined') {
|
|
45882
|
-
apiPayload['profileId'] = profileId;
|
|
45883
|
-
}
|
|
45884
|
-
if (typeof output !== 'undefined') {
|
|
45885
|
-
apiPayload['output'] = output;
|
|
45886
|
-
}
|
|
45887
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45888
|
-
const apiHeaders = {
|
|
45889
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
45890
|
-
'content-type': 'application/json',
|
|
45891
|
-
accept: 'application/json',
|
|
45892
|
-
};
|
|
45893
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
45894
|
-
}
|
|
45895
|
-
getRendition(paramsOrFirst, ...rest) {
|
|
45896
|
-
let params;
|
|
45897
|
-
if (paramsOrFirst &&
|
|
45898
|
-
typeof paramsOrFirst === 'object' &&
|
|
45899
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45900
|
-
params = (paramsOrFirst || {});
|
|
45901
|
-
}
|
|
45902
|
-
else {
|
|
45903
|
-
params = {
|
|
45904
|
-
videoId: paramsOrFirst,
|
|
45905
|
-
renditionId: rest[0],
|
|
45906
|
-
};
|
|
45907
|
-
}
|
|
45908
|
-
const videoId = params.videoId;
|
|
45909
|
-
const renditionId = params.renditionId;
|
|
45910
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45911
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45912
|
-
}
|
|
45913
|
-
if (typeof renditionId === 'undefined' || renditionId === '') {
|
|
45914
|
-
throw new AppwriteException('Missing required parameter: "renditionId"');
|
|
45915
|
-
}
|
|
45916
|
-
const apiPath = '/videos/{videoId}/renditions/{renditionId}'
|
|
45917
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45918
|
-
.replace('{renditionId}', encodeURIComponent(String(renditionId)));
|
|
45919
|
-
const apiPayload = {};
|
|
45920
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45921
|
-
const apiHeaders = {
|
|
45922
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
45923
|
-
accept: 'application/json',
|
|
45924
|
-
};
|
|
45925
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
45926
|
-
}
|
|
45927
|
-
deleteRendition(paramsOrFirst, ...rest) {
|
|
45928
|
-
let params;
|
|
45929
|
-
if (paramsOrFirst &&
|
|
45930
|
-
typeof paramsOrFirst === 'object' &&
|
|
45931
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45932
|
-
params = (paramsOrFirst || {});
|
|
45933
|
-
}
|
|
45934
|
-
else {
|
|
45935
|
-
params = {
|
|
45936
|
-
videoId: paramsOrFirst,
|
|
45937
|
-
renditionId: rest[0],
|
|
45938
|
-
};
|
|
45939
|
-
}
|
|
45940
|
-
const videoId = params.videoId;
|
|
45941
|
-
const renditionId = params.renditionId;
|
|
45942
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45943
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45944
|
-
}
|
|
45945
|
-
if (typeof renditionId === 'undefined' || renditionId === '') {
|
|
45946
|
-
throw new AppwriteException('Missing required parameter: "renditionId"');
|
|
45947
|
-
}
|
|
45948
|
-
const apiPath = '/videos/{videoId}/renditions/{renditionId}'
|
|
45949
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45950
|
-
.replace('{renditionId}', encodeURIComponent(String(renditionId)));
|
|
45951
|
-
const apiPayload = {};
|
|
45952
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45953
|
-
const apiHeaders = {
|
|
45954
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
45955
|
-
'content-type': 'application/json',
|
|
45956
|
-
accept: 'application/json',
|
|
45957
|
-
};
|
|
45958
|
-
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
45959
|
-
}
|
|
45960
|
-
createSource(paramsOrFirst) {
|
|
45961
|
-
let params;
|
|
45962
|
-
if (paramsOrFirst &&
|
|
45963
|
-
typeof paramsOrFirst === 'object' &&
|
|
45964
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45965
|
-
params = (paramsOrFirst || {});
|
|
45966
|
-
}
|
|
45967
|
-
else {
|
|
45968
|
-
params = {
|
|
45969
|
-
videoId: paramsOrFirst,
|
|
45970
|
-
};
|
|
45971
|
-
}
|
|
45972
|
-
const videoId = params.videoId;
|
|
45973
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45974
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45975
|
-
}
|
|
45976
|
-
const apiPath = '/videos/{videoId}/source'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45977
|
-
const apiPayload = {};
|
|
45978
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45979
|
-
const apiHeaders = {
|
|
45980
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
45981
|
-
'content-type': 'application/json',
|
|
45982
|
-
accept: 'application/json',
|
|
45983
|
-
};
|
|
45984
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
45985
|
-
}
|
|
45986
|
-
listSubtitles(paramsOrFirst) {
|
|
45987
|
-
let params;
|
|
45988
|
-
if (paramsOrFirst &&
|
|
45989
|
-
typeof paramsOrFirst === 'object' &&
|
|
45990
|
-
!Array.isArray(paramsOrFirst)) {
|
|
45991
|
-
params = (paramsOrFirst || {});
|
|
45992
|
-
}
|
|
45993
|
-
else {
|
|
45994
|
-
params = {
|
|
45995
|
-
videoId: paramsOrFirst,
|
|
45996
|
-
};
|
|
45997
|
-
}
|
|
45998
|
-
const videoId = params.videoId;
|
|
45999
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
46000
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
46001
|
-
}
|
|
46002
|
-
const apiPath = '/videos/{videoId}/subtitles'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
46003
|
-
const apiPayload = {};
|
|
46004
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46005
|
-
const apiHeaders = {
|
|
46006
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46007
|
-
accept: 'application/json',
|
|
46008
|
-
};
|
|
46009
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
46010
|
-
}
|
|
46011
|
-
createSubtitle(paramsOrFirst, ...rest) {
|
|
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
|
-
bucketId: rest[0],
|
|
46022
|
-
fileId: rest[1],
|
|
46023
|
-
name: rest[2],
|
|
46024
|
-
code: rest[3],
|
|
46025
|
-
xdefault: rest[4],
|
|
46026
|
-
};
|
|
46027
|
-
}
|
|
46028
|
-
const videoId = params.videoId;
|
|
46029
|
-
const bucketId = params.bucketId;
|
|
46030
|
-
const fileId = params.fileId;
|
|
46031
|
-
const name = params.name;
|
|
46032
|
-
const code = params.code;
|
|
46033
|
-
const xdefault = params.xdefault;
|
|
46034
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
46035
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
46036
|
-
}
|
|
46037
|
-
if (typeof bucketId === 'undefined') {
|
|
46038
|
-
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
46039
|
-
}
|
|
46040
|
-
if (typeof fileId === 'undefined') {
|
|
46041
|
-
throw new AppwriteException('Missing required parameter: "fileId"');
|
|
46042
|
-
}
|
|
46043
|
-
if (typeof name === 'undefined') {
|
|
46044
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
46045
|
-
}
|
|
46046
|
-
if (typeof code === 'undefined') {
|
|
46047
|
-
throw new AppwriteException('Missing required parameter: "code"');
|
|
46048
|
-
}
|
|
46049
|
-
const apiPath = '/videos/{videoId}/subtitles'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
46050
|
-
const apiPayload = {};
|
|
46051
|
-
if (typeof bucketId !== 'undefined') {
|
|
46052
|
-
apiPayload['bucketId'] = bucketId;
|
|
46053
|
-
}
|
|
46054
|
-
if (typeof fileId !== 'undefined') {
|
|
46055
|
-
apiPayload['fileId'] = fileId;
|
|
46056
|
-
}
|
|
46057
|
-
if (typeof name !== 'undefined') {
|
|
46058
|
-
apiPayload['name'] = name;
|
|
46059
|
-
}
|
|
46060
|
-
if (typeof code !== 'undefined') {
|
|
46061
|
-
apiPayload['code'] = code;
|
|
46062
|
-
}
|
|
46063
|
-
if (typeof xdefault !== 'undefined') {
|
|
46064
|
-
apiPayload['default'] = xdefault;
|
|
46065
|
-
}
|
|
46066
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46067
|
-
const apiHeaders = {
|
|
46068
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46069
|
-
'content-type': 'application/json',
|
|
46070
|
-
accept: 'application/json',
|
|
46071
|
-
};
|
|
46072
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
46073
|
-
}
|
|
46074
|
-
updateSubtitle(paramsOrFirst, ...rest) {
|
|
46075
|
-
let params;
|
|
46076
|
-
if (paramsOrFirst &&
|
|
46077
|
-
typeof paramsOrFirst === 'object' &&
|
|
46078
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46079
|
-
params = (paramsOrFirst || {});
|
|
46080
|
-
}
|
|
46081
|
-
else {
|
|
46082
|
-
params = {
|
|
46083
|
-
videoId: paramsOrFirst,
|
|
46084
|
-
subtitleId: rest[0],
|
|
46085
|
-
bucketId: rest[1],
|
|
46086
|
-
fileId: rest[2],
|
|
46087
|
-
name: rest[3],
|
|
46088
|
-
code: rest[4],
|
|
46089
|
-
xdefault: rest[5],
|
|
46090
|
-
};
|
|
46091
|
-
}
|
|
46092
|
-
const videoId = params.videoId;
|
|
46093
|
-
const subtitleId = params.subtitleId;
|
|
46094
|
-
const bucketId = params.bucketId;
|
|
46095
|
-
const fileId = params.fileId;
|
|
46096
|
-
const name = params.name;
|
|
46097
|
-
const code = params.code;
|
|
46098
|
-
const xdefault = params.xdefault;
|
|
46099
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
46100
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
46101
|
-
}
|
|
46102
|
-
if (typeof subtitleId === 'undefined' || subtitleId === '') {
|
|
46103
|
-
throw new AppwriteException('Missing required parameter: "subtitleId"');
|
|
46104
|
-
}
|
|
46105
|
-
const apiPath = '/videos/{videoId}/subtitles/{subtitleId}'
|
|
46106
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
46107
|
-
.replace('{subtitleId}', encodeURIComponent(String(subtitleId)));
|
|
46108
|
-
const apiPayload = {};
|
|
46109
|
-
if (typeof bucketId !== 'undefined') {
|
|
46110
|
-
apiPayload['bucketId'] = bucketId;
|
|
46111
|
-
}
|
|
46112
|
-
if (typeof fileId !== 'undefined') {
|
|
46113
|
-
apiPayload['fileId'] = fileId;
|
|
46114
|
-
}
|
|
46115
|
-
if (typeof name !== 'undefined') {
|
|
46116
|
-
apiPayload['name'] = name;
|
|
46117
|
-
}
|
|
46118
|
-
if (typeof code !== 'undefined') {
|
|
46119
|
-
apiPayload['code'] = code;
|
|
46120
|
-
}
|
|
46121
|
-
if (typeof xdefault !== 'undefined') {
|
|
46122
|
-
apiPayload['default'] = xdefault;
|
|
46123
|
-
}
|
|
46124
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46125
|
-
const apiHeaders = {
|
|
46126
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46127
|
-
'content-type': 'application/json',
|
|
46128
|
-
accept: 'application/json',
|
|
46129
|
-
};
|
|
46130
|
-
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
46131
|
-
}
|
|
46132
|
-
deleteSubtitle(paramsOrFirst, ...rest) {
|
|
46133
|
-
let params;
|
|
46134
|
-
if (paramsOrFirst &&
|
|
46135
|
-
typeof paramsOrFirst === 'object' &&
|
|
46136
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46137
|
-
params = (paramsOrFirst || {});
|
|
46138
|
-
}
|
|
46139
|
-
else {
|
|
46140
|
-
params = {
|
|
46141
|
-
videoId: paramsOrFirst,
|
|
46142
|
-
subtitleId: rest[0],
|
|
46143
|
-
};
|
|
46144
|
-
}
|
|
46145
|
-
const videoId = params.videoId;
|
|
46146
|
-
const subtitleId = params.subtitleId;
|
|
46147
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
46148
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
46149
|
-
}
|
|
46150
|
-
if (typeof subtitleId === 'undefined' || subtitleId === '') {
|
|
46151
|
-
throw new AppwriteException('Missing required parameter: "subtitleId"');
|
|
46152
|
-
}
|
|
46153
|
-
const apiPath = '/videos/{videoId}/subtitles/{subtitleId}'
|
|
46154
|
-
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
46155
|
-
.replace('{subtitleId}', encodeURIComponent(String(subtitleId)));
|
|
46156
|
-
const apiPayload = {};
|
|
46157
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46158
|
-
const apiHeaders = {
|
|
46159
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46160
|
-
'content-type': 'application/json',
|
|
46161
|
-
accept: 'application/json',
|
|
46162
|
-
};
|
|
46163
|
-
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
46164
|
-
}
|
|
46165
|
-
getTimeline(paramsOrFirst) {
|
|
46166
|
-
let params;
|
|
46167
|
-
if (paramsOrFirst &&
|
|
46168
|
-
typeof paramsOrFirst === 'object' &&
|
|
46169
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46170
|
-
params = (paramsOrFirst || {});
|
|
46171
|
-
}
|
|
46172
|
-
else {
|
|
46173
|
-
params = {
|
|
46174
|
-
videoId: paramsOrFirst,
|
|
46175
|
-
};
|
|
46176
|
-
}
|
|
46177
|
-
const videoId = params.videoId;
|
|
46178
|
-
if (typeof videoId === 'undefined' || videoId === '') {
|
|
46179
|
-
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
46180
|
-
}
|
|
46181
|
-
const apiPath = '/videos/{videoId}/timeline'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
46182
|
-
const apiPayload = {};
|
|
46183
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46184
|
-
const apiHeaders = {
|
|
46185
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46186
|
-
accept: 'text/plain',
|
|
46187
|
-
};
|
|
46188
|
-
return this.client.call('get', uri, apiHeaders, apiPayload, 'text');
|
|
46189
|
-
}
|
|
46190
|
-
createTimeline(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
|
-
'content-type': 'application/json',
|
|
46212
|
-
accept: 'application/json',
|
|
46213
|
-
};
|
|
46214
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
46215
|
-
}
|
|
46216
|
-
}
|
|
46217
|
-
|
|
46218
|
-
class Waf {
|
|
46219
|
-
constructor(client) {
|
|
46220
|
-
this.client = client;
|
|
46221
|
-
}
|
|
46222
|
-
listRules(paramsOrFirst, ...rest) {
|
|
46223
|
-
let params;
|
|
46224
|
-
if ((typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
|
|
46225
|
-
(paramsOrFirst &&
|
|
46226
|
-
typeof paramsOrFirst === 'object' &&
|
|
46227
|
-
!Array.isArray(paramsOrFirst))) {
|
|
46228
|
-
params = (paramsOrFirst || {});
|
|
46229
|
-
}
|
|
46230
|
-
else {
|
|
46231
|
-
params = {
|
|
46232
|
-
queries: paramsOrFirst,
|
|
46233
|
-
search: rest[0],
|
|
46234
|
-
total: rest[1],
|
|
46235
|
-
};
|
|
46236
|
-
}
|
|
46237
|
-
const queries = params.queries;
|
|
46238
|
-
const search = params.search;
|
|
46239
|
-
const total = params.total;
|
|
46240
|
-
const apiPath = '/waf/rules';
|
|
46241
|
-
const apiPayload = {};
|
|
46242
|
-
if (typeof queries !== 'undefined') {
|
|
46243
|
-
apiPayload['queries'] = queries;
|
|
46244
|
-
}
|
|
46245
|
-
if (typeof search !== 'undefined') {
|
|
46246
|
-
apiPayload['search'] = search;
|
|
46247
|
-
}
|
|
46248
|
-
if (typeof total !== 'undefined') {
|
|
46249
|
-
apiPayload['total'] = total;
|
|
46250
|
-
}
|
|
46251
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46252
|
-
const apiHeaders = {
|
|
46253
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46254
|
-
accept: 'application/json',
|
|
46255
|
-
};
|
|
46256
|
-
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
46257
|
-
}
|
|
46258
|
-
createBypassRule(paramsOrFirst, ...rest) {
|
|
46259
|
-
let params;
|
|
46260
|
-
if (paramsOrFirst &&
|
|
46261
|
-
typeof paramsOrFirst === 'object' &&
|
|
46262
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46263
|
-
params = (paramsOrFirst || {});
|
|
46264
|
-
}
|
|
46265
|
-
else {
|
|
46266
|
-
params = {
|
|
46267
|
-
ruleId: paramsOrFirst,
|
|
46268
|
-
resourceType: rest[0],
|
|
46269
|
-
name: rest[1],
|
|
46270
|
-
resourceId: rest[2],
|
|
46271
|
-
description: rest[3],
|
|
46272
|
-
priority: rest[4],
|
|
46273
|
-
enabled: rest[5],
|
|
46274
|
-
conditions: rest[6],
|
|
46275
|
-
};
|
|
46276
|
-
}
|
|
46277
|
-
const ruleId = params.ruleId;
|
|
46278
|
-
const resourceType = params.resourceType;
|
|
46279
|
-
const name = params.name;
|
|
46280
|
-
const resourceId = params.resourceId;
|
|
46281
|
-
const description = params.description;
|
|
46282
|
-
const priority = params.priority;
|
|
46283
|
-
const enabled = params.enabled;
|
|
46284
|
-
const conditions = params.conditions;
|
|
46285
|
-
if (typeof ruleId === 'undefined') {
|
|
46286
|
-
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
46287
|
-
}
|
|
46288
|
-
if (typeof resourceType === 'undefined') {
|
|
46289
|
-
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
46290
|
-
}
|
|
46291
|
-
if (typeof name === 'undefined') {
|
|
46292
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
46293
|
-
}
|
|
46294
|
-
const apiPath = '/waf/rules/bypass';
|
|
46295
|
-
const apiPayload = {};
|
|
46296
|
-
if (typeof ruleId !== 'undefined') {
|
|
46297
|
-
apiPayload['ruleId'] = ruleId;
|
|
46298
|
-
}
|
|
46299
|
-
if (typeof resourceType !== 'undefined') {
|
|
46300
|
-
apiPayload['resourceType'] = resourceType;
|
|
46301
|
-
}
|
|
46302
|
-
if (typeof resourceId !== 'undefined') {
|
|
46303
|
-
apiPayload['resourceId'] = resourceId;
|
|
46304
|
-
}
|
|
46305
|
-
if (typeof name !== 'undefined') {
|
|
46306
|
-
apiPayload['name'] = name;
|
|
46307
|
-
}
|
|
46308
|
-
if (typeof description !== 'undefined') {
|
|
46309
|
-
apiPayload['description'] = description;
|
|
46310
|
-
}
|
|
46311
|
-
if (typeof priority !== 'undefined') {
|
|
46312
|
-
apiPayload['priority'] = priority;
|
|
46313
|
-
}
|
|
46314
|
-
if (typeof enabled !== 'undefined') {
|
|
46315
|
-
apiPayload['enabled'] = enabled;
|
|
46316
|
-
}
|
|
46317
|
-
if (typeof conditions !== 'undefined') {
|
|
46318
|
-
apiPayload['conditions'] = conditions;
|
|
46319
|
-
}
|
|
46320
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46321
|
-
const apiHeaders = {
|
|
46322
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46323
|
-
'content-type': 'application/json',
|
|
46324
|
-
accept: 'application/json',
|
|
46325
|
-
};
|
|
46326
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
46327
|
-
}
|
|
46328
|
-
updateBypassRule(paramsOrFirst, ...rest) {
|
|
46329
|
-
let params;
|
|
46330
|
-
if (paramsOrFirst &&
|
|
46331
|
-
typeof paramsOrFirst === 'object' &&
|
|
46332
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46333
|
-
params = (paramsOrFirst || {});
|
|
46334
|
-
}
|
|
46335
|
-
else {
|
|
46336
|
-
params = {
|
|
46337
|
-
ruleId: paramsOrFirst,
|
|
46338
|
-
resourceType: rest[0],
|
|
46339
|
-
resourceId: rest[1],
|
|
46340
|
-
name: rest[2],
|
|
46341
|
-
description: rest[3],
|
|
46342
|
-
priority: rest[4],
|
|
46343
|
-
enabled: rest[5],
|
|
46344
|
-
conditions: rest[6],
|
|
46345
|
-
};
|
|
46346
|
-
}
|
|
46347
|
-
const ruleId = params.ruleId;
|
|
46348
|
-
const resourceType = params.resourceType;
|
|
46349
|
-
const resourceId = params.resourceId;
|
|
46350
|
-
const name = params.name;
|
|
46351
|
-
const description = params.description;
|
|
46352
|
-
const priority = params.priority;
|
|
46353
|
-
const enabled = params.enabled;
|
|
46354
|
-
const conditions = params.conditions;
|
|
46355
|
-
if (typeof ruleId === 'undefined' || ruleId === '') {
|
|
46356
|
-
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
46357
|
-
}
|
|
46358
|
-
const apiPath = '/waf/rules/bypass/{ruleId}'.replace('{ruleId}', encodeURIComponent(String(ruleId)));
|
|
46359
|
-
const apiPayload = {};
|
|
46360
|
-
if (typeof resourceType !== 'undefined') {
|
|
46361
|
-
apiPayload['resourceType'] = resourceType;
|
|
46362
|
-
}
|
|
46363
|
-
if (typeof resourceId !== 'undefined') {
|
|
46364
|
-
apiPayload['resourceId'] = resourceId;
|
|
46365
|
-
}
|
|
46366
|
-
if (typeof name !== 'undefined') {
|
|
46367
|
-
apiPayload['name'] = name;
|
|
46368
|
-
}
|
|
46369
|
-
if (typeof description !== 'undefined') {
|
|
46370
|
-
apiPayload['description'] = description;
|
|
46371
|
-
}
|
|
46372
|
-
if (typeof priority !== 'undefined') {
|
|
46373
|
-
apiPayload['priority'] = priority;
|
|
46374
|
-
}
|
|
46375
|
-
if (typeof enabled !== 'undefined') {
|
|
46376
|
-
apiPayload['enabled'] = enabled;
|
|
46377
|
-
}
|
|
46378
|
-
if (typeof conditions !== 'undefined') {
|
|
46379
|
-
apiPayload['conditions'] = conditions;
|
|
46380
|
-
}
|
|
46381
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46382
|
-
const apiHeaders = {
|
|
46383
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46384
|
-
'content-type': 'application/json',
|
|
46385
|
-
accept: 'application/json',
|
|
46386
|
-
};
|
|
46387
|
-
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
46388
|
-
}
|
|
46389
|
-
createChallengeRule(paramsOrFirst, ...rest) {
|
|
46390
|
-
let params;
|
|
46391
|
-
if (paramsOrFirst &&
|
|
46392
|
-
typeof paramsOrFirst === 'object' &&
|
|
46393
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46394
|
-
params = (paramsOrFirst || {});
|
|
46395
|
-
}
|
|
46396
|
-
else {
|
|
46397
|
-
params = {
|
|
46398
|
-
ruleId: paramsOrFirst,
|
|
46399
|
-
resourceType: rest[0],
|
|
46400
|
-
name: rest[1],
|
|
46401
|
-
resourceId: rest[2],
|
|
46402
|
-
description: rest[3],
|
|
46403
|
-
challengeType: rest[4],
|
|
46404
|
-
priority: rest[5],
|
|
46405
|
-
enabled: rest[6],
|
|
46406
|
-
conditions: rest[7],
|
|
46407
|
-
difficulty: rest[8],
|
|
46408
|
-
ttl: rest[9],
|
|
46409
|
-
};
|
|
46410
|
-
}
|
|
46411
|
-
const ruleId = params.ruleId;
|
|
46412
|
-
const resourceType = params.resourceType;
|
|
46413
|
-
const name = params.name;
|
|
46414
|
-
const resourceId = params.resourceId;
|
|
46415
|
-
const description = params.description;
|
|
46416
|
-
const challengeType = params.challengeType;
|
|
46417
|
-
const priority = params.priority;
|
|
46418
|
-
const enabled = params.enabled;
|
|
46419
|
-
const conditions = params.conditions;
|
|
46420
|
-
const difficulty = params.difficulty;
|
|
46421
|
-
const ttl = params.ttl;
|
|
46422
|
-
if (typeof ruleId === 'undefined') {
|
|
46423
|
-
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
46424
|
-
}
|
|
46425
|
-
if (typeof resourceType === 'undefined') {
|
|
46426
|
-
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
46427
|
-
}
|
|
46428
|
-
if (typeof name === 'undefined') {
|
|
46429
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
46430
|
-
}
|
|
46431
|
-
const apiPath = '/waf/rules/challenge';
|
|
46432
|
-
const apiPayload = {};
|
|
46433
|
-
if (typeof ruleId !== 'undefined') {
|
|
46434
|
-
apiPayload['ruleId'] = ruleId;
|
|
46435
|
-
}
|
|
46436
|
-
if (typeof resourceType !== 'undefined') {
|
|
46437
|
-
apiPayload['resourceType'] = resourceType;
|
|
46438
|
-
}
|
|
46439
|
-
if (typeof resourceId !== 'undefined') {
|
|
46440
|
-
apiPayload['resourceId'] = resourceId;
|
|
46441
|
-
}
|
|
46442
|
-
if (typeof name !== 'undefined') {
|
|
46443
|
-
apiPayload['name'] = name;
|
|
46444
|
-
}
|
|
46445
|
-
if (typeof description !== 'undefined') {
|
|
46446
|
-
apiPayload['description'] = description;
|
|
46447
|
-
}
|
|
46448
|
-
if (typeof challengeType !== 'undefined') {
|
|
46449
|
-
apiPayload['challengeType'] = challengeType;
|
|
46450
|
-
}
|
|
46451
|
-
if (typeof priority !== 'undefined') {
|
|
46452
|
-
apiPayload['priority'] = priority;
|
|
46453
|
-
}
|
|
46454
|
-
if (typeof enabled !== 'undefined') {
|
|
46455
|
-
apiPayload['enabled'] = enabled;
|
|
46456
|
-
}
|
|
46457
|
-
if (typeof conditions !== 'undefined') {
|
|
46458
|
-
apiPayload['conditions'] = conditions;
|
|
46459
|
-
}
|
|
46460
|
-
if (typeof difficulty !== 'undefined') {
|
|
46461
|
-
apiPayload['difficulty'] = difficulty;
|
|
46462
|
-
}
|
|
46463
|
-
if (typeof ttl !== 'undefined') {
|
|
46464
|
-
apiPayload['ttl'] = ttl;
|
|
46465
|
-
}
|
|
46466
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46467
|
-
const apiHeaders = {
|
|
46468
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46469
|
-
'content-type': 'application/json',
|
|
46470
|
-
accept: 'application/json',
|
|
46471
|
-
};
|
|
46472
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
46473
|
-
}
|
|
46474
|
-
updateChallengeRule(paramsOrFirst, ...rest) {
|
|
46475
|
-
let params;
|
|
46476
|
-
if (paramsOrFirst &&
|
|
46477
|
-
typeof paramsOrFirst === 'object' &&
|
|
46478
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46479
|
-
params = (paramsOrFirst || {});
|
|
46480
|
-
}
|
|
46481
|
-
else {
|
|
46482
|
-
params = {
|
|
46483
|
-
ruleId: paramsOrFirst,
|
|
46484
|
-
resourceType: rest[0],
|
|
46485
|
-
resourceId: rest[1],
|
|
46486
|
-
name: rest[2],
|
|
46487
|
-
description: rest[3],
|
|
46488
|
-
challengeType: rest[4],
|
|
46489
|
-
priority: rest[5],
|
|
46490
|
-
enabled: rest[6],
|
|
46491
|
-
conditions: rest[7],
|
|
46492
|
-
difficulty: rest[8],
|
|
46493
|
-
ttl: rest[9],
|
|
46494
|
-
};
|
|
46495
|
-
}
|
|
46496
|
-
const ruleId = params.ruleId;
|
|
46497
|
-
const resourceType = params.resourceType;
|
|
46498
|
-
const resourceId = params.resourceId;
|
|
46499
|
-
const name = params.name;
|
|
46500
|
-
const description = params.description;
|
|
46501
|
-
const challengeType = params.challengeType;
|
|
46502
|
-
const priority = params.priority;
|
|
46503
|
-
const enabled = params.enabled;
|
|
46504
|
-
const conditions = params.conditions;
|
|
46505
|
-
const difficulty = params.difficulty;
|
|
46506
|
-
const ttl = params.ttl;
|
|
46507
|
-
if (typeof ruleId === 'undefined' || ruleId === '') {
|
|
46508
|
-
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
46509
|
-
}
|
|
46510
|
-
const apiPath = '/waf/rules/challenge/{ruleId}'.replace('{ruleId}', encodeURIComponent(String(ruleId)));
|
|
46511
|
-
const apiPayload = {};
|
|
46512
|
-
if (typeof resourceType !== 'undefined') {
|
|
46513
|
-
apiPayload['resourceType'] = resourceType;
|
|
46514
|
-
}
|
|
46515
|
-
if (typeof resourceId !== 'undefined') {
|
|
46516
|
-
apiPayload['resourceId'] = resourceId;
|
|
46517
|
-
}
|
|
46518
|
-
if (typeof name !== 'undefined') {
|
|
46519
|
-
apiPayload['name'] = name;
|
|
46520
|
-
}
|
|
46521
|
-
if (typeof description !== 'undefined') {
|
|
46522
|
-
apiPayload['description'] = description;
|
|
46523
|
-
}
|
|
46524
|
-
if (typeof challengeType !== 'undefined') {
|
|
46525
|
-
apiPayload['challengeType'] = challengeType;
|
|
46526
|
-
}
|
|
46527
|
-
if (typeof priority !== 'undefined') {
|
|
46528
|
-
apiPayload['priority'] = priority;
|
|
46529
|
-
}
|
|
46530
|
-
if (typeof enabled !== 'undefined') {
|
|
46531
|
-
apiPayload['enabled'] = enabled;
|
|
46532
|
-
}
|
|
46533
|
-
if (typeof conditions !== 'undefined') {
|
|
46534
|
-
apiPayload['conditions'] = conditions;
|
|
46535
|
-
}
|
|
46536
|
-
if (typeof difficulty !== 'undefined') {
|
|
46537
|
-
apiPayload['difficulty'] = difficulty;
|
|
46538
|
-
}
|
|
46539
|
-
if (typeof ttl !== 'undefined') {
|
|
46540
|
-
apiPayload['ttl'] = ttl;
|
|
46541
|
-
}
|
|
46542
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46543
|
-
const apiHeaders = {
|
|
46544
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46545
|
-
'content-type': 'application/json',
|
|
46546
|
-
accept: 'application/json',
|
|
46547
|
-
};
|
|
46548
|
-
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
46549
|
-
}
|
|
46550
|
-
createDenyRule(paramsOrFirst, ...rest) {
|
|
46551
|
-
let params;
|
|
46552
|
-
if (paramsOrFirst &&
|
|
46553
|
-
typeof paramsOrFirst === 'object' &&
|
|
46554
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46555
|
-
params = (paramsOrFirst || {});
|
|
46556
|
-
}
|
|
46557
|
-
else {
|
|
46558
|
-
params = {
|
|
46559
|
-
ruleId: paramsOrFirst,
|
|
46560
|
-
resourceType: rest[0],
|
|
46561
|
-
name: rest[1],
|
|
46562
|
-
resourceId: rest[2],
|
|
46563
|
-
description: rest[3],
|
|
46564
|
-
priority: rest[4],
|
|
46565
|
-
enabled: rest[5],
|
|
46566
|
-
conditions: rest[6],
|
|
46567
|
-
};
|
|
46568
|
-
}
|
|
46569
|
-
const ruleId = params.ruleId;
|
|
46570
|
-
const resourceType = params.resourceType;
|
|
46571
|
-
const name = params.name;
|
|
46572
|
-
const resourceId = params.resourceId;
|
|
46573
|
-
const description = params.description;
|
|
46574
|
-
const priority = params.priority;
|
|
46575
|
-
const enabled = params.enabled;
|
|
46576
|
-
const conditions = params.conditions;
|
|
46577
|
-
if (typeof ruleId === 'undefined') {
|
|
46578
|
-
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
46579
|
-
}
|
|
46580
|
-
if (typeof resourceType === 'undefined') {
|
|
46581
|
-
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
46582
|
-
}
|
|
46583
|
-
if (typeof name === 'undefined') {
|
|
46584
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
46585
|
-
}
|
|
46586
|
-
const apiPath = '/waf/rules/deny';
|
|
46587
|
-
const apiPayload = {};
|
|
46588
|
-
if (typeof ruleId !== 'undefined') {
|
|
46589
|
-
apiPayload['ruleId'] = ruleId;
|
|
46590
|
-
}
|
|
46591
|
-
if (typeof resourceType !== 'undefined') {
|
|
46592
|
-
apiPayload['resourceType'] = resourceType;
|
|
46593
|
-
}
|
|
46594
|
-
if (typeof resourceId !== 'undefined') {
|
|
46595
|
-
apiPayload['resourceId'] = resourceId;
|
|
46596
|
-
}
|
|
46597
|
-
if (typeof name !== 'undefined') {
|
|
46598
|
-
apiPayload['name'] = name;
|
|
46599
|
-
}
|
|
46600
|
-
if (typeof description !== 'undefined') {
|
|
46601
|
-
apiPayload['description'] = description;
|
|
46602
|
-
}
|
|
46603
|
-
if (typeof priority !== 'undefined') {
|
|
46604
|
-
apiPayload['priority'] = priority;
|
|
46605
|
-
}
|
|
46606
|
-
if (typeof enabled !== 'undefined') {
|
|
46607
|
-
apiPayload['enabled'] = enabled;
|
|
46608
|
-
}
|
|
46609
|
-
if (typeof conditions !== 'undefined') {
|
|
46610
|
-
apiPayload['conditions'] = conditions;
|
|
46611
|
-
}
|
|
46612
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46613
|
-
const apiHeaders = {
|
|
46614
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46615
|
-
'content-type': 'application/json',
|
|
46616
|
-
accept: 'application/json',
|
|
46617
|
-
};
|
|
46618
|
-
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
46619
|
-
}
|
|
46620
|
-
updateDenyRule(paramsOrFirst, ...rest) {
|
|
46621
|
-
let params;
|
|
46622
|
-
if (paramsOrFirst &&
|
|
46623
|
-
typeof paramsOrFirst === 'object' &&
|
|
46624
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46625
|
-
params = (paramsOrFirst || {});
|
|
46626
|
-
}
|
|
46627
|
-
else {
|
|
46628
|
-
params = {
|
|
46629
|
-
ruleId: paramsOrFirst,
|
|
46630
|
-
resourceType: rest[0],
|
|
46631
|
-
resourceId: rest[1],
|
|
46632
|
-
name: rest[2],
|
|
46633
|
-
description: rest[3],
|
|
46634
|
-
priority: rest[4],
|
|
46635
|
-
enabled: rest[5],
|
|
46636
|
-
conditions: rest[6],
|
|
46637
|
-
};
|
|
46638
|
-
}
|
|
46639
|
-
const ruleId = params.ruleId;
|
|
46640
|
-
const resourceType = params.resourceType;
|
|
46641
|
-
const resourceId = params.resourceId;
|
|
46642
|
-
const name = params.name;
|
|
46643
|
-
const description = params.description;
|
|
46644
|
-
const priority = params.priority;
|
|
46645
|
-
const enabled = params.enabled;
|
|
46646
|
-
const conditions = params.conditions;
|
|
46647
|
-
if (typeof ruleId === 'undefined' || ruleId === '') {
|
|
46648
|
-
throw new AppwriteException('Missing required parameter: "ruleId"');
|
|
46649
|
-
}
|
|
46650
|
-
const apiPath = '/waf/rules/deny/{ruleId}'.replace('{ruleId}', encodeURIComponent(String(ruleId)));
|
|
46651
|
-
const apiPayload = {};
|
|
46652
|
-
if (typeof resourceType !== 'undefined') {
|
|
46653
|
-
apiPayload['resourceType'] = resourceType;
|
|
46654
|
-
}
|
|
46655
|
-
if (typeof resourceId !== 'undefined') {
|
|
46656
|
-
apiPayload['resourceId'] = resourceId;
|
|
46657
|
-
}
|
|
46658
|
-
if (typeof name !== 'undefined') {
|
|
46659
|
-
apiPayload['name'] = name;
|
|
46660
|
-
}
|
|
46661
|
-
if (typeof description !== 'undefined') {
|
|
46662
|
-
apiPayload['description'] = description;
|
|
46663
|
-
}
|
|
46664
|
-
if (typeof priority !== 'undefined') {
|
|
46665
|
-
apiPayload['priority'] = priority;
|
|
46666
|
-
}
|
|
46667
|
-
if (typeof enabled !== 'undefined') {
|
|
46668
|
-
apiPayload['enabled'] = enabled;
|
|
46669
|
-
}
|
|
46670
|
-
if (typeof conditions !== 'undefined') {
|
|
46671
|
-
apiPayload['conditions'] = conditions;
|
|
46672
|
-
}
|
|
46673
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46674
|
-
const apiHeaders = {
|
|
46675
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
46676
|
-
'content-type': 'application/json',
|
|
46677
|
-
accept: 'application/json',
|
|
46678
|
-
};
|
|
46679
|
-
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
46680
|
-
}
|
|
46681
|
-
createRateLimitRule(paramsOrFirst, ...rest) {
|
|
46682
|
-
let params;
|
|
46683
|
-
if (paramsOrFirst &&
|
|
46684
|
-
typeof paramsOrFirst === 'object' &&
|
|
46685
|
-
!Array.isArray(paramsOrFirst)) {
|
|
46686
|
-
params = (paramsOrFirst || {});
|
|
46687
|
-
}
|
|
46688
|
-
else {
|
|
46689
|
-
params = {
|
|
46690
|
-
ruleId: paramsOrFirst,
|
|
46691
|
-
resourceType: rest[0],
|
|
46692
|
-
name: rest[1],
|
|
46693
|
-
limit: rest[2],
|
|
46694
|
-
interval: rest[3],
|
|
46695
|
-
resourceId: rest[4],
|
|
46696
|
-
description: rest[5],
|
|
46697
|
-
key: rest[6],
|
|
46698
|
-
strategy: rest[7],
|
|
46699
|
-
maxBucketSize: rest[8],
|
|
46700
|
-
priority: rest[9],
|
|
46701
|
-
enabled: rest[10],
|
|
46702
|
-
conditions: rest[11],
|
|
44727
|
+
ruleId: paramsOrFirst,
|
|
44728
|
+
resourceType: rest[0],
|
|
44729
|
+
name: rest[1],
|
|
44730
|
+
limit: rest[2],
|
|
44731
|
+
interval: rest[3],
|
|
44732
|
+
resourceId: rest[4],
|
|
44733
|
+
description: rest[5],
|
|
44734
|
+
key: rest[6],
|
|
44735
|
+
strategy: rest[7],
|
|
44736
|
+
maxBucketSize: rest[8],
|
|
44737
|
+
priority: rest[9],
|
|
44738
|
+
enabled: rest[10],
|
|
44739
|
+
conditions: rest[11],
|
|
46703
44740
|
};
|
|
46704
44741
|
}
|
|
46705
44742
|
const ruleId = params.ruleId;
|
|
@@ -47977,8 +46014,9 @@ const RECONNECT_PERIOD_MS = 2000;
|
|
|
47977
46014
|
* );
|
|
47978
46015
|
* // sub.update({ background: true }); sub.unsubscribe();
|
|
47979
46016
|
*/
|
|
47980
|
-
class Push {
|
|
46017
|
+
class Push extends Service {
|
|
47981
46018
|
constructor(client) {
|
|
46019
|
+
super(client);
|
|
47982
46020
|
this.mqtt = null;
|
|
47983
46021
|
this.connecting = null;
|
|
47984
46022
|
this.Buffer = null;
|
|
@@ -48008,7 +46046,6 @@ class Push {
|
|
|
48008
46046
|
this.connectedKey = '';
|
|
48009
46047
|
this.connectionEpoch = 0;
|
|
48010
46048
|
this.subscriptions = new Map();
|
|
48011
|
-
this.client = client;
|
|
48012
46049
|
}
|
|
48013
46050
|
// The broker subscription for a filter uses the highest QoS any local subscription on
|
|
48014
46051
|
// it wants, so a QoS-0 subscription never downgrades a QoS-1 one sharing the filter.
|
|
@@ -48748,670 +46785,6 @@ function matches(filter, topic) {
|
|
|
48748
46785
|
return filterParts.length === topicParts.length;
|
|
48749
46786
|
}
|
|
48750
46787
|
|
|
48751
|
-
/**
|
|
48752
|
-
* Analytics auto-tracking helpers.
|
|
48753
|
-
*
|
|
48754
|
-
* These are hand-written companions to the generated `Analytics` service.
|
|
48755
|
-
* The generated service exposes `createEvent(params)` for arbitrary events;
|
|
48756
|
-
* this module wires up common auto-tracking behaviours (pageviews, outbound
|
|
48757
|
-
* links, downloads, scroll depth, active engagement) on top of it.
|
|
48758
|
-
*
|
|
48759
|
-
* The tracking helpers accept a plain event-emitter function so they do not
|
|
48760
|
-
* hard-couple to the generated `Analytics` class. The emitter adapts this
|
|
48761
|
-
* module's option shape to `createEvent`: `url` is required there, and `props`
|
|
48762
|
-
* is a flat alternating key/value list rather than an object.
|
|
48763
|
-
*
|
|
48764
|
-
* ```ts
|
|
48765
|
-
* const analytics = new Analytics(client);
|
|
48766
|
-
* const tracking = new AnalyticsTracking(
|
|
48767
|
-
* (name, options) => analytics.createEvent({
|
|
48768
|
-
* propertyId: options?.propertyId ?? '<PROPERTY_ID>',
|
|
48769
|
-
* name,
|
|
48770
|
-
* url: options?.url ?? window.location.href,
|
|
48771
|
-
* referrer: options?.referrer,
|
|
48772
|
-
* scrollDepth: options?.scrollDepth,
|
|
48773
|
-
* engagementTime: options?.engagementTime,
|
|
48774
|
-
* props: Object.entries(options?.props ?? {}).flatMap(
|
|
48775
|
-
* ([key, value]) => [key, String(value)],
|
|
48776
|
-
* ),
|
|
48777
|
-
* }),
|
|
48778
|
-
* { propertyId: '<PROPERTY_ID>' }
|
|
48779
|
-
* );
|
|
48780
|
-
* tracking.enableAllAutoTracking();
|
|
48781
|
-
* ```
|
|
48782
|
-
*
|
|
48783
|
-
* `propertyId` is optional: when set it is merged into the options of every
|
|
48784
|
-
* emitted event, so an emitter that forwards `options.propertyId` (as above)
|
|
48785
|
-
* picks it up instead of every caller hand-rolling it into the closure.
|
|
48786
|
-
* Per-event `propertyId` always wins over the configured default.
|
|
48787
|
-
*
|
|
48788
|
-
* All helpers respect `navigator.doNotTrack === '1'` by default; opt out with
|
|
48789
|
-
* `respectDoNotTrack: false` in the constructor options.
|
|
48790
|
-
*
|
|
48791
|
-
* Engagement time follows Plausible's model: rather than one total at unload,
|
|
48792
|
-
* a delta is emitted at every natural checkpoint of the visit (tab hidden, SPA
|
|
48793
|
-
* route change, unload). See `enableAutoEngagementTime` for details.
|
|
48794
|
-
*
|
|
48795
|
-
* Auto-emitted event names follow `snake_case` + lowercase (`pageview`,
|
|
48796
|
-
* `outbound_link`, `file_download`, `screen_view`, etc.). Any prop keys use
|
|
48797
|
-
* camelCase to match the endpoint's parameter naming. Callers can pass any
|
|
48798
|
-
* custom event name; the auto-track methods only own the events they emit
|
|
48799
|
-
* themselves.
|
|
48800
|
-
*/
|
|
48801
|
-
const DEFAULT_DOWNLOAD_EXTENSIONS = [
|
|
48802
|
-
'pdf',
|
|
48803
|
-
'zip',
|
|
48804
|
-
'rar',
|
|
48805
|
-
'7z',
|
|
48806
|
-
'tar',
|
|
48807
|
-
'gz',
|
|
48808
|
-
'csv',
|
|
48809
|
-
'tsv',
|
|
48810
|
-
'xls',
|
|
48811
|
-
'xlsx',
|
|
48812
|
-
'doc',
|
|
48813
|
-
'docx',
|
|
48814
|
-
'ppt',
|
|
48815
|
-
'pptx',
|
|
48816
|
-
'dmg',
|
|
48817
|
-
'exe',
|
|
48818
|
-
'msi',
|
|
48819
|
-
'pkg',
|
|
48820
|
-
'deb',
|
|
48821
|
-
'rpm',
|
|
48822
|
-
'apk',
|
|
48823
|
-
'mp3',
|
|
48824
|
-
'wav',
|
|
48825
|
-
'flac',
|
|
48826
|
-
'mp4',
|
|
48827
|
-
'mov',
|
|
48828
|
-
'avi',
|
|
48829
|
-
'mkv',
|
|
48830
|
-
'webm',
|
|
48831
|
-
];
|
|
48832
|
-
/**
|
|
48833
|
-
* Two-part public suffixes common enough to matter for outbound-link detection.
|
|
48834
|
-
* See `rootDomain()` for why this is a short list rather than the Public Suffix
|
|
48835
|
-
* List.
|
|
48836
|
-
*/
|
|
48837
|
-
const MULTI_PART_SUFFIXES = new Set([
|
|
48838
|
-
'co.uk',
|
|
48839
|
-
'org.uk',
|
|
48840
|
-
'ac.uk',
|
|
48841
|
-
'gov.uk',
|
|
48842
|
-
'me.uk',
|
|
48843
|
-
'net.uk',
|
|
48844
|
-
'sch.uk',
|
|
48845
|
-
'co.jp',
|
|
48846
|
-
'ne.jp',
|
|
48847
|
-
'or.jp',
|
|
48848
|
-
'ac.jp',
|
|
48849
|
-
'go.jp',
|
|
48850
|
-
'com.au',
|
|
48851
|
-
'net.au',
|
|
48852
|
-
'org.au',
|
|
48853
|
-
'edu.au',
|
|
48854
|
-
'gov.au',
|
|
48855
|
-
'com.br',
|
|
48856
|
-
'net.br',
|
|
48857
|
-
'org.br',
|
|
48858
|
-
'com.cn',
|
|
48859
|
-
'net.cn',
|
|
48860
|
-
'org.cn',
|
|
48861
|
-
'gov.cn',
|
|
48862
|
-
'co.in',
|
|
48863
|
-
'net.in',
|
|
48864
|
-
'org.in',
|
|
48865
|
-
'co.nz',
|
|
48866
|
-
'net.nz',
|
|
48867
|
-
'org.nz',
|
|
48868
|
-
'co.za',
|
|
48869
|
-
'org.za',
|
|
48870
|
-
'com.mx',
|
|
48871
|
-
'com.ar',
|
|
48872
|
-
'com.co',
|
|
48873
|
-
'com.pe',
|
|
48874
|
-
'com.tr',
|
|
48875
|
-
'com.tw',
|
|
48876
|
-
'com.sg',
|
|
48877
|
-
'com.hk',
|
|
48878
|
-
'com.my',
|
|
48879
|
-
'com.ph',
|
|
48880
|
-
'com.vn',
|
|
48881
|
-
'co.kr',
|
|
48882
|
-
'co.il',
|
|
48883
|
-
'co.id',
|
|
48884
|
-
'co.th',
|
|
48885
|
-
'com.ua',
|
|
48886
|
-
'com.pl',
|
|
48887
|
-
'com.es',
|
|
48888
|
-
]);
|
|
48889
|
-
const SCROLL_DEPTH_THROTTLE_MS = 200;
|
|
48890
|
-
class AnalyticsTracking {
|
|
48891
|
-
constructor(emit, options = {}) {
|
|
48892
|
-
this.pageviewCleanups = [];
|
|
48893
|
-
this.scrollCleanups = [];
|
|
48894
|
-
this.engagementCleanups = [];
|
|
48895
|
-
this.maxScrollDepth = 0;
|
|
48896
|
-
this.scrollTicking = false;
|
|
48897
|
-
this.lastScrollReport = 0;
|
|
48898
|
-
this.engagementStart = 0;
|
|
48899
|
-
this.engagementAccumulatedMs = 0;
|
|
48900
|
-
this.engagementActive = false;
|
|
48901
|
-
this.emit = emit;
|
|
48902
|
-
this.respectDoNotTrack = options.respectDoNotTrack !== false;
|
|
48903
|
-
this.propertyId = options.propertyId;
|
|
48904
|
-
}
|
|
48905
|
-
/**
|
|
48906
|
-
* Enable the opinionated default auto-tracking set: pageviews, outbound
|
|
48907
|
-
* links, scroll depth and active engagement time. Downloads must be opted
|
|
48908
|
-
* into separately via `enableAutoDownloadTracking()` because the extension
|
|
48909
|
-
* list is application-specific.
|
|
48910
|
-
*/
|
|
48911
|
-
enableAllAutoTracking() {
|
|
48912
|
-
this.enableAutoPageviews();
|
|
48913
|
-
this.enableAutoOutboundTracking();
|
|
48914
|
-
this.enableAutoScrollDepth();
|
|
48915
|
-
this.enableAutoEngagementTime();
|
|
48916
|
-
}
|
|
48917
|
-
/**
|
|
48918
|
-
* Track an event manually. Respects the DNT setting and swallows emitter
|
|
48919
|
-
* exceptions so tracking failures never surface to the host page.
|
|
48920
|
-
*/
|
|
48921
|
-
track(name, options) {
|
|
48922
|
-
if (!this.canTrack()) {
|
|
48923
|
-
return;
|
|
48924
|
-
}
|
|
48925
|
-
try {
|
|
48926
|
-
this.emit(name, this.withPropertyId(options));
|
|
48927
|
-
}
|
|
48928
|
-
catch (error) {
|
|
48929
|
-
console.warn('AnalyticsTracking: emitter threw', error);
|
|
48930
|
-
}
|
|
48931
|
-
}
|
|
48932
|
-
/**
|
|
48933
|
-
* Convenience wrapper for pageview-shaped events.
|
|
48934
|
-
*/
|
|
48935
|
-
pageview(url, referrer) {
|
|
48936
|
-
this.track('pageview', {
|
|
48937
|
-
url: url !== null && url !== void 0 ? url : this.currentPageUrl(),
|
|
48938
|
-
referrer: referrer !== null && referrer !== void 0 ? referrer : (typeof document !== 'undefined'
|
|
48939
|
-
? document.referrer
|
|
48940
|
-
: undefined),
|
|
48941
|
-
});
|
|
48942
|
-
}
|
|
48943
|
-
/**
|
|
48944
|
-
* Enable SPA-aware pageview tracking. Fires an initial pageview on
|
|
48945
|
-
* enable, then again on every `pushState`, `replaceState`, `popstate`
|
|
48946
|
-
* or hashchange. Idempotent — repeat calls no-op.
|
|
48947
|
-
*/
|
|
48948
|
-
enableAutoPageviews() {
|
|
48949
|
-
if (this.pageviewCleanups.length > 0) {
|
|
48950
|
-
return;
|
|
48951
|
-
}
|
|
48952
|
-
if (typeof window === 'undefined' || typeof history === 'undefined') {
|
|
48953
|
-
return;
|
|
48954
|
-
}
|
|
48955
|
-
this.currentPath = this.currentPageUrl();
|
|
48956
|
-
this.pageview();
|
|
48957
|
-
const handleNavigation = () => {
|
|
48958
|
-
const nextPath = this.currentPageUrl();
|
|
48959
|
-
if (nextPath === this.currentPath) {
|
|
48960
|
-
return;
|
|
48961
|
-
}
|
|
48962
|
-
const previous = this.currentPath;
|
|
48963
|
-
this.currentPath = nextPath;
|
|
48964
|
-
this.flushScrollDepth(previous);
|
|
48965
|
-
this.flushEngagement(previous);
|
|
48966
|
-
this.pageview(nextPath);
|
|
48967
|
-
// flushEngagement no longer auto-restarts the timer (see its
|
|
48968
|
-
// implementation note re: bfcache). SPA navigation stays on the
|
|
48969
|
-
// same document, so restart engagement tracking for the new
|
|
48970
|
-
// route as long as the tab is visible.
|
|
48971
|
-
if (this.engagementCleanups.length > 0 &&
|
|
48972
|
-
(typeof document === 'undefined' ||
|
|
48973
|
-
document.visibilityState !== 'hidden')) {
|
|
48974
|
-
this.startEngagement();
|
|
48975
|
-
}
|
|
48976
|
-
};
|
|
48977
|
-
const originalPushState = history.pushState.bind(history);
|
|
48978
|
-
const originalReplaceState = history.replaceState.bind(history);
|
|
48979
|
-
// Our wrappers stay reachable after cleanup whenever another library
|
|
48980
|
-
// patched on top of ours, so they have to be switchable off rather than
|
|
48981
|
-
// merely unreferenced.
|
|
48982
|
-
let patchActive = true;
|
|
48983
|
-
const patchedPushState = (data, unused, url) => {
|
|
48984
|
-
originalPushState(data, unused, url);
|
|
48985
|
-
if (patchActive) {
|
|
48986
|
-
handleNavigation();
|
|
48987
|
-
}
|
|
48988
|
-
};
|
|
48989
|
-
const patchedReplaceState = (data, unused, url) => {
|
|
48990
|
-
originalReplaceState(data, unused, url);
|
|
48991
|
-
if (patchActive) {
|
|
48992
|
-
handleNavigation();
|
|
48993
|
-
}
|
|
48994
|
-
};
|
|
48995
|
-
history.pushState = patchedPushState;
|
|
48996
|
-
history.replaceState = patchedReplaceState;
|
|
48997
|
-
const popstateHandler = () => handleNavigation();
|
|
48998
|
-
const hashchangeHandler = () => handleNavigation();
|
|
48999
|
-
window.addEventListener('popstate', popstateHandler);
|
|
49000
|
-
window.addEventListener('hashchange', hashchangeHandler);
|
|
49001
|
-
this.pageviewCleanups.push(() => {
|
|
49002
|
-
// Only unwind our own patch. A router (Next.js App Router, React
|
|
49003
|
-
// Router, …) that patched these after us owns the current value,
|
|
49004
|
-
// and assigning our saved reference back would silently throw its
|
|
49005
|
-
// wrapper away. In that case ours stays in the chain, which is why
|
|
49006
|
-
// `patchActive` exists: the wrapper keeps delegating to the original
|
|
49007
|
-
// but stops reporting.
|
|
49008
|
-
patchActive = false;
|
|
49009
|
-
if (history.pushState === patchedPushState) {
|
|
49010
|
-
history.pushState = originalPushState;
|
|
49011
|
-
}
|
|
49012
|
-
if (history.replaceState === patchedReplaceState) {
|
|
49013
|
-
history.replaceState = originalReplaceState;
|
|
49014
|
-
}
|
|
49015
|
-
window.removeEventListener('popstate', popstateHandler);
|
|
49016
|
-
window.removeEventListener('hashchange', hashchangeHandler);
|
|
49017
|
-
});
|
|
49018
|
-
}
|
|
49019
|
-
/**
|
|
49020
|
-
* Disable auto-pageview tracking installed by `enableAutoPageviews`.
|
|
49021
|
-
* Safe to call when auto-pageviews were never enabled.
|
|
49022
|
-
*/
|
|
49023
|
-
disableAutoPageviews() {
|
|
49024
|
-
for (const cleanup of this.pageviewCleanups) {
|
|
49025
|
-
cleanup();
|
|
49026
|
-
}
|
|
49027
|
-
this.pageviewCleanups = [];
|
|
49028
|
-
}
|
|
49029
|
-
/**
|
|
49030
|
-
* Enable click-based outbound link tracking. Detects anchor clicks that
|
|
49031
|
-
* navigate to a different origin and fires an `outbound_link` event
|
|
49032
|
-
* (with `hostname` and `href` props) before the browser navigates.
|
|
49033
|
-
*/
|
|
49034
|
-
enableAutoOutboundTracking(options = {}) {
|
|
49035
|
-
if (this.outboundCleanup) {
|
|
49036
|
-
return;
|
|
49037
|
-
}
|
|
49038
|
-
if (typeof document === 'undefined') {
|
|
49039
|
-
return;
|
|
49040
|
-
}
|
|
49041
|
-
const includeSubdomains = options.includeSubdomains === true;
|
|
49042
|
-
const clickHandler = (event) => {
|
|
49043
|
-
const anchor = this.findAnchor(event.target);
|
|
49044
|
-
if (!anchor || !anchor.href) {
|
|
49045
|
-
return;
|
|
49046
|
-
}
|
|
49047
|
-
const target = this.parseUrl(anchor.href);
|
|
49048
|
-
if (!target || !this.isExternal(target, includeSubdomains)) {
|
|
49049
|
-
return;
|
|
49050
|
-
}
|
|
49051
|
-
this.track('outbound_link', {
|
|
49052
|
-
url: target.href,
|
|
49053
|
-
props: { hostname: target.hostname, href: target.href },
|
|
49054
|
-
});
|
|
49055
|
-
};
|
|
49056
|
-
document.addEventListener('click', clickHandler, { capture: true });
|
|
49057
|
-
this.outboundCleanup = () => document.removeEventListener('click', clickHandler, {
|
|
49058
|
-
capture: true,
|
|
49059
|
-
});
|
|
49060
|
-
}
|
|
49061
|
-
/**
|
|
49062
|
-
* Disable outbound-link tracking installed by `enableAutoOutboundTracking`.
|
|
49063
|
-
* Safe to call when auto-outbound was never enabled.
|
|
49064
|
-
*/
|
|
49065
|
-
disableAutoOutboundTracking() {
|
|
49066
|
-
if (this.outboundCleanup) {
|
|
49067
|
-
this.outboundCleanup();
|
|
49068
|
-
this.outboundCleanup = undefined;
|
|
49069
|
-
}
|
|
49070
|
-
}
|
|
49071
|
-
/**
|
|
49072
|
-
* Enable click-based download tracking. Detects anchor clicks that point
|
|
49073
|
-
* at a file whose extension appears in the configured list and fires a
|
|
49074
|
-
* `file_download` event with `filename`, `extension` and `href` props.
|
|
49075
|
-
*/
|
|
49076
|
-
enableAutoDownloadTracking(options = {}) {
|
|
49077
|
-
var _a;
|
|
49078
|
-
if (this.downloadCleanup) {
|
|
49079
|
-
return;
|
|
49080
|
-
}
|
|
49081
|
-
if (typeof document === 'undefined') {
|
|
49082
|
-
return;
|
|
49083
|
-
}
|
|
49084
|
-
const extensions = ((_a = options.extensions) !== null && _a !== void 0 ? _a : DEFAULT_DOWNLOAD_EXTENSIONS).map((ext) => ext.toLowerCase().replace(/^\./, ''));
|
|
49085
|
-
const extensionSet = new Set(extensions);
|
|
49086
|
-
const clickHandler = (event) => {
|
|
49087
|
-
var _a, _b;
|
|
49088
|
-
const anchor = this.findAnchor(event.target);
|
|
49089
|
-
if (!anchor || !anchor.href) {
|
|
49090
|
-
return;
|
|
49091
|
-
}
|
|
49092
|
-
const url = this.parseUrl(anchor.href);
|
|
49093
|
-
if (!url) {
|
|
49094
|
-
return;
|
|
49095
|
-
}
|
|
49096
|
-
const filename = (_a = url.pathname.split('/').pop()) !== null && _a !== void 0 ? _a : '';
|
|
49097
|
-
const extension = filename.includes('.')
|
|
49098
|
-
? (_b = filename.split('.').pop()) === null || _b === void 0 ? void 0 : _b.toLowerCase()
|
|
49099
|
-
: undefined;
|
|
49100
|
-
if (!extension || !extensionSet.has(extension)) {
|
|
49101
|
-
return;
|
|
49102
|
-
}
|
|
49103
|
-
this.track('file_download', {
|
|
49104
|
-
url: url.href,
|
|
49105
|
-
props: { filename, extension, href: url.href },
|
|
49106
|
-
});
|
|
49107
|
-
};
|
|
49108
|
-
document.addEventListener('click', clickHandler, { capture: true });
|
|
49109
|
-
this.downloadCleanup = () => document.removeEventListener('click', clickHandler, {
|
|
49110
|
-
capture: true,
|
|
49111
|
-
});
|
|
49112
|
-
}
|
|
49113
|
-
/**
|
|
49114
|
-
* Disable file-download tracking installed by `enableAutoDownloadTracking`.
|
|
49115
|
-
* Safe to call when auto-download was never enabled.
|
|
49116
|
-
*/
|
|
49117
|
-
disableAutoDownloadTracking() {
|
|
49118
|
-
if (this.downloadCleanup) {
|
|
49119
|
-
this.downloadCleanup();
|
|
49120
|
-
this.downloadCleanup = undefined;
|
|
49121
|
-
}
|
|
49122
|
-
}
|
|
49123
|
-
/**
|
|
49124
|
-
* Enable passive scroll-depth tracking. Records the maximum percent of the
|
|
49125
|
-
* document scrolled and reports it on `beforeunload` and on SPA route
|
|
49126
|
-
* changes. Uses a throttled passive listener so it is safe on hot paths.
|
|
49127
|
-
*/
|
|
49128
|
-
enableAutoScrollDepth() {
|
|
49129
|
-
if (this.scrollCleanups.length > 0) {
|
|
49130
|
-
return;
|
|
49131
|
-
}
|
|
49132
|
-
if (typeof window === 'undefined' || typeof document === 'undefined') {
|
|
49133
|
-
return;
|
|
49134
|
-
}
|
|
49135
|
-
this.maxScrollDepth = 0;
|
|
49136
|
-
this.lastScrollReport = 0;
|
|
49137
|
-
const scrollHandler = () => {
|
|
49138
|
-
if (this.scrollTicking) {
|
|
49139
|
-
return;
|
|
49140
|
-
}
|
|
49141
|
-
this.scrollTicking = true;
|
|
49142
|
-
window.requestAnimationFrame(() => {
|
|
49143
|
-
const now = Date.now();
|
|
49144
|
-
if (now - this.lastScrollReport < SCROLL_DEPTH_THROTTLE_MS) {
|
|
49145
|
-
this.scrollTicking = false;
|
|
49146
|
-
return;
|
|
49147
|
-
}
|
|
49148
|
-
this.lastScrollReport = now;
|
|
49149
|
-
const depth = this.computeScrollDepth();
|
|
49150
|
-
if (depth > this.maxScrollDepth) {
|
|
49151
|
-
this.maxScrollDepth = depth;
|
|
49152
|
-
}
|
|
49153
|
-
this.scrollTicking = false;
|
|
49154
|
-
});
|
|
49155
|
-
};
|
|
49156
|
-
const unloadHandler = () => {
|
|
49157
|
-
this.flushScrollDepth(this.currentPageUrl());
|
|
49158
|
-
};
|
|
49159
|
-
window.addEventListener('scroll', scrollHandler, { passive: true });
|
|
49160
|
-
window.addEventListener('beforeunload', unloadHandler);
|
|
49161
|
-
window.addEventListener('pagehide', unloadHandler);
|
|
49162
|
-
this.scrollCleanups.push(() => {
|
|
49163
|
-
window.removeEventListener('scroll', scrollHandler);
|
|
49164
|
-
window.removeEventListener('beforeunload', unloadHandler);
|
|
49165
|
-
window.removeEventListener('pagehide', unloadHandler);
|
|
49166
|
-
});
|
|
49167
|
-
}
|
|
49168
|
-
/**
|
|
49169
|
-
* Disable scroll-depth tracking installed by `enableAutoScrollDepth`. Safe
|
|
49170
|
-
* to call when auto-scroll-depth was never enabled. Any accumulated depth
|
|
49171
|
-
* for the current page is dropped.
|
|
49172
|
-
*/
|
|
49173
|
-
disableAutoScrollDepth() {
|
|
49174
|
-
for (const cleanup of this.scrollCleanups) {
|
|
49175
|
-
cleanup();
|
|
49176
|
-
}
|
|
49177
|
-
this.scrollCleanups = [];
|
|
49178
|
-
this.maxScrollDepth = 0;
|
|
49179
|
-
this.scrollTicking = false;
|
|
49180
|
-
this.lastScrollReport = 0;
|
|
49181
|
-
}
|
|
49182
|
-
/**
|
|
49183
|
-
* Enable active engagement-time tracking. Counts time the tab is visible
|
|
49184
|
-
* and uses `visibilitychange` to exclude background time.
|
|
49185
|
-
*
|
|
49186
|
-
* Delivery follows Plausible's model rather than a single total at the
|
|
49187
|
-
* end of the visit: an `engagement_time` event is emitted at every natural
|
|
49188
|
-
* checkpoint — the tab going hidden, an SPA route change, and finally
|
|
49189
|
-
* `beforeunload`/`pagehide`. Unload is kept only as a best-effort last
|
|
49190
|
-
* flush; it is the least reliable moment to send anything (browsers
|
|
49191
|
-
* routinely cancel in-flight requests there, and `sendBeacon` cannot set
|
|
49192
|
-
* the `X-Appwrite-Project` header the endpoint requires), so it must never
|
|
49193
|
-
* be the only delivery.
|
|
49194
|
-
*
|
|
49195
|
-
* Each event carries a **delta** — the seconds accrued since the previous
|
|
49196
|
-
* flush, not a running total — so the values are additive per session and
|
|
49197
|
-
* a lost event costs only its own slice.
|
|
49198
|
-
*
|
|
49199
|
-
* There is deliberately no periodic ping. The cadence is driven by
|
|
49200
|
-
* navigation and tab switches, so request volume tracks what the visitor
|
|
49201
|
-
* actually does instead of multiplying with time on page.
|
|
49202
|
-
*/
|
|
49203
|
-
enableAutoEngagementTime() {
|
|
49204
|
-
if (this.engagementCleanups.length > 0) {
|
|
49205
|
-
return;
|
|
49206
|
-
}
|
|
49207
|
-
if (typeof window === 'undefined' || typeof document === 'undefined') {
|
|
49208
|
-
return;
|
|
49209
|
-
}
|
|
49210
|
-
this.engagementAccumulatedMs = 0;
|
|
49211
|
-
// Do not start the clock for a tab that is already hidden (prerender,
|
|
49212
|
-
// background tab restore); `visibilitychange` starts it when it is
|
|
49213
|
-
// actually looked at.
|
|
49214
|
-
if (document.visibilityState !== 'hidden') {
|
|
49215
|
-
this.startEngagement();
|
|
49216
|
-
}
|
|
49217
|
-
const visibilityHandler = () => {
|
|
49218
|
-
if (document.visibilityState === 'hidden') {
|
|
49219
|
-
// Flush, don't just pause. The page is still fully alive here,
|
|
49220
|
-
// which makes this the most reliable delivery point in the
|
|
49221
|
-
// whole visit — and it is the same moment Plausible reports on.
|
|
49222
|
-
this.flushEngagement(this.currentPageUrl());
|
|
49223
|
-
}
|
|
49224
|
-
else if (document.visibilityState === 'visible') {
|
|
49225
|
-
this.startEngagement();
|
|
49226
|
-
}
|
|
49227
|
-
};
|
|
49228
|
-
const unloadHandler = () => {
|
|
49229
|
-
this.flushEngagement(this.currentPageUrl());
|
|
49230
|
-
};
|
|
49231
|
-
const pageshowHandler = (event) => {
|
|
49232
|
-
// When the page is restored from the back-forward cache the
|
|
49233
|
-
// engagement timer is in a stopped state (flushEngagement paused
|
|
49234
|
-
// it on pagehide and does not auto-restart). Kick off a fresh
|
|
49235
|
-
// engagementStart so bfcache dwell time is not billed as
|
|
49236
|
-
// engagement.
|
|
49237
|
-
if (event.persisted) {
|
|
49238
|
-
this.startEngagement();
|
|
49239
|
-
}
|
|
49240
|
-
};
|
|
49241
|
-
document.addEventListener('visibilitychange', visibilityHandler);
|
|
49242
|
-
window.addEventListener('beforeunload', unloadHandler);
|
|
49243
|
-
window.addEventListener('pagehide', unloadHandler);
|
|
49244
|
-
window.addEventListener('pageshow', pageshowHandler);
|
|
49245
|
-
this.engagementCleanups.push(() => {
|
|
49246
|
-
document.removeEventListener('visibilitychange', visibilityHandler);
|
|
49247
|
-
window.removeEventListener('beforeunload', unloadHandler);
|
|
49248
|
-
window.removeEventListener('pagehide', unloadHandler);
|
|
49249
|
-
window.removeEventListener('pageshow', pageshowHandler);
|
|
49250
|
-
});
|
|
49251
|
-
}
|
|
49252
|
-
/**
|
|
49253
|
-
* Disable engagement-time tracking installed by `enableAutoEngagementTime`.
|
|
49254
|
-
* Safe to call when auto-engagement was never enabled. Any accumulated
|
|
49255
|
-
* engagement time is dropped without being emitted.
|
|
49256
|
-
*/
|
|
49257
|
-
disableAutoEngagementTime() {
|
|
49258
|
-
for (const cleanup of this.engagementCleanups) {
|
|
49259
|
-
cleanup();
|
|
49260
|
-
}
|
|
49261
|
-
this.engagementCleanups = [];
|
|
49262
|
-
this.engagementActive = false;
|
|
49263
|
-
this.engagementAccumulatedMs = 0;
|
|
49264
|
-
this.engagementStart = 0;
|
|
49265
|
-
}
|
|
49266
|
-
/**
|
|
49267
|
-
* Merge the configured `propertyId` into an event's options. Returns the
|
|
49268
|
-
* caller's object untouched when no default is configured (or the event
|
|
49269
|
-
* already carries one), so emitters written against the pre-`propertyId`
|
|
49270
|
-
* shape keep receiving exactly what they received before.
|
|
49271
|
-
*/
|
|
49272
|
-
withPropertyId(options) {
|
|
49273
|
-
if (this.propertyId === undefined ||
|
|
49274
|
-
(options === null || options === void 0 ? void 0 : options.propertyId) !== undefined) {
|
|
49275
|
-
return options;
|
|
49276
|
-
}
|
|
49277
|
-
return Object.assign(Object.assign({}, (options !== null && options !== void 0 ? options : {})), { propertyId: this.propertyId });
|
|
49278
|
-
}
|
|
49279
|
-
canTrack() {
|
|
49280
|
-
if (!this.respectDoNotTrack) {
|
|
49281
|
-
return true;
|
|
49282
|
-
}
|
|
49283
|
-
if (typeof navigator === 'undefined') {
|
|
49284
|
-
return true;
|
|
49285
|
-
}
|
|
49286
|
-
return navigator.doNotTrack !== '1';
|
|
49287
|
-
}
|
|
49288
|
-
currentPageUrl() {
|
|
49289
|
-
if (typeof window === 'undefined' || !window.location) {
|
|
49290
|
-
return '';
|
|
49291
|
-
}
|
|
49292
|
-
return window.location.href;
|
|
49293
|
-
}
|
|
49294
|
-
findAnchor(target) {
|
|
49295
|
-
let node = target;
|
|
49296
|
-
while (node) {
|
|
49297
|
-
if (node.tagName === 'A') {
|
|
49298
|
-
return node;
|
|
49299
|
-
}
|
|
49300
|
-
node = node.parentNode;
|
|
49301
|
-
}
|
|
49302
|
-
return null;
|
|
49303
|
-
}
|
|
49304
|
-
parseUrl(href) {
|
|
49305
|
-
try {
|
|
49306
|
-
return new URL(href, window.location.href);
|
|
49307
|
-
}
|
|
49308
|
-
catch (_a) {
|
|
49309
|
-
return null;
|
|
49310
|
-
}
|
|
49311
|
-
}
|
|
49312
|
-
isExternal(target, includeSubdomains) {
|
|
49313
|
-
if (target.protocol !== 'http:' && target.protocol !== 'https:') {
|
|
49314
|
-
return false;
|
|
49315
|
-
}
|
|
49316
|
-
if (target.hostname === window.location.hostname) {
|
|
49317
|
-
return false;
|
|
49318
|
-
}
|
|
49319
|
-
if (includeSubdomains) {
|
|
49320
|
-
return true;
|
|
49321
|
-
}
|
|
49322
|
-
const root = this.rootDomain(window.location.hostname);
|
|
49323
|
-
return this.rootDomain(target.hostname) !== root;
|
|
49324
|
-
}
|
|
49325
|
-
rootDomain(hostname) {
|
|
49326
|
-
const parts = hostname.split('.');
|
|
49327
|
-
if (parts.length <= 2) {
|
|
49328
|
-
return hostname;
|
|
49329
|
-
}
|
|
49330
|
-
// Taking the last two labels is wrong wherever the registry sells names
|
|
49331
|
-
// one level down: `shop.example.co.uk` and `google.co.uk` both reduce to
|
|
49332
|
-
// `co.uk`, so every outbound click between two `.co.uk` sites looks
|
|
49333
|
-
// internal and is dropped. Take three labels after a known two-part
|
|
49334
|
-
// suffix instead.
|
|
49335
|
-
//
|
|
49336
|
-
// This is a heuristic, not the Public Suffix List — the full list is
|
|
49337
|
-
// orders of magnitude larger than this whole file, and a tracking
|
|
49338
|
-
// snippet cannot carry it. Sites on a suffix that is missing here can
|
|
49339
|
-
// pass `includeSubdomains: true` to treat every other host as outbound.
|
|
49340
|
-
const suffix = parts.slice(-2).join('.');
|
|
49341
|
-
if (parts.length > 2 && MULTI_PART_SUFFIXES.has(suffix)) {
|
|
49342
|
-
return parts.slice(-3).join('.');
|
|
49343
|
-
}
|
|
49344
|
-
return suffix;
|
|
49345
|
-
}
|
|
49346
|
-
computeScrollDepth() {
|
|
49347
|
-
const scrollTop = window.scrollY || document.documentElement.scrollTop;
|
|
49348
|
-
const viewport = window.innerHeight || document.documentElement.clientHeight;
|
|
49349
|
-
const total = document.documentElement.scrollHeight;
|
|
49350
|
-
if (total <= viewport) {
|
|
49351
|
-
return 100;
|
|
49352
|
-
}
|
|
49353
|
-
const depth = Math.round(((scrollTop + viewport) / total) * 100);
|
|
49354
|
-
return Math.max(0, Math.min(100, depth));
|
|
49355
|
-
}
|
|
49356
|
-
flushScrollDepth(url) {
|
|
49357
|
-
if (this.scrollCleanups.length === 0) {
|
|
49358
|
-
return;
|
|
49359
|
-
}
|
|
49360
|
-
if (this.maxScrollDepth <= 0) {
|
|
49361
|
-
return;
|
|
49362
|
-
}
|
|
49363
|
-
this.track('scroll_depth', {
|
|
49364
|
-
url,
|
|
49365
|
-
scrollDepth: this.maxScrollDepth,
|
|
49366
|
-
});
|
|
49367
|
-
this.maxScrollDepth = 0;
|
|
49368
|
-
}
|
|
49369
|
-
startEngagement() {
|
|
49370
|
-
if (this.engagementActive) {
|
|
49371
|
-
return;
|
|
49372
|
-
}
|
|
49373
|
-
this.engagementActive = true;
|
|
49374
|
-
this.engagementStart = Date.now();
|
|
49375
|
-
}
|
|
49376
|
-
pauseEngagement() {
|
|
49377
|
-
if (!this.engagementActive) {
|
|
49378
|
-
return;
|
|
49379
|
-
}
|
|
49380
|
-
this.engagementActive = false;
|
|
49381
|
-
this.engagementAccumulatedMs += Date.now() - this.engagementStart;
|
|
49382
|
-
}
|
|
49383
|
-
flushEngagement(url) {
|
|
49384
|
-
if (this.engagementCleanups.length === 0) {
|
|
49385
|
-
return;
|
|
49386
|
-
}
|
|
49387
|
-
this.pauseEngagement();
|
|
49388
|
-
// Deltas, not a running total: emit only what accrued since the last
|
|
49389
|
-
// flush. `floor` plus keeping the sub-second remainder in the
|
|
49390
|
-
// accumulator is what makes repeated flushes safe — nothing is emitted
|
|
49391
|
-
// twice, and a visit chopped into many short segments does not lose a
|
|
49392
|
-
// fraction of a second to rounding on every one of them.
|
|
49393
|
-
const seconds = Math.floor(this.engagementAccumulatedMs / 1000);
|
|
49394
|
-
if (seconds > 0) {
|
|
49395
|
-
// Deduct before emitting so a synchronous emitter that re-enters
|
|
49396
|
-
// (or throws) can never bill the same seconds again.
|
|
49397
|
-
this.engagementAccumulatedMs -= seconds * 1000;
|
|
49398
|
-
this.track('engagement_time', {
|
|
49399
|
-
url,
|
|
49400
|
-
engagementTime: seconds,
|
|
49401
|
-
});
|
|
49402
|
-
}
|
|
49403
|
-
// NOTE: intentionally do NOT call startEngagement() here. flushEngagement
|
|
49404
|
-
// runs on `pagehide`, which is also the last hook before the browser
|
|
49405
|
-
// may freeze the page into the back-forward cache. Auto-restarting
|
|
49406
|
-
// would snapshot engagementStart just before the freeze; the next
|
|
49407
|
-
// pauseEngagement (after bfcache restore) would then bill the entire
|
|
49408
|
-
// bfcache dwell as active engagement. Restart is driven by explicit
|
|
49409
|
-
// resume signals: `pageshow` (with `persisted === true`),
|
|
49410
|
-
// `visibilitychange` back to visible, or the SPA navigation flow in
|
|
49411
|
-
// `enableAutoPageviews`.
|
|
49412
|
-
}
|
|
49413
|
-
}
|
|
49414
|
-
|
|
49415
46788
|
/**
|
|
49416
46789
|
* Helper class to generate permission strings for resources.
|
|
49417
46790
|
*/
|
|
@@ -50118,68 +47491,6 @@ exports.OAuthProvider = void 0;
|
|
|
50118
47491
|
OAuthProvider["Zoom"] = "zoom";
|
|
50119
47492
|
})(exports.OAuthProvider || (exports.OAuthProvider = {}));
|
|
50120
47493
|
|
|
50121
|
-
exports.PlatformResourceType = void 0;
|
|
50122
|
-
(function (PlatformResourceType) {
|
|
50123
|
-
PlatformResourceType["Projects"] = "projects";
|
|
50124
|
-
PlatformResourceType["Organizations"] = "organizations";
|
|
50125
|
-
PlatformResourceType["Users"] = "users";
|
|
50126
|
-
PlatformResourceType["Memberships"] = "memberships";
|
|
50127
|
-
PlatformResourceType["Rules"] = "rules";
|
|
50128
|
-
PlatformResourceType["Keys"] = "keys";
|
|
50129
|
-
PlatformResourceType["Platforms"] = "platforms";
|
|
50130
|
-
PlatformResourceType["Webhooks"] = "webhooks";
|
|
50131
|
-
PlatformResourceType["Certificates"] = "certificates";
|
|
50132
|
-
})(exports.PlatformResourceType || (exports.PlatformResourceType = {}));
|
|
50133
|
-
|
|
50134
|
-
exports.ProjectResourceType = void 0;
|
|
50135
|
-
(function (ProjectResourceType) {
|
|
50136
|
-
ProjectResourceType["Users"] = "users";
|
|
50137
|
-
ProjectResourceType["Teams"] = "teams";
|
|
50138
|
-
ProjectResourceType["Memberships"] = "memberships";
|
|
50139
|
-
ProjectResourceType["Databases"] = "databases";
|
|
50140
|
-
ProjectResourceType["Buckets"] = "buckets";
|
|
50141
|
-
ProjectResourceType["Functions"] = "functions";
|
|
50142
|
-
ProjectResourceType["Sites"] = "sites";
|
|
50143
|
-
ProjectResourceType["Deployments"] = "deployments";
|
|
50144
|
-
ProjectResourceType["Topics"] = "topics";
|
|
50145
|
-
ProjectResourceType["Providers"] = "providers";
|
|
50146
|
-
ProjectResourceType["Messages"] = "messages";
|
|
50147
|
-
})(exports.ProjectResourceType || (exports.ProjectResourceType = {}));
|
|
50148
|
-
|
|
50149
|
-
exports.AnalyticsInterval = void 0;
|
|
50150
|
-
(function (AnalyticsInterval) {
|
|
50151
|
-
AnalyticsInterval["OneHour"] = "1h";
|
|
50152
|
-
AnalyticsInterval["OneDay"] = "1d";
|
|
50153
|
-
AnalyticsInterval["OneWeek"] = "1w";
|
|
50154
|
-
AnalyticsInterval["OneMonth"] = "1m";
|
|
50155
|
-
})(exports.AnalyticsInterval || (exports.AnalyticsInterval = {}));
|
|
50156
|
-
|
|
50157
|
-
exports.AnalyticsDimension = void 0;
|
|
50158
|
-
(function (AnalyticsDimension) {
|
|
50159
|
-
AnalyticsDimension["Country"] = "country";
|
|
50160
|
-
AnalyticsDimension["Region"] = "region";
|
|
50161
|
-
AnalyticsDimension["City"] = "city";
|
|
50162
|
-
AnalyticsDimension["Browser"] = "browser";
|
|
50163
|
-
AnalyticsDimension["OperatingSystem"] = "operatingSystem";
|
|
50164
|
-
AnalyticsDimension["Device"] = "device";
|
|
50165
|
-
AnalyticsDimension["ScreenSize"] = "screenSize";
|
|
50166
|
-
AnalyticsDimension["ReferrerSource"] = "referrerSource";
|
|
50167
|
-
AnalyticsDimension["Channel"] = "channel";
|
|
50168
|
-
AnalyticsDimension["UtmSource"] = "utmSource";
|
|
50169
|
-
AnalyticsDimension["UtmMedium"] = "utmMedium";
|
|
50170
|
-
AnalyticsDimension["UtmCampaign"] = "utmCampaign";
|
|
50171
|
-
AnalyticsDimension["UtmContent"] = "utmContent";
|
|
50172
|
-
AnalyticsDimension["UtmTerm"] = "utmTerm";
|
|
50173
|
-
AnalyticsDimension["Page"] = "page";
|
|
50174
|
-
AnalyticsDimension["Hostname"] = "hostname";
|
|
50175
|
-
AnalyticsDimension["EntryPage"] = "entryPage";
|
|
50176
|
-
AnalyticsDimension["ExitPage"] = "exitPage";
|
|
50177
|
-
AnalyticsDimension["TrafficType"] = "trafficType";
|
|
50178
|
-
AnalyticsDimension["BotName"] = "botName";
|
|
50179
|
-
AnalyticsDimension["BotCategory"] = "botCategory";
|
|
50180
|
-
AnalyticsDimension["EventName"] = "eventName";
|
|
50181
|
-
})(exports.AnalyticsDimension || (exports.AnalyticsDimension = {}));
|
|
50182
|
-
|
|
50183
47494
|
exports.Browser = void 0;
|
|
50184
47495
|
(function (Browser) {
|
|
50185
47496
|
Browser["AvantBrowser"] = "aa";
|
|
@@ -50995,14 +48306,6 @@ exports.QuerySuggestionResource = void 0;
|
|
|
50995
48306
|
QuerySuggestionResource["ResourceTokens"] = "resourcetokens";
|
|
50996
48307
|
QuerySuggestionResource["Transactions"] = "transactions";
|
|
50997
48308
|
QuerySuggestionResource["TransactionLogs"] = "transactionlogs";
|
|
50998
|
-
QuerySuggestionResource["Videos"] = "videos";
|
|
50999
|
-
QuerySuggestionResource["VideosPreviews"] = "videos_previews";
|
|
51000
|
-
QuerySuggestionResource["VideosRenditions"] = "videos_renditions";
|
|
51001
|
-
QuerySuggestionResource["VideosRenditionsSegments"] = "videos_renditions_segments";
|
|
51002
|
-
QuerySuggestionResource["VideosProfiles"] = "videos_profiles";
|
|
51003
|
-
QuerySuggestionResource["VideosSubtitles"] = "videos_subtitles";
|
|
51004
|
-
QuerySuggestionResource["VideosSubtitlesSegments"] = "videos_subtitles_segments";
|
|
51005
|
-
QuerySuggestionResource["AnalyticsProperties"] = "analyticsproperties";
|
|
51006
48309
|
QuerySuggestionResource["DedicatedDatabases"] = "dedicateddatabases";
|
|
51007
48310
|
QuerySuggestionResource["DedicatedDatabaseConfigs"] = "dedicateddatabaseconfigs";
|
|
51008
48311
|
QuerySuggestionResource["DedicatedDatabaseRuntimes"] = "dedicateddatabaseruntimes";
|
|
@@ -51425,8 +48728,6 @@ exports.ProjectKeyScopes = void 0;
|
|
|
51425
48728
|
ProjectKeyScopes["ReportsWrite"] = "reports.write";
|
|
51426
48729
|
ProjectKeyScopes["PresencesRead"] = "presences.read";
|
|
51427
48730
|
ProjectKeyScopes["PresencesWrite"] = "presences.write";
|
|
51428
|
-
ProjectKeyScopes["VideosRead"] = "videos.read";
|
|
51429
|
-
ProjectKeyScopes["VideosWrite"] = "videos.write";
|
|
51430
48731
|
ProjectKeyScopes["DedicatedDatabasesExecute"] = "dedicatedDatabases.execute";
|
|
51431
48732
|
ProjectKeyScopes["BackupsPoliciesRead"] = "backups.policies.read";
|
|
51432
48733
|
ProjectKeyScopes["BackupsPoliciesWrite"] = "backups.policies.write";
|
|
@@ -51445,8 +48746,6 @@ exports.ProjectKeyScopes = void 0;
|
|
|
51445
48746
|
ProjectKeyScopes["Oauth2Read"] = "oauth2.read";
|
|
51446
48747
|
ProjectKeyScopes["Oauth2Write"] = "oauth2.write";
|
|
51447
48748
|
ProjectKeyScopes["Oauth2Introspect"] = "oauth2.introspect";
|
|
51448
|
-
ProjectKeyScopes["AnalyticsRead"] = "analytics.read";
|
|
51449
|
-
ProjectKeyScopes["AnalyticsWrite"] = "analytics.write";
|
|
51450
48749
|
})(exports.ProjectKeyScopes || (exports.ProjectKeyScopes = {}));
|
|
51451
48750
|
|
|
51452
48751
|
exports.FunctionTemplateUseCase = void 0;
|
|
@@ -51696,7 +48995,6 @@ exports.ProjectAuthMethodId = void 0;
|
|
|
51696
48995
|
ProjectAuthMethodId["Invites"] = "invites";
|
|
51697
48996
|
ProjectAuthMethodId["Jwt"] = "jwt";
|
|
51698
48997
|
ProjectAuthMethodId["Phone"] = "phone";
|
|
51699
|
-
ProjectAuthMethodId["Passkey"] = "passkey";
|
|
51700
48998
|
})(exports.ProjectAuthMethodId || (exports.ProjectAuthMethodId = {}));
|
|
51701
48999
|
|
|
51702
49000
|
exports.ProjectOAuth2Auth0Prompt = void 0;
|
|
@@ -51838,7 +49136,6 @@ exports.ProjectPolicyId = void 0;
|
|
|
51838
49136
|
ProjectPolicyId["Denydisposableemail"] = "deny-disposable-email";
|
|
51839
49137
|
ProjectPolicyId["Denyfreeemail"] = "deny-free-email";
|
|
51840
49138
|
ProjectPolicyId["Denycorporateemail"] = "deny-corporate-email";
|
|
51841
|
-
ProjectPolicyId["Passkey"] = "passkey";
|
|
51842
49139
|
})(exports.ProjectPolicyId || (exports.ProjectPolicyId = {}));
|
|
51843
49140
|
|
|
51844
49141
|
exports.ProjectProtocolId = void 0;
|
|
@@ -52083,9 +49380,6 @@ exports.TablesDBIndexType = void 0;
|
|
|
52083
49380
|
|
|
52084
49381
|
exports.UsageEventMetric = void 0;
|
|
52085
49382
|
(function (UsageEventMetric) {
|
|
52086
|
-
UsageEventMetric["AnalyticsEvents"] = "analytics.events";
|
|
52087
|
-
UsageEventMetric["AnalyticsPageviews"] = "analytics.pageviews";
|
|
52088
|
-
UsageEventMetric["AnalyticsBotsEvents"] = "analytics.bots.events";
|
|
52089
49383
|
UsageEventMetric["NetworkRequests"] = "network.requests";
|
|
52090
49384
|
UsageEventMetric["NetworkInbound"] = "network.inbound";
|
|
52091
49385
|
UsageEventMetric["NetworkOutbound"] = "network.outbound";
|
|
@@ -52203,7 +49497,6 @@ exports.UsageOrderDirection = void 0;
|
|
|
52203
49497
|
|
|
52204
49498
|
exports.UsageGaugeMetric = void 0;
|
|
52205
49499
|
(function (UsageGaugeMetric) {
|
|
52206
|
-
UsageGaugeMetric["AnalyticsProperties"] = "analytics.properties";
|
|
52207
49500
|
UsageGaugeMetric["Teams"] = "teams";
|
|
52208
49501
|
UsageGaugeMetric["Users"] = "users";
|
|
52209
49502
|
UsageGaugeMetric["Messages"] = "messages";
|
|
@@ -52301,24 +49594,6 @@ exports.VectorsDBIndexType = void 0;
|
|
|
52301
49594
|
VectorsDBIndexType["Unique"] = "unique";
|
|
52302
49595
|
})(exports.VectorsDBIndexType || (exports.VectorsDBIndexType = {}));
|
|
52303
49596
|
|
|
52304
|
-
exports.VideoOutput = void 0;
|
|
52305
|
-
(function (VideoOutput) {
|
|
52306
|
-
VideoOutput["Hls"] = "hls";
|
|
52307
|
-
VideoOutput["Dash"] = "dash";
|
|
52308
|
-
VideoOutput["Cmaf"] = "cmaf";
|
|
52309
|
-
})(exports.VideoOutput || (exports.VideoOutput = {}));
|
|
52310
|
-
|
|
52311
|
-
exports.VideoRenditionStatus = void 0;
|
|
52312
|
-
(function (VideoRenditionStatus) {
|
|
52313
|
-
VideoRenditionStatus["Pending"] = "pending";
|
|
52314
|
-
VideoRenditionStatus["Started"] = "started";
|
|
52315
|
-
VideoRenditionStatus["Ended"] = "ended";
|
|
52316
|
-
VideoRenditionStatus["Uploading"] = "uploading";
|
|
52317
|
-
VideoRenditionStatus["Ready"] = "ready";
|
|
52318
|
-
VideoRenditionStatus["Error"] = "error";
|
|
52319
|
-
VideoRenditionStatus["Aborted"] = "aborted";
|
|
52320
|
-
})(exports.VideoRenditionStatus || (exports.VideoRenditionStatus = {}));
|
|
52321
|
-
|
|
52322
49597
|
exports.DatabaseType = void 0;
|
|
52323
49598
|
(function (DatabaseType) {
|
|
52324
49599
|
DatabaseType["Legacy"] = "legacy";
|
|
@@ -52497,7 +49772,6 @@ exports.ProxyRuleDeploymentResourceType = void 0;
|
|
|
52497
49772
|
(function (ProxyRuleDeploymentResourceType) {
|
|
52498
49773
|
ProxyRuleDeploymentResourceType["Function"] = "function";
|
|
52499
49774
|
ProxyRuleDeploymentResourceType["Site"] = "site";
|
|
52500
|
-
ProxyRuleDeploymentResourceType["DedicatedDatabase"] = "dedicatedDatabase";
|
|
52501
49775
|
})(exports.ProxyRuleDeploymentResourceType || (exports.ProxyRuleDeploymentResourceType = {}));
|
|
52502
49776
|
|
|
52503
49777
|
exports.ProxyRuleStatus = void 0;
|
|
@@ -52555,11 +49829,8 @@ exports.WafRuleAction = void 0;
|
|
|
52555
49829
|
|
|
52556
49830
|
exports.Account = Account;
|
|
52557
49831
|
exports.Activities = Activities;
|
|
52558
|
-
exports.Admin = Admin;
|
|
52559
49832
|
exports.Advisor = Advisor;
|
|
52560
49833
|
exports.Affiliates = Affiliates;
|
|
52561
|
-
exports.Analytics = Analytics;
|
|
52562
|
-
exports.AnalyticsTracking = AnalyticsTracking;
|
|
52563
49834
|
exports.Apps = Apps;
|
|
52564
49835
|
exports.AppwriteException = AppwriteException;
|
|
52565
49836
|
exports.Assistant = Assistant;
|
|
@@ -52608,7 +49879,6 @@ exports.Usage = Usage;
|
|
|
52608
49879
|
exports.Users = Users;
|
|
52609
49880
|
exports.Vcs = Vcs;
|
|
52610
49881
|
exports.VectorsDB = VectorsDB;
|
|
52611
|
-
exports.Videos = Videos;
|
|
52612
49882
|
exports.Waf = Waf;
|
|
52613
49883
|
exports.Webhooks = Webhooks;
|
|
52614
49884
|
//# sourceMappingURL=sdk.js.map
|