@appwrite.io/console 2.3.1 → 3.1.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.
Files changed (46) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +2 -2
  3. package/dist/cjs/sdk.js +330 -14
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +331 -14
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +383 -47
  8. package/docs/examples/domains/create-purchase.md +25 -0
  9. package/docs/examples/organizations/get-scopes.md +2 -1
  10. package/docs/examples/projects/create-schedule.md +20 -0
  11. package/docs/examples/projects/get-schedule.md +16 -0
  12. package/docs/examples/projects/list-schedules.md +17 -0
  13. package/package.json +2 -3
  14. package/src/channel.ts +4 -0
  15. package/src/client.ts +17 -4
  16. package/src/enums/build-runtime.ts +20 -0
  17. package/src/enums/email-template-type.ts +4 -4
  18. package/src/enums/o-auth-provider.ts +0 -2
  19. package/src/enums/resource-type.ts +6 -0
  20. package/src/enums/runtime.ts +20 -0
  21. package/src/enums/runtimes.ts +20 -0
  22. package/src/enums/scopes.ts +2 -0
  23. package/src/enums/sms-template-type.ts +1 -1
  24. package/src/index.ts +2 -0
  25. package/src/models.ts +73 -5
  26. package/src/query.ts +26 -0
  27. package/src/services/account.ts +4 -4
  28. package/src/services/domains.ts +147 -0
  29. package/src/services/organizations.ts +14 -6
  30. package/src/services/projects.ts +223 -0
  31. package/types/channel.d.ts +1 -0
  32. package/types/enums/build-runtime.d.ts +20 -0
  33. package/types/enums/email-template-type.d.ts +4 -4
  34. package/types/enums/o-auth-provider.d.ts +1 -3
  35. package/types/enums/resource-type.d.ts +6 -0
  36. package/types/enums/runtime.d.ts +20 -0
  37. package/types/enums/runtimes.d.ts +20 -0
  38. package/types/enums/scopes.d.ts +2 -0
  39. package/types/enums/sms-template-type.d.ts +1 -1
  40. package/types/index.d.ts +2 -0
  41. package/types/models.d.ts +71 -5
  42. package/types/query.d.ts +22 -0
  43. package/types/services/account.d.ts +4 -4
  44. package/types/services/domains.d.ts +49 -0
  45. package/types/services/organizations.d.ts +4 -1
  46. package/types/services/projects.d.ts +82 -0
package/dist/iife/sdk.js CHANGED
@@ -44,10 +44,10 @@
44
44
  (function (globalObject) {
45
45
 
46
46
  /*
47
- * bignumber.js v9.0.0
47
+ * bignumber.js v9.3.1
48
48
  * A JavaScript library for arbitrary-precision arithmetic.
49
49
  * https://github.com/MikeMcl/bignumber.js
50
- * Copyright (c) 2019 Michael Mclaughlin <M8ch88l@gmail.com>
50
+ * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
51
51
  * MIT Licensed.
52
52
  *
53
53
  * BigNumber.prototype methods | BigNumber methods
@@ -187,7 +187,7 @@
187
187
 
188
188
  // The maximum number of significant digits of the result of the exponentiatedBy operation.
189
189
  // If POW_PRECISION is 0, there will be unlimited significant digits.
190
- POW_PRECISION = 0, // 0 to MAX
190
+ POW_PRECISION = 0, // 0 to MAX
191
191
 
192
192
  // The format specification used by the BigNumber.prototype.toFormat method.
193
193
  FORMAT = {
@@ -197,14 +197,15 @@
197
197
  groupSeparator: ',',
198
198
  decimalSeparator: '.',
199
199
  fractionGroupSize: 0,
200
- fractionGroupSeparator: '\xA0', // non-breaking space
200
+ fractionGroupSeparator: '\xA0', // non-breaking space
201
201
  suffix: ''
202
202
  },
203
203
 
204
204
  // The alphabet used for base conversion. It must be at least 2 characters long, with no '+',
205
205
  // '-', '.', whitespace, or repeated character.
206
206
  // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'
207
- ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz';
207
+ ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz',
208
+ alphabetHasNormalDecimalDigits = true;
208
209
 
209
210
 
210
211
  //------------------------------------------------------------------------------------------
@@ -294,7 +295,7 @@
294
295
 
295
296
  // Allow exponential notation to be used with base 10 argument, while
296
297
  // also rounding to DECIMAL_PLACES as with other bases.
297
- if (b == 10) {
298
+ if (b == 10 && alphabetHasNormalDecimalDigits) {
298
299
  x = new BigNumber(v);
299
300
  return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);
300
301
  }
@@ -583,9 +584,10 @@
583
584
  if (obj.hasOwnProperty(p = 'ALPHABET')) {
584
585
  v = obj[p];
585
586
 
586
- // Disallow if only one character,
587
+ // Disallow if less than two characters,
587
588
  // or if it contains '+', '-', '.', whitespace, or a repeated character.
588
- if (typeof v == 'string' && !/^.$|[+-.\s]|(.).*\1/.test(v)) {
589
+ if (typeof v == 'string' && !/^.?$|[+\-.\s]|(.).*\1/.test(v)) {
590
+ alphabetHasNormalDecimalDigits = v.slice(0, 10) == '0123456789';
589
591
  ALPHABET = v;
590
592
  } else {
591
593
  throw Error
@@ -677,7 +679,7 @@
677
679
  * arguments {number|string|BigNumber}
678
680
  */
679
681
  BigNumber.maximum = BigNumber.max = function () {
680
- return maxOrMin(arguments, P.lt);
682
+ return maxOrMin(arguments, -1);
681
683
  };
682
684
 
683
685
 
@@ -687,7 +689,7 @@
687
689
  * arguments {number|string|BigNumber}
688
690
  */
689
691
  BigNumber.minimum = BigNumber.min = function () {
690
- return maxOrMin(arguments, P.gt);
692
+ return maxOrMin(arguments, 1);
691
693
  };
692
694
 
693
695
 
@@ -946,7 +948,7 @@
946
948
 
947
949
  // xc now represents str converted to baseOut.
948
950
 
949
- // THe index of the rounding digit.
951
+ // The index of the rounding digit.
950
952
  d = e + dp + 1;
951
953
 
952
954
  // The rounding digit: the digit to the right of the digit that may be rounded up.
@@ -1310,7 +1312,7 @@
1310
1312
 
1311
1313
  // Fixed-point notation.
1312
1314
  } else {
1313
- i -= ne;
1315
+ i -= ne + (id === 2 && e > ne);
1314
1316
  str = toFixedPoint(str, e, '0');
1315
1317
 
1316
1318
  // Append zeros?
@@ -1331,24 +1333,20 @@
1331
1333
 
1332
1334
 
1333
1335
  // Handle BigNumber.max and BigNumber.min.
1334
- function maxOrMin(args, method) {
1335
- var n,
1336
+ // If any number is NaN, return NaN.
1337
+ function maxOrMin(args, n) {
1338
+ var k, y,
1336
1339
  i = 1,
1337
- m = new BigNumber(args[0]);
1340
+ x = new BigNumber(args[0]);
1338
1341
 
1339
1342
  for (; i < args.length; i++) {
1340
- n = new BigNumber(args[i]);
1341
-
1342
- // If any number is NaN, return NaN.
1343
- if (!n.s) {
1344
- m = n;
1345
- break;
1346
- } else if (method.call(m, n)) {
1347
- m = n;
1343
+ y = new BigNumber(args[i]);
1344
+ if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) {
1345
+ x = y;
1348
1346
  }
1349
1347
  }
1350
1348
 
1351
- return m;
1349
+ return x;
1352
1350
  }
1353
1351
 
1354
1352
 
@@ -1467,7 +1465,7 @@
1467
1465
  n = xc[ni = 0];
1468
1466
 
1469
1467
  // Get the rounding digit at index j of n.
1470
- rd = n / pows10[d - j - 1] % 10 | 0;
1468
+ rd = mathfloor(n / pows10[d - j - 1] % 10);
1471
1469
  } else {
1472
1470
  ni = mathceil((i + 1) / LOG_BASE);
1473
1471
 
@@ -1498,7 +1496,7 @@
1498
1496
  j = i - LOG_BASE + d;
1499
1497
 
1500
1498
  // Get the rounding digit at index j of n.
1501
- rd = j < 0 ? 0 : n / pows10[d - j - 1] % 10 | 0;
1499
+ rd = j < 0 ? 0 : mathfloor(n / pows10[d - j - 1] % 10);
1502
1500
  }
1503
1501
  }
1504
1502
 
@@ -1746,7 +1744,7 @@
1746
1744
 
1747
1745
  // The sign of the result of pow when x is negative depends on the evenness of n.
1748
1746
  // If +n overflows to ±Infinity, the evenness of n would be not be known.
1749
- y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? 2 - isOdd(n) : +valueOf(n)));
1747
+ y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n)));
1750
1748
  return m ? y.mod(m) : y;
