react-native-appwrite 0.10.0 → 0.11.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
@@ -78,7 +78,7 @@ class Client {
78
78
  'x-sdk-name': 'React Native',
79
79
  'x-sdk-platform': 'client',
80
80
  'x-sdk-language': 'reactnative',
81
- 'x-sdk-version': '0.10.0',
81
+ 'x-sdk-version': '0.11.0',
82
82
  'X-Appwrite-Response-Format': '1.7.0',
83
83
  };
84
84
  this.realtime = {
@@ -463,7 +463,7 @@ class Account extends Service {
463
463
  *
464
464
  * @throws {AppwriteException}
465
465
  * @returns {Promise}
466
- */
466
+ */
467
467
  get() {
468
468
  const apiPath = '/account';
469
469
  const payload = {};
@@ -485,7 +485,7 @@ class Account extends Service {
485
485
  * @param {string} name
486
486
  * @throws {AppwriteException}
487
487
  * @returns {Promise}
488
- */
488
+ */
489
489
  create(userId, email, password, name) {
490
490
  if (typeof userId === 'undefined') {
491
491
  throw new AppwriteException('Missing required parameter: "userId"');
@@ -529,7 +529,7 @@ class Account extends Service {
529
529
  * @param {string} password
530
530
  * @throws {AppwriteException}
531
531
  * @returns {Promise}
532
- */
532
+ */
533
533
  updateEmail(email, password) {
534
534
  if (typeof email === 'undefined') {
535
535
  throw new AppwriteException('Missing required parameter: "email"');
@@ -556,7 +556,7 @@ class Account extends Service {
556
556
  * @param {string[]} queries
557
557
  * @throws {AppwriteException}
558
558
  * @returns {Promise}
559
- */
559
+ */
560
560
  listIdentities(queries) {
561
561
  const apiPath = '/account/identities';
562
562
  const payload = {};
@@ -572,7 +572,7 @@ class Account extends Service {
572
572
  * @param {string} identityId
573
573
  * @throws {AppwriteException}
574
574
  * @returns {Promise}
575
- */
575
+ */
576
576
  deleteIdentity(identityId) {
577
577
  if (typeof identityId === 'undefined') {
578
578
  throw new AppwriteException('Missing required parameter: "identityId"');
@@ -593,7 +593,7 @@ class Account extends Service {
593
593
  *
594
594
  * @throws {AppwriteException}
595
595
  * @returns {Promise}
596
- */
596
+ */
597
597
  createJWT() {
598
598
  const apiPath = '/account/jwts';
599
599
  const payload = {};
@@ -609,7 +609,7 @@ class Account extends Service {
609
609
  * @param {string[]} queries
610
610
  * @throws {AppwriteException}
611
611
  * @returns {Promise}
612
- */
612
+ */
613
613
  listLogs(queries) {
614
614
  const apiPath = '/account/logs';
615
615
  const payload = {};
@@ -625,7 +625,7 @@ class Account extends Service {
625
625
  * @param {boolean} mfa
626
626
  * @throws {AppwriteException}
627
627
  * @returns {Promise}
628
- */
628
+ */
629
629
  updateMFA(mfa) {
630
630
  if (typeof mfa === 'undefined') {
631
631
  throw new AppwriteException('Missing required parameter: "mfa"');
@@ -649,7 +649,7 @@ class Account extends Service {
649
649
  * @param {AuthenticatorType} type
650
650
  * @throws {AppwriteException}
651
651
  * @returns {Promise}
652
- */
652
+ */
653
653
  createMfaAuthenticator(type) {
654
654
  if (typeof type === 'undefined') {
655
655
  throw new AppwriteException('Missing required parameter: "type"');
@@ -670,7 +670,7 @@ class Account extends Service {
670
670
  * @param {string} otp
671
671
  * @throws {AppwriteException}
672
672
  * @returns {Promise}
673
- */
673
+ */
674
674
  updateMfaAuthenticator(type, otp) {
675
675
  if (typeof type === 'undefined') {
676
676
  throw new AppwriteException('Missing required parameter: "type"');
@@ -694,7 +694,7 @@ class Account extends Service {
694
694
  * @param {AuthenticatorType} type
695
695
  * @throws {AppwriteException}
696
696
  * @returns {Promise}
697
- */
697
+ */
698
698
  deleteMfaAuthenticator(type) {
699
699
  if (typeof type === 'undefined') {
700
700
  throw new AppwriteException('Missing required parameter: "type"');
@@ -714,7 +714,7 @@ class Account extends Service {
714
714
  * @param {AuthenticationFactor} factor
715
715
  * @throws {AppwriteException}
716
716
  * @returns {Promise}
717
- */
717
+ */
718
718
  createMfaChallenge(factor) {
719
719
  if (typeof factor === 'undefined') {
720
720
  throw new AppwriteException('Missing required parameter: "factor"');
@@ -740,7 +740,7 @@ class Account extends Service {
740
740
  * @param {string} otp
741
741
  * @throws {AppwriteException}
742
742
  * @returns {Promise}
743
- */
743
+ */
744
744
  updateMfaChallenge(challengeId, otp) {
745
745
  if (typeof challengeId === 'undefined') {
746
746
  throw new AppwriteException('Missing required parameter: "challengeId"');
@@ -766,7 +766,7 @@ class Account extends Service {
766
766
  *
767
767
  * @throws {AppwriteException}
768
768
  * @returns {Promise}
769
- */
769
+ */
770
770
  listMfaFactors() {
771
771
  const apiPath = '/account/mfa/factors';
772
772
  const payload = {};
@@ -781,7 +781,7 @@ class Account extends Service {
781
781
  *
782
782
  * @throws {AppwriteException}
783
783
  * @returns {Promise}
784
- */
784
+ */
785
785
  getMfaRecoveryCodes() {
786
786
  const apiPath = '/account/mfa/recovery-codes';
787
787
  const payload = {};
@@ -797,7 +797,7 @@ class Account extends Service {
797
797
  *
798
798
  * @throws {AppwriteException}
799
799
  * @returns {Promise}
800
- */
800
+ */
801
801
  createMfaRecoveryCodes() {
802
802
  const apiPath = '/account/mfa/recovery-codes';
803
803
  const payload = {};
@@ -814,7 +814,7 @@ class Account extends Service {
814
814
  *
815
815
  * @throws {AppwriteException}
816
816
  * @returns {Promise}
817
- */
817
+ */
818
818
  updateMfaRecoveryCodes() {
819
819
  const apiPath = '/account/mfa/recovery-codes';
820
820
  const payload = {};
@@ -829,7 +829,7 @@ class Account extends Service {
829
829
  * @param {string} name
830
830
  * @throws {AppwriteException}
831
831
  * @returns {Promise}
832
- */
832
+ */
833
833
  updateName(name) {
834
834
  if (typeof name === 'undefined') {
835
835
  throw new AppwriteException('Missing required parameter: "name"');
@@ -853,7 +853,7 @@ class Account extends Service {
853
853
  * @param {string} oldPassword
854
854
  * @throws {AppwriteException}
855
855
  * @returns {Promise}
856
- */
856
+ */
857
857
  updatePassword(password, oldPassword) {
858
858
  if (typeof password === 'undefined') {
859
859
  throw new AppwriteException('Missing required parameter: "password"');
@@ -882,7 +882,7 @@ class Account extends Service {
882
882
  * @param {string} password
883
883
  * @throws {AppwriteException}
884
884
  * @returns {Promise}
885
- */
885
+ */
886
886
  updatePhone(phone, password) {
887
887
  if (typeof phone === 'undefined') {
888
888
  throw new AppwriteException('Missing required parameter: "phone"');
@@ -908,7 +908,7 @@ class Account extends Service {
908
908
  *
909
909
  * @throws {AppwriteException}
910
910
  * @returns {Promise}
911
- */
911
+ */
912
912
  getPrefs() {
913
913
  const apiPath = '/account/prefs';
914
914
  const payload = {};
@@ -923,7 +923,7 @@ class Account extends Service {
923
923
  * @param {object} prefs
924
924
  * @throws {AppwriteException}
925
925
  * @returns {Promise}
926
- */
926
+ */
927
927
  updatePrefs(prefs) {
928
928
  if (typeof prefs === 'undefined') {
929
929
  throw new AppwriteException('Missing required parameter: "prefs"');
@@ -952,7 +952,7 @@ class Account extends Service {
952
952
  * @param {string} url
953
953
  * @throws {AppwriteException}
954
954
  * @returns {Promise}
955
- */
955
+ */
956
956
  createRecovery(email, url) {
957
957
  if (typeof email === 'undefined') {
958
958
  throw new AppwriteException('Missing required parameter: "email"');
@@ -990,7 +990,7 @@ class Account extends Service {
990
990
  * @param {string} password
991
991
  * @throws {AppwriteException}
992
992
  * @returns {Promise}
993
- */
993
+ */
994
994
  updateRecovery(userId, secret, password) {
995
995
  if (typeof userId === 'undefined') {
996
996
  throw new AppwriteException('Missing required parameter: "userId"');
@@ -1023,7 +1023,7 @@ class Account extends Service {
1023
1023
  *
1024
1024
  * @throws {AppwriteException}
1025
1025
  * @returns {Promise}
1026
- */
1026
+ */
1027
1027
  listSessions() {
1028
1028
  const apiPath = '/account/sessions';
1029
1029
  const payload = {};
@@ -1036,7 +1036,7 @@ class Account extends Service {
1036
1036
  *
1037
1037
  * @throws {AppwriteException}
1038
1038
  * @returns {Promise}
1039
- */
1039
+ */
1040
1040
  deleteSessions() {
1041
1041
  const apiPath = '/account/sessions';
1042
1042
  const payload = {};
@@ -1056,7 +1056,7 @@ class Account extends Service {
1056
1056
  *
1057
1057
  * @throws {AppwriteException}
1058
1058
  * @returns {Promise}
1059
- */
1059
+ */
1060
1060
  createAnonymousSession() {
1061
1061
  const apiPath = '/account/sessions/anonymous';
1062
1062
  const payload = {};
@@ -1077,7 +1077,7 @@ class Account extends Service {
1077
1077
  * @param {string} password
1078
1078
  * @throws {AppwriteException}
1079
1079
  * @returns {Promise}
1080
- */
1080
+ */
1081
1081
  createEmailPasswordSession(email, password) {
1082
1082
  if (typeof email === 'undefined') {
1083
1083
  throw new AppwriteException('Missing required parameter: "email"');
@@ -1107,7 +1107,7 @@ class Account extends Service {
1107
1107
  * @param {string} secret
1108
1108
  * @throws {AppwriteException}
1109
1109
  * @returns {Promise}
1110
- */
1110
+ */
1111
1111
  updateMagicURLSession(userId, secret) {
1112
1112
  if (typeof userId === 'undefined') {
1113
1113
  throw new AppwriteException('Missing required parameter: "userId"');
@@ -1152,7 +1152,7 @@ class Account extends Service {
1152
1152
  * @param {string[]} scopes
1153
1153
  * @throws {AppwriteException}
1154
1154
  * @returns {void|string}
1155
- */
1155
+ */
1156
1156
  createOAuth2Session(provider, success, failure, scopes) {
1157
1157
  if (typeof provider === 'undefined') {
1158
1158
  throw new AppwriteException('Missing required parameter: "provider"');
@@ -1184,7 +1184,7 @@ class Account extends Service {
1184
1184
  * @param {string} secret
1185
1185
  * @throws {AppwriteException}
1186
1186
  * @returns {Promise}
1187
- */
1187
+ */
1188
1188
  updatePhoneSession(userId, secret) {
1189
1189
  if (typeof userId === 'undefined') {
1190
1190
  throw new AppwriteException('Missing required parameter: "userId"');
@@ -1214,7 +1214,7 @@ class Account extends Service {
1214
1214
  * @param {string} secret
1215
1215
  * @throws {AppwriteException}
1216
1216
  * @returns {Promise}
1217
- */
1217
+ */
1218
1218
  createSession(userId, secret) {
1219
1219
  if (typeof userId === 'undefined') {
1220
1220
  throw new AppwriteException('Missing required parameter: "userId"');
@@ -1242,7 +1242,7 @@ class Account extends Service {
1242
1242
  * @param {string} sessionId
1243
1243
  * @throws {AppwriteException}
1244
1244
  * @returns {Promise}
1245
- */
1245
+ */
1246
1246
  getSession(sessionId) {
1247
1247
  if (typeof sessionId === 'undefined') {
1248
1248
  throw new AppwriteException('Missing required parameter: "sessionId"');
@@ -1260,7 +1260,7 @@ class Account extends Service {
1260
1260
  * @param {string} sessionId
1261
1261
  * @throws {AppwriteException}
1262
1262
  * @returns {Promise}
1263
- */
1263
+ */
1264
1264
  updateSession(sessionId) {
1265
1265
  if (typeof sessionId === 'undefined') {
1266
1266
  throw new AppwriteException('Missing required parameter: "sessionId"');
@@ -1282,7 +1282,7 @@ class Account extends Service {
1282
1282
  * @param {string} sessionId
1283
1283
  * @throws {AppwriteException}
1284
1284
  * @returns {Promise}
1285
- */
1285
+ */
1286
1286
  deleteSession(sessionId) {
1287
1287
  if (typeof sessionId === 'undefined') {
1288
1288
  throw new AppwriteException('Missing required parameter: "sessionId"');
@@ -1301,7 +1301,7 @@ class Account extends Service {
1301
1301
  *
1302
1302
  * @throws {AppwriteException}
1303
1303
  * @returns {Promise}
1304
- */
1304
+ */
1305
1305
  updateStatus() {
1306
1306
  const apiPath = '/account/status';
1307
1307
  const payload = {};
@@ -1322,7 +1322,7 @@ class Account extends Service {
1322
1322
  * @param {string} providerId
1323
1323
  * @throws {AppwriteException}
1324
1324
  * @returns {Promise}
1325
- */
1325
+ */
1326
1326
  createPushTarget(targetId, identifier, providerId) {
1327
1327
  if (typeof targetId === 'undefined') {
1328
1328
  throw new AppwriteException('Missing required parameter: "targetId"');
@@ -1357,7 +1357,7 @@ class Account extends Service {
1357
1357
  * @param {string} identifier
1358
1358
  * @throws {AppwriteException}
1359
1359
  * @returns {Promise}
1360
- */
1360
+ */
1361
1361
  updatePushTarget(targetId, identifier) {
1362
1362
  if (typeof targetId === 'undefined') {
1363
1363
  throw new AppwriteException('Missing required parameter: "targetId"');
@@ -1383,7 +1383,7 @@ class Account extends Service {
1383
1383
  * @param {string} targetId
1384
1384
  * @throws {AppwriteException}
1385
1385
  * @returns {Promise}
1386
- */
1386
+ */
1387
1387
  deletePushTarget(targetId) {
1388
1388
  if (typeof targetId === 'undefined') {
1389
1389
  throw new AppwriteException('Missing required parameter: "targetId"');
@@ -1412,7 +1412,7 @@ class Account extends Service {
1412
1412
  * @param {boolean} phrase
1413
1413
  * @throws {AppwriteException}
1414
1414
  * @returns {Promise}
1415
- */
1415
+ */
1416
1416
  createEmailToken(userId, email, phrase) {
1417
1417
  if (typeof userId === 'undefined') {
1418
1418
  throw new AppwriteException('Missing required parameter: "userId"');
@@ -1458,7 +1458,7 @@ class Account extends Service {
1458
1458
  * @param {boolean} phrase
1459
1459
  * @throws {AppwriteException}
1460
1460
  * @returns {Promise}
1461
- */
1461
+ */
1462
1462
  createMagicURLToken(userId, email, url, phrase) {
1463
1463
  if (typeof userId === 'undefined') {
1464
1464
  throw new AppwriteException('Missing required parameter: "userId"');
@@ -1507,7 +1507,7 @@ class Account extends Service {
1507
1507
  * @param {string[]} scopes
1508
1508
  * @throws {AppwriteException}
1509
1509
  * @returns {void|string}
1510
- */
1510
+ */
1511
1511
  createOAuth2Token(provider, success, failure, scopes) {
1512
1512
  if (typeof provider === 'undefined') {
1513
1513
  throw new AppwriteException('Missing required parameter: "provider"');
@@ -1546,7 +1546,7 @@ class Account extends Service {
1546
1546
  * @param {string} phone
1547
1547
  * @throws {AppwriteException}
1548
1548
  * @returns {Promise}
1549
- */
1549
+ */
1550
1550
  createPhoneToken(userId, phone) {
1551
1551
  if (typeof userId === 'undefined') {
1552
1552
  throw new AppwriteException('Missing required parameter: "userId"');
@@ -1587,7 +1587,7 @@ class Account extends Service {
1587
1587
  * @param {string} url
1588
1588
  * @throws {AppwriteException}
1589
1589
  * @returns {Promise}
1590
- */
1590
+ */
1591
1591
  createVerification(url) {
1592
1592
  if (typeof url === 'undefined') {
1593
1593
  throw new AppwriteException('Missing required parameter: "url"');
@@ -1612,7 +1612,7 @@ class Account extends Service {
1612
1612
  * @param {string} secret
1613
1613
  * @throws {AppwriteException}
1614
1614
  * @returns {Promise}
1615
- */
1615
+ */
1616
1616
  updateVerification(userId, secret) {
1617
1617
  if (typeof userId === 'undefined') {
1618
1618
  throw new AppwriteException('Missing required parameter: "userId"');
@@ -1645,7 +1645,7 @@ class Account extends Service {
1645
1645
  *
1646
1646
  * @throws {AppwriteException}
1647
1647
  * @returns {Promise}
1648
- */
1648
+ */
1649
1649
  createPhoneVerification() {
1650
1650
  const apiPath = '/account/verification/phone';
1651
1651
  const payload = {};
@@ -1664,7 +1664,7 @@ class Account extends Service {
1664
1664
  * @param {string} secret
1665
1665
  * @throws {AppwriteException}
1666
1666
  * @returns {Promise}
1667
- */
1667
+ */
1668
1668
  updatePhoneVerification(userId, secret) {
1669
1669
  if (typeof userId === 'undefined') {
1670
1670
  throw new AppwriteException('Missing required parameter: "userId"');
@@ -1709,7 +1709,7 @@ class Avatars extends Service {
1709
1709
  * @param {number} quality
1710
1710
  * @throws {AppwriteException}
1711
1711
  * @returns {ArrayBuffer}
1712
- */
1712
+ */
1713
1713
  getBrowser(code, width, height, quality) {
1714
1714
  if (typeof code === 'undefined') {
1715
1715
  throw new AppwriteException('Missing required parameter: "code"');
@@ -1749,7 +1749,7 @@ class Avatars extends Service {
1749
1749
  * @param {number} quality
1750
1750
  * @throws {AppwriteException}
1751
1751
  * @returns {ArrayBuffer}
1752
- */
1752
+ */
1753
1753
  getCreditCard(code, width, height, quality) {
1754
1754
  if (typeof code === 'undefined') {
1755
1755
  throw new AppwriteException('Missing required parameter: "code"');
@@ -1781,7 +1781,7 @@ class Avatars extends Service {
1781
1781
  * @param {string} url
1782
1782
  * @throws {AppwriteException}
1783
1783
  * @returns {ArrayBuffer}
1784
- */
1784
+ */
1785
1785
  getFavicon(url) {
1786
1786
  if (typeof url === 'undefined') {
1787
1787
  throw new AppwriteException('Missing required parameter: "url"');
@@ -1816,7 +1816,7 @@ class Avatars extends Service {
1816
1816
  * @param {number} quality
1817
1817
  * @throws {AppwriteException}
1818
1818
  * @returns {ArrayBuffer}
1819
- */
1819
+ */
1820
1820
  getFlag(code, width, height, quality) {
1821
1821
  if (typeof code === 'undefined') {
1822
1822
  throw new AppwriteException('Missing required parameter: "code"');
@@ -1857,7 +1857,7 @@ class Avatars extends Service {
1857
1857
  * @param {number} height
1858
1858
  * @throws {AppwriteException}
1859
1859
  * @returns {ArrayBuffer}
1860
- */
1860
+ */
1861
1861
  getImage(url, width, height) {
1862
1862
  if (typeof url === 'undefined') {
1863
1863
  throw new AppwriteException('Missing required parameter: "url"');
@@ -1904,7 +1904,7 @@ class Avatars extends Service {
1904
1904
  * @param {string} background
1905
1905
  * @throws {AppwriteException}
1906
1906
  * @returns {ArrayBuffer}
1907
- */
1907
+ */
1908
1908
  getInitials(name, width, height, background) {
1909
1909
  const apiPath = '/avatars/initials';
1910
1910
  const payload = {};
@@ -1938,7 +1938,7 @@ class Avatars extends Service {
1938
1938
  * @param {boolean} download
1939
1939
  * @throws {AppwriteException}
1940
1940
  * @returns {ArrayBuffer}
1941
- */
1941
+ */
1942
1942
  getQR(text, size, margin, download) {
1943
1943
  if (typeof text === 'undefined') {
1944
1944
  throw new AppwriteException('Missing required parameter: "text"');
@@ -1985,7 +1985,21 @@ class Avatars extends Service {
1985
1985
  */
1986
1986
  getBrowserURL(code, width, height, quality) {
1987
1987
  const apiPath = '/avatars/browsers/{code}'.replace('{code}', code);
1988
+ const payload = {};
1989
+ if (typeof width !== 'undefined') {
1990
+ payload['width'] = width;
1991
+ }
1992
+ if (typeof height !== 'undefined') {
1993
+ payload['height'] = height;
1994
+ }
1995
+ if (typeof quality !== 'undefined') {
1996
+ payload['quality'] = quality;
1997
+ }
1988
1998
  const uri = new URL(this.client.config.endpoint + apiPath);
1999
+ payload['project'] = this.client.config.project;
2000
+ for (const [key, value] of Object.entries(Service.flatten(payload))) {
2001
+ uri.searchParams.append(key, value);
2002
+ }
1989
2003
  return uri;
1990
2004
  }
1991
2005
  /**
@@ -2008,7 +2022,21 @@ class Avatars extends Service {
2008
2022
  */
2009
2023
  getCreditCardURL(code, width, height, quality) {
2010
2024
  const apiPath = '/avatars/credit-cards/{code}'.replace('{code}', code);
2025
+ const payload = {};
2026
+ if (typeof width !== 'undefined') {
2027
+ payload['width'] = width;
2028
+ }
2029
+ if (typeof height !== 'undefined') {
2030
+ payload['height'] = height;
2031
+ }
2032
+ if (typeof quality !== 'undefined') {
2033
+ payload['quality'] = quality;
2034
+ }
2011
2035
  const uri = new URL(this.client.config.endpoint + apiPath);
2036
+ payload['project'] = this.client.config.project;
2037
+ for (const [key, value] of Object.entries(Service.flatten(payload))) {
2038
+ uri.searchParams.append(key, value);
2039
+ }
2012
2040
  return uri;
2013
2041
  }
2014
2042
  /**
@@ -2023,7 +2051,15 @@ class Avatars extends Service {
2023
2051
  */
2024
2052
  getFaviconURL(url) {
2025
2053
  const apiPath = '/avatars/favicon';
2054
+ const payload = {};
2055
+ if (typeof url !== 'undefined') {
2056
+ payload['url'] = url;
2057
+ }
2026
2058
  const uri = new URL(this.client.config.endpoint + apiPath);
2059
+ payload['project'] = this.client.config.project;
2060
+ for (const [key, value] of Object.entries(Service.flatten(payload))) {
2061
+ uri.searchParams.append(key, value);
2062
+ }
2027
2063
  return uri;
2028
2064
  }
2029
2065
  /**
@@ -2047,7 +2083,21 @@ class Avatars extends Service {
2047
2083
  */
2048
2084
  getFlagURL(code, width, height, quality) {
2049
2085
  const apiPath = '/avatars/flags/{code}'.replace('{code}', code);
2086
+ const payload = {};
2087
+ if (typeof width !== 'undefined') {
2088
+ payload['width'] = width;
2089
+ }
2090
+ if (typeof height !== 'undefined') {
2091
+ payload['height'] = height;
2092
+ }
2093
+ if (typeof quality !== 'undefined') {
2094
+ payload['quality'] = quality;
2095
+ }
2050
2096
  const uri = new URL(this.client.config.endpoint + apiPath);
2097
+ payload['project'] = this.client.config.project;
2098
+ for (const [key, value] of Object.entries(Service.flatten(payload))) {
2099
+ uri.searchParams.append(key, value);
2100
+ }
2051
2101
  return uri;
2052
2102
  }
2053
2103
  /**
@@ -2071,7 +2121,21 @@ class Avatars extends Service {
2071
2121
  */
2072
2122
  getImageURL(url, width, height) {
2073
2123
  const apiPath = '/avatars/image';
2124
+ const payload = {};
2125
+ if (typeof url !== 'undefined') {
2126
+ payload['url'] = url;
2127
+ }
2128
+ if (typeof width !== 'undefined') {
2129
+ payload['width'] = width;
2130
+ }
2131
+ if (typeof height !== 'undefined') {
2132
+ payload['height'] = height;
2133
+ }
2074
2134
  const uri = new URL(this.client.config.endpoint + apiPath);
2135
+ payload['project'] = this.client.config.project;
2136
+ for (const [key, value] of Object.entries(Service.flatten(payload))) {
2137
+ uri.searchParams.append(key, value);
2138
+ }
2075
2139
  return uri;
2076
2140
  }
2077
2141
  /**
@@ -2101,7 +2165,24 @@ class Avatars extends Service {
2101
2165
  */
2102
2166
  getInitialsURL(name, width, height, background) {
2103
2167
  const apiPath = '/avatars/initials';
2168
+ const payload = {};
2169
+ if (typeof name !== 'undefined') {
2170
+ payload['name'] = name;
2171
+ }
2172
+ if (typeof width !== 'undefined') {
2173
+ payload['width'] = width;
2174
+ }
2175
+ if (typeof height !== 'undefined') {
2176
+ payload['height'] = height;
2177
+ }
2178
+ if (typeof background !== 'undefined') {
2179
+ payload['background'] = background;
2180
+ }
2104
2181
  const uri = new URL(this.client.config.endpoint + apiPath);
2182
+ payload['project'] = this.client.config.project;
2183
+ for (const [key, value] of Object.entries(Service.flatten(payload))) {
2184
+ uri.searchParams.append(key, value);
2185
+ }
2105
2186
  return uri;
2106
2187
  }
2107
2188
  /**
@@ -2118,7 +2199,24 @@ class Avatars extends Service {
2118
2199
  */
2119
2200
  getQRURL(text, size, margin, download) {
2120
2201
  const apiPath = '/avatars/qr';
2202
+ const payload = {};
2203
+ if (typeof text !== 'undefined') {
2204
+ payload['text'] = text;
2205
+ }
2206
+ if (typeof size !== 'undefined') {
2207
+ payload['size'] = size;
2208
+ }
2209
+ if (typeof margin !== 'undefined') {
2210
+ payload['margin'] = margin;
2211
+ }
2212
+ if (typeof download !== 'undefined') {
2213
+ payload['download'] = download;
2214
+ }
2121
2215
  const uri = new URL(this.client.config.endpoint + apiPath);
2216
+ payload['project'] = this.client.config.project;
2217
+ for (const [key, value] of Object.entries(Service.flatten(payload))) {
2218
+ uri.searchParams.append(key, value);
2219
+ }
2122
2220
  return uri;
2123
2221
  }
2124
2222
  }
@@ -2136,7 +2234,7 @@ class Databases extends Service {
2136
2234
  * @param {string[]} queries
2137
2235
  * @throws {AppwriteException}
2138
2236
  * @returns {Promise}
2139
- */
2237
+ */
2140
2238
  listDocuments(databaseId, collectionId, queries) {
2141
2239
  if (typeof databaseId === 'undefined') {
2142
2240
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -2165,7 +2263,7 @@ class Databases extends Service {
2165
2263
  * @param {string[]} permissions
2166
2264
  * @throws {AppwriteException}
2167
2265
  * @returns {Promise}
2168
- */
2266
+ */
2169
2267
  createDocument(databaseId, collectionId, documentId, data, permissions) {
2170
2268
  if (typeof databaseId === 'undefined') {
2171
2269
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -2205,7 +2303,7 @@ class Databases extends Service {
2205
2303
  * @param {string[]} queries
2206
2304
  * @throws {AppwriteException}
2207
2305
  * @returns {Promise}
2208
- */
2306
+ */
2209
2307
  getDocument(databaseId, collectionId, documentId, queries) {
2210
2308
  if (typeof databaseId === 'undefined') {
2211
2309
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -2225,6 +2323,10 @@ class Databases extends Service {
2225
2323
  return this.client.call('get', uri, {}, payload);
2226
2324
  }
2227
2325
  /**
2326
+ * **WARNING: Experimental Feature** - This endpoint is experimental and not
2327
+ * yet officially supported. It may be subject to breaking changes or removal
2328
+ * in future versions.
2329
+ *
2228
2330
  * Create or update a Document. Before using this route, you should create a
2229
2331
  * new collection resource using either a [server
2230
2332
  * integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
@@ -2237,7 +2339,7 @@ class Databases extends Service {
2237
2339
  * @param {string[]} permissions
2238
2340
  * @throws {AppwriteException}
2239
2341
  * @returns {Promise}
2240
- */
2342
+ */
2241
2343
  upsertDocument(databaseId, collectionId, documentId, data, permissions) {
2242
2344
  if (typeof databaseId === 'undefined') {
2243
2345
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -2275,7 +2377,7 @@ class Databases extends Service {
2275
2377
  * @param {string[]} permissions
2276
2378
  * @throws {AppwriteException}
2277
2379
  * @returns {Promise}
2278
- */
2380
+ */
2279
2381
  updateDocument(databaseId, collectionId, documentId, data, permissions) {
2280
2382
  if (typeof databaseId === 'undefined') {
2281
2383
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -2307,7 +2409,7 @@ class Databases extends Service {
2307
2409
  * @param {string} documentId
2308
2410
  * @throws {AppwriteException}
2309
2411
  * @returns {Promise}
2310
- */
2412
+ */
2311
2413
  deleteDocument(databaseId, collectionId, documentId) {
2312
2414
  if (typeof databaseId === 'undefined') {
2313
2415
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -2325,6 +2427,82 @@ class Databases extends Service {
2325
2427
  'content-type': 'application/json',
2326
2428
  }, payload);
2327
2429
  }
2430
+ /**
2431
+ * Decrement a specific attribute of a document by a given value.
2432
+ *
2433
+ * @param {string} databaseId
2434
+ * @param {string} collectionId
2435
+ * @param {string} documentId
2436
+ * @param {string} attribute
2437
+ * @param {number} value
2438
+ * @param {number} min
2439
+ * @throws {AppwriteException}
2440
+ * @returns {Promise}
2441
+ */
2442
+ decrementDocumentAttribute(databaseId, collectionId, documentId, attribute, value, min) {
2443
+ if (typeof databaseId === 'undefined') {
2444
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2445
+ }
2446
+ if (typeof collectionId === 'undefined') {
2447
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2448
+ }
2449
+ if (typeof documentId === 'undefined') {
2450
+ throw new AppwriteException('Missing required parameter: "documentId"');
2451
+ }
2452
+ if (typeof attribute === 'undefined') {
2453
+ throw new AppwriteException('Missing required parameter: "attribute"');
2454
+ }
2455
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId).replace('{attribute}', attribute);
2456
+ const payload = {};
2457
+ if (typeof value !== 'undefined') {
2458
+ payload['value'] = value;
2459
+ }
2460
+ if (typeof min !== 'undefined') {
2461
+ payload['min'] = min;
2462
+ }
2463
+ const uri = new URL(this.client.config.endpoint + apiPath);
2464
+ return this.client.call('patch', uri, {
2465
+ 'content-type': 'application/json',
2466
+ }, payload);
2467
+ }
2468
+ /**
2469
+ * Increment a specific attribute of a document by a given value.
2470
+ *
2471
+ * @param {string} databaseId
2472
+ * @param {string} collectionId
2473
+ * @param {string} documentId
2474
+ * @param {string} attribute
2475
+ * @param {number} value
2476
+ * @param {number} max
2477
+ * @throws {AppwriteException}
2478
+ * @returns {Promise}
2479
+ */
2480
+ incrementDocumentAttribute(databaseId, collectionId, documentId, attribute, value, max) {
2481
+ if (typeof databaseId === 'undefined') {
2482
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2483
+ }
2484
+ if (typeof collectionId === 'undefined') {
2485
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2486
+ }
2487
+ if (typeof documentId === 'undefined') {
2488
+ throw new AppwriteException('Missing required parameter: "documentId"');
2489
+ }
2490
+ if (typeof attribute === 'undefined') {
2491
+ throw new AppwriteException('Missing required parameter: "attribute"');
2492
+ }
2493
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId).replace('{attribute}', attribute);
2494
+ const payload = {};
2495
+ if (typeof value !== 'undefined') {
2496
+ payload['value'] = value;
2497
+ }
2498
+ if (typeof max !== 'undefined') {
2499
+ payload['max'] = max;
2500
+ }
2501
+ const uri = new URL(this.client.config.endpoint + apiPath);
2502
+ return this.client.call('patch', uri, {
2503
+ 'content-type': 'application/json',
2504
+ }, payload);
2505
+ }
2328
2506
  }
2329
2507
 
2330
2508
  class Functions extends Service {
@@ -2339,7 +2517,7 @@ class Functions extends Service {
2339
2517
  * @param {string[]} queries
2340
2518
  * @throws {AppwriteException}
2341
2519
  * @returns {Promise}
2342
- */
2520
+ */
2343
2521
  listExecutions(functionId, queries) {
2344
2522
  if (typeof functionId === 'undefined') {
2345
2523
  throw new AppwriteException('Missing required parameter: "functionId"');
@@ -2367,7 +2545,7 @@ class Functions extends Service {
2367
2545
  * @param {string} scheduledAt
2368
2546
  * @throws {AppwriteException}
2369
2547
  * @returns {Promise}
2370
- */
2548
+ */
2371
2549
  createExecution(functionId, body, async, xpath, method, headers, scheduledAt) {
2372
2550
  if (typeof functionId === 'undefined') {
2373
2551
  throw new AppwriteException('Missing required parameter: "functionId"');
@@ -2404,7 +2582,7 @@ class Functions extends Service {
2404
2582
  * @param {string} executionId
2405
2583
  * @throws {AppwriteException}
2406
2584
  * @returns {Promise}
2407
- */
2585
+ */
2408
2586
  getExecution(functionId, executionId) {
2409
2587
  if (typeof functionId === 'undefined') {
2410
2588
  throw new AppwriteException('Missing required parameter: "functionId"');
@@ -2429,7 +2607,7 @@ class Graphql extends Service {
2429
2607
  * @param {object} query
2430
2608
  * @throws {AppwriteException}
2431
2609
  * @returns {Promise}
2432
- */
2610
+ */
2433
2611
  query(query) {
2434
2612
  if (typeof query === 'undefined') {
2435
2613
  throw new AppwriteException('Missing required parameter: "query"');
@@ -2451,7 +2629,7 @@ class Graphql extends Service {
2451
2629
  * @param {object} query
2452
2630
  * @throws {AppwriteException}
2453
2631
  * @returns {Promise}
2454
- */
2632
+ */
2455
2633
  mutation(query) {
2456
2634
  if (typeof query === 'undefined') {
2457
2635
  throw new AppwriteException('Missing required parameter: "query"');
@@ -2483,7 +2661,7 @@ class Locale extends Service {
2483
2661
  *
2484
2662
  * @throws {AppwriteException}
2485
2663
  * @returns {Promise}
2486
- */
2664
+ */
2487
2665
  get() {
2488
2666
  const apiPath = '/locale';
2489
2667
  const payload = {};
@@ -2496,7 +2674,7 @@ class Locale extends Service {
2496
2674
  *
2497
2675
  * @throws {AppwriteException}
2498
2676
  * @returns {Promise}
2499
- */
2677
+ */
2500
2678
  listCodes() {
2501
2679
  const apiPath = '/locale/codes';
2502
2680
  const payload = {};
@@ -2509,7 +2687,7 @@ class Locale extends Service {
2509
2687
  *
2510
2688
  * @throws {AppwriteException}
2511
2689
  * @returns {Promise}
2512
- */
2690
+ */
2513
2691
  listContinents() {
2514
2692
  const apiPath = '/locale/continents';
2515
2693
  const payload = {};
@@ -2522,7 +2700,7 @@ class Locale extends Service {
2522
2700
  *
2523
2701
  * @throws {AppwriteException}
2524
2702
  * @returns {Promise}
2525
- */
2703
+ */
2526
2704
  listCountries() {
2527
2705
  const apiPath = '/locale/countries';
2528
2706
  const payload = {};
@@ -2535,7 +2713,7 @@ class Locale extends Service {
2535
2713
  *
2536
2714
  * @throws {AppwriteException}
2537
2715
  * @returns {Promise}
2538
- */
2716
+ */
2539
2717
  listCountriesEU() {
2540
2718
  const apiPath = '/locale/countries/eu';
2541
2719
  const payload = {};
@@ -2548,7 +2726,7 @@ class Locale extends Service {
2548
2726
  *
2549
2727
  * @throws {AppwriteException}
2550
2728
  * @returns {Promise}
2551
- */
2729
+ */
2552
2730
  listCountriesPhones() {
2553
2731
  const apiPath = '/locale/countries/phones';
2554
2732
  const payload = {};
@@ -2562,7 +2740,7 @@ class Locale extends Service {
2562
2740
  *
2563
2741
  * @throws {AppwriteException}
2564
2742
  * @returns {Promise}
2565
- */
2743
+ */
2566
2744
  listCurrencies() {
2567
2745
  const apiPath = '/locale/currencies';
2568
2746
  const payload = {};
@@ -2575,7 +2753,7 @@ class Locale extends Service {
2575
2753
  *
2576
2754
  * @throws {AppwriteException}
2577
2755
  * @returns {Promise}
2578
- */
2756
+ */
2579
2757
  listLanguages() {
2580
2758
  const apiPath = '/locale/languages';
2581
2759
  const payload = {};
@@ -2596,7 +2774,7 @@ class Messaging extends Service {
2596
2774
  * @param {string} targetId
2597
2775
  * @throws {AppwriteException}
2598
2776
  * @returns {Promise}
2599
- */
2777
+ */
2600
2778
  createSubscriber(topicId, subscriberId, targetId) {
2601
2779
  if (typeof topicId === 'undefined') {
2602
2780
  throw new AppwriteException('Missing required parameter: "topicId"');
@@ -2627,7 +2805,7 @@ class Messaging extends Service {
2627
2805
  * @param {string} subscriberId
2628
2806
  * @throws {AppwriteException}
2629
2807
  * @returns {Promise}
2630
- */
2808
+ */
2631
2809
  deleteSubscriber(topicId, subscriberId) {
2632
2810
  if (typeof topicId === 'undefined') {
2633
2811
  throw new AppwriteException('Missing required parameter: "topicId"');
@@ -2657,7 +2835,7 @@ class Storage extends Service {
2657
2835
  * @param {string} search
2658
2836
  * @throws {AppwriteException}
2659
2837
  * @returns {Promise}
2660
- */
2838
+ */
2661
2839
  listFiles(bucketId, queries, search) {
2662
2840
  if (typeof bucketId === 'undefined') {
2663
2841
  throw new AppwriteException('Missing required parameter: "bucketId"');
@@ -2699,7 +2877,7 @@ class Storage extends Service {
2699
2877
  * @param {string[]} permissions
2700
2878
  * @throws {AppwriteException}
2701
2879
  * @returns {Promise}
2702
- */
2880
+ */
2703
2881
  createFile(bucketId_1, fileId_1, file_1, permissions_1) {
2704
2882
  return __awaiter(this, arguments, void 0, function* (bucketId, fileId, file, permissions, onProgress = (progress) => { }) {
2705
2883
  if (typeof bucketId === 'undefined') {
@@ -2781,7 +2959,7 @@ class Storage extends Service {
2781
2959
  * @param {string} fileId
2782
2960
  * @throws {AppwriteException}
2783
2961
  * @returns {Promise}
2784
- */
2962
+ */
2785
2963
  getFile(bucketId, fileId) {
2786
2964
  if (typeof bucketId === 'undefined') {
2787
2965
  throw new AppwriteException('Missing required parameter: "bucketId"');
@@ -2804,7 +2982,7 @@ class Storage extends Service {
2804
2982
  * @param {string[]} permissions
2805
2983
  * @throws {AppwriteException}
2806
2984
  * @returns {Promise}
2807
- */
2985
+ */
2808
2986
  updateFile(bucketId, fileId, name, permissions) {
2809
2987
  if (typeof bucketId === 'undefined') {
2810
2988
  throw new AppwriteException('Missing required parameter: "bucketId"');
@@ -2833,7 +3011,7 @@ class Storage extends Service {
2833
3011
  * @param {string} fileId
2834
3012
  * @throws {AppwriteException}
2835
3013
  * @returns {Promise}
2836
- */
3014
+ */
2837
3015
  deleteFile(bucketId, fileId) {
2838
3016
  if (typeof bucketId === 'undefined') {
2839
3017
  throw new AppwriteException('Missing required parameter: "bucketId"');
@@ -2858,7 +3036,7 @@ class Storage extends Service {
2858
3036
  * @param {string} token
2859
3037
  * @throws {AppwriteException}
2860
3038
  * @returns {ArrayBuffer}
2861
- */
3039
+ */
2862
3040
  getFileDownload(bucketId, fileId, token) {
2863
3041
  if (typeof bucketId === 'undefined') {
2864
3042
  throw new AppwriteException('Missing required parameter: "bucketId"');
@@ -2901,7 +3079,7 @@ class Storage extends Service {
2901
3079
  * @param {string} token
2902
3080
  * @throws {AppwriteException}
2903
3081
  * @returns {ArrayBuffer}
2904
- */
3082
+ */
2905
3083
  getFilePreview(bucketId, fileId, width, height, gravity, quality, borderWidth, borderColor, borderRadius, opacity, rotation, background, output, token) {
2906
3084
  if (typeof bucketId === 'undefined') {
2907
3085
  throw new AppwriteException('Missing required parameter: "bucketId"');
@@ -2964,7 +3142,7 @@ class Storage extends Service {
2964
3142
  * @param {string} token
2965
3143
  * @throws {AppwriteException}
2966
3144
  * @returns {ArrayBuffer}
2967
- */
3145
+ */
2968
3146
  getFileView(bucketId, fileId, token) {
2969
3147
  if (typeof bucketId === 'undefined') {
2970
3148
  throw new AppwriteException('Missing required parameter: "bucketId"');
@@ -2997,7 +3175,15 @@ class Storage extends Service {
2997
3175
  */
2998
3176
  getFileDownloadURL(bucketId, fileId, token) {
2999
3177
  const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);
3178
+ const payload = {};
3179
+ if (typeof token !== 'undefined') {
3180
+ payload['token'] = token;
3181
+ }
3000
3182
  const uri = new URL(this.client.config.endpoint + apiPath);
3183
+ payload['project'] = this.client.config.project;
3184
+ for (const [key, value] of Object.entries(Service.flatten(payload))) {
3185
+ uri.searchParams.append(key, value);
3186
+ }
3001
3187
  return uri;
3002
3188
  }
3003
3189
  /**
@@ -3026,7 +3212,48 @@ class Storage extends Service {
3026
3212
  */
3027
3213
  getFilePreviewURL(bucketId, fileId, width, height, gravity, quality, borderWidth, borderColor, borderRadius, opacity, rotation, background, output, token) {
3028
3214
  const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/preview'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);
3215
+ const payload = {};
3216
+ if (typeof width !== 'undefined') {
3217
+ payload['width'] = width;
3218
+ }
3219
+ if (typeof height !== 'undefined') {
3220
+ payload['height'] = height;
3221
+ }
3222
+ if (typeof gravity !== 'undefined') {
3223
+ payload['gravity'] = gravity;
3224
+ }
3225
+ if (typeof quality !== 'undefined') {
3226
+ payload['quality'] = quality;
3227
+ }
3228
+ if (typeof borderWidth !== 'undefined') {
3229
+ payload['borderWidth'] = borderWidth;
3230
+ }
3231
+ if (typeof borderColor !== 'undefined') {
3232
+ payload['borderColor'] = borderColor;
3233
+ }
3234
+ if (typeof borderRadius !== 'undefined') {
3235
+ payload['borderRadius'] = borderRadius;
3236
+ }
3237
+ if (typeof opacity !== 'undefined') {
3238
+ payload['opacity'] = opacity;
3239
+ }
3240
+ if (typeof rotation !== 'undefined') {
3241
+ payload['rotation'] = rotation;
3242
+ }
3243
+ if (typeof background !== 'undefined') {
3244
+ payload['background'] = background;
3245
+ }
3246
+ if (typeof output !== 'undefined') {
3247
+ payload['output'] = output;
3248
+ }
3249
+ if (typeof token !== 'undefined') {
3250
+ payload['token'] = token;
3251
+ }
3029
3252
  const uri = new URL(this.client.config.endpoint + apiPath);
3253
+ payload['project'] = this.client.config.project;
3254
+ for (const [key, value] of Object.entries(Service.flatten(payload))) {
3255
+ uri.searchParams.append(key, value);
3256
+ }
3030
3257
  return uri;
3031
3258
  }
3032
3259
  /**
@@ -3042,7 +3269,15 @@ class Storage extends Service {
3042
3269
  */
3043
3270
  getFileViewURL(bucketId, fileId, token) {
3044
3271
  const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);
3272
+ const payload = {};
3273
+ if (typeof token !== 'undefined') {
3274
+ payload['token'] = token;
3275
+ }
3045
3276
  const uri = new URL(this.client.config.endpoint + apiPath);
3277
+ payload['project'] = this.client.config.project;
3278
+ for (const [key, value] of Object.entries(Service.flatten(payload))) {
3279
+ uri.searchParams.append(key, value);
3280
+ }
3046
3281
  return uri;
3047
3282
  }
3048
3283
  }
@@ -3059,7 +3294,7 @@ class Teams extends Service {
3059
3294
  * @param {string} search
3060
3295
  * @throws {AppwriteException}
3061
3296
  * @returns {Promise}
3062
- */
3297
+ */
3063
3298
  list(queries, search) {
3064
3299
  const apiPath = '/teams';
3065
3300
  const payload = {};
@@ -3082,7 +3317,7 @@ class Teams extends Service {
3082
3317
  * @param {string[]} roles
3083
3318
  * @throws {AppwriteException}
3084
3319
  * @returns {Promise}
3085
- */
3320
+ */
3086
3321
  create(teamId, name, roles) {
3087
3322
  if (typeof teamId === 'undefined') {
3088
3323
  throw new AppwriteException('Missing required parameter: "teamId"');
@@ -3112,7 +3347,7 @@ class Teams extends Service {
3112
3347
  * @param {string} teamId
3113
3348
  * @throws {AppwriteException}
3114
3349
  * @returns {Promise}
3115
- */
3350
+ */
3116
3351
  get(teamId) {
3117
3352
  if (typeof teamId === 'undefined') {
3118
3353
  throw new AppwriteException('Missing required parameter: "teamId"');
@@ -3129,7 +3364,7 @@ class Teams extends Service {
3129
3364
  * @param {string} name
3130
3365
  * @throws {AppwriteException}
3131
3366
  * @returns {Promise}
3132
- */
3367
+ */
3133
3368
  updateName(teamId, name) {
3134
3369
  if (typeof teamId === 'undefined') {
3135
3370
  throw new AppwriteException('Missing required parameter: "teamId"');
@@ -3154,7 +3389,7 @@ class Teams extends Service {
3154
3389
  * @param {string} teamId
3155
3390
  * @throws {AppwriteException}
3156
3391
  * @returns {Promise}
3157
- */
3392
+ */
3158
3393
  delete(teamId) {
3159
3394
  if (typeof teamId === 'undefined') {
3160
3395
  throw new AppwriteException('Missing required parameter: "teamId"');
@@ -3176,7 +3411,7 @@ class Teams extends Service {
3176
3411
  * @param {string} search
3177
3412
  * @throws {AppwriteException}
3178
3413
  * @returns {Promise}
3179
- */
3414
+ */
3180
3415
  listMemberships(teamId, queries, search) {
3181
3416
  if (typeof teamId === 'undefined') {
3182
3417
  throw new AppwriteException('Missing required parameter: "teamId"');
@@ -3224,7 +3459,7 @@ class Teams extends Service {
3224
3459
  * @param {string} name
3225
3460
  * @throws {AppwriteException}
3226
3461
  * @returns {Promise}
3227
- */
3462
+ */
3228
3463
  createMembership(teamId, roles, email, userId, phone, url, name) {
3229
3464
  if (typeof teamId === 'undefined') {
3230
3465
  throw new AppwriteException('Missing required parameter: "teamId"');
@@ -3266,7 +3501,7 @@ class Teams extends Service {
3266
3501
  * @param {string} membershipId
3267
3502
  * @throws {AppwriteException}
3268
3503
  * @returns {Promise}
3269
- */
3504
+ */
3270
3505
  getMembership(teamId, membershipId) {
3271
3506
  if (typeof teamId === 'undefined') {
3272
3507
  throw new AppwriteException('Missing required parameter: "teamId"');
@@ -3290,7 +3525,7 @@ class Teams extends Service {
3290
3525
  * @param {string[]} roles
3291
3526
  * @throws {AppwriteException}
3292
3527
  * @returns {Promise}
3293
- */
3528
+ */
3294
3529
  updateMembership(teamId, membershipId, roles) {
3295
3530
  if (typeof teamId === 'undefined') {
3296
3531
  throw new AppwriteException('Missing required parameter: "teamId"');
@@ -3320,7 +3555,7 @@ class Teams extends Service {
3320
3555
  * @param {string} membershipId
3321
3556
  * @throws {AppwriteException}
3322
3557
  * @returns {Promise}
3323
- */
3558
+ */
3324
3559
  deleteMembership(teamId, membershipId) {
3325
3560
  if (typeof teamId === 'undefined') {
3326
3561
  throw new AppwriteException('Missing required parameter: "teamId"');
@@ -3350,7 +3585,7 @@ class Teams extends Service {
3350
3585
  * @param {string} secret
3351
3586
  * @throws {AppwriteException}
3352
3587
  * @returns {Promise}
3353
- */
3588
+ */
3354
3589
  updateMembershipStatus(teamId, membershipId, userId, secret) {
3355
3590
  if (typeof teamId === 'undefined') {
3356
3591
  throw new AppwriteException('Missing required parameter: "teamId"');
@@ -3385,7 +3620,7 @@ class Teams extends Service {
3385
3620
  * @param {string} teamId
3386
3621
  * @throws {AppwriteException}
3387
3622
  * @returns {Promise}
3388
- */
3623
+ */
3389
3624
  getPrefs(teamId) {
3390
3625
  if (typeof teamId === 'undefined') {
3391
3626
  throw new AppwriteException('Missing required parameter: "teamId"');
@@ -3404,7 +3639,7 @@ class Teams extends Service {
3404
3639
  * @param {object} prefs
3405
3640
  * @throws {AppwriteException}
3406
3641
  * @returns {Promise}
3407
- */
3642
+ */
3408
3643
  updatePrefs(teamId, prefs) {
3409
3644
  if (typeof teamId === 'undefined') {
3410
3645
  throw new AppwriteException('Missing required parameter: "teamId"');
@@ -3931,6 +4166,7 @@ var ImageFormat;
3931
4166
  ImageFormat["Webp"] = "webp";
3932
4167
  ImageFormat["Heic"] = "heic";
3933
4168
  ImageFormat["Avif"] = "avif";
4169
+ ImageFormat["Gif"] = "gif";
3934
4170
  })(ImageFormat || (ImageFormat = {}));
3935
4171
 
3936
4172
  export { Account, AppwriteException, AuthenticationFactor, AuthenticatorType, Avatars, Browser, Client, CreditCard, Databases, ExecutionMethod, Flag, Functions, Graphql, ID, ImageFormat, ImageGravity, Locale, Messaging, OAuthProvider, Permission, Query, Role, Storage, Teams };