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