1751
1749
  }
1752
1750
 
@@ -2047,7 +2045,12 @@
2047
2045
  }
2048
2046
 
2049
2047
  // x < y? Point xc to the array of the bigger number.
2050
- if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s;
2048
+ if (xLTy) {
2049
+ t = xc;
2050
+ xc = yc;
2051
+ yc = t;
2052
+ y.s = -y.s;
2053
+ }
2051
2054
 
2052
2055
  b = (j = yc.length) - (i = xc.length);
2053
2056
 
@@ -2201,7 +2204,14 @@
2201
2204
  ycL = yc.length;
2202
2205
 
2203
2206
  // Ensure xc points to longer array and xcL to its length.
2204
- if (xcL < ycL) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i;
2207
+ if (xcL < ycL) {
2208
+ zc = xc;
2209
+ xc = yc;
2210
+ yc = zc;
2211
+ i = xcL;
2212
+ xcL = ycL;
2213
+ ycL = i;
2214
+ }
2205
2215
 
2206
2216
  // Initialise the result array with zeros.
2207
2217
  for (i = xcL + ycL, zc = []; i--; zc.push(0));
@@ -2322,7 +2332,12 @@
2322
2332
  b = yc.length;
2323
2333
 
2324
2334
  // Point xc to the longer array, and b to the shorter length.
2325
- if (a - b < 0) t = yc, yc = xc, xc = t, b = a;
2335
+ if (a - b < 0) {
2336
+ t = yc;
2337
+ yc = xc;
2338
+ xc = t;
2339
+ b = a;
2340
+ }
2326
2341
 
2327
2342
  // Only start adding at yc.length - 1 as the further digits of xc can be ignored.
2328
2343
  for (a = 0; b;) {
@@ -2438,7 +2453,7 @@
2438
2453
  e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);
2439
2454
 
