@appwrite.io/console 15.7.0 → 16.0.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/iife/sdk.js CHANGED
@@ -4424,6 +4424,7 @@
4424
4424
  endpointRealtime: '',
4425
4425
  project: '',
4426
4426
  key: '',
4427
+ organization: '',
4427
4428
  jwt: '',
4428
4429
  bearer: '',
4429
4430
  locale: '',
@@ -4445,8 +4446,8 @@
4445
4446
  'x-sdk-name': 'Console',
4446
4447
  'x-sdk-platform': 'console',
4447
4448
  'x-sdk-language': 'web',
4448
- 'x-sdk-version': '15.7.0',
4449
- 'X-Appwrite-Response-Format': '1.9.5',
4449
+ 'x-sdk-version': '16.0.0',
4450
+ 'X-Appwrite-Response-Format': '1.9.6',
4450
4451
  };
4451
4452
  this.realtime = {
4452
4453
  socket: undefined,
@@ -4755,6 +4756,20 @@
4755
4756
  this.config.key = value;
4756
4757
  return this;
4757
4758
  }
4759
+ /**
4760
+ * Set Organization
4761
+ *
4762
+ * Your organization ID
4763
+ *
4764
+ * @param value string
4765
+ *
4766
+ * @return {this}
4767
+ */
4768
+ setOrganization(value) {
4769
+ this.headers['X-Appwrite-Organization'] = value;
4770
+ this.config.organization = value;
4771
+ return this;
4772
+ }
4758
4773
  /**
4759
4774
  * Set JWT
4760
4775
  *
@@ -7706,6 +7721,200 @@
7706
7721
  }
7707
7722
  }
7708
7723
 
7724
+ class Affiliates {
7725
+ constructor(client) {
7726
+ this.client = client;
7727
+ }
7728
+ listLinks(paramsOrFirst) {
7729
+ let params;
7730
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
7731
+ params = (paramsOrFirst || {});
7732
+ }
7733
+ else {
7734
+ params = {
7735
+ queries: paramsOrFirst
7736
+ };
7737
+ }
7738
+ const queries = params.queries;
7739
+ const apiPath = '/affiliates/links';
7740
+ const payload = {};
7741
+ if (typeof queries !== 'undefined') {
7742
+ payload['queries'] = queries;
7743
+ }
7744
+ const uri = new URL(this.client.config.endpoint + apiPath);
7745
+ const apiHeaders = {
7746
+ 'X-Appwrite-Project': this.client.config.project,
7747
+ 'accept': 'application/json',
7748
+ };
7749
+ return this.client.call('get', uri, apiHeaders, payload);
7750
+ }
7751
+ createLink(paramsOrFirst, ...rest) {
7752
+ let params;
7753
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
7754
+ params = (paramsOrFirst || {});
7755
+ }
7756
+ else {
7757
+ params = {
7758
+ linkId: paramsOrFirst,
7759
+ name: rest[0]
7760
+ };
7761
+ }
7762
+ const linkId = params.linkId;
7763
+ const name = params.name;
7764
+ if (typeof linkId === 'undefined') {
7765
+ throw new AppwriteException('Missing required parameter: "linkId"');
7766
+ }
7767
+ const apiPath = '/affiliates/links';
7768
+ const payload = {};
7769
+ if (typeof linkId !== 'undefined') {
7770
+ payload['linkId'] = linkId;
7771
+ }
7772
+ if (typeof name !== 'undefined') {
7773
+ payload['name'] = name;
7774
+ }
7775
+ const uri = new URL(this.client.config.endpoint + apiPath);
7776
+ const apiHeaders = {
7777
+ 'X-Appwrite-Project': this.client.config.project,
7778
+ 'content-type': 'application/json',
7779
+ 'accept': 'application/json',
7780
+ };
7781
+ return this.client.call('post', uri, apiHeaders, payload);
7782
+ }
7783
+ getLink(paramsOrFirst) {
7784
+ let params;
7785
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
7786
+ params = (paramsOrFirst || {});
7787
+ }
7788
+ else {
7789
+ params = {
7790
+ linkId: paramsOrFirst
7791
+ };
7792
+ }
7793
+ const linkId = params.linkId;
7794
+ if (typeof linkId === 'undefined') {
7795
+ throw new AppwriteException('Missing required parameter: "linkId"');
7796
+ }
7797
+ const apiPath = '/affiliates/links/{linkId}'.replace('{linkId}', encodeURIComponent(String(linkId)));
7798
+ const payload = {};
7799
+ const uri = new URL(this.client.config.endpoint + apiPath);
7800
+ const apiHeaders = {
7801
+ 'X-Appwrite-Project': this.client.config.project,
7802
+ 'accept': 'application/json',
7803
+ };
7804
+ return this.client.call('get', uri, apiHeaders, payload);
7805
+ }
7806
+ deleteLink(paramsOrFirst) {
7807
+ let params;
7808
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
7809
+ params = (paramsOrFirst || {});
7810
+ }
7811
+ else {
7812
+ params = {
7813
+ linkId: paramsOrFirst
7814
+ };
7815
+ }
7816
+ const linkId = params.linkId;
7817
+ if (typeof linkId === 'undefined') {
7818
+ throw new AppwriteException('Missing required parameter: "linkId"');
7819
+ }
7820
+ const apiPath = '/affiliates/links/{linkId}'.replace('{linkId}', encodeURIComponent(String(linkId)));
7821
+ const payload = {};
7822
+ const uri = new URL(this.client.config.endpoint + apiPath);
7823
+ const apiHeaders = {
7824
+ 'X-Appwrite-Project': this.client.config.project,
7825
+ 'content-type': 'application/json',
7826
+ 'accept': 'application/json',
7827
+ };
7828
+ return this.client.call('delete', uri, apiHeaders, payload);
7829
+ }
7830
+ listReferrals(paramsOrFirst) {
7831
+ let params;
7832
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
7833
+ params = (paramsOrFirst || {});
7834
+ }
7835
+ else {
7836
+ params = {
7837
+ queries: paramsOrFirst
7838
+ };
7839
+ }
7840
+ const queries = params.queries;
7841
+ const apiPath = '/affiliates/referrals';
7842
+ const payload = {};
7843
+ if (typeof queries !== 'undefined') {
7844
+ payload['queries'] = queries;
7845
+ }
7846
+ const uri = new URL(this.client.config.endpoint + apiPath);
7847
+ const apiHeaders = {
7848
+ 'X-Appwrite-Project': this.client.config.project,
7849
+ 'accept': 'application/json',
7850
+ };
7851
+ return this.client.call('get', uri, apiHeaders, payload);
7852
+ }
7853
+ listRewards(paramsOrFirst) {
7854
+ let params;
7855
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
7856
+ params = (paramsOrFirst || {});
7857
+ }
7858
+ else {
7859
+ params = {
7860
+ queries: paramsOrFirst
7861
+ };
7862
+ }
7863
+ const queries = params.queries;
7864
+ const apiPath = '/affiliates/rewards';
7865
+ const payload = {};
7866
+ if (typeof queries !== 'undefined') {
7867
+ payload['queries'] = queries;
7868
+ }
7869
+ const uri = new URL(this.client.config.endpoint + apiPath);
7870
+ const apiHeaders = {
7871
+ 'X-Appwrite-Project': this.client.config.project,
7872
+ 'accept': 'application/json',
7873
+ };
7874
+ return this.client.call('get', uri, apiHeaders, payload);
7875
+ }
7876
+ updateReward(paramsOrFirst, ...rest) {
7877
+ let params;
7878
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
7879
+ params = (paramsOrFirst || {});
7880
+ }
7881
+ else {
7882
+ params = {
7883
+ rewardId: paramsOrFirst,
7884
+ status: rest[0],
7885
+ organizationId: rest[1]
7886
+ };
7887
+ }
7888
+ const rewardId = params.rewardId;
7889
+ const status = params.status;
7890
+ const organizationId = params.organizationId;
7891
+ if (typeof rewardId === 'undefined') {
7892
+ throw new AppwriteException('Missing required parameter: "rewardId"');
7893
+ }
7894
+ if (typeof status === 'undefined') {
7895
+ throw new AppwriteException('Missing required parameter: "status"');
7896
+ }
7897
+ if (typeof organizationId === 'undefined') {
7898
+ throw new AppwriteException('Missing required parameter: "organizationId"');
7899
+ }
7900
+ const apiPath = '/affiliates/rewards/{rewardId}'.replace('{rewardId}', encodeURIComponent(String(rewardId)));
7901
+ const payload = {};
7902
+ if (typeof status !== 'undefined') {
7903
+ payload['status'] = status;
7904
+ }
7905
+ if (typeof organizationId !== 'undefined') {
7906
+ payload['organizationId'] = organizationId;
7907
+ }
7908
+ const uri = new URL(this.client.config.endpoint + apiPath);
7909
+ const apiHeaders = {
7910
+ 'X-Appwrite-Project': this.client.config.project,
7911
+ 'content-type': 'application/json',
7912
+ 'accept': 'application/json',
7913
+ };
7914
+ return this.client.call('patch', uri, apiHeaders, payload);
7915
+ }
7916
+ }
7917
+
7709
7918
  class Apps {
7710
7919
  constructor(client) {
7711
7920
  this.client = client;
@@ -13315,7 +13524,8 @@
13315
13524
  name: rest[0],
13316
13525
  enabled: rest[1],
13317
13526
  specification: rest[2],
13318
- replicas: rest[3]
13527
+ replicas: rest[3],
13528
+ syncMode: rest[4]
13319
13529
  };
13320
13530
  }
13321
13531
  const databaseId = params.databaseId;
@@ -13323,6 +13533,7 @@
13323
13533
  const enabled = params.enabled;
13324
13534
  const specification = params.specification;
13325
13535
  const replicas = params.replicas;
13536
+ const syncMode = params.syncMode;
13326
13537
  if (typeof databaseId === 'undefined') {
13327
13538
  throw new AppwriteException('Missing required parameter: "databaseId"');
13328
13539
  }
@@ -13346,6 +13557,9 @@
13346
13557
  if (typeof replicas !== 'undefined') {
13347
13558
  payload['replicas'] = replicas;
13348
13559
  }
13560
+ if (typeof syncMode !== 'undefined') {
13561
+ payload['syncMode'] = syncMode;
13562
+ }
13349
13563
  const uri = new URL(this.client.config.endpoint + apiPath);
13350
13564
  const apiHeaders = {
13351
13565
  'X-Appwrite-Project': this.client.config.project,
@@ -13531,7 +13745,8 @@
13531
13745
  name: rest[0],
13532
13746
  enabled: rest[1],
13533
13747
  specification: rest[2],
13534
- replicas: rest[3]
13748
+ replicas: rest[3],
13749
+ syncMode: rest[4]
13535
13750
  };
13536
13751
  }
13537
13752
  const databaseId = params.databaseId;
@@ -13539,6 +13754,7 @@
13539
13754
  const enabled = params.enabled;
13540
13755
  const specification = params.specification;
13541
13756
  const replicas = params.replicas;
13757
+ const syncMode = params.syncMode;
13542
13758
  if (typeof databaseId === 'undefined') {
13543
13759
  throw new AppwriteException('Missing required parameter: "databaseId"');
13544
13760
  }
@@ -13559,6 +13775,9 @@
13559
13775
  if (typeof replicas !== 'undefined') {
13560
13776
  payload['replicas'] = replicas;
13561
13777
  }
13778
+ if (typeof syncMode !== 'undefined') {
13779
+ payload['syncMode'] = syncMode;
13780
+ }
13562
13781
  const uri = new URL(this.client.config.endpoint + apiPath);
13563
13782
  const apiHeaders = {
13564
13783
  'X-Appwrite-Project': this.client.config.project,
@@ -16829,6 +17048,44 @@
16829
17048
  }
16830
17049
  }
16831
17050
 
17051
+ class Embeddings {
17052
+ constructor(client) {
17053
+ this.client = client;
17054
+ }
17055
+ createTextEmbeddings(paramsOrFirst, ...rest) {
17056
+ let params;
17057
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17058
+ params = (paramsOrFirst || {});
17059
+ }
17060
+ else {
17061
+ params = {
17062
+ texts: paramsOrFirst,
17063
+ model: rest[0]
17064
+ };
17065
+ }
17066
+ const texts = params.texts;
17067
+ const model = params.model;
17068
+ if (typeof texts === 'undefined') {
17069
+ throw new AppwriteException('Missing required parameter: "texts"');
17070
+ }
17071
+ const apiPath = '/embeddings/text';
17072
+ const payload = {};
17073
+ if (typeof texts !== 'undefined') {
17074
+ payload['texts'] = texts;
17075
+ }
17076
+ if (typeof model !== 'undefined') {
17077
+ payload['model'] = model;
17078
+ }
17079
+ const uri = new URL(this.client.config.endpoint + apiPath);
17080
+ const apiHeaders = {
17081
+ 'X-Appwrite-Project': this.client.config.project,
17082
+ 'content-type': 'application/json',
17083
+ 'accept': 'application/json',
17084
+ };
17085
+ return this.client.call('post', uri, apiHeaders, payload);
17086
+ }
17087
+ }
17088
+
16832
17089
  class Functions {
16833
17090
  constructor(client) {
16834
17091
  this.client = client;
@@ -22279,8 +22536,7 @@
22279
22536
  pitrRetentionDays: rest[10],
22280
22537
  storageAutoscaling: rest[11],
22281
22538
  storageAutoscalingThresholdPercent: rest[12],
22282
- storageAutoscalingMaxGb: rest[13],
22283
- api: rest[14]
22539
+ storageAutoscalingMaxGb: rest[13]
22284
22540
  };
22285
22541
  }
22286
22542
  const databaseId = params.databaseId;
@@ -22298,7 +22554,6 @@
22298
22554
  const storageAutoscaling = params.storageAutoscaling;
22299
22555
  const storageAutoscalingThresholdPercent = params.storageAutoscalingThresholdPercent;
22300
22556
  const storageAutoscalingMaxGb = params.storageAutoscalingMaxGb;
22301
- const api = params.api;
22302
22557
  if (typeof databaseId === 'undefined') {
22303
22558
  throw new AppwriteException('Missing required parameter: "databaseId"');
22304
22559
  }
@@ -22352,9 +22607,6 @@
22352
22607
  if (typeof storageAutoscalingMaxGb !== 'undefined') {
22353
22608
  payload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb;
22354
22609
  }
22355
- if (typeof api !== 'undefined') {
22356
- payload['api'] = api;
22357
- }
22358
22610
  const uri = new URL(this.client.config.endpoint + apiPath);
22359
22611
  const apiHeaders = {
22360
22612
  'X-Appwrite-Project': this.client.config.project,
@@ -23460,8 +23712,7 @@
23460
23712
  pitrRetentionDays: rest[10],
23461
23713
  storageAutoscaling: rest[11],
23462
23714
  storageAutoscalingThresholdPercent: rest[12],
23463
- storageAutoscalingMaxGb: rest[13],
23464
- api: rest[14]
23715
+ storageAutoscalingMaxGb: rest[13]
23465
23716
  };
23466
23717
  }
23467
23718
  const databaseId = params.databaseId;
@@ -23479,7 +23730,6 @@
23479
23730
  const storageAutoscaling = params.storageAutoscaling;
23480
23731
  const storageAutoscalingThresholdPercent = params.storageAutoscalingThresholdPercent;
23481
23732
  const storageAutoscalingMaxGb = params.storageAutoscalingMaxGb;
23482
- const api = params.api;
23483
23733
  if (typeof databaseId === 'undefined') {
23484
23734
  throw new AppwriteException('Missing required parameter: "databaseId"');
23485
23735
  }
@@ -23533,9 +23783,6 @@
23533
23783
  if (typeof storageAutoscalingMaxGb !== 'undefined') {
23534
23784
  payload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb;
23535
23785
  }
23536
- if (typeof api !== 'undefined') {
23537
- payload['api'] = api;
23538
- }
23539
23786
  const uri = new URL(this.client.config.endpoint + apiPath);
23540
23787
  const apiHeaders = {
23541
23788
  'X-Appwrite-Project': this.client.config.project,
@@ -27649,8 +27896,7 @@
27649
27896
  pitrRetentionDays: rest[10],
27650
27897
  storageAutoscaling: rest[11],
27651
27898
  storageAutoscalingThresholdPercent: rest[12],
27652
- storageAutoscalingMaxGb: rest[13],
27653
- api: rest[14]
27899
+ storageAutoscalingMaxGb: rest[13]
27654
27900
  };
27655
27901
  }
27656
27902
  const databaseId = params.databaseId;
@@ -27668,7 +27914,6 @@
27668
27914
  const storageAutoscaling = params.storageAutoscaling;
27669
27915
  const storageAutoscalingThresholdPercent = params.storageAutoscalingThresholdPercent;
27670
27916
  const storageAutoscalingMaxGb = params.storageAutoscalingMaxGb;
27671
- const api = params.api;
27672
27917
  if (typeof databaseId === 'undefined') {
27673
27918
  throw new AppwriteException('Missing required parameter: "databaseId"');
27674
27919
  }
@@ -27722,9 +27967,6 @@
27722
27967
  if (typeof storageAutoscalingMaxGb !== 'undefined') {
27723
27968
  payload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb;
27724
27969
  }
27725
- if (typeof api !== 'undefined') {
27726
- payload['api'] = api;
27727
- }
27728
27970
  const uri = new URL(this.client.config.endpoint + apiPath);
27729
27971
  const apiHeaders = {
27730
27972
  'X-Appwrite-Project': this.client.config.project,
@@ -33339,6 +33581,46 @@
33339
33581
  constructor(client) {
33340
33582
  this.client = client;
33341
33583
  }
33584
+ createInvalidation(paramsOrFirst, ...rest) {
33585
+ let params;
33586
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
33587
+ params = (paramsOrFirst || {});
33588
+ }
33589
+ else {
33590
+ params = {
33591
+ domain: paramsOrFirst,
33592
+ type: rest[0],
33593
+ reference: rest[1]
33594
+ };
33595
+ }
33596
+ const domain = params.domain;
33597
+ const type = params.type;
33598
+ const reference = params.reference;
33599
+ if (typeof domain === 'undefined') {
33600
+ throw new AppwriteException('Missing required parameter: "domain"');
33601
+ }
33602
+ if (typeof type === 'undefined') {
33603
+ throw new AppwriteException('Missing required parameter: "type"');
33604
+ }
33605
+ const apiPath = '/proxy/invalidations';
33606
+ const payload = {};
33607
+ if (typeof domain !== 'undefined') {
33608
+ payload['domain'] = domain;
33609
+ }
33610
+ if (typeof type !== 'undefined') {
33611
+ payload['type'] = type;
33612
+ }
33613
+ if (typeof reference !== 'undefined') {
33614
+ payload['reference'] = reference;
33615
+ }
33616
+ const uri = new URL(this.client.config.endpoint + apiPath);
33617
+ const apiHeaders = {
33618
+ 'X-Appwrite-Project': this.client.config.project,
33619
+ 'content-type': 'application/json',
33620
+ 'accept': 'application/json',
33621
+ };
33622
+ return this.client.call('post', uri, apiHeaders, payload);
33623
+ }
33342
33624
  listRules(paramsOrFirst, ...rest) {
33343
33625
  let params;
33344
33626
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -35529,7 +35811,8 @@
35529
35811
  name: rest[0],
35530
35812
  enabled: rest[1],
35531
35813
  specification: rest[2],
35532
- replicas: rest[3]
35814
+ replicas: rest[3],
35815
+ syncMode: rest[4]
35533
35816
  };
35534
35817
  }
35535
35818
  const databaseId = params.databaseId;
@@ -35537,6 +35820,7 @@
35537
35820
  const enabled = params.enabled;
35538
35821
  const specification = params.specification;
35539
35822
  const replicas = params.replicas;
35823
+ const syncMode = params.syncMode;
35540
35824
  if (typeof databaseId === 'undefined') {
35541
35825
  throw new AppwriteException('Missing required parameter: "databaseId"');
35542
35826
  }
@@ -35560,6 +35844,9 @@
35560
35844
  if (typeof replicas !== 'undefined') {
35561
35845
  payload['replicas'] = replicas;
35562
35846
  }
35847
+ if (typeof syncMode !== 'undefined') {
35848
+ payload['syncMode'] = syncMode;
35849
+ }
35563
35850
  const uri = new URL(this.client.config.endpoint + apiPath);
35564
35851
  const apiHeaders = {
35565
35852
  'X-Appwrite-Project': this.client.config.project,
@@ -35774,7 +36061,8 @@
35774
36061
  name: rest[0],
35775
36062
  enabled: rest[1],
35776
36063
  specification: rest[2],
35777
- replicas: rest[3]
36064
+ replicas: rest[3],
36065
+ syncMode: rest[4]
35778
36066
  };
35779
36067
  }
35780
36068
  const databaseId = params.databaseId;
@@ -35782,6 +36070,7 @@
35782
36070
  const enabled = params.enabled;
35783
36071
  const specification = params.specification;
35784
36072
  const replicas = params.replicas;
36073
+ const syncMode = params.syncMode;
35785
36074
  if (typeof databaseId === 'undefined') {
35786
36075
  throw new AppwriteException('Missing required parameter: "databaseId"');
35787
36076
  }
@@ -35799,6 +36088,9 @@
35799
36088
  if (typeof replicas !== 'undefined') {
35800
36089
  payload['replicas'] = replicas;
35801
36090
  }
36091
+ if (typeof syncMode !== 'undefined') {
36092
+ payload['syncMode'] = syncMode;
36093
+ }
35802
36094
  const uri = new URL(this.client.config.endpoint + apiPath);
35803
36095
  const apiHeaders = {
35804
36096
  'X-Appwrite-Project': this.client.config.project,
@@ -42253,7 +42545,8 @@
42253
42545
  name: rest[0],
42254
42546
  enabled: rest[1],
42255
42547
  specification: rest[2],
42256
- replicas: rest[3]
42548
+ replicas: rest[3],
42549
+ syncMode: rest[4]
42257
42550
  };
42258
42551
  }
42259
42552
  const databaseId = params.databaseId;
@@ -42261,6 +42554,7 @@
42261
42554
  const enabled = params.enabled;
42262
42555
  const specification = params.specification;
42263
42556
  const replicas = params.replicas;
42557
+ const syncMode = params.syncMode;
42264
42558
  if (typeof databaseId === 'undefined') {
42265
42559
  throw new AppwriteException('Missing required parameter: "databaseId"');
42266
42560
  }
@@ -42284,37 +42578,8 @@
42284
42578
  if (typeof replicas !== 'undefined') {
42285
42579
  payload['replicas'] = replicas;
42286
42580
  }
42287
- const uri = new URL(this.client.config.endpoint + apiPath);
42288
- const apiHeaders = {
42289
- 'X-Appwrite-Project': this.client.config.project,
42290
- 'content-type': 'application/json',
42291
- 'accept': 'application/json',
42292
- };
42293
- return this.client.call('post', uri, apiHeaders, payload);
42294
- }
42295
- createTextEmbeddings(paramsOrFirst, ...rest) {
42296
- let params;
42297
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
42298
- params = (paramsOrFirst || {});
42299
- }
42300
- else {
42301
- params = {
42302
- texts: paramsOrFirst,
42303
- model: rest[0]
42304
- };
42305
- }
42306
- const texts = params.texts;
42307
- const model = params.model;
42308
- if (typeof texts === 'undefined') {
42309
- throw new AppwriteException('Missing required parameter: "texts"');
42310
- }
42311
- const apiPath = '/vectorsdb/embeddings/text';
42312
- const payload = {};
42313
- if (typeof texts !== 'undefined') {
42314
- payload['texts'] = texts;
42315
- }
42316
- if (typeof model !== 'undefined') {
42317
- payload['model'] = model;
42581
+ if (typeof syncMode !== 'undefined') {
42582
+ payload['syncMode'] = syncMode;
42318
42583
  }
42319
42584
  const uri = new URL(this.client.config.endpoint + apiPath);
42320
42585
  const apiHeaders = {
@@ -42530,7 +42795,8 @@
42530
42795
  name: rest[0],
42531
42796
  enabled: rest[1],
42532
42797
  specification: rest[2],
42533
- replicas: rest[3]
42798
+ replicas: rest[3],
42799
+ syncMode: rest[4]
42534
42800
  };
42535
42801
  }
42536
42802
  const databaseId = params.databaseId;
@@ -42538,6 +42804,7 @@
42538
42804
  const enabled = params.enabled;
42539
42805
  const specification = params.specification;
42540
42806
  const replicas = params.replicas;
42807
+ const syncMode = params.syncMode;
42541
42808
  if (typeof databaseId === 'undefined') {
42542
42809
  throw new AppwriteException('Missing required parameter: "databaseId"');
42543
42810
  }
@@ -42558,6 +42825,9 @@
42558
42825
  if (typeof replicas !== 'undefined') {
42559
42826
  payload['replicas'] = replicas;
42560
42827
  }
42828
+ if (typeof syncMode !== 'undefined') {
42829
+ payload['syncMode'] = syncMode;
42830
+ }
42561
42831
  const uri = new URL(this.client.config.endpoint + apiPath);
42562
42832
  const apiHeaders = {
42563
42833
  'X-Appwrite-Project': this.client.config.project,
@@ -43752,7 +44022,9 @@
43752
44022
  challengeType: rest[4],
43753
44023
  priority: rest[5],
43754
44024
  enabled: rest[6],
43755
- conditions: rest[7]
44025
+ conditions: rest[7],
44026
+ difficulty: rest[8],
44027
+ ttl: rest[9]
43756
44028
  };
43757
44029
  }
43758
44030
  const ruleId = params.ruleId;
@@ -43764,6 +44036,8 @@
43764
44036
  const priority = params.priority;
43765
44037
  const enabled = params.enabled;
43766
44038
  const conditions = params.conditions;
44039
+ const difficulty = params.difficulty;
44040
+ const ttl = params.ttl;
43767
44041
  if (typeof ruleId === 'undefined') {
43768
44042
  throw new AppwriteException('Missing required parameter: "ruleId"');
43769
44043
  }
@@ -43802,6 +44076,12 @@
43802
44076
  if (typeof conditions !== 'undefined') {
43803
44077
  payload['conditions'] = conditions;
43804
44078
  }
44079
+ if (typeof difficulty !== 'undefined') {
44080
+ payload['difficulty'] = difficulty;
44081
+ }
44082
+ if (typeof ttl !== 'undefined') {
44083
+ payload['ttl'] = ttl;
44084
+ }
43805
44085
  const uri = new URL(this.client.config.endpoint + apiPath);
43806
44086
  const apiHeaders = {
43807
44087
  'X-Appwrite-Project': this.client.config.project,
@@ -43825,7 +44105,9 @@
43825
44105
  challengeType: rest[4],
43826
44106
  priority: rest[5],
43827
44107
  enabled: rest[6],
43828
- conditions: rest[7]
44108
+ conditions: rest[7],
44109
+ difficulty: rest[8],
44110
+ ttl: rest[9]
43829
44111
  };
43830
44112
  }
43831
44113
  const ruleId = params.ruleId;
@@ -43837,6 +44119,8 @@
43837
44119
  const priority = params.priority;
43838
44120
  const enabled = params.enabled;
43839
44121
  const conditions = params.conditions;
44122
+ const difficulty = params.difficulty;
44123
+ const ttl = params.ttl;
43840
44124
  if (typeof ruleId === 'undefined') {
43841
44125
  throw new AppwriteException('Missing required parameter: "ruleId"');
43842
44126
  }
@@ -43866,6 +44150,12 @@
43866
44150
  if (typeof conditions !== 'undefined') {
43867
44151
  payload['conditions'] = conditions;
43868
44152
  }
44153
+ if (typeof difficulty !== 'undefined') {
44154
+ payload['difficulty'] = difficulty;
44155
+ }
44156
+ if (typeof ttl !== 'undefined') {
44157
+ payload['ttl'] = ttl;
44158
+ }
43869
44159
  const uri = new URL(this.client.config.endpoint + apiPath);
43870
44160
  const apiHeaders = {
43871
44161
  'X-Appwrite-Project': this.client.config.project,
@@ -44015,9 +44305,10 @@
44015
44305
  interval: rest[3],
44016
44306
  resourceId: rest[4],
44017
44307
  description: rest[5],
44018
- priority: rest[6],
44019
- enabled: rest[7],
44020
- conditions: rest[8]
44308
+ key: rest[6],
44309
+ priority: rest[7],
44310
+ enabled: rest[8],
44311
+ conditions: rest[9]
44021
44312
  };
44022
44313
  }
44023
44314
  const ruleId = params.ruleId;
@@ -44027,6 +44318,7 @@
44027
44318
  const interval = params.interval;
44028
44319
  const resourceId = params.resourceId;
44029
44320
  const description = params.description;
44321
+ const key = params.key;
44030
44322
  const priority = params.priority;
44031
44323
  const enabled = params.enabled;
44032
44324
  const conditions = params.conditions;
@@ -44068,6 +44360,9 @@
44068
44360
  if (typeof interval !== 'undefined') {
44069
44361
  payload['interval'] = interval;
44070
44362
  }
44363
+ if (typeof key !== 'undefined') {
44364
+ payload['key'] = key;
44365
+ }
44071
44366
  if (typeof priority !== 'undefined') {
44072
44367
  payload['priority'] = priority;
44073
44368
  }
@@ -44099,9 +44394,10 @@
44099
44394
  description: rest[3],
44100
44395
  limit: rest[4],
44101
44396
  interval: rest[5],
44102
- priority: rest[6],
44103
- enabled: rest[7],
44104
- conditions: rest[8]
44397
+ key: rest[6],
44398
+ priority: rest[7],
44399
+ enabled: rest[8],
44400
+ conditions: rest[9]
44105
44401
  };
44106
44402
  }
44107
44403
  const ruleId = params.ruleId;
@@ -44111,6 +44407,7 @@
44111
44407
  const description = params.description;
44112
44408
  const limit = params.limit;
44113
44409
  const interval = params.interval;
44410
+ const key = params.key;
44114
44411
  const priority = params.priority;
44115
44412
  const enabled = params.enabled;
44116
44413
  const conditions = params.conditions;
@@ -44137,6 +44434,9 @@
44137
44434
  if (typeof interval !== 'undefined') {
44138
44435
  payload['interval'] = interval;
44139
44436
  }
44437
+ if (typeof key !== 'undefined') {
44438
+ payload['key'] = key;
44439
+ }
44140
44440
  if (typeof priority !== 'undefined') {
44141
44441
  payload['priority'] = priority;
44142
44442
  }
@@ -46583,6 +46883,9 @@
46583
46883
  QuerySuggestionResource["ShInstallations"] = "sh_installations";
46584
46884
  QuerySuggestionResource["MigrationDatabases"] = "migrationdatabases";
46585
46885
  QuerySuggestionResource["MigrationProjects"] = "migrationprojects";
46886
+ QuerySuggestionResource["AffiliateLinks"] = "affiliatelinks";
46887
+ QuerySuggestionResource["AffiliateReferrals"] = "affiliatereferrals";
46888
+ QuerySuggestionResource["AffiliateRewards"] = "affiliaterewards";
46586
46889
  QuerySuggestionResource["Apps"] = "apps";
46587
46890
  QuerySuggestionResource["AppSecrets"] = "appsecrets";
46588
46891
  QuerySuggestionResource["AppInstallations"] = "appinstallations";
@@ -46807,6 +47110,14 @@
46807
47110
  DomainSuggestionType["Suggestion"] = "suggestion";
46808
47111
  })(exports.DomainSuggestionType || (exports.DomainSuggestionType = {}));
46809
47112
 
47113
+ exports.EmbeddingModel = void 0;
47114
+ (function (EmbeddingModel) {
47115
+ EmbeddingModel["Nomicembedtext"] = "nomic-embed-text";
47116
+ EmbeddingModel["Embeddinggemma"] = "embedding-gemma";
47117
+ EmbeddingModel["Allminilm"] = "all-minilm";
47118
+ EmbeddingModel["Bgesmall"] = "bge-small";
47119
+ })(exports.EmbeddingModel || (exports.EmbeddingModel = {}));
47120
+
46810
47121
  exports.Runtime = void 0;
46811
47122
  (function (Runtime) {
46812
47123
  Runtime["Node145"] = "node-14.5";
@@ -46819,6 +47130,7 @@
46819
47130
  Runtime["Node23"] = "node-23";
46820
47131
  Runtime["Node24"] = "node-24";
46821
47132
  Runtime["Node25"] = "node-25";
47133
+ Runtime["Node26"] = "node-26";
46822
47134
  Runtime["Php80"] = "php-8.0";
46823
47135
  Runtime["Php81"] = "php-8.1";
46824
47136
  Runtime["Php82"] = "php-8.2";
@@ -47002,6 +47314,7 @@
47002
47314
  ProjectKeyScopes["WafRulesRead"] = "wafRules.read";
47003
47315
  ProjectKeyScopes["WafRulesWrite"] = "wafRules.write";
47004
47316
  ProjectKeyScopes["EventsRead"] = "events.read";
47317
+ ProjectKeyScopes["ProxyInvalidationsWrite"] = "proxy.invalidations.write";
47005
47318
  ProjectKeyScopes["AppsRead"] = "apps.read";
47006
47319
  ProjectKeyScopes["AppsWrite"] = "apps.write";
47007
47320
  ProjectKeyScopes["Oauth2Read"] = "oauth2.read";
@@ -47387,6 +47700,13 @@
47387
47700
  Status["Active"] = "active";
47388
47701
  })(exports.Status || (exports.Status = {}));
47389
47702
 
47703
+ exports.InvalidationType = void 0;
47704
+ (function (InvalidationType) {
47705
+ InvalidationType["Tag"] = "tag";
47706
+ InvalidationType["Path"] = "path";
47707
+ InvalidationType["All"] = "all";
47708
+ })(exports.InvalidationType || (exports.InvalidationType = {}));
47709
+
47390
47710
  exports.StatusCode = void 0;
47391
47711
  (function (StatusCode) {
47392
47712
  StatusCode["MovedPermanently"] = "301";
@@ -47432,6 +47752,7 @@
47432
47752
  BuildRuntime["Node23"] = "node-23";
47433
47753
  BuildRuntime["Node24"] = "node-24";
47434
47754
  BuildRuntime["Node25"] = "node-25";
47755
+ BuildRuntime["Node26"] = "node-26";
47435
47756
  BuildRuntime["Php80"] = "php-8.0";
47436
47757
  BuildRuntime["Php81"] = "php-8.1";
47437
47758
  BuildRuntime["Php82"] = "php-8.2";
@@ -47562,6 +47883,59 @@
47562
47883
  TablesDBIndexType["Spatial"] = "spatial";
47563
47884
  })(exports.TablesDBIndexType || (exports.TablesDBIndexType = {}));
47564
47885
 
47886
+ exports.UsageInterval = void 0;
47887
+ (function (UsageInterval) {
47888
+ UsageInterval["OneMinute"] = "1m";
47889
+ UsageInterval["FifteenMinutes"] = "15m";
47890
+ UsageInterval["ThirtyMinutes"] = "30m";
47891
+ UsageInterval["OneHour"] = "1h";
47892
+ UsageInterval["OneDay"] = "1d";
47893
+ })(exports.UsageInterval || (exports.UsageInterval = {}));
47894
+
47895
+ exports.UsageEventDimension = void 0;
47896
+ (function (UsageEventDimension) {
47897
+ UsageEventDimension["Path"] = "path";
47898
+ UsageEventDimension["Method"] = "method";
47899
+ UsageEventDimension["Status"] = "status";
47900
+ UsageEventDimension["Service"] = "service";
47901
+ UsageEventDimension["ResourceType"] = "resourceType";
47902
+ UsageEventDimension["Country"] = "country";
47903
+ UsageEventDimension["ContinentCode"] = "continentCode";
47904
+ UsageEventDimension["City"] = "city";
47905
+ UsageEventDimension["Region"] = "region";
47906
+ UsageEventDimension["Hostname"] = "hostname";
47907
+ UsageEventDimension["Ip"] = "ip";
47908
+ UsageEventDimension["OsName"] = "osName";
47909
+ UsageEventDimension["ClientType"] = "clientType";
47910
+ UsageEventDimension["ClientName"] = "clientName";
47911
+ UsageEventDimension["DeviceName"] = "deviceName";
47912
+ UsageEventDimension["Sdk"] = "sdk";
47913
+ UsageEventDimension["SdkVersion"] = "sdkVersion";
47914
+ UsageEventDimension["TeamId"] = "teamId";
47915
+ UsageEventDimension["ResourceId"] = "resourceId";
47916
+ })(exports.UsageEventDimension || (exports.UsageEventDimension = {}));
47917
+
47918
+ exports.UsageOrderBy = void 0;
47919
+ (function (UsageOrderBy) {
47920
+ UsageOrderBy["Time"] = "time";
47921
+ UsageOrderBy["Value"] = "value";
47922
+ })(exports.UsageOrderBy || (exports.UsageOrderBy = {}));
47923
+
47924
+ exports.UsageOrderDirection = void 0;
47925
+ (function (UsageOrderDirection) {
47926
+ UsageOrderDirection["Asc"] = "asc";
47927
+ UsageOrderDirection["Desc"] = "desc";
47928
+ })(exports.UsageOrderDirection || (exports.UsageOrderDirection = {}));
47929
+
47930
+ exports.UsageGaugeDimension = void 0;
47931
+ (function (UsageGaugeDimension) {
47932
+ UsageGaugeDimension["ResourceId"] = "resourceId";
47933
+ UsageGaugeDimension["TeamId"] = "teamId";
47934
+ UsageGaugeDimension["Service"] = "service";
47935
+ UsageGaugeDimension["ResourceType"] = "resourceType";
47936
+ UsageGaugeDimension["Ordinal"] = "ordinal";
47937
+ })(exports.UsageGaugeDimension || (exports.UsageGaugeDimension = {}));
47938
+
47565
47939
  exports.PasswordHash = void 0;
47566
47940
  (function (PasswordHash) {
47567
47941
  PasswordHash["Sha1"] = "sha1";
@@ -47590,14 +47964,6 @@
47590
47964
  VCSDetectionType["Framework"] = "framework";
47591
47965
  })(exports.VCSDetectionType || (exports.VCSDetectionType = {}));
47592
47966
 
47593
- exports.EmbeddingModel = void 0;
47594
- (function (EmbeddingModel) {
47595
- EmbeddingModel["Nomicembedtext"] = "nomic-embed-text";
47596
- EmbeddingModel["Embeddinggemma"] = "embedding-gemma";
47597
- EmbeddingModel["Allminilm"] = "all-minilm";
47598
- EmbeddingModel["Bgesmall"] = "bge-small";
47599
- })(exports.EmbeddingModel || (exports.EmbeddingModel = {}));
47600
-
47601
47967
  exports.VectorsDBIndexType = void 0;
47602
47968
  (function (VectorsDBIndexType) {
47603
47969
  VectorsDBIndexType["HnswEuclidean"] = "hnsw_euclidean";
@@ -47785,6 +48151,7 @@
47785
48151
  exports.Account = Account;
47786
48152
  exports.Activities = Activities;
47787
48153
  exports.Advisor = Advisor;
48154
+ exports.Affiliates = Affiliates;
47788
48155
  exports.Apps = Apps;
47789
48156
  exports.AppwriteException = AppwriteException;
47790
48157
  exports.Assistant = Assistant;
@@ -47796,6 +48163,7 @@
47796
48163
  exports.Databases = Databases;
47797
48164
  exports.DocumentsDB = DocumentsDB;
47798
48165
  exports.Domains = Domains;
48166
+ exports.Embeddings = Embeddings;
47799
48167
  exports.Functions = Functions;
47800
48168
  exports.Graphql = Graphql;
47801
48169
  exports.ID = ID;