2440
2455
  if (s == 1 / 0) {
2441
- n = '1e' + e;
2456
+ n = '5e' + e;
2442
2457
  } else {
2443
2458
  n = s.toExponential();
2444
2459
  n = n.slice(0, n.indexOf('e') + 1) + e;
@@ -2608,7 +2623,12 @@
2608
2623
  intDigits = isNeg ? intPart.slice(1) : intPart,
2609
2624
  len = intDigits.length;
2610
2625
 
2611
- if (g2) i = g1, g1 = g2, g2 = i, len -= i;
2626
+ if (g2) {
2627
+ i = g1;
2628
+ g1 = g2;
2629
+ g2 = i;
2630
+ len -= i;
2631
+ }
2612
2632
 
2613
2633
  if (g1 > 0 && len > 0) {
2614
2634
  i = len % g1 || g1;
@@ -2760,7 +2780,7 @@
2760
2780
  str = e <= TO_EXP_NEG || e >= TO_EXP_POS
2761
2781
  ? toExponential(coeffToString(n.c), e)
2762
2782
  : toFixedPoint(coeffToString(n.c), e, '0');
2763
- } else if (b === 10) {
2783
+ } else if (b === 10 && alphabetHasNormalDecimalDigits) {
2764
2784
  n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);
2765
2785
  str = toFixedPoint(coeffToString(n.c), n.e, '0');
2766
2786
  } else {
@@ -2940,8 +2960,6 @@
2940
2960
  })(commonjsGlobal);
2941
2961
  } (bignumber));
2942
2962
 
2943
- var BigNumber$1 = bignumber.exports;
2944
-
2945
2963
  (function (module) {
2946
2964
  var BigNumber = bignumber.exports;
2947
2965
 
@@ -3989,12 +4007,34 @@
3989
4007
  Query.offset = (offset) => new Query("offset", undefined, offset).toString();
3990
4008
  /**
3991
4009
  * Filter resources where attribute contains the specified value.
4010
+ * For string attributes, checks if the string contains the substring.
3992
4011
  *
4012
+ * Note: For array attributes, use {@link containsAny} or {@link containsAll} instead.
3993
4013
  * @param {string} attribute
3994
4014
  * @param {string | string[]} value
3995
4015
  * @returns {string}
3996
4016
  */
3997
4017
  Query.contains = (attribute, value) => new Query("contains", attribute, value).toString();
4018
+ /**
4019
+ * Filter resources where attribute contains ANY of the specified values.
4020
+ * For array and relationship attributes, matches documents where the attribute
4021
+ * contains at least one of the given values.
4022
+ *
4023
+ * @param {string} attribute
4024
+ * @param {any[]} value
4025
+ * @returns {string}
4026
+ */
4027
+ Query.containsAny = (attribute, value) => new Query("containsAny", attribute, value).toString();
4028
+ /**
4029
+ * Filter resources where attribute contains ALL of the specified values.
4030
+ * For array and relationship attributes, matches documents where the attribute
4031
+ * contains every one of the given values.
4032
+ *
4033
+ * @param {string} attribute
4034
+ * @param {any[]} value
4035
+ * @returns {string}
4036
+ */
4037
+ Query.containsAll = (attribute, value) => new Query("containsAll", attribute, value).toString();
3998
4038
  /**
3999
4039
  * Filter resources where attribute does not contain the specified value.
4000
4040
  *
@@ -4212,15 +4252,28 @@
4212
4252
  const JSONbigSerializer = jsonBigint.exports({ useNativeBigInt: true });
4213
4253
  const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
4214
4254
  const MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
4255
+ const MAX_INT64 = BigInt('9223372036854775807');
4256
+ const MIN_INT64 = BigInt('-9223372036854775808');
4257
+ function isBigNumber(value) {
4258
+ return value !== null
4259
+ && typeof value === 'object'
4260
+ && value._isBigNumber === true
4261
+ && typeof value.isInteger === 'function'
4262
+ && typeof value.toFixed === 'function'
4263
+ && typeof value.toNumber === 'function';
4264
+ }
4215
4265
  function reviver(_key, value) {
4216
- if (BigNumber$1.isBigNumber(value)) {
4266
+ if (isBigNumber(value)) {
4217
4267
  if (value.isInteger()) {
4218
4268
  const str = value.toFixed();
4219
4269
  const bi = BigInt(str);
4220
4270
  if (bi >= MIN_SAFE && bi <= MAX_SAFE) {
4221
4271
  return Number(str);
4222
4272
  }
4223
- return bi;
4273
+ if (bi >= MIN_INT64 && bi <= MAX_INT64) {
4274
+ return bi;
4275
+ }
4276
+ return value.toNumber();
4224
4277
  }
4225
4278
  return value.toNumber();
4226
4279
  }
@@ -4279,7 +4332,7 @@
4279
4332
  'x-sdk-name': 'Console',
4280
4333
  'x-sdk-platform': 'console',
4281
4334
  'x-sdk-language': 'web',
4282
- 'x-sdk-version': '2.3.1',
4335
+ 'x-sdk-version': '3.1.0',
4283
4336
  'X-Appwrite-Response-Format': '1.8.0',
4284
4337
  };
4285
4338
  this.realtime = {
@@ -11468,6 +11521,102 @@
11468
11521
  const apiHeaders = {};
11469
11522
  return this.client.call('get', uri, apiHeaders, payload);
11470
11523
  }
11524
+ createPurchase(paramsOrFirst, ...rest) {
11525
+ let params;
11526
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
11527
+ params = (paramsOrFirst || {});
11528
+ }
11529
+ else {
11530
+ params = {
11531
+ domain: paramsOrFirst,
11532
+ teamId: rest[0],
11533
+ firstName: rest[1],
11534
+ lastName: rest[2],
11535
+ email: rest[3],
11536
+ phone: rest[4],
11537
+ billingAddressId: rest[5],
11538
+ paymentMethodId: rest[6],
11539
+ addressLine3: rest[7],
11540
+ companyName: rest[8],
11541
+ periodYears: rest[9]
11542
+ };
11543
+ }
11544
+ const domain = params.domain;
11545
+ const teamId = params.teamId;
11546
+ const firstName = params.firstName;
11547
+ const lastName = params.lastName;
11548
+ const email = params.email;
11549
+ const phone = params.phone;
11550
+ const billingAddressId = params.billingAddressId;
11551
+ const paymentMethodId = params.paymentMethodId;
11552
+ const addressLine3 = params.addressLine3;
11553
+ const companyName = params.companyName;
11554
+ const periodYears = params.periodYears;
11555
+ if (typeof domain === 'undefined') {
11556
+ throw new AppwriteException('Missing required parameter: "domain"');
11557
+ }
11558
+ if (typeof teamId === 'undefined') {
11559
+ throw new AppwriteException('Missing required parameter: "teamId"');
11560
+ }
11561
+ if (typeof firstName === 'undefined') {
11562
+ throw new AppwriteException('Missing required parameter: "firstName"');
11563
+ }
11564
+ if (typeof lastName === 'undefined') {
11565
+ throw new AppwriteException('Missing required parameter: "lastName"');
11566
+ }
11567
+ if (typeof email === 'undefined') {
11568
+ throw new AppwriteException('Missing required parameter: "email"');
11569
+ }
11570
+ if (typeof phone === 'undefined') {
11571
+ throw new AppwriteException('Missing required parameter: "phone"');
11572
+ }
11573
+ if (typeof billingAddressId === 'undefined') {
11574
+ throw new AppwriteException('Missing required parameter: "billingAddressId"');
11575
+ }
11576
+ if (typeof paymentMethodId === 'undefined') {
11577
+ throw new AppwriteException('Missing required parameter: "paymentMethodId"');
11578
+ }
11579
+ const apiPath = '/domains/purchases';
11580
+ const payload = {};
11581
+ if (typeof domain !== 'undefined') {
11582
+ payload['domain'] = domain;
11583
+ }
11584
+ if (typeof teamId !== 'undefined') {
11585
+ payload['teamId'] = teamId;
11586
+ }
11587
+ if (typeof firstName !== 'undefined') {
11588
+ payload['firstName'] = firstName;
11589
+ }
11590
+ if (typeof lastName !== 'undefined') {
11591
+ payload['lastName'] = lastName;
11592
+ }
11593
+ if (typeof email !== 'undefined') {
11594
+ payload['email'] = email;
11595
+ }
11596
+ if (typeof phone !== 'undefined') {
11597
+ payload['phone'] = phone;
11598
+ }
11599
+ if (typeof billingAddressId !== 'undefined') {
11600
+ payload['billingAddressId'] = billingAddressId;
11601
+ }
11602
+ if (typeof addressLine3 !== 'undefined') {
11603
+ payload['addressLine3'] = addressLine3;
11604
+ }
11605
+ if (typeof companyName !== 'undefined') {
11606
+ payload['companyName'] = companyName;
11607
+ }
11608
+ if (typeof periodYears !== 'undefined') {
11609
+ payload['periodYears'] = periodYears;
11610
+ }
11611
+ if (typeof paymentMethodId !== 'undefined') {
11612
+ payload['paymentMethodId'] = paymentMethodId;
11613
+ }
11614
+ const uri = new URL(this.client.config.endpoint + apiPath);
11615
+ const apiHeaders = {
11616
+ 'content-type': 'application/json',
11617
+ };
11618
+ return this.client.call('post', uri, apiHeaders, payload);
11619
+ }
11471
11620
  listSuggestions(paramsOrFirst, ...rest) {
11472
11621
  let params;
11473
11622
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -19574,22 +19723,27 @@
19574
19723
  const apiHeaders = {};
19575
19724
  return this.client.call('get', uri, apiHeaders, payload);
19576
19725
  }
19577
- getScopes(paramsOrFirst) {
19726
+ getScopes(paramsOrFirst, ...rest) {
19578
19727
  let params;
19579
19728
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19580
19729
  params = (paramsOrFirst || {});
19581
19730
  }
19582
19731
  else {
19583
19732
  params = {
19584
- organizationId: paramsOrFirst
19733
+ organizationId: paramsOrFirst,
19734
+ projectId: rest[0]
19585
19735
  };
19586
19736
  }
19587
19737
  const organizationId = params.organizationId;
19738
+ const projectId = params.projectId;
19588
19739
  if (typeof organizationId === 'undefined') {
19589
19740
  throw new AppwriteException('Missing required parameter: "organizationId"');
19590
19741
  }
19591
19742
  const apiPath = '/organizations/{organizationId}/roles'.replace('{organizationId}', organizationId);
19592
19743
  const payload = {};
19744
+ if (typeof projectId !== 'undefined') {
19745
+ payload['projectId'] = projectId;
19746
+ }
19593
19747
  const uri = new URL(this.client.config.endpoint + apiPath);
19594
19748
  const apiHeaders = {};
19595
19749
  return this.client.call('get', uri, apiHeaders, payload);
@@ -21213,6 +21367,117 @@
21213
21367
  };
21214
21368
  return this.client.call('delete', uri, apiHeaders, payload);
21215
21369
  }
21370
+ listSchedules(paramsOrFirst, ...rest) {
21371
+ let params;
21372
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21373
+ params = (paramsOrFirst || {});
21374
+ }
21375
+ else {
21376
+ params = {
21377
+ projectId: paramsOrFirst,
21378
+ queries: rest[0],
21379
+ total: rest[1]
21380
+ };
21381
+ }
21382
+ const projectId = params.projectId;
21383
+ const queries = params.queries;
21384
+ const total = params.total;
21385
+ if (typeof projectId === 'undefined') {
21386
+ throw new AppwriteException('Missing required parameter: "projectId"');
21387
+ }
21388
+ const apiPath = '/projects/{projectId}/schedules'.replace('{projectId}', projectId);
21389
+ const payload = {};
21390
+ if (typeof queries !== 'undefined') {
21391
+ payload['queries'] = queries;
21392
+ }
21393
+ if (typeof total !== 'undefined') {
21394
+ payload['total'] = total;
21395
+ }
21396
+ const uri = new URL(this.client.config.endpoint + apiPath);
21397
+ const apiHeaders = {};
21398
+ return this.client.call('get', uri, apiHeaders, payload);
21399
+ }
21400
+ createSchedule(paramsOrFirst, ...rest) {
21401
+ let params;
21402
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21403
+ params = (paramsOrFirst || {});
21404
+ }
21405
+ else {
21406
+ params = {
21407
+ projectId: paramsOrFirst,
21408
+ resourceType: rest[0],
21409
+ resourceId: rest[1],
21410
+ schedule: rest[2],
21411
+ active: rest[3],
21412
+ data: rest[4]
21413
+ };
21414
+ }
21415
+ const projectId = params.projectId;
21416
+ const resourceType = params.resourceType;
21417
+ const resourceId = params.resourceId;
21418
+ const schedule = params.schedule;
21419
+ const active = params.active;
21420
+ const data = params.data;
21421
+ if (typeof projectId === 'undefined') {
21422
+ throw new AppwriteException('Missing required parameter: "projectId"');
21423
+ }
21424
+ if (typeof resourceType === 'undefined') {
21425
+ throw new AppwriteException('Missing required parameter: "resourceType"');
21426
+ }
21427
+ if (typeof resourceId === 'undefined') {
21428
+ throw new AppwriteException('Missing required parameter: "resourceId"');
21429
+ }
21430
+ if (typeof schedule === 'undefined') {
21431
+ throw new AppwriteException('Missing required parameter: "schedule"');
21432
+ }
21433
+ const apiPath = '/projects/{projectId}/schedules'.replace('{projectId}', projectId);
21434
+ const payload = {};
21435
+ if (typeof resourceType !== 'undefined') {
21436
+ payload['resourceType'] = resourceType;
21437
+ }
21438
+ if (typeof resourceId !== 'undefined') {
21439
+ payload['resourceId'] = resourceId;
21440
+ }
21441
+ if (typeof schedule !== 'undefined') {
21442
+ payload['schedule'] = schedule;
21443
+ }
21444
+ if (typeof active !== 'undefined') {
21445
+ payload['active'] = active;
21446
+ }
21447
+ if (typeof data !== 'undefined') {
21448
+ payload['data'] = data;
21449
+ }
21450
+ const uri = new URL(this.client.config.endpoint + apiPath);
21451
+ const apiHeaders = {
21452
+ 'content-type': 'application/json',
21453
+ };
21454
+ return this.client.call('post', uri, apiHeaders, payload);
21455
+ }
21456
+ getSchedule(paramsOrFirst, ...rest) {
21457
+ let params;
21458
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21459
+ params = (paramsOrFirst || {});
21460
+ }
21461
+ else {
21462
+ params = {
21463
+ projectId: paramsOrFirst,
21464
+ scheduleId: rest[0]
21465
+ };
21466
+ }
21467
+ const projectId = params.projectId;
21468
+ const scheduleId = params.scheduleId;
21469
+ if (typeof projectId === 'undefined') {
21470
+ throw new AppwriteException('Missing required parameter: "projectId"');
21471
+ }
21472
+ if (typeof scheduleId === 'undefined') {
21473
+ throw new AppwriteException('Missing required parameter: "scheduleId"');
21474
+ }
21475
+ const apiPath = '/projects/{projectId}/schedules/{scheduleId}'.replace('{projectId}', projectId).replace('{scheduleId}', scheduleId);
21476
+ const payload = {};
21477
+ const uri = new URL(this.client.config.endpoint + apiPath);
21478
+ const apiHeaders = {};
21479
+ return this.client.call('get', uri, apiHeaders, payload);
21480
+ }
21216
21481
  updateServiceStatus(paramsOrFirst, ...rest) {
21217
21482
  let params;
21218
21483
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -30494,6 +30759,9 @@
30494
30759
  create() {
30495
30760
  return this.resolve("create");
30496
30761
  }
30762
+ upsert() {
30763
+ return this.resolve("upsert");
30764
+ }
30497
30765
  update() {
30498
30766
  return this.resolve("update");
30499
30767
  }
@@ -30861,6 +31129,8 @@
30861
31129
  Scopes["TargetsWrite"] = "targets.write";
30862
31130
  Scopes["RulesRead"] = "rules.read";
30863
31131
  Scopes["RulesWrite"] = "rules.write";
31132
+ Scopes["SchedulesRead"] = "schedules.read";
31133
+ Scopes["SchedulesWrite"] = "schedules.write";
30864
31134
  Scopes["MigrationsRead"] = "migrations.read";
30865
31135
  Scopes["MigrationsWrite"] = "migrations.write";
30866
31136
  Scopes["VcsRead"] = "vcs.read";
@@ -30933,8 +31203,6 @@
30933
31203
  OAuthProvider["Yandex"] = "yandex";
30934
31204
  OAuthProvider["Zoho"] = "zoho";
30935
31205
  OAuthProvider["Zoom"] = "zoom";
30936
- OAuthProvider["GithubImagine"] = "githubImagine";
30937
- OAuthProvider["GoogleImagine"] = "googleImagine";
30938
31206
  })(exports.OAuthProvider || (exports.OAuthProvider = {}));
30939
31207
 
30940
31208
  exports.Browser = void 0;
@@ -31716,24 +31984,35 @@
31716
31984
  Runtime["Node200"] = "node-20.0";
31717
31985
  Runtime["Node210"] = "node-21.0";
31718
31986
  Runtime["Node22"] = "node-22";
31987
+ Runtime["Node23"] = "node-23";
31988
+ Runtime["Node24"] = "node-24";
31989
+ Runtime["Node25"] = "node-25";
31719
31990
  Runtime["Php80"] = "php-8.0";
31720
31991
  Runtime["Php81"] = "php-8.1";
31721
31992
  Runtime["Php82"] = "php-8.2";
31722
31993
  Runtime["Php83"] = "php-8.3";
31994
+ Runtime["Php84"] = "php-8.4";
31723
31995
  Runtime["Ruby30"] = "ruby-3.0";
31724
31996
  Runtime["Ruby31"] = "ruby-3.1";
31725
31997
  Runtime["Ruby32"] = "ruby-3.2";
31726
31998
  Runtime["Ruby33"] = "ruby-3.3";
31999
+ Runtime["Ruby34"] = "ruby-3.4";
32000
+ Runtime["Ruby40"] = "ruby-4.0";
31727
32001
  Runtime["Python38"] = "python-3.8";
31728
32002
  Runtime["Python39"] = "python-3.9";
31729
32003
  Runtime["Python310"] = "python-3.10";
31730
32004
  Runtime["Python311"] = "python-3.11";
31731
32005
  Runtime["Python312"] = "python-3.12";
32006
+ Runtime["Python313"] = "python-3.13";
32007
+ Runtime["Python314"] = "python-3.14";
31732
32008
  Runtime["Pythonml311"] = "python-ml-3.11";
31733
32009
  Runtime["Pythonml312"] = "python-ml-3.12";
32010
+ Runtime["Pythonml313"] = "python-ml-3.13";
31734
32011
  Runtime["Deno140"] = "deno-1.40";
31735
32012
  Runtime["Deno146"] = "deno-1.46";
31736
32013
  Runtime["Deno20"] = "deno-2.0";
32014
+ Runtime["Deno25"] = "deno-2.5";
32015
+ Runtime["Deno26"] = "deno-2.6";
31737
32016
  Runtime["Dart215"] = "dart-2.15";
31738
32017
  Runtime["Dart216"] = "dart-2.16";
31739
32018
  Runtime["Dart217"] = "dart-2.17";
@@ -31749,25 +32028,34 @@
31749
32028
  Runtime["Dotnet60"] = "dotnet-6.0";
31750
32029
  Runtime["Dotnet70"] = "dotnet-7.0";
31751
32030
  Runtime["Dotnet80"] = "dotnet-8.0";
32031
+ Runtime["Dotnet10"] = "dotnet-10";
31752
32032
  Runtime["Java80"] = "java-8.0";
31753
32033
  Runtime["Java110"] = "java-11.0";
31754
32034
  Runtime["Java170"] = "java-17.0";
31755
32035
  Runtime["Java180"] = "java-18.0";
31756
32036
  Runtime["Java210"] = "java-21.0";
31757
32037
  Runtime["Java22"] = "java-22";
32038
+ Runtime["Java25"] = "java-25";
31758
32039
  Runtime["Swift55"] = "swift-5.5";
31759
32040
  Runtime["Swift58"] = "swift-5.8";
31760
32041
  Runtime["Swift59"] = "swift-5.9";
31761
32042
  Runtime["Swift510"] = "swift-5.10";
32043
+ Runtime["Swift62"] = "swift-6.2";
31762
32044
  Runtime["Kotlin16"] = "kotlin-1.6";
31763
32045
  Runtime["Kotlin18"] = "kotlin-1.8";
31764
32046
  Runtime["Kotlin19"] = "kotlin-1.9";
31765
32047
  Runtime["Kotlin20"] = "kotlin-2.0";
32048
+ Runtime["Kotlin23"] = "kotlin-2.3";
31766
32049
  Runtime["Cpp17"] = "cpp-17";
31767
32050
  Runtime["Cpp20"] = "cpp-20";
31768
32051
  Runtime["Bun10"] = "bun-1.0";
31769
32052
  Runtime["Bun11"] = "bun-1.1";
32053
+ Runtime["Bun12"] = "bun-1.2";
32054
+ Runtime["Bun13"] = "bun-1.3";
31770
32055
  Runtime["Go123"] = "go-1.23";
32056
+ Runtime["Go124"] = "go-1.24";
32057
+ Runtime["Go125"] = "go-1.25";
32058
+ Runtime["Go126"] = "go-1.26";
31771
32059
  Runtime["Static1"] = "static-1";
31772
32060
  Runtime["Flutter324"] = "flutter-3.24";
31773
32061
  Runtime["Flutter327"] = "flutter-3.27";
@@ -31786,24 +32074,35 @@
31786
32074
  Runtimes["Node200"] = "node-20.0";
31787
32075
  Runtimes["Node210"] = "node-21.0";
31788
32076
  Runtimes["Node22"] = "node-22";
32077
+ Runtimes["Node23"] = "node-23";
32078
+ Runtimes["Node24"] = "node-24";
32079
+ Runtimes["Node25"] = "node-25";
31789
32080
  Runtimes["Php80"] = "php-8.0";
31790
32081
  Runtimes["Php81"] = "php-8.1";
31791
32082
  Runtimes["Php82"] = "php-8.2";
31792
32083
  Runtimes["Php83"] = "php-8.3";
32084
+ Runtimes["Php84"] = "php-8.4";
31793
32085
  Runtimes["Ruby30"] = "ruby-3.0";
31794
32086
  Runtimes["Ruby31"] = "ruby-3.1";
31795
32087
  Runtimes["Ruby32"] = "ruby-3.2";
31796
32088
  Runtimes["Ruby33"] = "ruby-3.3";
32089
+ Runtimes["Ruby34"] = "ruby-3.4";
32090
+ Runtimes["Ruby40"] = "ruby-4.0";
31797
32091
  Runtimes["Python38"] = "python-3.8";
31798
32092
  Runtimes["Python39"] = "python-3.9";
31799
32093
  Runtimes["Python310"] = "python-3.10";
31800
32094
  Runtimes["Python311"] = "python-3.11";
31801
32095
  Runtimes["Python312"] = "python-3.12";
32096
+ Runtimes["Python313"] = "python-3.13";
32097
+ Runtimes["Python314"] = "python-3.14";
31802
32098
  Runtimes["Pythonml311"] = "python-ml-3.11";
31803
32099
  Runtimes["Pythonml312"] = "python-ml-3.12";
32100
+ Runtimes["Pythonml313"] = "python-ml-3.13";
31804
32101
  Runtimes["Deno140"] = "deno-1.40";
31805
32102
  Runtimes["Deno146"] = "deno-1.46";
31806
32103
  Runtimes["Deno20"] = "deno-2.0";
32104
+ Runtimes["Deno25"] = "deno-2.5";
32105
+ Runtimes["Deno26"] = "deno-2.6";
31807
32106
  Runtimes["Dart215"] = "dart-2.15";
31808
32107
  Runtimes["Dart216"] = "dart-2.16";
31809
32108
  Runtimes["Dart217"] = "dart-2.17";
@@ -31819,25 +32118,34 @@
31819
32118
  Runtimes["Dotnet60"] = "dotnet-6.0";
31820
32119
  Runtimes["Dotnet70"] = "dotnet-7.0";
31821
32120
  Runtimes["Dotnet80"] = "dotnet-8.0";
32121
+ Runtimes["Dotnet10"] = "dotnet-10";
31822
32122
  Runtimes["Java80"] = "java-8.0";
31823
32123
  Runtimes["Java110"] = "java-11.0";
31824
32124
  Runtimes["Java170"] = "java-17.0";
31825
32125
  Runtimes["Java180"] = "java-18.0";
31826
32126
  Runtimes["Java210"] = "java-21.0";
31827
32127
  Runtimes["Java22"] = "java-22";
32128
+ Runtimes["Java25"] = "java-25";
31828
32129
  Runtimes["Swift55"] = "swift-5.5";
31829
32130
  Runtimes["Swift58"] = "swift-5.8";
31830
32131
  Runtimes["Swift59"] = "swift-5.9";
31831
32132
  Runtimes["Swift510"] = "swift-5.10";
32133
+ Runtimes["Swift62"] = "swift-6.2";
31832
32134
  Runtimes["Kotlin16"] = "kotlin-1.6";
31833
32135
  Runtimes["Kotlin18"] = "kotlin-1.8";
31834
32136
  Runtimes["Kotlin19"] = "kotlin-1.9";
31835
32137
  Runtimes["Kotlin20"] = "kotlin-2.0";
32138
+ Runtimes["Kotlin23"] = "kotlin-2.3";
31836
32139
  Runtimes["Cpp17"] = "cpp-17";
31837
32140
  Runtimes["Cpp20"] = "cpp-20";
31838
32141
  Runtimes["Bun10"] = "bun-1.0";
31839
32142
  Runtimes["Bun11"] = "bun-1.1";
32143
+ Runtimes["Bun12"] = "bun-1.2";
32144
+ Runtimes["Bun13"] = "bun-1.3";
31840
32145
  Runtimes["Go123"] = "go-1.23";
32146
+ Runtimes["Go124"] = "go-1.24";
32147
+ Runtimes["Go125"] = "go-1.25";
32148
+ Runtimes["Go126"] = "go-1.26";
31841
32149
  Runtimes["Static1"] = "static-1";
31842
32150
  Runtimes["Flutter324"] = "flutter-3.24";
31843
32151
  Runtimes["Flutter327"] = "flutter-3.27";
@@ -31989,6 +32297,14 @@
31989
32297
  PlatformType["Reactnativeandroid"] = "react-native-android";
31990
32298
  })(exports.PlatformType || (exports.PlatformType = {}));
31991
32299
 
32300
+ exports.ResourceType = void 0;
32301
+ (function (ResourceType) {
32302
+ ResourceType["Function"] = "function";
32303
+ ResourceType["Execution"] = "execution";
32304
+ ResourceType["Message"] = "message";
32305
+ ResourceType["Backup"] = "backup";
32306
+ })(exports.ResourceType || (exports.ResourceType = {}));
32307
+
31992
32308
  exports.ApiService = void 0;
31993
32309
  (function (ApiService) {
31994
32310
  ApiService["Account"] = "account";
@@ -32015,12 +32331,12 @@
32015
32331
  exports.EmailTemplateType = void 0;
32016
32332
  (function (EmailTemplateType) {
32017
32333
  EmailTemplateType["Verification"] = "verification";
32018
- EmailTemplateType["Magicsession"] = "magicsession";
32334
+ EmailTemplateType["MagicSession"] = "magicSession";
32019
32335
  EmailTemplateType["Recovery"] = "recovery";
32020
32336
  EmailTemplateType["Invitation"] = "invitation";
32021
- EmailTemplateType["Mfachallenge"] = "mfachallenge";
32022
- EmailTemplateType["Sessionalert"] = "sessionalert";
32023
- EmailTemplateType["Otpsession"] = "otpsession";
32337
+ EmailTemplateType["MfaChallenge"] = "mfaChallenge";
32338
+ EmailTemplateType["SessionAlert"] = "sessionAlert";
32339
+ EmailTemplateType["OtpSession"] = "otpSession";
32024
32340
  })(exports.EmailTemplateType || (exports.EmailTemplateType = {}));
32025
32341
 
32026
32342
  exports.EmailTemplateLocale = void 0;
@@ -32163,7 +32479,7 @@
32163
32479
  SmsTemplateType["Verification"] = "verification";
32164
32480
  SmsTemplateType["Login"] = "login";
32165
32481
  SmsTemplateType["Invitation"] = "invitation";
32166
- SmsTemplateType["Mfachallenge"] = "mfachallenge";
32482
+ SmsTemplateType["MfaChallenge"] = "mfaChallenge";
32167
32483
  })(exports.SmsTemplateType || (exports.SmsTemplateType = {}));
32168
32484
 
32169
32485
  exports.SmsTemplateLocale = void 0;
@@ -32343,24 +32659,35 @@
32343
32659
  BuildRuntime["Node200"] = "node-20.0";
32344
32660
  BuildRuntime["Node210"] = "node-21.0";
32345
32661
  BuildRuntime["Node22"] = "node-22";
32662
+ BuildRuntime["Node23"] = "node-23";
32663
+ BuildRuntime["Node24"] = "node-24";
32664
+ BuildRuntime["Node25"] = "node-25";
32346
32665
  BuildRuntime["Php80"] = "php-8.0";
32347
32666
  BuildRuntime["Php81"] = "php-8.1";
32348
32667
  BuildRuntime["Php82"] = "php-8.2";
32349
32668
  BuildRuntime["Php83"] = "php-8.3";
32669
+ BuildRuntime["Php84"] = "php-8.4";
32350
32670
  BuildRuntime["Ruby30"] = "ruby-3.0";
32351
32671
  BuildRuntime["Ruby31"] = "ruby-3.1";
32352
32672
  BuildRuntime["Ruby32"] = "ruby-3.2";
32353
32673
  BuildRuntime["Ruby33"] = "ruby-3.3";
32674
+ BuildRuntime["Ruby34"] = "ruby-3.4";
32675
+ BuildRuntime["Ruby40"] = "ruby-4.0";
32354
32676
  BuildRuntime["Python38"] = "python-3.8";
32355
32677
  BuildRuntime["Python39"] = "python-3.9";
32356
32678
  BuildRuntime["Python310"] = "python-3.10";
32357
32679
  BuildRuntime["Python311"] = "python-3.11";
32358
32680
  BuildRuntime["Python312"] = "python-3.12";
32681
+ BuildRuntime["Python313"] = "python-3.13";
32682
+ BuildRuntime["Python314"] = "python-3.14";
32359
32683
  BuildRuntime["Pythonml311"] = "python-ml-3.11";
32360
32684
  BuildRuntime["Pythonml312"] = "python-ml-3.12";
32685
+ BuildRuntime["Pythonml313"] = "python-ml-3.13";
32361
32686
  BuildRuntime["Deno140"] = "deno-1.40";
32362
32687
  BuildRuntime["Deno146"] = "deno-1.46";
32363
32688
  BuildRuntime["Deno20"] = "deno-2.0";
32689
+ BuildRuntime["Deno25"] = "deno-2.5";
32690
+ BuildRuntime["Deno26"] = "deno-2.6";
32364
32691
  BuildRuntime["Dart215"] = "dart-2.15";
32365
32692
  BuildRuntime["Dart216"] = "dart-2.16";
32366
32693
  BuildRuntime["Dart217"] = "dart-2.17";
@@ -32376,25 +32703,34 @@
32376
32703
  BuildRuntime["Dotnet60"] = "dotnet-6.0";
32377
32704
  BuildRuntime["Dotnet70"] = "dotnet-7.0";
32378
32705
  BuildRuntime["Dotnet80"] = "dotnet-8.0";
32706
+ BuildRuntime["Dotnet10"] = "dotnet-10";
32379
32707
  BuildRuntime["Java80"] = "java-8.0";
32380
32708
  BuildRuntime["Java110"] = "java-11.0";
32381
32709
  BuildRuntime["Java170"] = "java-17.0";
32382
32710
  BuildRuntime["Java180"] = "java-18.0";
32383
32711
  BuildRuntime["Java210"] = "java-21.0";
32384
32712
  BuildRuntime["Java22"] = "java-22";
32713
+ BuildRuntime["Java25"] = "java-25";
32385
32714
  BuildRuntime["Swift55"] = "swift-5.5";
32386
32715
  BuildRuntime["Swift58"] = "swift-5.8";
32387
32716
  BuildRuntime["Swift59"] = "swift-5.9";
32388
32717
  BuildRuntime["Swift510"] = "swift-5.10";
32718
+ BuildRuntime["Swift62"] = "swift-6.2";
32389
32719
  BuildRuntime["Kotlin16"] = "kotlin-1.6";
32390
32720
  BuildRuntime["Kotlin18"] = "kotlin-1.8";
32391
32721
  BuildRuntime["Kotlin19"] = "kotlin-1.9";
32392
32722
  BuildRuntime["Kotlin20"] = "kotlin-2.0";
32723
+ BuildRuntime["Kotlin23"] = "kotlin-2.3";
32393
32724
  BuildRuntime["Cpp17"] = "cpp-17";
32394
32725
  BuildRuntime["Cpp20"] = "cpp-20";
32395
32726
  BuildRuntime["Bun10"] = "bun-1.0";
32396
32727
  BuildRuntime["Bun11"] = "bun-1.1";
32728
+ BuildRuntime["Bun12"] = "bun-1.2";
32729
+ BuildRuntime["Bun13"] = "bun-1.3";
32397
32730
  BuildRuntime["Go123"] = "go-1.23";
32731
+ BuildRuntime["Go124"] = "go-1.24";
32732
+ BuildRuntime["Go125"] = "go-1.25";
32733
+ BuildRuntime["Go126"] = "go-1.26";
32398
32734
  BuildRuntime["Static1"] = "static-1";
32399
32735
  BuildRuntime["Flutter324"] = "flutter-3.24";
32400
32736
  BuildRuntime["Flutter327"] = "flutter-3.27";