@appwrite.io/console 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/dist/cjs/sdk.js +2332 -633
  2. package/dist/cjs/sdk.js.map +1 -1
  3. package/dist/esm/sdk.js +2329 -634
  4. package/dist/esm/sdk.js.map +1 -1
  5. package/dist/iife/sdk.js +2332 -633
  6. package/docs/examples/account/create-anonymous-session.md +1 -1
  7. package/docs/examples/account/create-email-session.md +1 -1
  8. package/docs/examples/account/create-j-w-t.md +1 -1
  9. package/docs/examples/account/create-magic-u-r-l-session.md +1 -1
  10. package/docs/examples/account/create-o-auth2session.md +1 -1
  11. package/docs/examples/account/create-phone-session.md +1 -1
  12. package/docs/examples/account/create-phone-verification.md +1 -1
  13. package/docs/examples/account/create-recovery.md +1 -1
  14. package/docs/examples/account/create-verification.md +1 -1
  15. package/docs/examples/account/create-with-invite-code.md +1 -1
  16. package/docs/examples/account/create.md +1 -1
  17. package/docs/examples/account/delete-identity.md +18 -0
  18. package/docs/examples/account/delete-session.md +1 -1
  19. package/docs/examples/account/delete-sessions.md +1 -1
  20. package/docs/examples/account/get-prefs.md +1 -1
  21. package/docs/examples/account/get-session.md +1 -1
  22. package/docs/examples/account/get.md +1 -1
  23. package/docs/examples/account/list-identities.md +18 -0
  24. package/docs/examples/account/list-logs.md +1 -1
  25. package/docs/examples/account/list-sessions.md +1 -1
  26. package/docs/examples/account/update-email.md +1 -1
  27. package/docs/examples/account/update-magic-u-r-l-session.md +1 -1
  28. package/docs/examples/account/update-name.md +1 -1
  29. package/docs/examples/account/update-password.md +1 -1
  30. package/docs/examples/account/update-phone-session.md +1 -1
  31. package/docs/examples/account/update-phone-verification.md +1 -1
  32. package/docs/examples/account/update-phone.md +1 -1
  33. package/docs/examples/account/update-prefs.md +1 -1
  34. package/docs/examples/account/update-recovery.md +1 -1
  35. package/docs/examples/account/update-session.md +1 -1
  36. package/docs/examples/account/update-status.md +1 -1
  37. package/docs/examples/account/update-verification.md +1 -1
  38. package/docs/examples/assistant/chat.md +18 -0
  39. package/docs/examples/avatars/get-browser.md +1 -1
  40. package/docs/examples/avatars/get-credit-card.md +1 -1
  41. package/docs/examples/avatars/get-favicon.md +1 -1
  42. package/docs/examples/avatars/get-flag.md +1 -1
  43. package/docs/examples/avatars/get-image.md +1 -1
  44. package/docs/examples/avatars/get-initials.md +1 -1
  45. package/docs/examples/avatars/get-q-r.md +1 -1
  46. package/docs/examples/console/variables.md +1 -1
  47. package/docs/examples/databases/create-boolean-attribute.md +1 -1
  48. package/docs/examples/databases/create-collection.md +1 -1
  49. package/docs/examples/databases/create-datetime-attribute.md +1 -1
  50. package/docs/examples/databases/create-document.md +1 -1
  51. package/docs/examples/databases/create-email-attribute.md +1 -1
  52. package/docs/examples/databases/create-enum-attribute.md +1 -1
  53. package/docs/examples/databases/create-float-attribute.md +1 -1
  54. package/docs/examples/databases/create-index.md +1 -1
  55. package/docs/examples/databases/create-integer-attribute.md +1 -1
  56. package/docs/examples/databases/create-ip-attribute.md +1 -1
  57. package/docs/examples/databases/create-relationship-attribute.md +1 -1
  58. package/docs/examples/databases/create-string-attribute.md +1 -1
  59. package/docs/examples/databases/create-url-attribute.md +1 -1
  60. package/docs/examples/databases/create.md +1 -1
  61. package/docs/examples/databases/delete-attribute.md +1 -1
  62. package/docs/examples/databases/delete-collection.md +1 -1
  63. package/docs/examples/databases/delete-document.md +1 -1
  64. package/docs/examples/databases/delete-index.md +1 -1
  65. package/docs/examples/databases/delete.md +1 -1
  66. package/docs/examples/databases/get-attribute.md +1 -1
  67. package/docs/examples/databases/get-collection-usage.md +1 -1
  68. package/docs/examples/databases/get-collection.md +1 -1
  69. package/docs/examples/databases/get-database-usage.md +1 -1
  70. package/docs/examples/databases/get-document.md +1 -1
  71. package/docs/examples/databases/get-index.md +1 -1
  72. package/docs/examples/databases/get-usage.md +1 -1
  73. package/docs/examples/databases/get.md +1 -1
  74. package/docs/examples/databases/list-attributes.md +1 -1
  75. package/docs/examples/databases/list-collection-logs.md +1 -1
  76. package/docs/examples/databases/list-collections.md +1 -1
  77. package/docs/examples/databases/list-document-logs.md +1 -1
  78. package/docs/examples/databases/list-documents.md +1 -1
  79. package/docs/examples/databases/list-indexes.md +1 -1
  80. package/docs/examples/databases/list-logs.md +1 -1
  81. package/docs/examples/databases/list.md +1 -1
  82. package/docs/examples/databases/update-boolean-attribute.md +1 -1
  83. package/docs/examples/databases/update-collection.md +1 -1
  84. package/docs/examples/databases/update-datetime-attribute.md +1 -1
  85. package/docs/examples/databases/update-document.md +1 -1
  86. package/docs/examples/databases/update-email-attribute.md +1 -1
  87. package/docs/examples/databases/update-enum-attribute.md +1 -1
  88. package/docs/examples/databases/update-float-attribute.md +1 -1
  89. package/docs/examples/databases/update-integer-attribute.md +1 -1
  90. package/docs/examples/databases/update-ip-attribute.md +1 -1
  91. package/docs/examples/databases/update-relationship-attribute.md +1 -1
  92. package/docs/examples/databases/update-string-attribute.md +1 -1
  93. package/docs/examples/databases/update-url-attribute.md +1 -1
  94. package/docs/examples/databases/update.md +1 -1
  95. package/docs/examples/functions/create-build.md +1 -1
  96. package/docs/examples/functions/create-deployment.md +2 -2
  97. package/docs/examples/functions/create-execution.md +1 -1
  98. package/docs/examples/functions/create-variable.md +1 -1
  99. package/docs/examples/functions/create.md +1 -1
  100. package/docs/examples/functions/delete-deployment.md +1 -1
  101. package/docs/examples/functions/delete-variable.md +1 -1
  102. package/docs/examples/functions/delete.md +1 -1
  103. package/docs/examples/functions/download-deployment.md +14 -0
  104. package/docs/examples/functions/get-deployment.md +1 -1
  105. package/docs/examples/functions/get-execution.md +1 -1
  106. package/docs/examples/functions/get-function-usage.md +1 -1
  107. package/docs/examples/functions/get-usage.md +1 -1
  108. package/docs/examples/functions/get-variable.md +1 -1
  109. package/docs/examples/functions/get.md +1 -1
  110. package/docs/examples/functions/list-deployments.md +1 -1
  111. package/docs/examples/functions/list-executions.md +1 -1
  112. package/docs/examples/functions/list-runtimes.md +1 -1
  113. package/docs/examples/functions/list-variables.md +1 -1
  114. package/docs/examples/functions/list.md +1 -1
  115. package/docs/examples/functions/update-deployment.md +1 -1
  116. package/docs/examples/functions/update-variable.md +1 -1
  117. package/docs/examples/functions/update.md +2 -2
  118. package/docs/examples/graphql/mutation.md +1 -1
  119. package/docs/examples/graphql/query.md +1 -1
  120. package/docs/examples/health/get-antivirus.md +1 -1
  121. package/docs/examples/health/get-cache.md +1 -1
  122. package/docs/examples/health/get-d-b.md +1 -1
  123. package/docs/examples/health/get-pub-sub.md +1 -1
  124. package/docs/examples/health/get-queue-certificates.md +1 -1
  125. package/docs/examples/health/get-queue-functions.md +1 -1
  126. package/docs/examples/health/get-queue-logs.md +1 -1
  127. package/docs/examples/health/get-queue-webhooks.md +1 -1
  128. package/docs/examples/health/get-queue.md +1 -1
  129. package/docs/examples/health/get-storage-local.md +1 -1
  130. package/docs/examples/health/get-time.md +1 -1
  131. package/docs/examples/health/get.md +1 -1
  132. package/docs/examples/locale/get.md +1 -1
  133. package/docs/examples/locale/list-codes.md +18 -0
  134. package/docs/examples/locale/list-continents.md +1 -1
  135. package/docs/examples/locale/list-countries-e-u.md +1 -1
  136. package/docs/examples/locale/list-countries-phones.md +1 -1
  137. package/docs/examples/locale/list-countries.md +1 -1
  138. package/docs/examples/locale/list-currencies.md +1 -1
  139. package/docs/examples/locale/list-languages.md +1 -1
  140. package/docs/examples/migrations/create-appwrite-migration.md +18 -0
  141. package/docs/examples/migrations/create-firebase-migration.md +18 -0
  142. package/docs/examples/migrations/create-firebase-o-auth-migration.md +18 -0
  143. package/docs/examples/migrations/create-n-host-migration.md +18 -0
  144. package/docs/examples/migrations/create-supabase-migration.md +18 -0
  145. package/docs/examples/migrations/delete-firebase-auth.md +18 -0
  146. package/docs/examples/migrations/delete.md +18 -0
  147. package/docs/examples/migrations/get-appwrite-report.md +18 -0
  148. package/docs/examples/migrations/get-firebase-report-o-auth.md +18 -0
  149. package/docs/examples/migrations/get-firebase-report.md +18 -0
  150. package/docs/examples/migrations/get-n-host-report.md +18 -0
  151. package/docs/examples/migrations/get-supabase-report.md +18 -0
  152. package/docs/examples/migrations/get.md +18 -0
  153. package/docs/examples/migrations/list-firebase-projects.md +18 -0
  154. package/docs/examples/migrations/list.md +18 -0
  155. package/docs/examples/migrations/retry.md +18 -0
  156. package/docs/examples/project/create-variable.md +18 -0
  157. package/docs/examples/project/delete-variable.md +18 -0
  158. package/docs/examples/project/get-usage.md +1 -1
  159. package/docs/examples/project/get-variable.md +18 -0
  160. package/docs/examples/project/list-variables.md +18 -0
  161. package/docs/examples/project/update-variable.md +18 -0
  162. package/docs/examples/projects/create-key.md +1 -1
  163. package/docs/examples/projects/create-platform.md +1 -1
  164. package/docs/examples/projects/create-webhook.md +1 -1
  165. package/docs/examples/projects/create.md +2 -2
  166. package/docs/examples/projects/delete-email-template.md +18 -0
  167. package/docs/examples/projects/delete-key.md +1 -1
  168. package/docs/examples/projects/delete-platform.md +1 -1
  169. package/docs/examples/projects/delete-sms-template.md +18 -0
  170. package/docs/examples/projects/delete-webhook.md +1 -1
  171. package/docs/examples/projects/delete.md +2 -2
  172. package/docs/examples/projects/get-email-template.md +18 -0
  173. package/docs/examples/projects/get-key.md +1 -1
  174. package/docs/examples/projects/get-platform.md +1 -1
  175. package/docs/examples/projects/get-sms-template.md +18 -0
  176. package/docs/examples/projects/{list-domains.md → get-usage.md} +2 -2
  177. package/docs/examples/projects/get-webhook.md +1 -1
  178. package/docs/examples/projects/get.md +1 -1
  179. package/docs/examples/projects/list-keys.md +1 -1
  180. package/docs/examples/projects/list-platforms.md +1 -1
  181. package/docs/examples/projects/list-webhooks.md +1 -1
  182. package/docs/examples/projects/list.md +1 -1
  183. package/docs/examples/projects/update-auth-duration.md +1 -1
  184. package/docs/examples/projects/update-auth-limit.md +1 -1
  185. package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
  186. package/docs/examples/projects/update-auth-password-history.md +1 -1
  187. package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
  188. package/docs/examples/projects/update-auth-status.md +1 -1
  189. package/docs/examples/projects/update-email-template.md +18 -0
  190. package/docs/examples/projects/update-key.md +1 -1
  191. package/docs/examples/projects/update-o-auth2.md +1 -1
  192. package/docs/examples/projects/{get-domain.md → update-personal-data-check.md} +2 -2
  193. package/docs/examples/projects/update-platform.md +1 -1
  194. package/docs/examples/projects/{delete-domain.md → update-service-status-all.md} +2 -2
  195. package/docs/examples/projects/update-service-status.md +1 -1
  196. package/docs/examples/projects/update-sms-template.md +18 -0
  197. package/docs/examples/projects/update-smtp-configuration.md +18 -0
  198. package/docs/examples/projects/{create-domain.md → update-team.md} +2 -2
  199. package/docs/examples/projects/update-webhook-signature.md +1 -1
  200. package/docs/examples/projects/update-webhook.md +1 -1
  201. package/docs/examples/projects/update.md +1 -1
  202. package/docs/examples/proxy/create-rule.md +18 -0
  203. package/docs/examples/proxy/delete-rule.md +18 -0
  204. package/docs/examples/proxy/get-rule.md +18 -0
  205. package/docs/examples/proxy/list-rules.md +18 -0
  206. package/docs/examples/proxy/update-rule-verification.md +18 -0
  207. package/docs/examples/storage/create-bucket.md +1 -1
  208. package/docs/examples/storage/create-file.md +1 -1
  209. package/docs/examples/storage/delete-bucket.md +1 -1
  210. package/docs/examples/storage/delete-file.md +1 -1
  211. package/docs/examples/storage/get-bucket-usage.md +1 -1
  212. package/docs/examples/storage/get-bucket.md +1 -1
  213. package/docs/examples/storage/get-file-download.md +1 -1
  214. package/docs/examples/storage/get-file-preview.md +1 -1
  215. package/docs/examples/storage/get-file-view.md +1 -1
  216. package/docs/examples/storage/get-file.md +1 -1
  217. package/docs/examples/storage/get-usage.md +1 -1
  218. package/docs/examples/storage/list-buckets.md +1 -1
  219. package/docs/examples/storage/list-files.md +1 -1
  220. package/docs/examples/storage/update-bucket.md +1 -1
  221. package/docs/examples/storage/update-file.md +1 -1
  222. package/docs/examples/teams/create-membership.md +1 -1
  223. package/docs/examples/teams/create.md +1 -1
  224. package/docs/examples/teams/delete-membership.md +1 -1
  225. package/docs/examples/teams/delete.md +1 -1
  226. package/docs/examples/teams/get-membership.md +1 -1
  227. package/docs/examples/teams/get-prefs.md +1 -1
  228. package/docs/examples/teams/get.md +1 -1
  229. package/docs/examples/teams/list-logs.md +1 -1
  230. package/docs/examples/teams/list-memberships.md +1 -1
  231. package/docs/examples/teams/list.md +1 -1
  232. package/docs/examples/teams/update-membership-status.md +1 -1
  233. package/docs/examples/teams/{update-membership-roles.md → update-membership.md} +2 -2
  234. package/docs/examples/teams/update-name.md +1 -1
  235. package/docs/examples/teams/update-prefs.md +1 -1
  236. package/docs/examples/users/create-argon2user.md +1 -1
  237. package/docs/examples/users/create-bcrypt-user.md +1 -1
  238. package/docs/examples/users/create-m-d5user.md +1 -1
  239. package/docs/examples/users/create-p-h-pass-user.md +1 -1
  240. package/docs/examples/users/create-s-h-a-user.md +1 -1
  241. package/docs/examples/users/create-scrypt-modified-user.md +1 -1
  242. package/docs/examples/users/create-scrypt-user.md +1 -1
  243. package/docs/examples/users/create.md +1 -1
  244. package/docs/examples/users/delete-identity.md +18 -0
  245. package/docs/examples/users/delete-session.md +1 -1
  246. package/docs/examples/users/delete-sessions.md +1 -1
  247. package/docs/examples/users/delete.md +1 -1
  248. package/docs/examples/users/get-prefs.md +1 -1
  249. package/docs/examples/users/get-usage.md +1 -1
  250. package/docs/examples/users/get.md +1 -1
  251. package/docs/examples/users/list-identities.md +18 -0
  252. package/docs/examples/users/list-logs.md +1 -1
  253. package/docs/examples/users/list-memberships.md +1 -1
  254. package/docs/examples/users/list-sessions.md +1 -1
  255. package/docs/examples/users/list.md +1 -1
  256. package/docs/examples/users/update-email-verification.md +1 -1
  257. package/docs/examples/users/update-email.md +1 -1
  258. package/docs/examples/users/update-labels.md +18 -0
  259. package/docs/examples/users/update-name.md +1 -1
  260. package/docs/examples/users/update-password.md +1 -1
  261. package/docs/examples/users/update-phone-verification.md +1 -1
  262. package/docs/examples/users/update-phone.md +1 -1
  263. package/docs/examples/users/update-prefs.md +1 -1
  264. package/docs/examples/users/update-status.md +1 -1
  265. package/docs/examples/vcs/create-repository-detection.md +18 -0
  266. package/docs/examples/vcs/create-repository.md +18 -0
  267. package/docs/examples/vcs/delete-installation.md +18 -0
  268. package/docs/examples/vcs/get-installation.md +18 -0
  269. package/docs/examples/vcs/get-repository.md +18 -0
  270. package/docs/examples/vcs/list-installations.md +18 -0
  271. package/docs/examples/vcs/list-repositories.md +18 -0
  272. package/docs/examples/vcs/list-repository-branches.md +18 -0
  273. package/docs/examples/vcs/update-external-deployments.md +18 -0
  274. package/package.json +1 -1
  275. package/src/client.ts +2 -2
  276. package/src/index.ts +4 -0
  277. package/src/models.ts +905 -114
  278. package/src/services/account.ts +1102 -1055
  279. package/src/services/assistant.ts +38 -0
  280. package/src/services/avatars.ts +337 -337
  281. package/src/services/console.ts +16 -16
  282. package/src/services/databases.ts +2170 -2140
  283. package/src/services/functions.ts +808 -652
  284. package/src/services/graphql.ts +47 -47
  285. package/src/services/health.ts +226 -226
  286. package/src/services/locale.ts +156 -137
  287. package/src/services/migrations.ts +707 -0
  288. package/src/services/project.ts +160 -20
  289. package/src/services/projects.ts +1538 -1256
  290. package/src/services/proxy.ts +150 -0
  291. package/src/services/storage.ts +576 -571
  292. package/src/services/teams.ts +502 -501
  293. package/src/services/users.ts +1094 -1001
  294. package/src/services/vcs.ts +272 -0
  295. package/types/index.d.ts +4 -0
  296. package/types/models.d.ts +905 -114
  297. package/types/services/account.d.ts +62 -41
  298. package/types/services/assistant.d.ts +14 -0
  299. package/types/services/avatars.d.ts +7 -7
  300. package/types/services/console.d.ts +1 -1
  301. package/types/services/databases.d.ts +60 -54
  302. package/types/services/functions.d.ts +66 -31
  303. package/types/services/graphql.d.ts +2 -2
  304. package/types/services/health.d.ts +12 -12
  305. package/types/services/locale.d.ts +17 -7
  306. package/types/services/migrations.d.ts +185 -0
  307. package/types/services/project.d.ts +56 -1
  308. package/types/services/projects.d.ts +159 -79
  309. package/types/services/proxy.d.ts +59 -0
  310. package/types/services/storage.d.ts +18 -17
  311. package/types/services/teams.d.ts +17 -16
  312. package/types/services/users.d.ts +65 -27
  313. package/types/services/vcs.d.ts +97 -0
  314. package/docs/examples/projects/update-domain-verification.md +0 -18
package/dist/esm/sdk.js CHANGED
@@ -102,8 +102,8 @@ class Client {
102
102
  'x-sdk-name': 'Console',
103
103
  'x-sdk-platform': 'console',
104
104
  'x-sdk-language': 'web',
105
- 'x-sdk-version': '0.2.0',
106
- 'X-Appwrite-Response-Format': '1.0.0',
105
+ 'x-sdk-version': '0.1.0',
106
+ 'X-Appwrite-Response-Format': '1.4.0',
107
107
  };
108
108
  this.realtime = {
109
109
  socket: undefined,
@@ -442,11 +442,11 @@ class Account extends Service {
442
442
  /**
443
443
  * Get Account
444
444
  *
445
- * Get currently logged in user data as JSON object.
445
+ * Get the currently logged in user.
446
446
  *
447
447
  * @throws {AppwriteException}
448
448
  * @returns {Promise}
449
- */
449
+ */
450
450
  get() {
451
451
  return __awaiter(this, void 0, void 0, function* () {
452
452
  let path = '/account';
@@ -473,7 +473,7 @@ class Account extends Service {
473
473
  * @param {string} name
474
474
  * @throws {AppwriteException}
475
475
  * @returns {Promise}
476
- */
476
+ */
477
477
  create(userId, email, password, name) {
478
478
  return __awaiter(this, void 0, void 0, function* () {
479
479
  if (typeof userId === 'undefined') {
@@ -521,7 +521,7 @@ class Account extends Service {
521
521
  * @param {string} password
522
522
  * @throws {AppwriteException}
523
523
  * @returns {Promise}
524
- */
524
+ */
525
525
  updateEmail(email, password) {
526
526
  return __awaiter(this, void 0, void 0, function* () {
527
527
  if (typeof email === 'undefined') {
@@ -544,6 +544,50 @@ class Account extends Service {
544
544
  }, payload);
545
545
  });
546
546
  }
547
+ /**
548
+ * List Identities
549
+ *
550
+ * Get the list of identities for the currently logged in user.
551
+ *
552
+ * @param {string} queries
553
+ * @throws {AppwriteException}
554
+ * @returns {Promise}
555
+ */
556
+ listIdentities(queries) {
557
+ return __awaiter(this, void 0, void 0, function* () {
558
+ let path = '/account/identities';
559
+ let payload = {};
560
+ if (typeof queries !== 'undefined') {
561
+ payload['queries'] = queries;
562
+ }
563
+ const uri = new URL(this.client.config.endpoint + path);
564
+ return yield this.client.call('get', uri, {
565
+ 'content-type': 'application/json',
566
+ }, payload);
567
+ });
568
+ }
569
+ /**
570
+ * Delete Identity
571
+ *
572
+ * Delete an identity by its unique ID.
573
+ *
574
+ * @param {string} identityId
575
+ * @throws {AppwriteException}
576
+ * @returns {Promise}
577
+ */
578
+ deleteIdentity(identityId) {
579
+ return __awaiter(this, void 0, void 0, function* () {
580
+ if (typeof identityId === 'undefined') {
581
+ throw new AppwriteException('Missing required parameter: "identityId"');
582
+ }
583
+ let path = '/account/identities/{identityId}'.replace('{identityId}', identityId);
584
+ let payload = {};
585
+ const uri = new URL(this.client.config.endpoint + path);
586
+ return yield this.client.call('delete', uri, {
587
+ 'content-type': 'application/json',
588
+ }, payload);
589
+ });
590
+ }
547
591
  /**
548
592
  * Create account using an invite code
549
593
  *
@@ -561,7 +605,7 @@ class Account extends Service {
561
605
  * @param {string} code
562
606
  * @throws {AppwriteException}
563
607
  * @returns {Promise}
564
- */
608
+ */
565
609
  createWithInviteCode(userId, email, password, name, code) {
566
610
  return __awaiter(this, void 0, void 0, function* () {
567
611
  if (typeof userId === 'undefined') {
@@ -607,7 +651,7 @@ class Account extends Service {
607
651
  *
608
652
  * @throws {AppwriteException}
609
653
  * @returns {Promise}
610
- */
654
+ */
611
655
  createJWT() {
612
656
  return __awaiter(this, void 0, void 0, function* () {
613
657
  let path = '/account/jwt';
@@ -621,13 +665,13 @@ class Account extends Service {
621
665
  /**
622
666
  * List Logs
623
667
  *
624
- * Get currently logged in user list of latest security activity logs. Each
625
- * log returns user IP address, location and date and time of log.
668
+ * Get the list of latest security activity logs for the currently logged in
669
+ * user. Each log returns user IP address, location and date and time of log.
626
670
  *
627
671
  * @param {string[]} queries
628
672
  * @throws {AppwriteException}
629
673
  * @returns {Promise}
630
- */
674
+ */
631
675
  listLogs(queries) {
632
676
  return __awaiter(this, void 0, void 0, function* () {
633
677
  let path = '/account/logs';
@@ -649,7 +693,7 @@ class Account extends Service {
649
693
  * @param {string} name
650
694
  * @throws {AppwriteException}
651
695
  * @returns {Promise}
652
- */
696
+ */
653
697
  updateName(name) {
654
698
  return __awaiter(this, void 0, void 0, function* () {
655
699
  if (typeof name === 'undefined') {
@@ -677,7 +721,7 @@ class Account extends Service {
677
721
  * @param {string} oldPassword
678
722
  * @throws {AppwriteException}
679
723
  * @returns {Promise}
680
- */
724
+ */
681
725
  updatePassword(password, oldPassword) {
682
726
  return __awaiter(this, void 0, void 0, function* () {
683
727
  if (typeof password === 'undefined') {
@@ -710,7 +754,7 @@ class Account extends Service {
710
754
  * @param {string} password
711
755
  * @throws {AppwriteException}
712
756
  * @returns {Promise}
713
- */
757
+ */
714
758
  updatePhone(phone, password) {
715
759
  return __awaiter(this, void 0, void 0, function* () {
716
760
  if (typeof phone === 'undefined') {
@@ -736,11 +780,11 @@ class Account extends Service {
736
780
  /**
737
781
  * Get Account Preferences
738
782
  *
739
- * Get currently logged in user preferences as a key-value object.
783
+ * Get the preferences as a key-value object for the currently logged in user.
740
784
  *
741
785
  * @throws {AppwriteException}
742
786
  * @returns {Promise}
743
- */
787
+ */
744
788
  getPrefs() {
745
789
  return __awaiter(this, void 0, void 0, function* () {
746
790
  let path = '/account/prefs';
@@ -761,7 +805,7 @@ class Account extends Service {
761
805
  * @param {Partial<Preferences>} prefs
762
806
  * @throws {AppwriteException}
763
807
  * @returns {Promise}
764
- */
808
+ */
765
809
  updatePrefs(prefs) {
766
810
  return __awaiter(this, void 0, void 0, function* () {
767
811
  if (typeof prefs === 'undefined') {
@@ -794,7 +838,7 @@ class Account extends Service {
794
838
  * @param {string} url
795
839
  * @throws {AppwriteException}
796
840
  * @returns {Promise}
797
- */
841
+ */
798
842
  createRecovery(email, url) {
799
843
  return __awaiter(this, void 0, void 0, function* () {
800
844
  if (typeof email === 'undefined') {
@@ -836,7 +880,7 @@ class Account extends Service {
836
880
  * @param {string} passwordAgain
837
881
  * @throws {AppwriteException}
838
882
  * @returns {Promise}
839
- */
883
+ */
840
884
  updateRecovery(userId, secret, password, passwordAgain) {
841
885
  return __awaiter(this, void 0, void 0, function* () {
842
886
  if (typeof userId === 'undefined') {
@@ -874,12 +918,12 @@ class Account extends Service {
874
918
  /**
875
919
  * List Sessions
876
920
  *
877
- * Get currently logged in user list of active sessions across different
878
- * devices.
921
+ * Get the list of active sessions across different devices for the currently
922
+ * logged in user.
879
923
  *
880
924
  * @throws {AppwriteException}
881
925
  * @returns {Promise}
882
- */
926
+ */
883
927
  listSessions() {
884
928
  return __awaiter(this, void 0, void 0, function* () {
885
929
  let path = '/account/sessions';
@@ -898,7 +942,7 @@ class Account extends Service {
898
942
  *
899
943
  * @throws {AppwriteException}
900
944
  * @returns {Promise}
901
- */
945
+ */
902
946
  deleteSessions() {
903
947
  return __awaiter(this, void 0, void 0, function* () {
904
948
  let path = '/account/sessions';
@@ -921,7 +965,7 @@ class Account extends Service {
921
965
  *
922
966
  * @throws {AppwriteException}
923
967
  * @returns {Promise}
924
- */
968
+ */
925
969
  createAnonymousSession() {
926
970
  return __awaiter(this, void 0, void 0, function* () {
927
971
  let path = '/account/sessions/anonymous';
@@ -945,7 +989,7 @@ class Account extends Service {
945
989
  * @param {string} password
946
990
  * @throws {AppwriteException}
947
991
  * @returns {Promise}
948
- */
992
+ */
949
993
  createEmailSession(email, password) {
950
994
  return __awaiter(this, void 0, void 0, function* () {
951
995
  if (typeof email === 'undefined') {
@@ -972,7 +1016,7 @@ class Account extends Service {
972
1016
  * Create Magic URL session
973
1017
  *
974
1018
  * Sends the user an email with a secret key for creating a session. If the
975
- * provided user ID has not be registered, a new user will be created. When
1019
+ * provided user ID has not been registered, a new user will be created. When
976
1020
  * the user clicks the link in the email, the user is redirected back to the
977
1021
  * URL you provided with the secret key and userId values attached to the URL
978
1022
  * query string. Use the query string parameters to submit a request to the
@@ -986,12 +1030,13 @@ class Account extends Service {
986
1030
  * A user is limited to 10 active sessions at a time by default. [Learn more
987
1031
  * about session limits](/docs/authentication-security#limits).
988
1032
  *
1033
+ *
989
1034
  * @param {string} userId
990
1035
  * @param {string} email
991
1036
  * @param {string} url
992
1037
  * @throws {AppwriteException}
993
1038
  * @returns {Promise}
994
- */
1039
+ */
995
1040
  createMagicURLSession(userId, email, url) {
996
1041
  return __awaiter(this, void 0, void 0, function* () {
997
1042
  if (typeof userId === 'undefined') {
@@ -1036,7 +1081,7 @@ class Account extends Service {
1036
1081
  * @param {string} secret
1037
1082
  * @throws {AppwriteException}
1038
1083
  * @returns {Promise}
1039
- */
1084
+ */
1040
1085
  updateMagicURLSession(userId, secret) {
1041
1086
  return __awaiter(this, void 0, void 0, function* () {
1042
1087
  if (typeof userId === 'undefined') {
@@ -1084,7 +1129,7 @@ class Account extends Service {
1084
1129
  * @param {string[]} scopes
1085
1130
  * @throws {AppwriteException}
1086
1131
  * @returns {void|string}
1087
- */
1132
+ */
1088
1133
  createOAuth2Session(provider, success, failure, scopes) {
1089
1134
  if (typeof provider === 'undefined') {
1090
1135
  throw new AppwriteException('Missing required parameter: "provider"');
@@ -1129,7 +1174,7 @@ class Account extends Service {
1129
1174
  * @param {string} phone
1130
1175
  * @throws {AppwriteException}
1131
1176
  * @returns {Promise}
1132
- */
1177
+ */
1133
1178
  createPhoneSession(userId, phone) {
1134
1179
  return __awaiter(this, void 0, void 0, function* () {
1135
1180
  if (typeof userId === 'undefined') {
@@ -1165,7 +1210,7 @@ class Account extends Service {
1165
1210
  * @param {string} secret
1166
1211
  * @throws {AppwriteException}
1167
1212
  * @returns {Promise}
1168
- */
1213
+ */
1169
1214
  updatePhoneSession(userId, secret) {
1170
1215
  return __awaiter(this, void 0, void 0, function* () {
1171
1216
  if (typeof userId === 'undefined') {
@@ -1197,7 +1242,7 @@ class Account extends Service {
1197
1242
  * @param {string} sessionId
1198
1243
  * @throws {AppwriteException}
1199
1244
  * @returns {Promise}
1200
- */
1245
+ */
1201
1246
  getSession(sessionId) {
1202
1247
  return __awaiter(this, void 0, void 0, function* () {
1203
1248
  if (typeof sessionId === 'undefined') {
@@ -1221,7 +1266,7 @@ class Account extends Service {
1221
1266
  * @param {string} sessionId
1222
1267
  * @throws {AppwriteException}
1223
1268
  * @returns {Promise}
1224
- */
1269
+ */
1225
1270
  updateSession(sessionId) {
1226
1271
  return __awaiter(this, void 0, void 0, function* () {
1227
1272
  if (typeof sessionId === 'undefined') {
@@ -1238,15 +1283,15 @@ class Account extends Service {
1238
1283
  /**
1239
1284
  * Delete Session
1240
1285
  *
1241
- * Use this endpoint to log out the currently logged in user from all their
1242
- * account sessions across all of their different devices. When using the
1243
- * Session ID argument, only the unique session ID provided is deleted.
1244
- *
1286
+ * Logout the user. Use 'current' as the session ID to logout on this device,
1287
+ * use a session ID to logout on another device. If you're looking to logout
1288
+ * the user on all devices, use [Delete
1289
+ * Sessions](/docs/client/account#accountDeleteSessions) instead.
1245
1290
  *
1246
1291
  * @param {string} sessionId
1247
1292
  * @throws {AppwriteException}
1248
1293
  * @returns {Promise}
1249
- */
1294
+ */
1250
1295
  deleteSession(sessionId) {
1251
1296
  return __awaiter(this, void 0, void 0, function* () {
1252
1297
  if (typeof sessionId === 'undefined') {
@@ -1269,7 +1314,7 @@ class Account extends Service {
1269
1314
  *
1270
1315
  * @throws {AppwriteException}
1271
1316
  * @returns {Promise}
1272
- */
1317
+ */
1273
1318
  updateStatus() {
1274
1319
  return __awaiter(this, void 0, void 0, function* () {
1275
1320
  let path = '/account/status';
@@ -1302,7 +1347,7 @@ class Account extends Service {
1302
1347
  * @param {string} url
1303
1348
  * @throws {AppwriteException}
1304
1349
  * @returns {Promise}
1305
- */
1350
+ */
1306
1351
  createVerification(url) {
1307
1352
  return __awaiter(this, void 0, void 0, function* () {
1308
1353
  if (typeof url === 'undefined') {
@@ -1331,7 +1376,7 @@ class Account extends Service {
1331
1376
  * @param {string} secret
1332
1377
  * @throws {AppwriteException}
1333
1378
  * @returns {Promise}
1334
- */
1379
+ */
1335
1380
  updateVerification(userId, secret) {
1336
1381
  return __awaiter(this, void 0, void 0, function* () {
1337
1382
  if (typeof userId === 'undefined') {
@@ -1366,7 +1411,7 @@ class Account extends Service {
1366
1411
  *
1367
1412
  * @throws {AppwriteException}
1368
1413
  * @returns {Promise}
1369
- */
1414
+ */
1370
1415
  createPhoneVerification() {
1371
1416
  return __awaiter(this, void 0, void 0, function* () {
1372
1417
  let path = '/account/verification/phone';
@@ -1389,7 +1434,7 @@ class Account extends Service {
1389
1434
  * @param {string} secret
1390
1435
  * @throws {AppwriteException}
1391
1436
  * @returns {Promise}
1392
- */
1437
+ */
1393
1438
  updatePhoneVerification(userId, secret) {
1394
1439
  return __awaiter(this, void 0, void 0, function* () {
1395
1440
  if (typeof userId === 'undefined') {
@@ -1437,7 +1482,7 @@ class Avatars extends Service {
1437
1482
  * @param {number} quality
1438
1483
  * @throws {AppwriteException}
1439
1484
  * @returns {URL}
1440
- */
1485
+ */
1441
1486
  getBrowser(code, width, height, quality) {
1442
1487
  if (typeof code === 'undefined') {
1443
1488
  throw new AppwriteException('Missing required parameter: "code"');
@@ -1479,7 +1524,7 @@ class Avatars extends Service {
1479
1524
  * @param {number} quality
1480
1525
  * @throws {AppwriteException}
1481
1526
  * @returns {URL}
1482
- */
1527
+ */
1483
1528
  getCreditCard(code, width, height, quality) {
1484
1529
  if (typeof code === 'undefined') {
1485
1530
  throw new AppwriteException('Missing required parameter: "code"');
@@ -1512,7 +1557,7 @@ class Avatars extends Service {
1512
1557
  * @param {string} url
1513
1558
  * @throws {AppwriteException}
1514
1559
  * @returns {URL}
1515
- */
1560
+ */
1516
1561
  getFavicon(url) {
1517
1562
  if (typeof url === 'undefined') {
1518
1563
  throw new AppwriteException('Missing required parameter: "url"');
@@ -1549,7 +1594,7 @@ class Avatars extends Service {
1549
1594
  * @param {number} quality
1550
1595
  * @throws {AppwriteException}
1551
1596
  * @returns {URL}
1552
- */
1597
+ */
1553
1598
  getFlag(code, width, height, quality) {
1554
1599
  if (typeof code === 'undefined') {
1555
1600
  throw new AppwriteException('Missing required parameter: "code"');
@@ -1591,7 +1636,7 @@ class Avatars extends Service {
1591
1636
  * @param {number} height
1592
1637
  * @throws {AppwriteException}
1593
1638
  * @returns {URL}
1594
- */
1639
+ */
1595
1640
  getImage(url, width, height) {
1596
1641
  if (typeof url === 'undefined') {
1597
1642
  throw new AppwriteException('Missing required parameter: "url"');
@@ -1640,7 +1685,7 @@ class Avatars extends Service {
1640
1685
  * @param {string} background
1641
1686
  * @throws {AppwriteException}
1642
1687
  * @returns {URL}
1643
- */
1688
+ */
1644
1689
  getInitials(name, width, height, background) {
1645
1690
  let path = '/avatars/initials';
1646
1691
  let payload = {};
@@ -1676,7 +1721,7 @@ class Avatars extends Service {
1676
1721
  * @param {boolean} download
1677
1722
  * @throws {AppwriteException}
1678
1723
  * @returns {URL}
1679
- */
1724
+ */
1680
1725
  getQR(text, size, margin, download) {
1681
1726
  if (typeof text === 'undefined') {
1682
1727
  throw new AppwriteException('Missing required parameter: "text"');
@@ -1704,6 +1749,36 @@ class Avatars extends Service {
1704
1749
  }
1705
1750
  }
1706
1751
 
1752
+ class Assistant extends Service {
1753
+ constructor(client) {
1754
+ super(client);
1755
+ }
1756
+ /**
1757
+ * Ask Query
1758
+ *
1759
+ *
1760
+ * @param {string} prompt
1761
+ * @throws {AppwriteException}
1762
+ * @returns {Promise}
1763
+ */
1764
+ chat(prompt) {
1765
+ return __awaiter(this, void 0, void 0, function* () {
1766
+ if (typeof prompt === 'undefined') {
1767
+ throw new AppwriteException('Missing required parameter: "prompt"');
1768
+ }
1769
+ let path = '/console/assistant';
1770
+ let payload = {};
1771
+ if (typeof prompt !== 'undefined') {
1772
+ payload['prompt'] = prompt;
1773
+ }
1774
+ const uri = new URL(this.client.config.endpoint + path);
1775
+ return yield this.client.call('post', uri, {
1776
+ 'content-type': 'application/json',
1777
+ }, payload);
1778
+ });
1779
+ }
1780
+ }
1781
+
1707
1782
  class Console extends Service {
1708
1783
  constructor(client) {
1709
1784
  super(client);
@@ -1715,7 +1790,7 @@ class Console extends Service {
1715
1790
  *
1716
1791
  * @throws {AppwriteException}
1717
1792
  * @returns {Promise}
1718
- */
1793
+ */
1719
1794
  variables() {
1720
1795
  return __awaiter(this, void 0, void 0, function* () {
1721
1796
  let path = '/console/variables';
@@ -1742,7 +1817,7 @@ class Databases extends Service {
1742
1817
  * @param {string} search
1743
1818
  * @throws {AppwriteException}
1744
1819
  * @returns {Promise}
1745
- */
1820
+ */
1746
1821
  list(queries, search) {
1747
1822
  return __awaiter(this, void 0, void 0, function* () {
1748
1823
  let path = '/databases';
@@ -1767,10 +1842,11 @@ class Databases extends Service {
1767
1842
  *
1768
1843
  * @param {string} databaseId
1769
1844
  * @param {string} name
1845
+ * @param {boolean} enabled
1770
1846
  * @throws {AppwriteException}
1771
1847
  * @returns {Promise}
1772
- */
1773
- create(databaseId, name) {
1848
+ */
1849
+ create(databaseId, name, enabled) {
1774
1850
  return __awaiter(this, void 0, void 0, function* () {
1775
1851
  if (typeof databaseId === 'undefined') {
1776
1852
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -1786,6 +1862,9 @@ class Databases extends Service {
1786
1862
  if (typeof name !== 'undefined') {
1787
1863
  payload['name'] = name;
1788
1864
  }
1865
+ if (typeof enabled !== 'undefined') {
1866
+ payload['enabled'] = enabled;
1867
+ }
1789
1868
  const uri = new URL(this.client.config.endpoint + path);
1790
1869
  return yield this.client.call('post', uri, {
1791
1870
  'content-type': 'application/json',
@@ -1799,7 +1878,7 @@ class Databases extends Service {
1799
1878
  * @param {string} range
1800
1879
  * @throws {AppwriteException}
1801
1880
  * @returns {Promise}
1802
- */
1881
+ */
1803
1882
  getUsage(range) {
1804
1883
  return __awaiter(this, void 0, void 0, function* () {
1805
1884
  let path = '/databases/usage';
@@ -1822,7 +1901,7 @@ class Databases extends Service {
1822
1901
  * @param {string} databaseId
1823
1902
  * @throws {AppwriteException}
1824
1903
  * @returns {Promise}
1825
- */
1904
+ */
1826
1905
  get(databaseId) {
1827
1906
  return __awaiter(this, void 0, void 0, function* () {
1828
1907
  if (typeof databaseId === 'undefined') {
@@ -1843,10 +1922,11 @@ class Databases extends Service {
1843
1922
  *
1844
1923
  * @param {string} databaseId
1845
1924
  * @param {string} name
1925
+ * @param {boolean} enabled
1846
1926
  * @throws {AppwriteException}
1847
1927
  * @returns {Promise}
1848
- */
1849
- update(databaseId, name) {
1928
+ */
1929
+ update(databaseId, name, enabled) {
1850
1930
  return __awaiter(this, void 0, void 0, function* () {
1851
1931
  if (typeof databaseId === 'undefined') {
1852
1932
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -1859,6 +1939,9 @@ class Databases extends Service {
1859
1939
  if (typeof name !== 'undefined') {
1860
1940
  payload['name'] = name;
1861
1941
  }
1942
+ if (typeof enabled !== 'undefined') {
1943
+ payload['enabled'] = enabled;
1944
+ }
1862
1945
  const uri = new URL(this.client.config.endpoint + path);
1863
1946
  return yield this.client.call('put', uri, {
1864
1947
  'content-type': 'application/json',
@@ -1874,7 +1957,7 @@ class Databases extends Service {
1874
1957
  * @param {string} databaseId
1875
1958
  * @throws {AppwriteException}
1876
1959
  * @returns {Promise}
1877
- */
1960
+ */
1878
1961
  delete(databaseId) {
1879
1962
  return __awaiter(this, void 0, void 0, function* () {
1880
1963
  if (typeof databaseId === 'undefined') {
@@ -1899,7 +1982,7 @@ class Databases extends Service {
1899
1982
  * @param {string} search
1900
1983
  * @throws {AppwriteException}
1901
1984
  * @returns {Promise}
1902
- */
1985
+ */
1903
1986
  listCollections(databaseId, queries, search) {
1904
1987
  return __awaiter(this, void 0, void 0, function* () {
1905
1988
  if (typeof databaseId === 'undefined') {
@@ -1932,10 +2015,11 @@ class Databases extends Service {
1932
2015
  * @param {string} name
1933
2016
  * @param {string[]} permissions
1934
2017
  * @param {boolean} documentSecurity
2018
+ * @param {boolean} enabled
1935
2019
  * @throws {AppwriteException}
1936
2020
  * @returns {Promise}
1937
- */
1938
- createCollection(databaseId, collectionId, name, permissions, documentSecurity) {
2021
+ */
2022
+ createCollection(databaseId, collectionId, name, permissions, documentSecurity, enabled) {
1939
2023
  return __awaiter(this, void 0, void 0, function* () {
1940
2024
  if (typeof databaseId === 'undefined') {
1941
2025
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -1960,6 +2044,9 @@ class Databases extends Service {
1960
2044
  if (typeof documentSecurity !== 'undefined') {
1961
2045
  payload['documentSecurity'] = documentSecurity;
1962
2046
  }
2047
+ if (typeof enabled !== 'undefined') {
2048
+ payload['enabled'] = enabled;
2049
+ }
1963
2050
  const uri = new URL(this.client.config.endpoint + path);
1964
2051
  return yield this.client.call('post', uri, {
1965
2052
  'content-type': 'application/json',
@@ -1976,7 +2063,7 @@ class Databases extends Service {
1976
2063
  * @param {string} collectionId
1977
2064
  * @throws {AppwriteException}
1978
2065
  * @returns {Promise}
1979
- */
2066
+ */
1980
2067
  getCollection(databaseId, collectionId) {
1981
2068
  return __awaiter(this, void 0, void 0, function* () {
1982
2069
  if (typeof databaseId === 'undefined') {
@@ -2006,7 +2093,7 @@ class Databases extends Service {
2006
2093
  * @param {boolean} enabled
2007
2094
  * @throws {AppwriteException}
2008
2095
  * @returns {Promise}
2009
- */
2096
+ */
2010
2097
  updateCollection(databaseId, collectionId, name, permissions, documentSecurity, enabled) {
2011
2098
  return __awaiter(this, void 0, void 0, function* () {
2012
2099
  if (typeof databaseId === 'undefined') {
@@ -2048,7 +2135,7 @@ class Databases extends Service {
2048
2135
  * @param {string} collectionId
2049
2136
  * @throws {AppwriteException}
2050
2137
  * @returns {Promise}
2051
- */
2138
+ */
2052
2139
  deleteCollection(databaseId, collectionId) {
2053
2140
  return __awaiter(this, void 0, void 0, function* () {
2054
2141
  if (typeof databaseId === 'undefined') {
@@ -2071,10 +2158,11 @@ class Databases extends Service {
2071
2158
  *
2072
2159
  * @param {string} databaseId
2073
2160
  * @param {string} collectionId
2161
+ * @param {string[]} queries
2074
2162
  * @throws {AppwriteException}
2075
2163
  * @returns {Promise}
2076
- */
2077
- listAttributes(databaseId, collectionId) {
2164
+ */
2165
+ listAttributes(databaseId, collectionId, queries) {
2078
2166
  return __awaiter(this, void 0, void 0, function* () {
2079
2167
  if (typeof databaseId === 'undefined') {
2080
2168
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -2084,6 +2172,9 @@ class Databases extends Service {
2084
2172
  }
2085
2173
  let path = '/databases/{databaseId}/collections/{collectionId}/attributes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
2086
2174
  let payload = {};
2175
+ if (typeof queries !== 'undefined') {
2176
+ payload['queries'] = queries;
2177
+ }
2087
2178
  const uri = new URL(this.client.config.endpoint + path);
2088
2179
  return yield this.client.call('get', uri, {
2089
2180
  'content-type': 'application/json',
@@ -2104,7 +2195,7 @@ class Databases extends Service {
2104
2195
  * @param {boolean} array
2105
2196
  * @throws {AppwriteException}
2106
2197
  * @returns {Promise}
2107
- */
2198
+ */
2108
2199
  createBooleanAttribute(databaseId, collectionId, key, required, xdefault, array) {
2109
2200
  return __awaiter(this, void 0, void 0, function* () {
2110
2201
  if (typeof databaseId === 'undefined') {
@@ -2150,7 +2241,7 @@ class Databases extends Service {
2150
2241
  * @param {boolean} xdefault
2151
2242
  * @throws {AppwriteException}
2152
2243
  * @returns {Promise}
2153
- */
2244
+ */
2154
2245
  updateBooleanAttribute(databaseId, collectionId, key, required, xdefault) {
2155
2246
  return __awaiter(this, void 0, void 0, function* () {
2156
2247
  if (typeof databaseId === 'undefined') {
@@ -2194,7 +2285,7 @@ class Databases extends Service {
2194
2285
  * @param {boolean} array
2195
2286
  * @throws {AppwriteException}
2196
2287
  * @returns {Promise}
2197
- */
2288
+ */
2198
2289
  createDatetimeAttribute(databaseId, collectionId, key, required, xdefault, array) {
2199
2290
  return __awaiter(this, void 0, void 0, function* () {
2200
2291
  if (typeof databaseId === 'undefined') {
@@ -2240,7 +2331,7 @@ class Databases extends Service {
2240
2331
  * @param {string} xdefault
2241
2332
  * @throws {AppwriteException}
2242
2333
  * @returns {Promise}
2243
- */
2334
+ */
2244
2335
  updateDatetimeAttribute(databaseId, collectionId, key, required, xdefault) {
2245
2336
  return __awaiter(this, void 0, void 0, function* () {
2246
2337
  if (typeof databaseId === 'undefined') {
@@ -2286,7 +2377,7 @@ class Databases extends Service {
2286
2377
  * @param {boolean} array
2287
2378
  * @throws {AppwriteException}
2288
2379
  * @returns {Promise}
2289
- */
2380
+ */
2290
2381
  createEmailAttribute(databaseId, collectionId, key, required, xdefault, array) {
2291
2382
  return __awaiter(this, void 0, void 0, function* () {
2292
2383
  if (typeof databaseId === 'undefined') {
@@ -2335,7 +2426,7 @@ class Databases extends Service {
2335
2426
  * @param {string} xdefault
2336
2427
  * @throws {AppwriteException}
2337
2428
  * @returns {Promise}
2338
- */
2429
+ */
2339
2430
  updateEmailAttribute(databaseId, collectionId, key, required, xdefault) {
2340
2431
  return __awaiter(this, void 0, void 0, function* () {
2341
2432
  if (typeof databaseId === 'undefined') {
@@ -2380,7 +2471,7 @@ class Databases extends Service {
2380
2471
  * @param {boolean} array
2381
2472
  * @throws {AppwriteException}
2382
2473
  * @returns {Promise}
2383
- */
2474
+ */
2384
2475
  createEnumAttribute(databaseId, collectionId, key, elements, required, xdefault, array) {
2385
2476
  return __awaiter(this, void 0, void 0, function* () {
2386
2477
  if (typeof databaseId === 'undefined') {
@@ -2436,7 +2527,7 @@ class Databases extends Service {
2436
2527
  * @param {string} xdefault
2437
2528
  * @throws {AppwriteException}
2438
2529
  * @returns {Promise}
2439
- */
2530
+ */
2440
2531
  updateEnumAttribute(databaseId, collectionId, key, elements, required, xdefault) {
2441
2532
  return __awaiter(this, void 0, void 0, function* () {
2442
2533
  if (typeof databaseId === 'undefined') {
@@ -2491,7 +2582,7 @@ class Databases extends Service {
2491
2582
  * @param {boolean} array
2492
2583
  * @throws {AppwriteException}
2493
2584
  * @returns {Promise}
2494
- */
2585
+ */
2495
2586
  createFloatAttribute(databaseId, collectionId, key, required, min, max, xdefault, array) {
2496
2587
  return __awaiter(this, void 0, void 0, function* () {
2497
2588
  if (typeof databaseId === 'undefined') {
@@ -2548,7 +2639,7 @@ class Databases extends Service {
2548
2639
  * @param {number} xdefault
2549
2640
  * @throws {AppwriteException}
2550
2641
  * @returns {Promise}
2551
- */
2642
+ */
2552
2643
  updateFloatAttribute(databaseId, collectionId, key, required, min, max, xdefault) {
2553
2644
  return __awaiter(this, void 0, void 0, function* () {
2554
2645
  if (typeof databaseId === 'undefined') {
@@ -2609,7 +2700,7 @@ class Databases extends Service {
2609
2700
  * @param {boolean} array
2610
2701
  * @throws {AppwriteException}
2611
2702
  * @returns {Promise}
2612
- */
2703
+ */
2613
2704
  createIntegerAttribute(databaseId, collectionId, key, required, min, max, xdefault, array) {
2614
2705
  return __awaiter(this, void 0, void 0, function* () {
2615
2706
  if (typeof databaseId === 'undefined') {
@@ -2666,7 +2757,7 @@ class Databases extends Service {
2666
2757
  * @param {number} xdefault
2667
2758
  * @throws {AppwriteException}
2668
2759
  * @returns {Promise}
2669
- */
2760
+ */
2670
2761
  updateIntegerAttribute(databaseId, collectionId, key, required, min, max, xdefault) {
2671
2762
  return __awaiter(this, void 0, void 0, function* () {
2672
2763
  if (typeof databaseId === 'undefined') {
@@ -2724,7 +2815,7 @@ class Databases extends Service {
2724
2815
  * @param {boolean} array
2725
2816
  * @throws {AppwriteException}
2726
2817
  * @returns {Promise}
2727
- */
2818
+ */
2728
2819
  createIpAttribute(databaseId, collectionId, key, required, xdefault, array) {
2729
2820
  return __awaiter(this, void 0, void 0, function* () {
2730
2821
  if (typeof databaseId === 'undefined') {
@@ -2773,7 +2864,7 @@ class Databases extends Service {
2773
2864
  * @param {string} xdefault
2774
2865
  * @throws {AppwriteException}
2775
2866
  * @returns {Promise}
2776
- */
2867
+ */
2777
2868
  updateIpAttribute(databaseId, collectionId, key, required, xdefault) {
2778
2869
  return __awaiter(this, void 0, void 0, function* () {
2779
2870
  if (typeof databaseId === 'undefined') {
@@ -2822,7 +2913,7 @@ class Databases extends Service {
2822
2913
  * @param {string} onDelete
2823
2914
  * @throws {AppwriteException}
2824
2915
  * @returns {Promise}
2825
- */
2916
+ */
2826
2917
  createRelationshipAttribute(databaseId, collectionId, relatedCollectionId, type, twoWay, key, twoWayKey, onDelete) {
2827
2918
  return __awaiter(this, void 0, void 0, function* () {
2828
2919
  if (typeof databaseId === 'undefined') {
@@ -2876,10 +2967,11 @@ class Databases extends Service {
2876
2967
  * @param {boolean} required
2877
2968
  * @param {string} xdefault
2878
2969
  * @param {boolean} array
2970
+ * @param {boolean} encrypt
2879
2971
  * @throws {AppwriteException}
2880
2972
  * @returns {Promise}
2881
- */
2882
- createStringAttribute(databaseId, collectionId, key, size, required, xdefault, array) {
2973
+ */
2974
+ createStringAttribute(databaseId, collectionId, key, size, required, xdefault, array, encrypt) {
2883
2975
  return __awaiter(this, void 0, void 0, function* () {
2884
2976
  if (typeof databaseId === 'undefined') {
2885
2977
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -2913,6 +3005,9 @@ class Databases extends Service {
2913
3005
  if (typeof array !== 'undefined') {
2914
3006
  payload['array'] = array;
2915
3007
  }
3008
+ if (typeof encrypt !== 'undefined') {
3009
+ payload['encrypt'] = encrypt;
3010
+ }
2916
3011
  const uri = new URL(this.client.config.endpoint + path);
2917
3012
  return yield this.client.call('post', uri, {
2918
3013
  'content-type': 'application/json',
@@ -2933,7 +3028,7 @@ class Databases extends Service {
2933
3028
  * @param {string} xdefault
2934
3029
  * @throws {AppwriteException}
2935
3030
  * @returns {Promise}
2936
- */
3031
+ */
2937
3032
  updateStringAttribute(databaseId, collectionId, key, required, xdefault) {
2938
3033
  return __awaiter(this, void 0, void 0, function* () {
2939
3034
  if (typeof databaseId === 'undefined') {
@@ -2979,7 +3074,7 @@ class Databases extends Service {
2979
3074
  * @param {boolean} array
2980
3075
  * @throws {AppwriteException}
2981
3076
  * @returns {Promise}
2982
- */
3077
+ */
2983
3078
  createUrlAttribute(databaseId, collectionId, key, required, xdefault, array) {
2984
3079
  return __awaiter(this, void 0, void 0, function* () {
2985
3080
  if (typeof databaseId === 'undefined') {
@@ -3028,7 +3123,7 @@ class Databases extends Service {
3028
3123
  * @param {string} xdefault
3029
3124
  * @throws {AppwriteException}
3030
3125
  * @returns {Promise}
3031
- */
3126
+ */
3032
3127
  updateUrlAttribute(databaseId, collectionId, key, required, xdefault) {
3033
3128
  return __awaiter(this, void 0, void 0, function* () {
3034
3129
  if (typeof databaseId === 'undefined') {
@@ -3069,7 +3164,7 @@ class Databases extends Service {
3069
3164
  * @param {string} key
3070
3165
  * @throws {AppwriteException}
3071
3166
  * @returns {Promise}
3072
- */
3167
+ */
3073
3168
  getAttribute(databaseId, collectionId, key) {
3074
3169
  return __awaiter(this, void 0, void 0, function* () {
3075
3170
  if (typeof databaseId === 'undefined') {
@@ -3098,7 +3193,7 @@ class Databases extends Service {
3098
3193
  * @param {string} key
3099
3194
  * @throws {AppwriteException}
3100
3195
  * @returns {Promise}
3101
- */
3196
+ */
3102
3197
  deleteAttribute(databaseId, collectionId, key) {
3103
3198
  return __awaiter(this, void 0, void 0, function* () {
3104
3199
  if (typeof databaseId === 'undefined') {
@@ -3131,7 +3226,7 @@ class Databases extends Service {
3131
3226
  * @param {string} onDelete
3132
3227
  * @throws {AppwriteException}
3133
3228
  * @returns {Promise}
3134
- */
3229
+ */
3135
3230
  updateRelationshipAttribute(databaseId, collectionId, key, onDelete) {
3136
3231
  return __awaiter(this, void 0, void 0, function* () {
3137
3232
  if (typeof databaseId === 'undefined') {
@@ -3165,7 +3260,7 @@ class Databases extends Service {
3165
3260
  * @param {string[]} queries
3166
3261
  * @throws {AppwriteException}
3167
3262
  * @returns {Promise}
3168
- */
3263
+ */
3169
3264
  listDocuments(databaseId, collectionId, queries) {
3170
3265
  return __awaiter(this, void 0, void 0, function* () {
3171
3266
  if (typeof databaseId === 'undefined') {
@@ -3200,7 +3295,7 @@ class Databases extends Service {
3200
3295
  * @param {string[]} permissions
3201
3296
  * @throws {AppwriteException}
3202
3297
  * @returns {Promise}
3203
- */
3298
+ */
3204
3299
  createDocument(databaseId, collectionId, documentId, data, permissions) {
3205
3300
  return __awaiter(this, void 0, void 0, function* () {
3206
3301
  if (typeof databaseId === 'undefined') {
@@ -3244,7 +3339,7 @@ class Databases extends Service {
3244
3339
  * @param {string[]} queries
3245
3340
  * @throws {AppwriteException}
3246
3341
  * @returns {Promise}
3247
- */
3342
+ */
3248
3343
  getDocument(databaseId, collectionId, documentId, queries) {
3249
3344
  return __awaiter(this, void 0, void 0, function* () {
3250
3345
  if (typeof databaseId === 'undefined') {
@@ -3280,7 +3375,7 @@ class Databases extends Service {
3280
3375
  * @param {string[]} permissions
3281
3376
  * @throws {AppwriteException}
3282
3377
  * @returns {Promise}
3283
- */
3378
+ */
3284
3379
  updateDocument(databaseId, collectionId, documentId, data, permissions) {
3285
3380
  return __awaiter(this, void 0, void 0, function* () {
3286
3381
  if (typeof databaseId === 'undefined') {
@@ -3316,7 +3411,7 @@ class Databases extends Service {
3316
3411
  * @param {string} documentId
3317
3412
  * @throws {AppwriteException}
3318
3413
  * @returns {Promise}
3319
- */
3414
+ */
3320
3415
  deleteDocument(databaseId, collectionId, documentId) {
3321
3416
  return __awaiter(this, void 0, void 0, function* () {
3322
3417
  if (typeof databaseId === 'undefined') {
@@ -3347,7 +3442,7 @@ class Databases extends Service {
3347
3442
  * @param {string[]} queries
3348
3443
  * @throws {AppwriteException}
3349
3444
  * @returns {Promise}
3350
- */
3445
+ */
3351
3446
  listDocumentLogs(databaseId, collectionId, documentId, queries) {
3352
3447
  return __awaiter(this, void 0, void 0, function* () {
3353
3448
  if (typeof databaseId === 'undefined') {
@@ -3376,10 +3471,11 @@ class Databases extends Service {
3376
3471
  *
3377
3472
  * @param {string} databaseId
3378
3473
  * @param {string} collectionId
3474
+ * @param {string[]} queries
3379
3475
  * @throws {AppwriteException}
3380
3476
  * @returns {Promise}
3381
- */
3382
- listIndexes(databaseId, collectionId) {
3477
+ */
3478
+ listIndexes(databaseId, collectionId, queries) {
3383
3479
  return __awaiter(this, void 0, void 0, function* () {
3384
3480
  if (typeof databaseId === 'undefined') {
3385
3481
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -3389,6 +3485,9 @@ class Databases extends Service {
3389
3485
  }
3390
3486
  let path = '/databases/{databaseId}/collections/{collectionId}/indexes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
3391
3487
  let payload = {};
3488
+ if (typeof queries !== 'undefined') {
3489
+ payload['queries'] = queries;
3490
+ }
3392
3491
  const uri = new URL(this.client.config.endpoint + path);
3393
3492
  return yield this.client.call('get', uri, {
3394
3493
  'content-type': 'application/json',
@@ -3407,7 +3506,7 @@ class Databases extends Service {
3407
3506
  * @param {string[]} orders
3408
3507
  * @throws {AppwriteException}
3409
3508
  * @returns {Promise}
3410
- */
3509
+ */
3411
3510
  createIndex(databaseId, collectionId, key, type, attributes, orders) {
3412
3511
  return __awaiter(this, void 0, void 0, function* () {
3413
3512
  if (typeof databaseId === 'undefined') {
@@ -3454,7 +3553,7 @@ class Databases extends Service {
3454
3553
  * @param {string} key
3455
3554
  * @throws {AppwriteException}
3456
3555
  * @returns {Promise}
3457
- */
3556
+ */
3458
3557
  getIndex(databaseId, collectionId, key) {
3459
3558
  return __awaiter(this, void 0, void 0, function* () {
3460
3559
  if (typeof databaseId === 'undefined') {
@@ -3483,7 +3582,7 @@ class Databases extends Service {
3483
3582
  * @param {string} key
3484
3583
  * @throws {AppwriteException}
3485
3584
  * @returns {Promise}
3486
- */
3585
+ */
3487
3586
  deleteIndex(databaseId, collectionId, key) {
3488
3587
  return __awaiter(this, void 0, void 0, function* () {
3489
3588
  if (typeof databaseId === 'undefined') {
@@ -3513,7 +3612,7 @@ class Databases extends Service {
3513
3612
  * @param {string[]} queries
3514
3613
  * @throws {AppwriteException}
3515
3614
  * @returns {Promise}
3516
- */
3615
+ */
3517
3616
  listCollectionLogs(databaseId, collectionId, queries) {
3518
3617
  return __awaiter(this, void 0, void 0, function* () {
3519
3618
  if (typeof databaseId === 'undefined') {
@@ -3542,7 +3641,7 @@ class Databases extends Service {
3542
3641
  * @param {string} range
3543
3642
  * @throws {AppwriteException}
3544
3643
  * @returns {Promise}
3545
- */
3644
+ */
3546
3645
  getCollectionUsage(databaseId, collectionId, range) {
3547
3646
  return __awaiter(this, void 0, void 0, function* () {
3548
3647
  if (typeof databaseId === 'undefined') {
@@ -3571,7 +3670,7 @@ class Databases extends Service {
3571
3670
  * @param {string[]} queries
3572
3671
  * @throws {AppwriteException}
3573
3672
  * @returns {Promise}
3574
- */
3673
+ */
3575
3674
  listLogs(databaseId, queries) {
3576
3675
  return __awaiter(this, void 0, void 0, function* () {
3577
3676
  if (typeof databaseId === 'undefined') {
@@ -3596,7 +3695,7 @@ class Databases extends Service {
3596
3695
  * @param {string} range
3597
3696
  * @throws {AppwriteException}
3598
3697
  * @returns {Promise}
3599
- */
3698
+ */
3600
3699
  getDatabaseUsage(databaseId, range) {
3601
3700
  return __awaiter(this, void 0, void 0, function* () {
3602
3701
  if (typeof databaseId === 'undefined') {
@@ -3629,7 +3728,7 @@ class Functions extends Service {
3629
3728
  * @param {string} search
3630
3729
  * @throws {AppwriteException}
3631
3730
  * @returns {Promise}
3632
- */
3731
+ */
3633
3732
  list(queries, search) {
3634
3733
  return __awaiter(this, void 0, void 0, function* () {
3635
3734
  let path = '/functions';
@@ -3661,10 +3760,22 @@ class Functions extends Service {
3661
3760
  * @param {string} schedule
3662
3761
  * @param {number} timeout
3663
3762
  * @param {boolean} enabled
3763
+ * @param {boolean} logging
3764
+ * @param {string} entrypoint
3765
+ * @param {string} commands
3766
+ * @param {string} installationId
3767
+ * @param {string} providerRepositoryId
3768
+ * @param {string} providerBranch
3769
+ * @param {boolean} providerSilentMode
3770
+ * @param {string} providerRootDirectory
3771
+ * @param {string} templateRepository
3772
+ * @param {string} templateOwner
3773
+ * @param {string} templateRootDirectory
3774
+ * @param {string} templateBranch
3664
3775
  * @throws {AppwriteException}
3665
3776
  * @returns {Promise}
3666
- */
3667
- create(functionId, name, runtime, execute, events, schedule, timeout, enabled) {
3777
+ */
3778
+ create(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, templateRepository, templateOwner, templateRootDirectory, templateBranch) {
3668
3779
  return __awaiter(this, void 0, void 0, function* () {
3669
3780
  if (typeof functionId === 'undefined') {
3670
3781
  throw new AppwriteException('Missing required parameter: "functionId"');
@@ -3683,12 +3794,12 @@ class Functions extends Service {
3683
3794
  if (typeof name !== 'undefined') {
3684
3795
  payload['name'] = name;
3685
3796
  }
3686
- if (typeof execute !== 'undefined') {
3687
- payload['execute'] = execute;
3688
- }
3689
3797
  if (typeof runtime !== 'undefined') {
3690
3798
  payload['runtime'] = runtime;
3691
3799
  }
3800
+ if (typeof execute !== 'undefined') {
3801
+ payload['execute'] = execute;
3802
+ }
3692
3803
  if (typeof events !== 'undefined') {
3693
3804
  payload['events'] = events;
3694
3805
  }
@@ -3701,6 +3812,42 @@ class Functions extends Service {
3701
3812
  if (typeof enabled !== 'undefined') {
3702
3813
  payload['enabled'] = enabled;
3703
3814
  }
3815
+ if (typeof logging !== 'undefined') {
3816
+ payload['logging'] = logging;
3817
+ }
3818
+ if (typeof entrypoint !== 'undefined') {
3819
+ payload['entrypoint'] = entrypoint;
3820
+ }
3821
+ if (typeof commands !== 'undefined') {
3822
+ payload['commands'] = commands;
3823
+ }
3824
+ if (typeof installationId !== 'undefined') {
3825
+ payload['installationId'] = installationId;
3826
+ }
3827
+ if (typeof providerRepositoryId !== 'undefined') {
3828
+ payload['providerRepositoryId'] = providerRepositoryId;
3829
+ }
3830
+ if (typeof providerBranch !== 'undefined') {
3831
+ payload['providerBranch'] = providerBranch;
3832
+ }
3833
+ if (typeof providerSilentMode !== 'undefined') {
3834
+ payload['providerSilentMode'] = providerSilentMode;
3835
+ }
3836
+ if (typeof providerRootDirectory !== 'undefined') {
3837
+ payload['providerRootDirectory'] = providerRootDirectory;
3838
+ }
3839
+ if (typeof templateRepository !== 'undefined') {
3840
+ payload['templateRepository'] = templateRepository;
3841
+ }
3842
+ if (typeof templateOwner !== 'undefined') {
3843
+ payload['templateOwner'] = templateOwner;
3844
+ }
3845
+ if (typeof templateRootDirectory !== 'undefined') {
3846
+ payload['templateRootDirectory'] = templateRootDirectory;
3847
+ }
3848
+ if (typeof templateBranch !== 'undefined') {
3849
+ payload['templateBranch'] = templateBranch;
3850
+ }
3704
3851
  const uri = new URL(this.client.config.endpoint + path);
3705
3852
  return yield this.client.call('post', uri, {
3706
3853
  'content-type': 'application/json',
@@ -3714,7 +3861,7 @@ class Functions extends Service {
3714
3861
  *
3715
3862
  * @throws {AppwriteException}
3716
3863
  * @returns {Promise}
3717
- */
3864
+ */
3718
3865
  listRuntimes() {
3719
3866
  return __awaiter(this, void 0, void 0, function* () {
3720
3867
  let path = '/functions/runtimes';
@@ -3732,7 +3879,7 @@ class Functions extends Service {
3732
3879
  * @param {string} range
3733
3880
  * @throws {AppwriteException}
3734
3881
  * @returns {Promise}
3735
- */
3882
+ */
3736
3883
  getUsage(range) {
3737
3884
  return __awaiter(this, void 0, void 0, function* () {
3738
3885
  let path = '/functions/usage';
@@ -3754,7 +3901,7 @@ class Functions extends Service {
3754
3901
  * @param {string} functionId
3755
3902
  * @throws {AppwriteException}
3756
3903
  * @returns {Promise}
3757
- */
3904
+ */
3758
3905
  get(functionId) {
3759
3906
  return __awaiter(this, void 0, void 0, function* () {
3760
3907
  if (typeof functionId === 'undefined') {
@@ -3775,15 +3922,24 @@ class Functions extends Service {
3775
3922
  *
3776
3923
  * @param {string} functionId
3777
3924
  * @param {string} name
3925
+ * @param {string} runtime
3778
3926
  * @param {string[]} execute
3779
3927
  * @param {string[]} events
3780
3928
  * @param {string} schedule
3781
3929
  * @param {number} timeout
3782
3930
  * @param {boolean} enabled
3931
+ * @param {boolean} logging
3932
+ * @param {string} entrypoint
3933
+ * @param {string} commands
3934
+ * @param {string} installationId
3935
+ * @param {string} providerRepositoryId
3936
+ * @param {string} providerBranch
3937
+ * @param {boolean} providerSilentMode
3938
+ * @param {string} providerRootDirectory
3783
3939
  * @throws {AppwriteException}
3784
3940
  * @returns {Promise}
3785
- */
3786
- update(functionId, name, execute, events, schedule, timeout, enabled) {
3941
+ */
3942
+ update(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory) {
3787
3943
  return __awaiter(this, void 0, void 0, function* () {
3788
3944
  if (typeof functionId === 'undefined') {
3789
3945
  throw new AppwriteException('Missing required parameter: "functionId"');
@@ -3791,11 +3947,17 @@ class Functions extends Service {
3791
3947
  if (typeof name === 'undefined') {
3792
3948
  throw new AppwriteException('Missing required parameter: "name"');
3793
3949
  }
3950
+ if (typeof runtime === 'undefined') {
3951
+ throw new AppwriteException('Missing required parameter: "runtime"');
3952
+ }
3794
3953
  let path = '/functions/{functionId}'.replace('{functionId}', functionId);
3795
3954
  let payload = {};
3796
3955
  if (typeof name !== 'undefined') {
3797
3956
  payload['name'] = name;
3798
3957
  }
3958
+ if (typeof runtime !== 'undefined') {
3959
+ payload['runtime'] = runtime;
3960
+ }
3799
3961
  if (typeof execute !== 'undefined') {
3800
3962
  payload['execute'] = execute;
3801
3963
  }
@@ -3811,6 +3973,30 @@ class Functions extends Service {
3811
3973
  if (typeof enabled !== 'undefined') {
3812
3974
  payload['enabled'] = enabled;
3813
3975
  }
3976
+ if (typeof logging !== 'undefined') {
3977
+ payload['logging'] = logging;
3978
+ }
3979
+ if (typeof entrypoint !== 'undefined') {
3980
+ payload['entrypoint'] = entrypoint;
3981
+ }
3982
+ if (typeof commands !== 'undefined') {
3983
+ payload['commands'] = commands;
3984
+ }
3985
+ if (typeof installationId !== 'undefined') {
3986
+ payload['installationId'] = installationId;
3987
+ }
3988
+ if (typeof providerRepositoryId !== 'undefined') {
3989
+ payload['providerRepositoryId'] = providerRepositoryId;
3990
+ }
3991
+ if (typeof providerBranch !== 'undefined') {
3992
+ payload['providerBranch'] = providerBranch;
3993
+ }
3994
+ if (typeof providerSilentMode !== 'undefined') {
3995
+ payload['providerSilentMode'] = providerSilentMode;
3996
+ }
3997
+ if (typeof providerRootDirectory !== 'undefined') {
3998
+ payload['providerRootDirectory'] = providerRootDirectory;
3999
+ }
3814
4000
  const uri = new URL(this.client.config.endpoint + path);
3815
4001
  return yield this.client.call('put', uri, {
3816
4002
  'content-type': 'application/json',
@@ -3825,7 +4011,7 @@ class Functions extends Service {
3825
4011
  * @param {string} functionId
3826
4012
  * @throws {AppwriteException}
3827
4013
  * @returns {Promise}
3828
- */
4014
+ */
3829
4015
  delete(functionId) {
3830
4016
  return __awaiter(this, void 0, void 0, function* () {
3831
4017
  if (typeof functionId === 'undefined') {
@@ -3850,7 +4036,7 @@ class Functions extends Service {
3850
4036
  * @param {string} search
3851
4037
  * @throws {AppwriteException}
3852
4038
  * @returns {Promise}
3853
- */
4039
+ */
3854
4040
  listDeployments(functionId, queries, search) {
3855
4041
  return __awaiter(this, void 0, void 0, function* () {
3856
4042
  if (typeof functionId === 'undefined') {
@@ -3882,23 +4068,21 @@ class Functions extends Service {
3882
4068
  * learn more about code packaging in the [Appwrite Cloud Functions
3883
4069
  * tutorial](/docs/functions).
3884
4070
  *
3885
- * Use the "command" param to set the entry point used to execute your code.
4071
+ * Use the "command" param to set the entrypoint used to execute your code.
3886
4072
  *
3887
4073
  * @param {string} functionId
3888
- * @param {string} entrypoint
3889
4074
  * @param {File} code
3890
4075
  * @param {boolean} activate
4076
+ * @param {string} entrypoint
4077
+ * @param {string} commands
3891
4078
  * @throws {AppwriteException}
3892
4079
  * @returns {Promise}
3893
- */
3894
- createDeployment(functionId, entrypoint, code, activate, onProgress = (progress) => { }) {
4080
+ */
4081
+ createDeployment(functionId, code, activate, entrypoint, commands, onProgress = (progress) => { }) {
3895
4082
  return __awaiter(this, void 0, void 0, function* () {
3896
4083
  if (typeof functionId === 'undefined') {
3897
4084
  throw new AppwriteException('Missing required parameter: "functionId"');
3898
4085
  }
3899
- if (typeof entrypoint === 'undefined') {
3900
- throw new AppwriteException('Missing required parameter: "entrypoint"');
3901
- }
3902
4086
  if (typeof code === 'undefined') {
3903
4087
  throw new AppwriteException('Missing required parameter: "code"');
3904
4088
  }
@@ -3910,6 +4094,9 @@ class Functions extends Service {
3910
4094
  if (typeof entrypoint !== 'undefined') {
3911
4095
  payload['entrypoint'] = entrypoint;
3912
4096
  }
4097
+ if (typeof commands !== 'undefined') {
4098
+ payload['commands'] = commands;
4099
+ }
3913
4100
  if (typeof code !== 'undefined') {
3914
4101
  payload['code'] = code;
3915
4102
  }
@@ -3968,7 +4155,7 @@ class Functions extends Service {
3968
4155
  * @param {string} deploymentId
3969
4156
  * @throws {AppwriteException}
3970
4157
  * @returns {Promise}
3971
- */
4158
+ */
3972
4159
  getDeployment(functionId, deploymentId) {
3973
4160
  return __awaiter(this, void 0, void 0, function* () {
3974
4161
  if (typeof functionId === 'undefined') {
@@ -3996,7 +4183,7 @@ class Functions extends Service {
3996
4183
  * @param {string} deploymentId
3997
4184
  * @throws {AppwriteException}
3998
4185
  * @returns {Promise}
3999
- */
4186
+ */
4000
4187
  updateDeployment(functionId, deploymentId) {
4001
4188
  return __awaiter(this, void 0, void 0, function* () {
4002
4189
  if (typeof functionId === 'undefined') {
@@ -4022,7 +4209,7 @@ class Functions extends Service {
4022
4209
  * @param {string} deploymentId
4023
4210
  * @throws {AppwriteException}
4024
4211
  * @returns {Promise}
4025
- */
4212
+ */
4026
4213
  deleteDeployment(functionId, deploymentId) {
4027
4214
  return __awaiter(this, void 0, void 0, function* () {
4028
4215
  if (typeof functionId === 'undefined') {
@@ -4048,7 +4235,7 @@ class Functions extends Service {
4048
4235
  * @param {string} buildId
4049
4236
  * @throws {AppwriteException}
4050
4237
  * @returns {Promise}
4051
- */
4238
+ */
4052
4239
  createBuild(functionId, deploymentId, buildId) {
4053
4240
  return __awaiter(this, void 0, void 0, function* () {
4054
4241
  if (typeof functionId === 'undefined') {
@@ -4068,6 +4255,31 @@ class Functions extends Service {
4068
4255
  }, payload);
4069
4256
  });
4070
4257
  }
4258
+ /**
4259
+ * Download Deployment
4260
+ *
4261
+ *
4262
+ * @param {string} functionId
4263
+ * @param {string} deploymentId
4264
+ * @throws {AppwriteException}
4265
+ * @returns {URL}
4266
+ */
4267
+ downloadDeployment(functionId, deploymentId) {
4268
+ if (typeof functionId === 'undefined') {
4269
+ throw new AppwriteException('Missing required parameter: "functionId"');
4270
+ }
4271
+ if (typeof deploymentId === 'undefined') {
4272
+ throw new AppwriteException('Missing required parameter: "deploymentId"');
4273
+ }
4274
+ let path = '/functions/{functionId}/deployments/{deploymentId}/download'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId);
4275
+ let payload = {};
4276
+ const uri = new URL(this.client.config.endpoint + path);
4277
+ payload['project'] = this.client.config.project;
4278
+ for (const [key, value] of Object.entries(Service.flatten(payload))) {
4279
+ uri.searchParams.append(key, value);
4280
+ }
4281
+ return uri;
4282
+ }
4071
4283
  /**
4072
4284
  * List Executions
4073
4285
  *
@@ -4079,7 +4291,7 @@ class Functions extends Service {
4079
4291
  * @param {string} search
4080
4292
  * @throws {AppwriteException}
4081
4293
  * @returns {Promise}
4082
- */
4294
+ */
4083
4295
  listExecutions(functionId, queries, search) {
4084
4296
  return __awaiter(this, void 0, void 0, function* () {
4085
4297
  if (typeof functionId === 'undefined') {
@@ -4108,25 +4320,37 @@ class Functions extends Service {
4108
4320
  * function execution process will start asynchronously.
4109
4321
  *
4110
4322
  * @param {string} functionId
4111
- * @param {string} data
4323
+ * @param {string} body
4112
4324
  * @param {boolean} async
4325
+ * @param {string} path
4326
+ * @param {string} method
4327
+ * @param {object} headers
4113
4328
  * @throws {AppwriteException}
4114
4329
  * @returns {Promise}
4115
- */
4116
- createExecution(functionId, data, async) {
4330
+ */
4331
+ createExecution(functionId, body, async, path, method, headers) {
4117
4332
  return __awaiter(this, void 0, void 0, function* () {
4118
4333
  if (typeof functionId === 'undefined') {
4119
4334
  throw new AppwriteException('Missing required parameter: "functionId"');
4120
4335
  }
4121
- let path = '/functions/{functionId}/executions'.replace('{functionId}', functionId);
4336
+ let _path = '/functions/{functionId}/executions'.replace('{functionId}', functionId);
4122
4337
  let payload = {};
4123
- if (typeof data !== 'undefined') {
4124
- payload['data'] = data;
4338
+ if (typeof body !== 'undefined') {
4339
+ payload['body'] = body;
4125
4340
  }
4126
4341
  if (typeof async !== 'undefined') {
4127
4342
  payload['async'] = async;
4128
4343
  }
4129
- const uri = new URL(this.client.config.endpoint + path);
4344
+ if (typeof path !== 'undefined') {
4345
+ payload['path'] = path;
4346
+ }
4347
+ if (typeof method !== 'undefined') {
4348
+ payload['method'] = method;
4349
+ }
4350
+ if (typeof headers !== 'undefined') {
4351
+ payload['headers'] = headers;
4352
+ }
4353
+ const uri = new URL(this.client.config.endpoint + _path);
4130
4354
  return yield this.client.call('post', uri, {
4131
4355
  'content-type': 'application/json',
4132
4356
  }, payload);
@@ -4141,7 +4365,7 @@ class Functions extends Service {
4141
4365
  * @param {string} executionId
4142
4366
  * @throws {AppwriteException}
4143
4367
  * @returns {Promise}
4144
- */
4368
+ */
4145
4369
  getExecution(functionId, executionId) {
4146
4370
  return __awaiter(this, void 0, void 0, function* () {
4147
4371
  if (typeof functionId === 'undefined') {
@@ -4166,7 +4390,7 @@ class Functions extends Service {
4166
4390
  * @param {string} range
4167
4391
  * @throws {AppwriteException}
4168
4392
  * @returns {Promise}
4169
- */
4393
+ */
4170
4394
  getFunctionUsage(functionId, range) {
4171
4395
  return __awaiter(this, void 0, void 0, function* () {
4172
4396
  if (typeof functionId === 'undefined') {
@@ -4191,7 +4415,7 @@ class Functions extends Service {
4191
4415
  * @param {string} functionId
4192
4416
  * @throws {AppwriteException}
4193
4417
  * @returns {Promise}
4194
- */
4418
+ */
4195
4419
  listVariables(functionId) {
4196
4420
  return __awaiter(this, void 0, void 0, function* () {
4197
4421
  if (typeof functionId === 'undefined') {
@@ -4208,15 +4432,15 @@ class Functions extends Service {
4208
4432
  /**
4209
4433
  * Create Variable
4210
4434
  *
4211
- * Create a new function variable. These variables can be accessed within
4212
- * function in the `env` object under the request variable.
4435
+ * Create a new function environment variable. These variables can be accessed
4436
+ * in the function at runtime as environment variables.
4213
4437
  *
4214
4438
  * @param {string} functionId
4215
4439
  * @param {string} key
4216
4440
  * @param {string} value
4217
4441
  * @throws {AppwriteException}
4218
4442
  * @returns {Promise}
4219
- */
4443
+ */
4220
4444
  createVariable(functionId, key, value) {
4221
4445
  return __awaiter(this, void 0, void 0, function* () {
4222
4446
  if (typeof functionId === 'undefined') {
@@ -4251,7 +4475,7 @@ class Functions extends Service {
4251
4475
  * @param {string} variableId
4252
4476
  * @throws {AppwriteException}
4253
4477
  * @returns {Promise}
4254
- */
4478
+ */
4255
4479
  getVariable(functionId, variableId) {
4256
4480
  return __awaiter(this, void 0, void 0, function* () {
4257
4481
  if (typeof functionId === 'undefined') {
@@ -4279,7 +4503,7 @@ class Functions extends Service {
4279
4503
  * @param {string} value
4280
4504
  * @throws {AppwriteException}
4281
4505
  * @returns {Promise}
4282
- */
4506
+ */
4283
4507
  updateVariable(functionId, variableId, key, value) {
4284
4508
  return __awaiter(this, void 0, void 0, function* () {
4285
4509
  if (typeof functionId === 'undefined') {
@@ -4314,7 +4538,7 @@ class Functions extends Service {
4314
4538
  * @param {string} variableId
4315
4539
  * @throws {AppwriteException}
4316
4540
  * @returns {Promise}
4317
- */
4541
+ */
4318
4542
  deleteVariable(functionId, variableId) {
4319
4543
  return __awaiter(this, void 0, void 0, function* () {
4320
4544
  if (typeof functionId === 'undefined') {
@@ -4345,7 +4569,7 @@ class Graphql extends Service {
4345
4569
  * @param {object} query
4346
4570
  * @throws {AppwriteException}
4347
4571
  * @returns {Promise}
4348
- */
4572
+ */
4349
4573
  query(query) {
4350
4574
  return __awaiter(this, void 0, void 0, function* () {
4351
4575
  if (typeof query === 'undefined') {
@@ -4371,7 +4595,7 @@ class Graphql extends Service {
4371
4595
  * @param {object} query
4372
4596
  * @throws {AppwriteException}
4373
4597
  * @returns {Promise}
4374
- */
4598
+ */
4375
4599
  mutation(query) {
4376
4600
  return __awaiter(this, void 0, void 0, function* () {
4377
4601
  if (typeof query === 'undefined') {
@@ -4402,7 +4626,7 @@ class Health extends Service {
4402
4626
  *
4403
4627
  * @throws {AppwriteException}
4404
4628
  * @returns {Promise}
4405
- */
4629
+ */
4406
4630
  get() {
4407
4631
  return __awaiter(this, void 0, void 0, function* () {
4408
4632
  let path = '/health';
@@ -4420,7 +4644,7 @@ class Health extends Service {
4420
4644
  *
4421
4645
  * @throws {AppwriteException}
4422
4646
  * @returns {Promise}
4423
- */
4647
+ */
4424
4648
  getAntivirus() {
4425
4649
  return __awaiter(this, void 0, void 0, function* () {
4426
4650
  let path = '/health/anti-virus';
@@ -4439,7 +4663,7 @@ class Health extends Service {
4439
4663
  *
4440
4664
  * @throws {AppwriteException}
4441
4665
  * @returns {Promise}
4442
- */
4666
+ */
4443
4667
  getCache() {
4444
4668
  return __awaiter(this, void 0, void 0, function* () {
4445
4669
  let path = '/health/cache';
@@ -4457,7 +4681,7 @@ class Health extends Service {
4457
4681
  *
4458
4682
  * @throws {AppwriteException}
4459
4683
  * @returns {Promise}
4460
- */
4684
+ */
4461
4685
  getDB() {
4462
4686
  return __awaiter(this, void 0, void 0, function* () {
4463
4687
  let path = '/health/db';
@@ -4475,7 +4699,7 @@ class Health extends Service {
4475
4699
  *
4476
4700
  * @throws {AppwriteException}
4477
4701
  * @returns {Promise}
4478
- */
4702
+ */
4479
4703
  getPubSub() {
4480
4704
  return __awaiter(this, void 0, void 0, function* () {
4481
4705
  let path = '/health/pubsub';
@@ -4494,7 +4718,7 @@ class Health extends Service {
4494
4718
  *
4495
4719
  * @throws {AppwriteException}
4496
4720
  * @returns {Promise}
4497
- */
4721
+ */
4498
4722
  getQueue() {
4499
4723
  return __awaiter(this, void 0, void 0, function* () {
4500
4724
  let path = '/health/queue';
@@ -4514,7 +4738,7 @@ class Health extends Service {
4514
4738
  *
4515
4739
  * @throws {AppwriteException}
4516
4740
  * @returns {Promise}
4517
- */
4741
+ */
4518
4742
  getQueueCertificates() {
4519
4743
  return __awaiter(this, void 0, void 0, function* () {
4520
4744
  let path = '/health/queue/certificates';
@@ -4531,7 +4755,7 @@ class Health extends Service {
4531
4755
  *
4532
4756
  * @throws {AppwriteException}
4533
4757
  * @returns {Promise}
4534
- */
4758
+ */
4535
4759
  getQueueFunctions() {
4536
4760
  return __awaiter(this, void 0, void 0, function* () {
4537
4761
  let path = '/health/queue/functions';
@@ -4550,7 +4774,7 @@ class Health extends Service {
4550
4774
  *
4551
4775
  * @throws {AppwriteException}
4552
4776
  * @returns {Promise}
4553
- */
4777
+ */
4554
4778
  getQueueLogs() {
4555
4779
  return __awaiter(this, void 0, void 0, function* () {
4556
4780
  let path = '/health/queue/logs';
@@ -4569,7 +4793,7 @@ class Health extends Service {
4569
4793
  *
4570
4794
  * @throws {AppwriteException}
4571
4795
  * @returns {Promise}
4572
- */
4796
+ */
4573
4797
  getQueueWebhooks() {
4574
4798
  return __awaiter(this, void 0, void 0, function* () {
4575
4799
  let path = '/health/queue/webhooks';
@@ -4587,7 +4811,7 @@ class Health extends Service {
4587
4811
  *
4588
4812
  * @throws {AppwriteException}
4589
4813
  * @returns {Promise}
4590
- */
4814
+ */
4591
4815
  getStorageLocal() {
4592
4816
  return __awaiter(this, void 0, void 0, function* () {
4593
4817
  let path = '/health/storage/local';
@@ -4611,7 +4835,7 @@ class Health extends Service {
4611
4835
  *
4612
4836
  * @throws {AppwriteException}
4613
4837
  * @returns {Promise}
4614
- */
4838
+ */
4615
4839
  getTime() {
4616
4840
  return __awaiter(this, void 0, void 0, function* () {
4617
4841
  let path = '/health/time';
@@ -4640,7 +4864,7 @@ class Locale extends Service {
4640
4864
  *
4641
4865
  * @throws {AppwriteException}
4642
4866
  * @returns {Promise}
4643
- */
4867
+ */
4644
4868
  get() {
4645
4869
  return __awaiter(this, void 0, void 0, function* () {
4646
4870
  let path = '/locale';
@@ -4651,6 +4875,25 @@ class Locale extends Service {
4651
4875
  }, payload);
4652
4876
  });
4653
4877
  }
4878
+ /**
4879
+ * List Locale Codes
4880
+ *
4881
+ * List of all locale codes in [ISO
4882
+ * 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
4883
+ *
4884
+ * @throws {AppwriteException}
4885
+ * @returns {Promise}
4886
+ */
4887
+ listCodes() {
4888
+ return __awaiter(this, void 0, void 0, function* () {
4889
+ let path = '/locale/codes';
4890
+ let payload = {};
4891
+ const uri = new URL(this.client.config.endpoint + path);
4892
+ return yield this.client.call('get', uri, {
4893
+ 'content-type': 'application/json',
4894
+ }, payload);
4895
+ });
4896
+ }
4654
4897
  /**
4655
4898
  * List Continents
4656
4899
  *
@@ -4659,7 +4902,7 @@ class Locale extends Service {
4659
4902
  *
4660
4903
  * @throws {AppwriteException}
4661
4904
  * @returns {Promise}
4662
- */
4905
+ */
4663
4906
  listContinents() {
4664
4907
  return __awaiter(this, void 0, void 0, function* () {
4665
4908
  let path = '/locale/continents';
@@ -4678,7 +4921,7 @@ class Locale extends Service {
4678
4921
  *
4679
4922
  * @throws {AppwriteException}
4680
4923
  * @returns {Promise}
4681
- */
4924
+ */
4682
4925
  listCountries() {
4683
4926
  return __awaiter(this, void 0, void 0, function* () {
4684
4927
  let path = '/locale/countries';
@@ -4697,7 +4940,7 @@ class Locale extends Service {
4697
4940
  *
4698
4941
  * @throws {AppwriteException}
4699
4942
  * @returns {Promise}
4700
- */
4943
+ */
4701
4944
  listCountriesEU() {
4702
4945
  return __awaiter(this, void 0, void 0, function* () {
4703
4946
  let path = '/locale/countries/eu';
@@ -4716,7 +4959,7 @@ class Locale extends Service {
4716
4959
  *
4717
4960
  * @throws {AppwriteException}
4718
4961
  * @returns {Promise}
4719
- */
4962
+ */
4720
4963
  listCountriesPhones() {
4721
4964
  return __awaiter(this, void 0, void 0, function* () {
4722
4965
  let path = '/locale/countries/phones';
@@ -4736,7 +4979,7 @@ class Locale extends Service {
4736
4979
  *
4737
4980
  * @throws {AppwriteException}
4738
4981
  * @returns {Promise}
4739
- */
4982
+ */
4740
4983
  listCurrencies() {
4741
4984
  return __awaiter(this, void 0, void 0, function* () {
4742
4985
  let path = '/locale/currencies';
@@ -4755,7 +4998,7 @@ class Locale extends Service {
4755
4998
  *
4756
4999
  * @throws {AppwriteException}
4757
5000
  * @returns {Promise}
4758
- */
5001
+ */
4759
5002
  listLanguages() {
4760
5003
  return __awaiter(this, void 0, void 0, function* () {
4761
5004
  let path = '/locale/languages';
@@ -4768,49 +5011,22 @@ class Locale extends Service {
4768
5011
  }
4769
5012
  }
4770
5013
 
4771
- class Project extends Service {
4772
- constructor(client) {
4773
- super(client);
4774
- }
4775
- /**
4776
- * Get usage stats for a project
4777
- *
4778
- *
4779
- * @param {string} range
4780
- * @throws {AppwriteException}
4781
- * @returns {Promise}
4782
- */
4783
- getUsage(range) {
4784
- return __awaiter(this, void 0, void 0, function* () {
4785
- let path = '/project/usage';
4786
- let payload = {};
4787
- if (typeof range !== 'undefined') {
4788
- payload['range'] = range;
4789
- }
4790
- const uri = new URL(this.client.config.endpoint + path);
4791
- return yield this.client.call('get', uri, {
4792
- 'content-type': 'application/json',
4793
- }, payload);
4794
- });
4795
- }
4796
- }
4797
-
4798
- class Projects extends Service {
5014
+ class Migrations extends Service {
4799
5015
  constructor(client) {
4800
5016
  super(client);
4801
5017
  }
4802
5018
  /**
4803
- * List Projects
5019
+ * List Migrations
4804
5020
  *
4805
5021
  *
4806
- * @param {string[]} queries
5022
+ * @param {string} queries
4807
5023
  * @param {string} search
4808
5024
  * @throws {AppwriteException}
4809
5025
  * @returns {Promise}
4810
- */
5026
+ */
4811
5027
  list(queries, search) {
4812
5028
  return __awaiter(this, void 0, void 0, function* () {
4813
- let path = '/projects';
5029
+ let path = '/migrations';
4814
5030
  let payload = {};
4815
5031
  if (typeof queries !== 'undefined') {
4816
5032
  payload['queries'] = queries;
@@ -4825,76 +5041,43 @@ class Projects extends Service {
4825
5041
  });
4826
5042
  }
4827
5043
  /**
4828
- * Create Project
5044
+ * Migrate Appwrite Data
4829
5045
  *
4830
5046
  *
5047
+ * @param {string[]} resources
5048
+ * @param {string} endpoint
4831
5049
  * @param {string} projectId
4832
- * @param {string} name
4833
- * @param {string} teamId
4834
- * @param {string} region
4835
- * @param {string} description
4836
- * @param {string} logo
4837
- * @param {string} url
4838
- * @param {string} legalName
4839
- * @param {string} legalCountry
4840
- * @param {string} legalState
4841
- * @param {string} legalCity
4842
- * @param {string} legalAddress
4843
- * @param {string} legalTaxId
5050
+ * @param {string} apiKey
4844
5051
  * @throws {AppwriteException}
4845
5052
  * @returns {Promise}
4846
- */
4847
- create(projectId, name, teamId, region, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId) {
5053
+ */
5054
+ createAppwriteMigration(resources, endpoint, projectId, apiKey) {
4848
5055
  return __awaiter(this, void 0, void 0, function* () {
5056
+ if (typeof resources === 'undefined') {
5057
+ throw new AppwriteException('Missing required parameter: "resources"');
5058
+ }
5059
+ if (typeof endpoint === 'undefined') {
5060
+ throw new AppwriteException('Missing required parameter: "endpoint"');
5061
+ }
4849
5062
  if (typeof projectId === 'undefined') {
4850
5063
  throw new AppwriteException('Missing required parameter: "projectId"');
4851
5064
  }
4852
- if (typeof name === 'undefined') {
4853
- throw new AppwriteException('Missing required parameter: "name"');
4854
- }
4855
- if (typeof teamId === 'undefined') {
4856
- throw new AppwriteException('Missing required parameter: "teamId"');
5065
+ if (typeof apiKey === 'undefined') {
5066
+ throw new AppwriteException('Missing required parameter: "apiKey"');
4857
5067
  }
4858
- let path = '/projects';
5068
+ let path = '/migrations/appwrite';
4859
5069
  let payload = {};
4860
- if (typeof projectId !== 'undefined') {
4861
- payload['projectId'] = projectId;
4862
- }
4863
- if (typeof name !== 'undefined') {
4864
- payload['name'] = name;
4865
- }
4866
- if (typeof teamId !== 'undefined') {
4867
- payload['teamId'] = teamId;
4868
- }
4869
- if (typeof region !== 'undefined') {
4870
- payload['region'] = region;
4871
- }
4872
- if (typeof description !== 'undefined') {
4873
- payload['description'] = description;
4874
- }
4875
- if (typeof logo !== 'undefined') {
4876
- payload['logo'] = logo;
4877
- }
4878
- if (typeof url !== 'undefined') {
4879
- payload['url'] = url;
4880
- }
4881
- if (typeof legalName !== 'undefined') {
4882
- payload['legalName'] = legalName;
4883
- }
4884
- if (typeof legalCountry !== 'undefined') {
4885
- payload['legalCountry'] = legalCountry;
4886
- }
4887
- if (typeof legalState !== 'undefined') {
4888
- payload['legalState'] = legalState;
5070
+ if (typeof resources !== 'undefined') {
5071
+ payload['resources'] = resources;
4889
5072
  }
4890
- if (typeof legalCity !== 'undefined') {
4891
- payload['legalCity'] = legalCity;
5073
+ if (typeof endpoint !== 'undefined') {
5074
+ payload['endpoint'] = endpoint;
4892
5075
  }
4893
- if (typeof legalAddress !== 'undefined') {
4894
- payload['legalAddress'] = legalAddress;
5076
+ if (typeof projectId !== 'undefined') {
5077
+ payload['projectId'] = projectId;
4895
5078
  }
4896
- if (typeof legalTaxId !== 'undefined') {
4897
- payload['legalTaxId'] = legalTaxId;
5079
+ if (typeof apiKey !== 'undefined') {
5080
+ payload['apiKey'] = apiKey;
4898
5081
  }
4899
5082
  const uri = new URL(this.client.config.endpoint + path);
4900
5083
  return yield this.client.call('post', uri, {
@@ -4903,20 +5086,44 @@ class Projects extends Service {
4903
5086
  });
4904
5087
  }
4905
5088
  /**
4906
- * Get Project
5089
+ * Generate a report on Appwrite Data
4907
5090
  *
4908
5091
  *
4909
- * @param {string} projectId
5092
+ * @param {string[]} resources
5093
+ * @param {string} endpoint
5094
+ * @param {string} projectID
5095
+ * @param {string} key
4910
5096
  * @throws {AppwriteException}
4911
5097
  * @returns {Promise}
4912
- */
4913
- get(projectId) {
5098
+ */
5099
+ getAppwriteReport(resources, endpoint, projectID, key) {
4914
5100
  return __awaiter(this, void 0, void 0, function* () {
4915
- if (typeof projectId === 'undefined') {
4916
- throw new AppwriteException('Missing required parameter: "projectId"');
5101
+ if (typeof resources === 'undefined') {
5102
+ throw new AppwriteException('Missing required parameter: "resources"');
4917
5103
  }
4918
- let path = '/projects/{projectId}'.replace('{projectId}', projectId);
5104
+ if (typeof endpoint === 'undefined') {
5105
+ throw new AppwriteException('Missing required parameter: "endpoint"');
5106
+ }
5107
+ if (typeof projectID === 'undefined') {
5108
+ throw new AppwriteException('Missing required parameter: "projectID"');
5109
+ }
5110
+ if (typeof key === 'undefined') {
5111
+ throw new AppwriteException('Missing required parameter: "key"');
5112
+ }
5113
+ let path = '/migrations/appwrite/report';
4919
5114
  let payload = {};
5115
+ if (typeof resources !== 'undefined') {
5116
+ payload['resources'] = resources;
5117
+ }
5118
+ if (typeof endpoint !== 'undefined') {
5119
+ payload['endpoint'] = endpoint;
5120
+ }
5121
+ if (typeof projectID !== 'undefined') {
5122
+ payload['projectID'] = projectID;
5123
+ }
5124
+ if (typeof key !== 'undefined') {
5125
+ payload['key'] = key;
5126
+ }
4920
5127
  const uri = new URL(this.client.config.endpoint + path);
4921
5128
  return yield this.client.call('get', uri, {
4922
5129
  'content-type': 'application/json',
@@ -4924,191 +5131,958 @@ class Projects extends Service {
4924
5131
  });
4925
5132
  }
4926
5133
  /**
4927
- * Update Project
5134
+ * Migrate Firebase Data (Service Account)
4928
5135
  *
4929
5136
  *
4930
- * @param {string} projectId
4931
- * @param {string} name
4932
- * @param {string} description
4933
- * @param {string} logo
4934
- * @param {string} url
4935
- * @param {string} legalName
4936
- * @param {string} legalCountry
4937
- * @param {string} legalState
4938
- * @param {string} legalCity
4939
- * @param {string} legalAddress
4940
- * @param {string} legalTaxId
5137
+ * @param {string[]} resources
5138
+ * @param {string} serviceAccount
4941
5139
  * @throws {AppwriteException}
4942
5140
  * @returns {Promise}
4943
- */
4944
- update(projectId, name, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId) {
5141
+ */
5142
+ createFirebaseMigration(resources, serviceAccount) {
4945
5143
  return __awaiter(this, void 0, void 0, function* () {
4946
- if (typeof projectId === 'undefined') {
4947
- throw new AppwriteException('Missing required parameter: "projectId"');
5144
+ if (typeof resources === 'undefined') {
5145
+ throw new AppwriteException('Missing required parameter: "resources"');
4948
5146
  }
4949
- if (typeof name === 'undefined') {
4950
- throw new AppwriteException('Missing required parameter: "name"');
5147
+ if (typeof serviceAccount === 'undefined') {
5148
+ throw new AppwriteException('Missing required parameter: "serviceAccount"');
4951
5149
  }
4952
- let path = '/projects/{projectId}'.replace('{projectId}', projectId);
5150
+ let path = '/migrations/firebase';
4953
5151
  let payload = {};
4954
- if (typeof name !== 'undefined') {
4955
- payload['name'] = name;
4956
- }
4957
- if (typeof description !== 'undefined') {
4958
- payload['description'] = description;
4959
- }
4960
- if (typeof logo !== 'undefined') {
4961
- payload['logo'] = logo;
4962
- }
4963
- if (typeof url !== 'undefined') {
4964
- payload['url'] = url;
4965
- }
4966
- if (typeof legalName !== 'undefined') {
4967
- payload['legalName'] = legalName;
4968
- }
4969
- if (typeof legalCountry !== 'undefined') {
4970
- payload['legalCountry'] = legalCountry;
5152
+ if (typeof resources !== 'undefined') {
5153
+ payload['resources'] = resources;
4971
5154
  }
4972
- if (typeof legalState !== 'undefined') {
4973
- payload['legalState'] = legalState;
4974
- }
4975
- if (typeof legalCity !== 'undefined') {
4976
- payload['legalCity'] = legalCity;
4977
- }
4978
- if (typeof legalAddress !== 'undefined') {
4979
- payload['legalAddress'] = legalAddress;
4980
- }
4981
- if (typeof legalTaxId !== 'undefined') {
4982
- payload['legalTaxId'] = legalTaxId;
5155
+ if (typeof serviceAccount !== 'undefined') {
5156
+ payload['serviceAccount'] = serviceAccount;
4983
5157
  }
4984
5158
  const uri = new URL(this.client.config.endpoint + path);
4985
- return yield this.client.call('patch', uri, {
5159
+ return yield this.client.call('post', uri, {
4986
5160
  'content-type': 'application/json',
4987
5161
  }, payload);
4988
5162
  });
4989
5163
  }
4990
5164
  /**
4991
- * Delete Project
5165
+ * Revoke Appwrite&#039;s authorization to access Firebase Projects
4992
5166
  *
4993
5167
  *
4994
- * @param {string} projectId
4995
- * @param {string} password
4996
5168
  * @throws {AppwriteException}
4997
5169
  * @returns {Promise}
4998
- */
4999
- delete(projectId, password) {
5170
+ */
5171
+ deleteFirebaseAuth() {
5000
5172
  return __awaiter(this, void 0, void 0, function* () {
5001
- if (typeof projectId === 'undefined') {
5002
- throw new AppwriteException('Missing required parameter: "projectId"');
5003
- }
5004
- if (typeof password === 'undefined') {
5005
- throw new AppwriteException('Missing required parameter: "password"');
5006
- }
5007
- let path = '/projects/{projectId}'.replace('{projectId}', projectId);
5173
+ let path = '/migrations/firebase/deauthorize';
5008
5174
  let payload = {};
5009
- if (typeof password !== 'undefined') {
5010
- payload['password'] = password;
5011
- }
5012
5175
  const uri = new URL(this.client.config.endpoint + path);
5013
- return yield this.client.call('delete', uri, {
5176
+ return yield this.client.call('get', uri, {
5014
5177
  'content-type': 'application/json',
5015
5178
  }, payload);
5016
5179
  });
5017
5180
  }
5018
5181
  /**
5019
- * Update Project Authentication Duration
5182
+ * Migrate Firebase Data (OAuth)
5020
5183
  *
5021
5184
  *
5185
+ * @param {string[]} resources
5022
5186
  * @param {string} projectId
5023
- * @param {number} duration
5024
5187
  * @throws {AppwriteException}
5025
5188
  * @returns {Promise}
5026
- */
5027
- updateAuthDuration(projectId, duration) {
5189
+ */
5190
+ createFirebaseOAuthMigration(resources, projectId) {
5028
5191
  return __awaiter(this, void 0, void 0, function* () {
5192
+ if (typeof resources === 'undefined') {
5193
+ throw new AppwriteException('Missing required parameter: "resources"');
5194
+ }
5029
5195
  if (typeof projectId === 'undefined') {
5030
5196
  throw new AppwriteException('Missing required parameter: "projectId"');
5031
5197
  }
5032
- if (typeof duration === 'undefined') {
5033
- throw new AppwriteException('Missing required parameter: "duration"');
5034
- }
5035
- let path = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
5198
+ let path = '/migrations/firebase/oauth';
5036
5199
  let payload = {};
5037
- if (typeof duration !== 'undefined') {
5038
- payload['duration'] = duration;
5200
+ if (typeof resources !== 'undefined') {
5201
+ payload['resources'] = resources;
5202
+ }
5203
+ if (typeof projectId !== 'undefined') {
5204
+ payload['projectId'] = projectId;
5039
5205
  }
5040
5206
  const uri = new URL(this.client.config.endpoint + path);
5041
- return yield this.client.call('patch', uri, {
5207
+ return yield this.client.call('post', uri, {
5042
5208
  'content-type': 'application/json',
5043
5209
  }, payload);
5044
5210
  });
5045
5211
  }
5046
5212
  /**
5047
- * Update Project users limit
5213
+ * List Firebase Projects
5048
5214
  *
5049
5215
  *
5050
- * @param {string} projectId
5051
- * @param {number} limit
5052
5216
  * @throws {AppwriteException}
5053
5217
  * @returns {Promise}
5054
- */
5055
- updateAuthLimit(projectId, limit) {
5218
+ */
5219
+ listFirebaseProjects() {
5056
5220
  return __awaiter(this, void 0, void 0, function* () {
5057
- if (typeof projectId === 'undefined') {
5058
- throw new AppwriteException('Missing required parameter: "projectId"');
5059
- }
5060
- if (typeof limit === 'undefined') {
5061
- throw new AppwriteException('Missing required parameter: "limit"');
5062
- }
5063
- let path = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
5221
+ let path = '/migrations/firebase/projects';
5064
5222
  let payload = {};
5065
- if (typeof limit !== 'undefined') {
5066
- payload['limit'] = limit;
5067
- }
5068
5223
  const uri = new URL(this.client.config.endpoint + path);
5069
- return yield this.client.call('patch', uri, {
5224
+ return yield this.client.call('get', uri, {
5070
5225
  'content-type': 'application/json',
5071
5226
  }, payload);
5072
5227
  });
5073
5228
  }
5074
5229
  /**
5075
- * Update Project user sessions limit
5230
+ * Generate a report on Firebase Data
5076
5231
  *
5077
5232
  *
5078
- * @param {string} projectId
5079
- * @param {number} limit
5233
+ * @param {string[]} resources
5234
+ * @param {string} serviceAccount
5080
5235
  * @throws {AppwriteException}
5081
5236
  * @returns {Promise}
5082
- */
5083
- updateAuthSessionsLimit(projectId, limit) {
5237
+ */
5238
+ getFirebaseReport(resources, serviceAccount) {
5084
5239
  return __awaiter(this, void 0, void 0, function* () {
5085
- if (typeof projectId === 'undefined') {
5086
- throw new AppwriteException('Missing required parameter: "projectId"');
5240
+ if (typeof resources === 'undefined') {
5241
+ throw new AppwriteException('Missing required parameter: "resources"');
5087
5242
  }
5088
- if (typeof limit === 'undefined') {
5089
- throw new AppwriteException('Missing required parameter: "limit"');
5243
+ if (typeof serviceAccount === 'undefined') {
5244
+ throw new AppwriteException('Missing required parameter: "serviceAccount"');
5090
5245
  }
5091
- let path = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
5246
+ let path = '/migrations/firebase/report';
5092
5247
  let payload = {};
5093
- if (typeof limit !== 'undefined') {
5094
- payload['limit'] = limit;
5248
+ if (typeof resources !== 'undefined') {
5249
+ payload['resources'] = resources;
5250
+ }
5251
+ if (typeof serviceAccount !== 'undefined') {
5252
+ payload['serviceAccount'] = serviceAccount;
5095
5253
  }
5096
5254
  const uri = new URL(this.client.config.endpoint + path);
5097
- return yield this.client.call('patch', uri, {
5255
+ return yield this.client.call('get', uri, {
5098
5256
  'content-type': 'application/json',
5099
5257
  }, payload);
5100
5258
  });
5101
5259
  }
5102
5260
  /**
5103
- * Update authentication password disctionary status. Use this endpoint to enable or disable the dicitonary check for user password
5261
+ * Generate a report on Firebase Data using OAuth
5104
5262
  *
5105
5263
  *
5264
+ * @param {string[]} resources
5106
5265
  * @param {string} projectId
5107
- * @param {boolean} enabled
5108
5266
  * @throws {AppwriteException}
5109
5267
  * @returns {Promise}
5110
- */
5111
- updateAuthPasswordDictionary(projectId, enabled) {
5268
+ */
5269
+ getFirebaseReportOAuth(resources, projectId) {
5270
+ return __awaiter(this, void 0, void 0, function* () {
5271
+ if (typeof resources === 'undefined') {
5272
+ throw new AppwriteException('Missing required parameter: "resources"');
5273
+ }
5274
+ if (typeof projectId === 'undefined') {
5275
+ throw new AppwriteException('Missing required parameter: "projectId"');
5276
+ }
5277
+ let path = '/migrations/firebase/report/oauth';
5278
+ let payload = {};
5279
+ if (typeof resources !== 'undefined') {
5280
+ payload['resources'] = resources;
5281
+ }
5282
+ if (typeof projectId !== 'undefined') {
5283
+ payload['projectId'] = projectId;
5284
+ }
5285
+ const uri = new URL(this.client.config.endpoint + path);
5286
+ return yield this.client.call('get', uri, {
5287
+ 'content-type': 'application/json',
5288
+ }, payload);
5289
+ });
5290
+ }
5291
+ /**
5292
+ * Migrate NHost Data
5293
+ *
5294
+ *
5295
+ * @param {string[]} resources
5296
+ * @param {string} subdomain
5297
+ * @param {string} region
5298
+ * @param {string} adminSecret
5299
+ * @param {string} database
5300
+ * @param {string} username
5301
+ * @param {string} password
5302
+ * @param {number} port
5303
+ * @throws {AppwriteException}
5304
+ * @returns {Promise}
5305
+ */
5306
+ createNHostMigration(resources, subdomain, region, adminSecret, database, username, password, port) {
5307
+ return __awaiter(this, void 0, void 0, function* () {
5308
+ if (typeof resources === 'undefined') {
5309
+ throw new AppwriteException('Missing required parameter: "resources"');
5310
+ }
5311
+ if (typeof subdomain === 'undefined') {
5312
+ throw new AppwriteException('Missing required parameter: "subdomain"');
5313
+ }
5314
+ if (typeof region === 'undefined') {
5315
+ throw new AppwriteException('Missing required parameter: "region"');
5316
+ }
5317
+ if (typeof adminSecret === 'undefined') {
5318
+ throw new AppwriteException('Missing required parameter: "adminSecret"');
5319
+ }
5320
+ if (typeof database === 'undefined') {
5321
+ throw new AppwriteException('Missing required parameter: "database"');
5322
+ }
5323
+ if (typeof username === 'undefined') {
5324
+ throw new AppwriteException('Missing required parameter: "username"');
5325
+ }
5326
+ if (typeof password === 'undefined') {
5327
+ throw new AppwriteException('Missing required parameter: "password"');
5328
+ }
5329
+ let path = '/migrations/nhost';
5330
+ let payload = {};
5331
+ if (typeof resources !== 'undefined') {
5332
+ payload['resources'] = resources;
5333
+ }
5334
+ if (typeof subdomain !== 'undefined') {
5335
+ payload['subdomain'] = subdomain;
5336
+ }
5337
+ if (typeof region !== 'undefined') {
5338
+ payload['region'] = region;
5339
+ }
5340
+ if (typeof adminSecret !== 'undefined') {
5341
+ payload['adminSecret'] = adminSecret;
5342
+ }
5343
+ if (typeof database !== 'undefined') {
5344
+ payload['database'] = database;
5345
+ }
5346
+ if (typeof username !== 'undefined') {
5347
+ payload['username'] = username;
5348
+ }
5349
+ if (typeof password !== 'undefined') {
5350
+ payload['password'] = password;
5351
+ }
5352
+ if (typeof port !== 'undefined') {
5353
+ payload['port'] = port;
5354
+ }
5355
+ const uri = new URL(this.client.config.endpoint + path);
5356
+ return yield this.client.call('post', uri, {
5357
+ 'content-type': 'application/json',
5358
+ }, payload);
5359
+ });
5360
+ }
5361
+ /**
5362
+ * Generate a report on NHost Data
5363
+ *
5364
+ *
5365
+ * @param {string[]} resources
5366
+ * @param {string} subdomain
5367
+ * @param {string} region
5368
+ * @param {string} adminSecret
5369
+ * @param {string} database
5370
+ * @param {string} username
5371
+ * @param {string} password
5372
+ * @param {number} port
5373
+ * @throws {AppwriteException}
5374
+ * @returns {Promise}
5375
+ */
5376
+ getNHostReport(resources, subdomain, region, adminSecret, database, username, password, port) {
5377
+ return __awaiter(this, void 0, void 0, function* () {
5378
+ if (typeof resources === 'undefined') {
5379
+ throw new AppwriteException('Missing required parameter: "resources"');
5380
+ }
5381
+ if (typeof subdomain === 'undefined') {
5382
+ throw new AppwriteException('Missing required parameter: "subdomain"');
5383
+ }
5384
+ if (typeof region === 'undefined') {
5385
+ throw new AppwriteException('Missing required parameter: "region"');
5386
+ }
5387
+ if (typeof adminSecret === 'undefined') {
5388
+ throw new AppwriteException('Missing required parameter: "adminSecret"');
5389
+ }
5390
+ if (typeof database === 'undefined') {
5391
+ throw new AppwriteException('Missing required parameter: "database"');
5392
+ }
5393
+ if (typeof username === 'undefined') {
5394
+ throw new AppwriteException('Missing required parameter: "username"');
5395
+ }
5396
+ if (typeof password === 'undefined') {
5397
+ throw new AppwriteException('Missing required parameter: "password"');
5398
+ }
5399
+ let path = '/migrations/nhost/report';
5400
+ let payload = {};
5401
+ if (typeof resources !== 'undefined') {
5402
+ payload['resources'] = resources;
5403
+ }
5404
+ if (typeof subdomain !== 'undefined') {
5405
+ payload['subdomain'] = subdomain;
5406
+ }
5407
+ if (typeof region !== 'undefined') {
5408
+ payload['region'] = region;
5409
+ }
5410
+ if (typeof adminSecret !== 'undefined') {
5411
+ payload['adminSecret'] = adminSecret;
5412
+ }
5413
+ if (typeof database !== 'undefined') {
5414
+ payload['database'] = database;
5415
+ }
5416
+ if (typeof username !== 'undefined') {
5417
+ payload['username'] = username;
5418
+ }
5419
+ if (typeof password !== 'undefined') {
5420
+ payload['password'] = password;
5421
+ }
5422
+ if (typeof port !== 'undefined') {
5423
+ payload['port'] = port;
5424
+ }
5425
+ const uri = new URL(this.client.config.endpoint + path);
5426
+ return yield this.client.call('get', uri, {
5427
+ 'content-type': 'application/json',
5428
+ }, payload);
5429
+ });
5430
+ }
5431
+ /**
5432
+ * Migrate Supabase Data
5433
+ *
5434
+ *
5435
+ * @param {string[]} resources
5436
+ * @param {string} endpoint
5437
+ * @param {string} apiKey
5438
+ * @param {string} databaseHost
5439
+ * @param {string} username
5440
+ * @param {string} password
5441
+ * @param {number} port
5442
+ * @throws {AppwriteException}
5443
+ * @returns {Promise}
5444
+ */
5445
+ createSupabaseMigration(resources, endpoint, apiKey, databaseHost, username, password, port) {
5446
+ return __awaiter(this, void 0, void 0, function* () {
5447
+ if (typeof resources === 'undefined') {
5448
+ throw new AppwriteException('Missing required parameter: "resources"');
5449
+ }
5450
+ if (typeof endpoint === 'undefined') {
5451
+ throw new AppwriteException('Missing required parameter: "endpoint"');
5452
+ }
5453
+ if (typeof apiKey === 'undefined') {
5454
+ throw new AppwriteException('Missing required parameter: "apiKey"');
5455
+ }
5456
+ if (typeof databaseHost === 'undefined') {
5457
+ throw new AppwriteException('Missing required parameter: "databaseHost"');
5458
+ }
5459
+ if (typeof username === 'undefined') {
5460
+ throw new AppwriteException('Missing required parameter: "username"');
5461
+ }
5462
+ if (typeof password === 'undefined') {
5463
+ throw new AppwriteException('Missing required parameter: "password"');
5464
+ }
5465
+ let path = '/migrations/supabase';
5466
+ let payload = {};
5467
+ if (typeof resources !== 'undefined') {
5468
+ payload['resources'] = resources;
5469
+ }
5470
+ if (typeof endpoint !== 'undefined') {
5471
+ payload['endpoint'] = endpoint;
5472
+ }
5473
+ if (typeof apiKey !== 'undefined') {
5474
+ payload['apiKey'] = apiKey;
5475
+ }
5476
+ if (typeof databaseHost !== 'undefined') {
5477
+ payload['databaseHost'] = databaseHost;
5478
+ }
5479
+ if (typeof username !== 'undefined') {
5480
+ payload['username'] = username;
5481
+ }
5482
+ if (typeof password !== 'undefined') {
5483
+ payload['password'] = password;
5484
+ }
5485
+ if (typeof port !== 'undefined') {
5486
+ payload['port'] = port;
5487
+ }
5488
+ const uri = new URL(this.client.config.endpoint + path);
5489
+ return yield this.client.call('post', uri, {
5490
+ 'content-type': 'application/json',
5491
+ }, payload);
5492
+ });
5493
+ }
5494
+ /**
5495
+ * Generate a report on Supabase Data
5496
+ *
5497
+ *
5498
+ * @param {string[]} resources
5499
+ * @param {string} endpoint
5500
+ * @param {string} apiKey
5501
+ * @param {string} databaseHost
5502
+ * @param {string} username
5503
+ * @param {string} password
5504
+ * @param {number} port
5505
+ * @throws {AppwriteException}
5506
+ * @returns {Promise}
5507
+ */
5508
+ getSupabaseReport(resources, endpoint, apiKey, databaseHost, username, password, port) {
5509
+ return __awaiter(this, void 0, void 0, function* () {
5510
+ if (typeof resources === 'undefined') {
5511
+ throw new AppwriteException('Missing required parameter: "resources"');
5512
+ }
5513
+ if (typeof endpoint === 'undefined') {
5514
+ throw new AppwriteException('Missing required parameter: "endpoint"');
5515
+ }
5516
+ if (typeof apiKey === 'undefined') {
5517
+ throw new AppwriteException('Missing required parameter: "apiKey"');
5518
+ }
5519
+ if (typeof databaseHost === 'undefined') {
5520
+ throw new AppwriteException('Missing required parameter: "databaseHost"');
5521
+ }
5522
+ if (typeof username === 'undefined') {
5523
+ throw new AppwriteException('Missing required parameter: "username"');
5524
+ }
5525
+ if (typeof password === 'undefined') {
5526
+ throw new AppwriteException('Missing required parameter: "password"');
5527
+ }
5528
+ let path = '/migrations/supabase/report';
5529
+ let payload = {};
5530
+ if (typeof resources !== 'undefined') {
5531
+ payload['resources'] = resources;
5532
+ }
5533
+ if (typeof endpoint !== 'undefined') {
5534
+ payload['endpoint'] = endpoint;
5535
+ }
5536
+ if (typeof apiKey !== 'undefined') {
5537
+ payload['apiKey'] = apiKey;
5538
+ }
5539
+ if (typeof databaseHost !== 'undefined') {
5540
+ payload['databaseHost'] = databaseHost;
5541
+ }
5542
+ if (typeof username !== 'undefined') {
5543
+ payload['username'] = username;
5544
+ }
5545
+ if (typeof password !== 'undefined') {
5546
+ payload['password'] = password;
5547
+ }
5548
+ if (typeof port !== 'undefined') {
5549
+ payload['port'] = port;
5550
+ }
5551
+ const uri = new URL(this.client.config.endpoint + path);
5552
+ return yield this.client.call('get', uri, {
5553
+ 'content-type': 'application/json',
5554
+ }, payload);
5555
+ });
5556
+ }
5557
+ /**
5558
+ * Get Migration
5559
+ *
5560
+ *
5561
+ * @param {string} migrationId
5562
+ * @throws {AppwriteException}
5563
+ * @returns {Promise}
5564
+ */
5565
+ get(migrationId) {
5566
+ return __awaiter(this, void 0, void 0, function* () {
5567
+ if (typeof migrationId === 'undefined') {
5568
+ throw new AppwriteException('Missing required parameter: "migrationId"');
5569
+ }
5570
+ let path = '/migrations/{migrationId}'.replace('{migrationId}', migrationId);
5571
+ let payload = {};
5572
+ const uri = new URL(this.client.config.endpoint + path);
5573
+ return yield this.client.call('get', uri, {
5574
+ 'content-type': 'application/json',
5575
+ }, payload);
5576
+ });
5577
+ }
5578
+ /**
5579
+ * Retry Migration
5580
+ *
5581
+ *
5582
+ * @param {string} migrationId
5583
+ * @throws {AppwriteException}
5584
+ * @returns {Promise}
5585
+ */
5586
+ retry(migrationId) {
5587
+ return __awaiter(this, void 0, void 0, function* () {
5588
+ if (typeof migrationId === 'undefined') {
5589
+ throw new AppwriteException('Missing required parameter: "migrationId"');
5590
+ }
5591
+ let path = '/migrations/{migrationId}'.replace('{migrationId}', migrationId);
5592
+ let payload = {};
5593
+ const uri = new URL(this.client.config.endpoint + path);
5594
+ return yield this.client.call('patch', uri, {
5595
+ 'content-type': 'application/json',
5596
+ }, payload);
5597
+ });
5598
+ }
5599
+ /**
5600
+ * Delete Migration
5601
+ *
5602
+ *
5603
+ * @param {string} migrationId
5604
+ * @throws {AppwriteException}
5605
+ * @returns {Promise}
5606
+ */
5607
+ delete(migrationId) {
5608
+ return __awaiter(this, void 0, void 0, function* () {
5609
+ if (typeof migrationId === 'undefined') {
5610
+ throw new AppwriteException('Missing required parameter: "migrationId"');
5611
+ }
5612
+ let path = '/migrations/{migrationId}'.replace('{migrationId}', migrationId);
5613
+ let payload = {};
5614
+ const uri = new URL(this.client.config.endpoint + path);
5615
+ return yield this.client.call('delete', uri, {
5616
+ 'content-type': 'application/json',
5617
+ }, payload);
5618
+ });
5619
+ }
5620
+ }
5621
+
5622
+ class Project extends Service {
5623
+ constructor(client) {
5624
+ super(client);
5625
+ }
5626
+ /**
5627
+ * Get usage stats for a project
5628
+ *
5629
+ *
5630
+ * @param {string} range
5631
+ * @throws {AppwriteException}
5632
+ * @returns {Promise}
5633
+ */
5634
+ getUsage(range) {
5635
+ return __awaiter(this, void 0, void 0, function* () {
5636
+ let path = '/project/usage';
5637
+ let payload = {};
5638
+ if (typeof range !== 'undefined') {
5639
+ payload['range'] = range;
5640
+ }
5641
+ const uri = new URL(this.client.config.endpoint + path);
5642
+ return yield this.client.call('get', uri, {
5643
+ 'content-type': 'application/json',
5644
+ }, payload);
5645
+ });
5646
+ }
5647
+ /**
5648
+ * List Variables
5649
+ *
5650
+ * Get a list of all project variables. These variables will be accessible in
5651
+ * all Appwrite Functions at runtime.
5652
+ *
5653
+ * @throws {AppwriteException}
5654
+ * @returns {Promise}
5655
+ */
5656
+ listVariables() {
5657
+ return __awaiter(this, void 0, void 0, function* () {
5658
+ let path = '/project/variables';
5659
+ let payload = {};
5660
+ const uri = new URL(this.client.config.endpoint + path);
5661
+ return yield this.client.call('get', uri, {
5662
+ 'content-type': 'application/json',
5663
+ }, payload);
5664
+ });
5665
+ }
5666
+ /**
5667
+ * Create Variable
5668
+ *
5669
+ * Create a new project variable. This variable will be accessible in all
5670
+ * Appwrite Functions at runtime.
5671
+ *
5672
+ * @param {string} key
5673
+ * @param {string} value
5674
+ * @throws {AppwriteException}
5675
+ * @returns {Promise}
5676
+ */
5677
+ createVariable(key, value) {
5678
+ return __awaiter(this, void 0, void 0, function* () {
5679
+ if (typeof key === 'undefined') {
5680
+ throw new AppwriteException('Missing required parameter: "key"');
5681
+ }
5682
+ if (typeof value === 'undefined') {
5683
+ throw new AppwriteException('Missing required parameter: "value"');
5684
+ }
5685
+ let path = '/project/variables';
5686
+ let payload = {};
5687
+ if (typeof key !== 'undefined') {
5688
+ payload['key'] = key;
5689
+ }
5690
+ if (typeof value !== 'undefined') {
5691
+ payload['value'] = value;
5692
+ }
5693
+ const uri = new URL(this.client.config.endpoint + path);
5694
+ return yield this.client.call('post', uri, {
5695
+ 'content-type': 'application/json',
5696
+ }, payload);
5697
+ });
5698
+ }
5699
+ /**
5700
+ * Get Variable
5701
+ *
5702
+ * Get a project variable by its unique ID.
5703
+ *
5704
+ * @param {string} variableId
5705
+ * @throws {AppwriteException}
5706
+ * @returns {Promise}
5707
+ */
5708
+ getVariable(variableId) {
5709
+ return __awaiter(this, void 0, void 0, function* () {
5710
+ if (typeof variableId === 'undefined') {
5711
+ throw new AppwriteException('Missing required parameter: "variableId"');
5712
+ }
5713
+ let path = '/project/variables/{variableId}'.replace('{variableId}', variableId);
5714
+ let payload = {};
5715
+ const uri = new URL(this.client.config.endpoint + path);
5716
+ return yield this.client.call('get', uri, {
5717
+ 'content-type': 'application/json',
5718
+ }, payload);
5719
+ });
5720
+ }
5721
+ /**
5722
+ * Update Variable
5723
+ *
5724
+ * Update project variable by its unique ID. This variable will be accessible
5725
+ * in all Appwrite Functions at runtime.
5726
+ *
5727
+ * @param {string} variableId
5728
+ * @param {string} key
5729
+ * @param {string} value
5730
+ * @throws {AppwriteException}
5731
+ * @returns {Promise}
5732
+ */
5733
+ updateVariable(variableId, key, value) {
5734
+ return __awaiter(this, void 0, void 0, function* () {
5735
+ if (typeof variableId === 'undefined') {
5736
+ throw new AppwriteException('Missing required parameter: "variableId"');
5737
+ }
5738
+ if (typeof key === 'undefined') {
5739
+ throw new AppwriteException('Missing required parameter: "key"');
5740
+ }
5741
+ let path = '/project/variables/{variableId}'.replace('{variableId}', variableId);
5742
+ let payload = {};
5743
+ if (typeof key !== 'undefined') {
5744
+ payload['key'] = key;
5745
+ }
5746
+ if (typeof value !== 'undefined') {
5747
+ payload['value'] = value;
5748
+ }
5749
+ const uri = new URL(this.client.config.endpoint + path);
5750
+ return yield this.client.call('put', uri, {
5751
+ 'content-type': 'application/json',
5752
+ }, payload);
5753
+ });
5754
+ }
5755
+ /**
5756
+ * Delete Variable
5757
+ *
5758
+ * Delete a project variable by its unique ID.
5759
+ *
5760
+ * @param {string} variableId
5761
+ * @throws {AppwriteException}
5762
+ * @returns {Promise}
5763
+ */
5764
+ deleteVariable(variableId) {
5765
+ return __awaiter(this, void 0, void 0, function* () {
5766
+ if (typeof variableId === 'undefined') {
5767
+ throw new AppwriteException('Missing required parameter: "variableId"');
5768
+ }
5769
+ let path = '/project/variables/{variableId}'.replace('{variableId}', variableId);
5770
+ let payload = {};
5771
+ const uri = new URL(this.client.config.endpoint + path);
5772
+ return yield this.client.call('delete', uri, {
5773
+ 'content-type': 'application/json',
5774
+ }, payload);
5775
+ });
5776
+ }
5777
+ }
5778
+
5779
+ class Projects extends Service {
5780
+ constructor(client) {
5781
+ super(client);
5782
+ }
5783
+ /**
5784
+ * List Projects
5785
+ *
5786
+ *
5787
+ * @param {string[]} queries
5788
+ * @param {string} search
5789
+ * @throws {AppwriteException}
5790
+ * @returns {Promise}
5791
+ */
5792
+ list(queries, search) {
5793
+ return __awaiter(this, void 0, void 0, function* () {
5794
+ let path = '/projects';
5795
+ let payload = {};
5796
+ if (typeof queries !== 'undefined') {
5797
+ payload['queries'] = queries;
5798
+ }
5799
+ if (typeof search !== 'undefined') {
5800
+ payload['search'] = search;
5801
+ }
5802
+ const uri = new URL(this.client.config.endpoint + path);
5803
+ return yield this.client.call('get', uri, {
5804
+ 'content-type': 'application/json',
5805
+ }, payload);
5806
+ });
5807
+ }
5808
+ /**
5809
+ * Create Project
5810
+ *
5811
+ *
5812
+ * @param {string} projectId
5813
+ * @param {string} name
5814
+ * @param {string} teamId
5815
+ * @param {string} region
5816
+ * @param {string} description
5817
+ * @param {string} logo
5818
+ * @param {string} url
5819
+ * @param {string} legalName
5820
+ * @param {string} legalCountry
5821
+ * @param {string} legalState
5822
+ * @param {string} legalCity
5823
+ * @param {string} legalAddress
5824
+ * @param {string} legalTaxId
5825
+ * @throws {AppwriteException}
5826
+ * @returns {Promise}
5827
+ */
5828
+ create(projectId, name, teamId, region, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId) {
5829
+ return __awaiter(this, void 0, void 0, function* () {
5830
+ if (typeof projectId === 'undefined') {
5831
+ throw new AppwriteException('Missing required parameter: "projectId"');
5832
+ }
5833
+ if (typeof name === 'undefined') {
5834
+ throw new AppwriteException('Missing required parameter: "name"');
5835
+ }
5836
+ if (typeof teamId === 'undefined') {
5837
+ throw new AppwriteException('Missing required parameter: "teamId"');
5838
+ }
5839
+ let path = '/projects';
5840
+ let payload = {};
5841
+ if (typeof projectId !== 'undefined') {
5842
+ payload['projectId'] = projectId;
5843
+ }
5844
+ if (typeof name !== 'undefined') {
5845
+ payload['name'] = name;
5846
+ }
5847
+ if (typeof teamId !== 'undefined') {
5848
+ payload['teamId'] = teamId;
5849
+ }
5850
+ if (typeof region !== 'undefined') {
5851
+ payload['region'] = region;
5852
+ }
5853
+ if (typeof description !== 'undefined') {
5854
+ payload['description'] = description;
5855
+ }
5856
+ if (typeof logo !== 'undefined') {
5857
+ payload['logo'] = logo;
5858
+ }
5859
+ if (typeof url !== 'undefined') {
5860
+ payload['url'] = url;
5861
+ }
5862
+ if (typeof legalName !== 'undefined') {
5863
+ payload['legalName'] = legalName;
5864
+ }
5865
+ if (typeof legalCountry !== 'undefined') {
5866
+ payload['legalCountry'] = legalCountry;
5867
+ }
5868
+ if (typeof legalState !== 'undefined') {
5869
+ payload['legalState'] = legalState;
5870
+ }
5871
+ if (typeof legalCity !== 'undefined') {
5872
+ payload['legalCity'] = legalCity;
5873
+ }
5874
+ if (typeof legalAddress !== 'undefined') {
5875
+ payload['legalAddress'] = legalAddress;
5876
+ }
5877
+ if (typeof legalTaxId !== 'undefined') {
5878
+ payload['legalTaxId'] = legalTaxId;
5879
+ }
5880
+ const uri = new URL(this.client.config.endpoint + path);
5881
+ return yield this.client.call('post', uri, {
5882
+ 'content-type': 'application/json',
5883
+ }, payload);
5884
+ });
5885
+ }
5886
+ /**
5887
+ * Get Project
5888
+ *
5889
+ *
5890
+ * @param {string} projectId
5891
+ * @throws {AppwriteException}
5892
+ * @returns {Promise}
5893
+ */
5894
+ get(projectId) {
5895
+ return __awaiter(this, void 0, void 0, function* () {
5896
+ if (typeof projectId === 'undefined') {
5897
+ throw new AppwriteException('Missing required parameter: "projectId"');
5898
+ }
5899
+ let path = '/projects/{projectId}'.replace('{projectId}', projectId);
5900
+ let payload = {};
5901
+ const uri = new URL(this.client.config.endpoint + path);
5902
+ return yield this.client.call('get', uri, {
5903
+ 'content-type': 'application/json',
5904
+ }, payload);
5905
+ });
5906
+ }
5907
+ /**
5908
+ * Update Project
5909
+ *
5910
+ *
5911
+ * @param {string} projectId
5912
+ * @param {string} name
5913
+ * @param {string} description
5914
+ * @param {string} logo
5915
+ * @param {string} url
5916
+ * @param {string} legalName
5917
+ * @param {string} legalCountry
5918
+ * @param {string} legalState
5919
+ * @param {string} legalCity
5920
+ * @param {string} legalAddress
5921
+ * @param {string} legalTaxId
5922
+ * @throws {AppwriteException}
5923
+ * @returns {Promise}
5924
+ */
5925
+ update(projectId, name, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId) {
5926
+ return __awaiter(this, void 0, void 0, function* () {
5927
+ if (typeof projectId === 'undefined') {
5928
+ throw new AppwriteException('Missing required parameter: "projectId"');
5929
+ }
5930
+ if (typeof name === 'undefined') {
5931
+ throw new AppwriteException('Missing required parameter: "name"');
5932
+ }
5933
+ let path = '/projects/{projectId}'.replace('{projectId}', projectId);
5934
+ let payload = {};
5935
+ if (typeof name !== 'undefined') {
5936
+ payload['name'] = name;
5937
+ }
5938
+ if (typeof description !== 'undefined') {
5939
+ payload['description'] = description;
5940
+ }
5941
+ if (typeof logo !== 'undefined') {
5942
+ payload['logo'] = logo;
5943
+ }
5944
+ if (typeof url !== 'undefined') {
5945
+ payload['url'] = url;
5946
+ }
5947
+ if (typeof legalName !== 'undefined') {
5948
+ payload['legalName'] = legalName;
5949
+ }
5950
+ if (typeof legalCountry !== 'undefined') {
5951
+ payload['legalCountry'] = legalCountry;
5952
+ }
5953
+ if (typeof legalState !== 'undefined') {
5954
+ payload['legalState'] = legalState;
5955
+ }
5956
+ if (typeof legalCity !== 'undefined') {
5957
+ payload['legalCity'] = legalCity;
5958
+ }
5959
+ if (typeof legalAddress !== 'undefined') {
5960
+ payload['legalAddress'] = legalAddress;
5961
+ }
5962
+ if (typeof legalTaxId !== 'undefined') {
5963
+ payload['legalTaxId'] = legalTaxId;
5964
+ }
5965
+ const uri = new URL(this.client.config.endpoint + path);
5966
+ return yield this.client.call('patch', uri, {
5967
+ 'content-type': 'application/json',
5968
+ }, payload);
5969
+ });
5970
+ }
5971
+ /**
5972
+ * Delete Project
5973
+ *
5974
+ *
5975
+ * @param {string} projectId
5976
+ * @throws {AppwriteException}
5977
+ * @returns {Promise}
5978
+ */
5979
+ delete(projectId) {
5980
+ return __awaiter(this, void 0, void 0, function* () {
5981
+ if (typeof projectId === 'undefined') {
5982
+ throw new AppwriteException('Missing required parameter: "projectId"');
5983
+ }
5984
+ let path = '/projects/{projectId}'.replace('{projectId}', projectId);
5985
+ let payload = {};
5986
+ const uri = new URL(this.client.config.endpoint + path);
5987
+ return yield this.client.call('delete', uri, {
5988
+ 'content-type': 'application/json',
5989
+ }, payload);
5990
+ });
5991
+ }
5992
+ /**
5993
+ * Update Project Authentication Duration
5994
+ *
5995
+ *
5996
+ * @param {string} projectId
5997
+ * @param {number} duration
5998
+ * @throws {AppwriteException}
5999
+ * @returns {Promise}
6000
+ */
6001
+ updateAuthDuration(projectId, duration) {
6002
+ return __awaiter(this, void 0, void 0, function* () {
6003
+ if (typeof projectId === 'undefined') {
6004
+ throw new AppwriteException('Missing required parameter: "projectId"');
6005
+ }
6006
+ if (typeof duration === 'undefined') {
6007
+ throw new AppwriteException('Missing required parameter: "duration"');
6008
+ }
6009
+ let path = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
6010
+ let payload = {};
6011
+ if (typeof duration !== 'undefined') {
6012
+ payload['duration'] = duration;
6013
+ }
6014
+ const uri = new URL(this.client.config.endpoint + path);
6015
+ return yield this.client.call('patch', uri, {
6016
+ 'content-type': 'application/json',
6017
+ }, payload);
6018
+ });
6019
+ }
6020
+ /**
6021
+ * Update Project users limit
6022
+ *
6023
+ *
6024
+ * @param {string} projectId
6025
+ * @param {number} limit
6026
+ * @throws {AppwriteException}
6027
+ * @returns {Promise}
6028
+ */
6029
+ updateAuthLimit(projectId, limit) {
6030
+ return __awaiter(this, void 0, void 0, function* () {
6031
+ if (typeof projectId === 'undefined') {
6032
+ throw new AppwriteException('Missing required parameter: "projectId"');
6033
+ }
6034
+ if (typeof limit === 'undefined') {
6035
+ throw new AppwriteException('Missing required parameter: "limit"');
6036
+ }
6037
+ let path = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
6038
+ let payload = {};
6039
+ if (typeof limit !== 'undefined') {
6040
+ payload['limit'] = limit;
6041
+ }
6042
+ const uri = new URL(this.client.config.endpoint + path);
6043
+ return yield this.client.call('patch', uri, {
6044
+ 'content-type': 'application/json',
6045
+ }, payload);
6046
+ });
6047
+ }
6048
+ /**
6049
+ * Update Project user sessions limit
6050
+ *
6051
+ *
6052
+ * @param {string} projectId
6053
+ * @param {number} limit
6054
+ * @throws {AppwriteException}
6055
+ * @returns {Promise}
6056
+ */
6057
+ updateAuthSessionsLimit(projectId, limit) {
6058
+ return __awaiter(this, void 0, void 0, function* () {
6059
+ if (typeof projectId === 'undefined') {
6060
+ throw new AppwriteException('Missing required parameter: "projectId"');
6061
+ }
6062
+ if (typeof limit === 'undefined') {
6063
+ throw new AppwriteException('Missing required parameter: "limit"');
6064
+ }
6065
+ let path = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
6066
+ let payload = {};
6067
+ if (typeof limit !== 'undefined') {
6068
+ payload['limit'] = limit;
6069
+ }
6070
+ const uri = new URL(this.client.config.endpoint + path);
6071
+ return yield this.client.call('patch', uri, {
6072
+ 'content-type': 'application/json',
6073
+ }, payload);
6074
+ });
6075
+ }
6076
+ /**
6077
+ * Update authentication password dictionary status. Use this endpoint to enable or disable the dicitonary check for user password
6078
+ *
6079
+ *
6080
+ * @param {string} projectId
6081
+ * @param {boolean} enabled
6082
+ * @throws {AppwriteException}
6083
+ * @returns {Promise}
6084
+ */
6085
+ updateAuthPasswordDictionary(projectId, enabled) {
5112
6086
  return __awaiter(this, void 0, void 0, function* () {
5113
6087
  if (typeof projectId === 'undefined') {
5114
6088
  throw new AppwriteException('Missing required parameter: "projectId"');
@@ -5135,7 +6109,7 @@ class Projects extends Service {
5135
6109
  * @param {number} limit
5136
6110
  * @throws {AppwriteException}
5137
6111
  * @returns {Promise}
5138
- */
6112
+ */
5139
6113
  updateAuthPasswordHistory(projectId, limit) {
5140
6114
  return __awaiter(this, void 0, void 0, function* () {
5141
6115
  if (typeof projectId === 'undefined') {
@@ -5155,6 +6129,34 @@ class Projects extends Service {
5155
6129
  }, payload);
5156
6130
  });
5157
6131
  }
6132
+ /**
6133
+ * Enable or disable checking user passwords for similarity with their personal data.
6134
+ *
6135
+ *
6136
+ * @param {string} projectId
6137
+ * @param {boolean} enabled
6138
+ * @throws {AppwriteException}
6139
+ * @returns {Promise}
6140
+ */
6141
+ updatePersonalDataCheck(projectId, enabled) {
6142
+ return __awaiter(this, void 0, void 0, function* () {
6143
+ if (typeof projectId === 'undefined') {
6144
+ throw new AppwriteException('Missing required parameter: "projectId"');
6145
+ }
6146
+ if (typeof enabled === 'undefined') {
6147
+ throw new AppwriteException('Missing required parameter: "enabled"');
6148
+ }
6149
+ let path = '/projects/{projectId}/auth/personal-data'.replace('{projectId}', projectId);
6150
+ let payload = {};
6151
+ if (typeof enabled !== 'undefined') {
6152
+ payload['enabled'] = enabled;
6153
+ }
6154
+ const uri = new URL(this.client.config.endpoint + path);
6155
+ return yield this.client.call('patch', uri, {
6156
+ 'content-type': 'application/json',
6157
+ }, payload);
6158
+ });
6159
+ }
5158
6160
  /**
5159
6161
  * Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.
5160
6162
  *
@@ -5164,7 +6166,7 @@ class Projects extends Service {
5164
6166
  * @param {boolean} status
5165
6167
  * @throws {AppwriteException}
5166
6168
  * @returns {Promise}
5167
- */
6169
+ */
5168
6170
  updateAuthStatus(projectId, method, status) {
5169
6171
  return __awaiter(this, void 0, void 0, function* () {
5170
6172
  if (typeof projectId === 'undefined') {
@@ -5188,143 +6190,284 @@ class Projects extends Service {
5188
6190
  });
5189
6191
  }
5190
6192
  /**
5191
- * List Domains
6193
+ * List Keys
6194
+ *
6195
+ *
6196
+ * @param {string} projectId
6197
+ * @throws {AppwriteException}
6198
+ * @returns {Promise}
6199
+ */
6200
+ listKeys(projectId) {
6201
+ return __awaiter(this, void 0, void 0, function* () {
6202
+ if (typeof projectId === 'undefined') {
6203
+ throw new AppwriteException('Missing required parameter: "projectId"');
6204
+ }
6205
+ let path = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
6206
+ let payload = {};
6207
+ const uri = new URL(this.client.config.endpoint + path);
6208
+ return yield this.client.call('get', uri, {
6209
+ 'content-type': 'application/json',
6210
+ }, payload);
6211
+ });
6212
+ }
6213
+ /**
6214
+ * Create Key
6215
+ *
6216
+ *
6217
+ * @param {string} projectId
6218
+ * @param {string} name
6219
+ * @param {string[]} scopes
6220
+ * @param {string} expire
6221
+ * @throws {AppwriteException}
6222
+ * @returns {Promise}
6223
+ */
6224
+ createKey(projectId, name, scopes, expire) {
6225
+ return __awaiter(this, void 0, void 0, function* () {
6226
+ if (typeof projectId === 'undefined') {
6227
+ throw new AppwriteException('Missing required parameter: "projectId"');
6228
+ }
6229
+ if (typeof name === 'undefined') {
6230
+ throw new AppwriteException('Missing required parameter: "name"');
6231
+ }
6232
+ if (typeof scopes === 'undefined') {
6233
+ throw new AppwriteException('Missing required parameter: "scopes"');
6234
+ }
6235
+ let path = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
6236
+ let payload = {};
6237
+ if (typeof name !== 'undefined') {
6238
+ payload['name'] = name;
6239
+ }
6240
+ if (typeof scopes !== 'undefined') {
6241
+ payload['scopes'] = scopes;
6242
+ }
6243
+ if (typeof expire !== 'undefined') {
6244
+ payload['expire'] = expire;
6245
+ }
6246
+ const uri = new URL(this.client.config.endpoint + path);
6247
+ return yield this.client.call('post', uri, {
6248
+ 'content-type': 'application/json',
6249
+ }, payload);
6250
+ });
6251
+ }
6252
+ /**
6253
+ * Get Key
6254
+ *
6255
+ *
6256
+ * @param {string} projectId
6257
+ * @param {string} keyId
6258
+ * @throws {AppwriteException}
6259
+ * @returns {Promise}
6260
+ */
6261
+ getKey(projectId, keyId) {
6262
+ return __awaiter(this, void 0, void 0, function* () {
6263
+ if (typeof projectId === 'undefined') {
6264
+ throw new AppwriteException('Missing required parameter: "projectId"');
6265
+ }
6266
+ if (typeof keyId === 'undefined') {
6267
+ throw new AppwriteException('Missing required parameter: "keyId"');
6268
+ }
6269
+ let path = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
6270
+ let payload = {};
6271
+ const uri = new URL(this.client.config.endpoint + path);
6272
+ return yield this.client.call('get', uri, {
6273
+ 'content-type': 'application/json',
6274
+ }, payload);
6275
+ });
6276
+ }
6277
+ /**
6278
+ * Update Key
5192
6279
  *
5193
6280
  *
5194
6281
  * @param {string} projectId
6282
+ * @param {string} keyId
6283
+ * @param {string} name
6284
+ * @param {string[]} scopes
6285
+ * @param {string} expire
5195
6286
  * @throws {AppwriteException}
5196
6287
  * @returns {Promise}
5197
- */
5198
- listDomains(projectId) {
6288
+ */
6289
+ updateKey(projectId, keyId, name, scopes, expire) {
5199
6290
  return __awaiter(this, void 0, void 0, function* () {
5200
6291
  if (typeof projectId === 'undefined') {
5201
6292
  throw new AppwriteException('Missing required parameter: "projectId"');
5202
6293
  }
5203
- let path = '/projects/{projectId}/domains'.replace('{projectId}', projectId);
6294
+ if (typeof keyId === 'undefined') {
6295
+ throw new AppwriteException('Missing required parameter: "keyId"');
6296
+ }
6297
+ if (typeof name === 'undefined') {
6298
+ throw new AppwriteException('Missing required parameter: "name"');
6299
+ }
6300
+ if (typeof scopes === 'undefined') {
6301
+ throw new AppwriteException('Missing required parameter: "scopes"');
6302
+ }
6303
+ let path = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
5204
6304
  let payload = {};
6305
+ if (typeof name !== 'undefined') {
6306
+ payload['name'] = name;
6307
+ }
6308
+ if (typeof scopes !== 'undefined') {
6309
+ payload['scopes'] = scopes;
6310
+ }
6311
+ if (typeof expire !== 'undefined') {
6312
+ payload['expire'] = expire;
6313
+ }
5205
6314
  const uri = new URL(this.client.config.endpoint + path);
5206
- return yield this.client.call('get', uri, {
6315
+ return yield this.client.call('put', uri, {
5207
6316
  'content-type': 'application/json',
5208
6317
  }, payload);
5209
6318
  });
5210
6319
  }
5211
6320
  /**
5212
- * Create Domain
6321
+ * Delete Key
5213
6322
  *
5214
6323
  *
5215
6324
  * @param {string} projectId
5216
- * @param {string} domain
6325
+ * @param {string} keyId
5217
6326
  * @throws {AppwriteException}
5218
6327
  * @returns {Promise}
5219
- */
5220
- createDomain(projectId, domain) {
6328
+ */
6329
+ deleteKey(projectId, keyId) {
5221
6330
  return __awaiter(this, void 0, void 0, function* () {
5222
6331
  if (typeof projectId === 'undefined') {
5223
6332
  throw new AppwriteException('Missing required parameter: "projectId"');
5224
6333
  }
5225
- if (typeof domain === 'undefined') {
5226
- throw new AppwriteException('Missing required parameter: "domain"');
6334
+ if (typeof keyId === 'undefined') {
6335
+ throw new AppwriteException('Missing required parameter: "keyId"');
5227
6336
  }
5228
- let path = '/projects/{projectId}/domains'.replace('{projectId}', projectId);
6337
+ let path = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
5229
6338
  let payload = {};
5230
- if (typeof domain !== 'undefined') {
5231
- payload['domain'] = domain;
5232
- }
5233
6339
  const uri = new URL(this.client.config.endpoint + path);
5234
- return yield this.client.call('post', uri, {
6340
+ return yield this.client.call('delete', uri, {
5235
6341
  'content-type': 'application/json',
5236
6342
  }, payload);
5237
6343
  });
5238
6344
  }
5239
6345
  /**
5240
- * Get Domain
6346
+ * Update Project OAuth2
5241
6347
  *
5242
6348
  *
5243
6349
  * @param {string} projectId
5244
- * @param {string} domainId
6350
+ * @param {string} provider
6351
+ * @param {string} appId
6352
+ * @param {string} secret
6353
+ * @param {boolean} enabled
5245
6354
  * @throws {AppwriteException}
5246
6355
  * @returns {Promise}
5247
- */
5248
- getDomain(projectId, domainId) {
6356
+ */
6357
+ updateOAuth2(projectId, provider, appId, secret, enabled) {
5249
6358
  return __awaiter(this, void 0, void 0, function* () {
5250
6359
  if (typeof projectId === 'undefined') {
5251
6360
  throw new AppwriteException('Missing required parameter: "projectId"');
5252
6361
  }
5253
- if (typeof domainId === 'undefined') {
5254
- throw new AppwriteException('Missing required parameter: "domainId"');
6362
+ if (typeof provider === 'undefined') {
6363
+ throw new AppwriteException('Missing required parameter: "provider"');
5255
6364
  }
5256
- let path = '/projects/{projectId}/domains/{domainId}'.replace('{projectId}', projectId).replace('{domainId}', domainId);
6365
+ let path = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
5257
6366
  let payload = {};
6367
+ if (typeof provider !== 'undefined') {
6368
+ payload['provider'] = provider;
6369
+ }
6370
+ if (typeof appId !== 'undefined') {
6371
+ payload['appId'] = appId;
6372
+ }
6373
+ if (typeof secret !== 'undefined') {
6374
+ payload['secret'] = secret;
6375
+ }
6376
+ if (typeof enabled !== 'undefined') {
6377
+ payload['enabled'] = enabled;
6378
+ }
5258
6379
  const uri = new URL(this.client.config.endpoint + path);
5259
- return yield this.client.call('get', uri, {
6380
+ return yield this.client.call('patch', uri, {
5260
6381
  'content-type': 'application/json',
5261
6382
  }, payload);
5262
6383
  });
5263
6384
  }
5264
6385
  /**
5265
- * Delete Domain
6386
+ * List Platforms
5266
6387
  *
5267
6388
  *
5268
6389
  * @param {string} projectId
5269
- * @param {string} domainId
5270
6390
  * @throws {AppwriteException}
5271
6391
  * @returns {Promise}
5272
- */
5273
- deleteDomain(projectId, domainId) {
6392
+ */
6393
+ listPlatforms(projectId) {
5274
6394
  return __awaiter(this, void 0, void 0, function* () {
5275
6395
  if (typeof projectId === 'undefined') {
5276
6396
  throw new AppwriteException('Missing required parameter: "projectId"');
5277
6397
  }
5278
- if (typeof domainId === 'undefined') {
5279
- throw new AppwriteException('Missing required parameter: "domainId"');
5280
- }
5281
- let path = '/projects/{projectId}/domains/{domainId}'.replace('{projectId}', projectId).replace('{domainId}', domainId);
6398
+ let path = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
5282
6399
  let payload = {};
5283
6400
  const uri = new URL(this.client.config.endpoint + path);
5284
- return yield this.client.call('delete', uri, {
6401
+ return yield this.client.call('get', uri, {
5285
6402
  'content-type': 'application/json',
5286
6403
  }, payload);
5287
6404
  });
5288
6405
  }
5289
6406
  /**
5290
- * Update Domain Verification Status
6407
+ * Create Platform
5291
6408
  *
5292
6409
  *
5293
6410
  * @param {string} projectId
5294
- * @param {string} domainId
6411
+ * @param {string} type
6412
+ * @param {string} name
6413
+ * @param {string} key
6414
+ * @param {string} store
6415
+ * @param {string} hostname
5295
6416
  * @throws {AppwriteException}
5296
6417
  * @returns {Promise}
5297
- */
5298
- updateDomainVerification(projectId, domainId) {
6418
+ */
6419
+ createPlatform(projectId, type, name, key, store, hostname) {
5299
6420
  return __awaiter(this, void 0, void 0, function* () {
5300
6421
  if (typeof projectId === 'undefined') {
5301
6422
  throw new AppwriteException('Missing required parameter: "projectId"');
5302
6423
  }
5303
- if (typeof domainId === 'undefined') {
5304
- throw new AppwriteException('Missing required parameter: "domainId"');
6424
+ if (typeof type === 'undefined') {
6425
+ throw new AppwriteException('Missing required parameter: "type"');
6426
+ }
6427
+ if (typeof name === 'undefined') {
6428
+ throw new AppwriteException('Missing required parameter: "name"');
5305
6429
  }
5306
- let path = '/projects/{projectId}/domains/{domainId}/verification'.replace('{projectId}', projectId).replace('{domainId}', domainId);
6430
+ let path = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
5307
6431
  let payload = {};
6432
+ if (typeof type !== 'undefined') {
6433
+ payload['type'] = type;
6434
+ }
6435
+ if (typeof name !== 'undefined') {
6436
+ payload['name'] = name;
6437
+ }
6438
+ if (typeof key !== 'undefined') {
6439
+ payload['key'] = key;
6440
+ }
6441
+ if (typeof store !== 'undefined') {
6442
+ payload['store'] = store;
6443
+ }
6444
+ if (typeof hostname !== 'undefined') {
6445
+ payload['hostname'] = hostname;
6446
+ }
5308
6447
  const uri = new URL(this.client.config.endpoint + path);
5309
- return yield this.client.call('patch', uri, {
6448
+ return yield this.client.call('post', uri, {
5310
6449
  'content-type': 'application/json',
5311
6450
  }, payload);
5312
6451
  });
5313
6452
  }
5314
6453
  /**
5315
- * List Keys
6454
+ * Get Platform
5316
6455
  *
5317
6456
  *
5318
6457
  * @param {string} projectId
6458
+ * @param {string} platformId
5319
6459
  * @throws {AppwriteException}
5320
6460
  * @returns {Promise}
5321
- */
5322
- listKeys(projectId) {
6461
+ */
6462
+ getPlatform(projectId, platformId) {
5323
6463
  return __awaiter(this, void 0, void 0, function* () {
5324
6464
  if (typeof projectId === 'undefined') {
5325
6465
  throw new AppwriteException('Missing required parameter: "projectId"');
5326
6466
  }
5327
- let path = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
6467
+ if (typeof platformId === 'undefined') {
6468
+ throw new AppwriteException('Missing required parameter: "platformId"');
6469
+ }
6470
+ let path = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
5328
6471
  let payload = {};
5329
6472
  const uri = new URL(this.client.config.endpoint + path);
5330
6473
  return yield this.client.call('get', uri, {
@@ -5333,170 +6476,218 @@ class Projects extends Service {
5333
6476
  });
5334
6477
  }
5335
6478
  /**
5336
- * Create Key
6479
+ * Update Platform
5337
6480
  *
5338
6481
  *
5339
6482
  * @param {string} projectId
6483
+ * @param {string} platformId
5340
6484
  * @param {string} name
5341
- * @param {string[]} scopes
5342
- * @param {string} expire
6485
+ * @param {string} key
6486
+ * @param {string} store
6487
+ * @param {string} hostname
5343
6488
  * @throws {AppwriteException}
5344
6489
  * @returns {Promise}
5345
- */
5346
- createKey(projectId, name, scopes, expire) {
6490
+ */
6491
+ updatePlatform(projectId, platformId, name, key, store, hostname) {
5347
6492
  return __awaiter(this, void 0, void 0, function* () {
5348
6493
  if (typeof projectId === 'undefined') {
5349
6494
  throw new AppwriteException('Missing required parameter: "projectId"');
5350
6495
  }
6496
+ if (typeof platformId === 'undefined') {
6497
+ throw new AppwriteException('Missing required parameter: "platformId"');
6498
+ }
5351
6499
  if (typeof name === 'undefined') {
5352
6500
  throw new AppwriteException('Missing required parameter: "name"');
5353
6501
  }
5354
- if (typeof scopes === 'undefined') {
5355
- throw new AppwriteException('Missing required parameter: "scopes"');
5356
- }
5357
- let path = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
6502
+ let path = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
5358
6503
  let payload = {};
5359
6504
  if (typeof name !== 'undefined') {
5360
6505
  payload['name'] = name;
5361
6506
  }
5362
- if (typeof scopes !== 'undefined') {
5363
- payload['scopes'] = scopes;
6507
+ if (typeof key !== 'undefined') {
6508
+ payload['key'] = key;
5364
6509
  }
5365
- if (typeof expire !== 'undefined') {
5366
- payload['expire'] = expire;
6510
+ if (typeof store !== 'undefined') {
6511
+ payload['store'] = store;
6512
+ }
6513
+ if (typeof hostname !== 'undefined') {
6514
+ payload['hostname'] = hostname;
5367
6515
  }
5368
6516
  const uri = new URL(this.client.config.endpoint + path);
5369
- return yield this.client.call('post', uri, {
6517
+ return yield this.client.call('put', uri, {
5370
6518
  'content-type': 'application/json',
5371
6519
  }, payload);
5372
6520
  });
5373
6521
  }
5374
6522
  /**
5375
- * Get Key
6523
+ * Delete Platform
5376
6524
  *
5377
6525
  *
5378
6526
  * @param {string} projectId
5379
- * @param {string} keyId
6527
+ * @param {string} platformId
5380
6528
  * @throws {AppwriteException}
5381
6529
  * @returns {Promise}
5382
- */
5383
- getKey(projectId, keyId) {
6530
+ */
6531
+ deletePlatform(projectId, platformId) {
5384
6532
  return __awaiter(this, void 0, void 0, function* () {
5385
6533
  if (typeof projectId === 'undefined') {
5386
6534
  throw new AppwriteException('Missing required parameter: "projectId"');
5387
6535
  }
5388
- if (typeof keyId === 'undefined') {
5389
- throw new AppwriteException('Missing required parameter: "keyId"');
6536
+ if (typeof platformId === 'undefined') {
6537
+ throw new AppwriteException('Missing required parameter: "platformId"');
5390
6538
  }
5391
- let path = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
6539
+ let path = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
5392
6540
  let payload = {};
5393
6541
  const uri = new URL(this.client.config.endpoint + path);
5394
- return yield this.client.call('get', uri, {
6542
+ return yield this.client.call('delete', uri, {
5395
6543
  'content-type': 'application/json',
5396
6544
  }, payload);
5397
6545
  });
5398
6546
  }
5399
6547
  /**
5400
- * Update Key
6548
+ * Update service status
5401
6549
  *
5402
6550
  *
5403
6551
  * @param {string} projectId
5404
- * @param {string} keyId
5405
- * @param {string} name
5406
- * @param {string[]} scopes
5407
- * @param {string} expire
6552
+ * @param {string} service
6553
+ * @param {boolean} status
5408
6554
  * @throws {AppwriteException}
5409
6555
  * @returns {Promise}
5410
- */
5411
- updateKey(projectId, keyId, name, scopes, expire) {
6556
+ */
6557
+ updateServiceStatus(projectId, service, status) {
5412
6558
  return __awaiter(this, void 0, void 0, function* () {
5413
6559
  if (typeof projectId === 'undefined') {
5414
6560
  throw new AppwriteException('Missing required parameter: "projectId"');
5415
6561
  }
5416
- if (typeof keyId === 'undefined') {
5417
- throw new AppwriteException('Missing required parameter: "keyId"');
5418
- }
5419
- if (typeof name === 'undefined') {
5420
- throw new AppwriteException('Missing required parameter: "name"');
6562
+ if (typeof service === 'undefined') {
6563
+ throw new AppwriteException('Missing required parameter: "service"');
5421
6564
  }
5422
- if (typeof scopes === 'undefined') {
5423
- throw new AppwriteException('Missing required parameter: "scopes"');
6565
+ if (typeof status === 'undefined') {
6566
+ throw new AppwriteException('Missing required parameter: "status"');
5424
6567
  }
5425
- let path = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
6568
+ let path = '/projects/{projectId}/service'.replace('{projectId}', projectId);
5426
6569
  let payload = {};
5427
- if (typeof name !== 'undefined') {
5428
- payload['name'] = name;
5429
- }
5430
- if (typeof scopes !== 'undefined') {
5431
- payload['scopes'] = scopes;
6570
+ if (typeof service !== 'undefined') {
6571
+ payload['service'] = service;
5432
6572
  }
5433
- if (typeof expire !== 'undefined') {
5434
- payload['expire'] = expire;
6573
+ if (typeof status !== 'undefined') {
6574
+ payload['status'] = status;
5435
6575
  }
5436
6576
  const uri = new URL(this.client.config.endpoint + path);
5437
- return yield this.client.call('put', uri, {
6577
+ return yield this.client.call('patch', uri, {
5438
6578
  'content-type': 'application/json',
5439
6579
  }, payload);
5440
6580
  });
5441
6581
  }
5442
6582
  /**
5443
- * Delete Key
6583
+ * Update all service status
5444
6584
  *
5445
6585
  *
5446
6586
  * @param {string} projectId
5447
- * @param {string} keyId
6587
+ * @param {boolean} status
5448
6588
  * @throws {AppwriteException}
5449
6589
  * @returns {Promise}
5450
- */
5451
- deleteKey(projectId, keyId) {
6590
+ */
6591
+ updateServiceStatusAll(projectId, status) {
5452
6592
  return __awaiter(this, void 0, void 0, function* () {
5453
6593
  if (typeof projectId === 'undefined') {
5454
6594
  throw new AppwriteException('Missing required parameter: "projectId"');
5455
6595
  }
5456
- if (typeof keyId === 'undefined') {
5457
- throw new AppwriteException('Missing required parameter: "keyId"');
6596
+ if (typeof status === 'undefined') {
6597
+ throw new AppwriteException('Missing required parameter: "status"');
5458
6598
  }
5459
- let path = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
6599
+ let path = '/projects/{projectId}/service/all'.replace('{projectId}', projectId);
5460
6600
  let payload = {};
6601
+ if (typeof status !== 'undefined') {
6602
+ payload['status'] = status;
6603
+ }
5461
6604
  const uri = new URL(this.client.config.endpoint + path);
5462
- return yield this.client.call('delete', uri, {
6605
+ return yield this.client.call('patch', uri, {
5463
6606
  'content-type': 'application/json',
5464
6607
  }, payload);
5465
6608
  });
5466
6609
  }
5467
6610
  /**
5468
- * Update Project OAuth2
6611
+ * Update SMTP configuration
5469
6612
  *
5470
6613
  *
5471
6614
  * @param {string} projectId
5472
- * @param {string} provider
5473
- * @param {string} appId
5474
- * @param {string} secret
5475
6615
  * @param {boolean} enabled
6616
+ * @param {string} senderName
6617
+ * @param {string} senderEmail
6618
+ * @param {string} replyTo
6619
+ * @param {string} host
6620
+ * @param {number} port
6621
+ * @param {string} username
6622
+ * @param {string} password
6623
+ * @param {string} secure
5476
6624
  * @throws {AppwriteException}
5477
6625
  * @returns {Promise}
5478
- */
5479
- updateOAuth2(projectId, provider, appId, secret, enabled) {
6626
+ */
6627
+ updateSmtpConfiguration(projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure) {
5480
6628
  return __awaiter(this, void 0, void 0, function* () {
5481
6629
  if (typeof projectId === 'undefined') {
5482
6630
  throw new AppwriteException('Missing required parameter: "projectId"');
5483
6631
  }
5484
- if (typeof provider === 'undefined') {
5485
- throw new AppwriteException('Missing required parameter: "provider"');
6632
+ if (typeof enabled === 'undefined') {
6633
+ throw new AppwriteException('Missing required parameter: "enabled"');
5486
6634
  }
5487
- let path = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
6635
+ let path = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
5488
6636
  let payload = {};
5489
- if (typeof provider !== 'undefined') {
5490
- payload['provider'] = provider;
6637
+ if (typeof enabled !== 'undefined') {
6638
+ payload['enabled'] = enabled;
5491
6639
  }
5492
- if (typeof appId !== 'undefined') {
5493
- payload['appId'] = appId;
6640
+ if (typeof senderName !== 'undefined') {
6641
+ payload['senderName'] = senderName;
6642
+ }
6643
+ if (typeof senderEmail !== 'undefined') {
6644
+ payload['senderEmail'] = senderEmail;
6645
+ }
6646
+ if (typeof replyTo !== 'undefined') {
6647
+ payload['replyTo'] = replyTo;
6648
+ }
6649
+ if (typeof host !== 'undefined') {
6650
+ payload['host'] = host;
6651
+ }
6652
+ if (typeof port !== 'undefined') {
6653
+ payload['port'] = port;
6654
+ }
6655
+ if (typeof username !== 'undefined') {
6656
+ payload['username'] = username;
6657
+ }
6658
+ if (typeof password !== 'undefined') {
6659
+ payload['password'] = password;
6660
+ }
6661
+ if (typeof secure !== 'undefined') {
6662
+ payload['secure'] = secure;
6663
+ }
6664
+ const uri = new URL(this.client.config.endpoint + path);
6665
+ return yield this.client.call('patch', uri, {
6666
+ 'content-type': 'application/json',
6667
+ }, payload);
6668
+ });
6669
+ }
6670
+ /**
6671
+ * Update Project Team
6672
+ *
6673
+ *
6674
+ * @param {string} projectId
6675
+ * @param {string} teamId
6676
+ * @throws {AppwriteException}
6677
+ * @returns {Promise}
6678
+ */
6679
+ updateTeam(projectId, teamId) {
6680
+ return __awaiter(this, void 0, void 0, function* () {
6681
+ if (typeof projectId === 'undefined') {
6682
+ throw new AppwriteException('Missing required parameter: "projectId"');
5494
6683
  }
5495
- if (typeof secret !== 'undefined') {
5496
- payload['secret'] = secret;
6684
+ if (typeof teamId === 'undefined') {
6685
+ throw new AppwriteException('Missing required parameter: "teamId"');
5497
6686
  }
5498
- if (typeof enabled !== 'undefined') {
5499
- payload['enabled'] = enabled;
6687
+ let path = '/projects/{projectId}/team'.replace('{projectId}', projectId);
6688
+ let payload = {};
6689
+ if (typeof teamId !== 'undefined') {
6690
+ payload['teamId'] = teamId;
5500
6691
  }
5501
6692
  const uri = new URL(this.client.config.endpoint + path);
5502
6693
  return yield this.client.call('patch', uri, {
@@ -5505,19 +6696,27 @@ class Projects extends Service {
5505
6696
  });
5506
6697
  }
5507
6698
  /**
5508
- * List Platforms
6699
+ * Get custom email template
5509
6700
  *
5510
6701
  *
5511
6702
  * @param {string} projectId
6703
+ * @param {string} type
6704
+ * @param {string} locale
5512
6705
  * @throws {AppwriteException}
5513
6706
  * @returns {Promise}
5514
- */
5515
- listPlatforms(projectId) {
6707
+ */
6708
+ getEmailTemplate(projectId, type, locale) {
5516
6709
  return __awaiter(this, void 0, void 0, function* () {
5517
6710
  if (typeof projectId === 'undefined') {
5518
6711
  throw new AppwriteException('Missing required parameter: "projectId"');
5519
6712
  }
5520
- let path = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
6713
+ if (typeof type === 'undefined') {
6714
+ throw new AppwriteException('Missing required parameter: "type"');
6715
+ }
6716
+ if (typeof locale === 'undefined') {
6717
+ throw new AppwriteException('Missing required parameter: "locale"');
6718
+ }
6719
+ let path = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
5521
6720
  let payload = {};
5522
6721
  const uri = new URL(this.client.config.endpoint + path);
5523
6722
  return yield this.client.call('get', uri, {
@@ -5526,19 +6725,21 @@ class Projects extends Service {
5526
6725
  });
5527
6726
  }
5528
6727
  /**
5529
- * Create Platform
6728
+ * Update custom email templates
5530
6729
  *
5531
6730
  *
5532
6731
  * @param {string} projectId
5533
6732
  * @param {string} type
5534
- * @param {string} name
5535
- * @param {string} key
5536
- * @param {string} store
5537
- * @param {string} hostname
6733
+ * @param {string} locale
6734
+ * @param {string} subject
6735
+ * @param {string} message
6736
+ * @param {string} senderName
6737
+ * @param {string} senderEmail
6738
+ * @param {string} replyTo
5538
6739
  * @throws {AppwriteException}
5539
6740
  * @returns {Promise}
5540
- */
5541
- createPlatform(projectId, type, name, key, store, hostname) {
6741
+ */
6742
+ updateEmailTemplate(projectId, type, locale, subject, message, senderName, senderEmail, replyTo) {
5542
6743
  return __awaiter(this, void 0, void 0, function* () {
5543
6744
  if (typeof projectId === 'undefined') {
5544
6745
  throw new AppwriteException('Missing required parameter: "projectId"');
@@ -5546,119 +6747,154 @@ class Projects extends Service {
5546
6747
  if (typeof type === 'undefined') {
5547
6748
  throw new AppwriteException('Missing required parameter: "type"');
5548
6749
  }
5549
- if (typeof name === 'undefined') {
5550
- throw new AppwriteException('Missing required parameter: "name"');
6750
+ if (typeof locale === 'undefined') {
6751
+ throw new AppwriteException('Missing required parameter: "locale"');
5551
6752
  }
5552
- let path = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
6753
+ if (typeof subject === 'undefined') {
6754
+ throw new AppwriteException('Missing required parameter: "subject"');
6755
+ }
6756
+ if (typeof message === 'undefined') {
6757
+ throw new AppwriteException('Missing required parameter: "message"');
6758
+ }
6759
+ let path = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
5553
6760
  let payload = {};
5554
- if (typeof type !== 'undefined') {
5555
- payload['type'] = type;
6761
+ if (typeof subject !== 'undefined') {
6762
+ payload['subject'] = subject;
5556
6763
  }
5557
- if (typeof name !== 'undefined') {
5558
- payload['name'] = name;
6764
+ if (typeof message !== 'undefined') {
6765
+ payload['message'] = message;
5559
6766
  }
5560
- if (typeof key !== 'undefined') {
5561
- payload['key'] = key;
6767
+ if (typeof senderName !== 'undefined') {
6768
+ payload['senderName'] = senderName;
5562
6769
  }
5563
- if (typeof store !== 'undefined') {
5564
- payload['store'] = store;
6770
+ if (typeof senderEmail !== 'undefined') {
6771
+ payload['senderEmail'] = senderEmail;
5565
6772
  }
5566
- if (typeof hostname !== 'undefined') {
5567
- payload['hostname'] = hostname;
6773
+ if (typeof replyTo !== 'undefined') {
6774
+ payload['replyTo'] = replyTo;
5568
6775
  }
5569
6776
  const uri = new URL(this.client.config.endpoint + path);
5570
- return yield this.client.call('post', uri, {
6777
+ return yield this.client.call('patch', uri, {
5571
6778
  'content-type': 'application/json',
5572
6779
  }, payload);
5573
6780
  });
5574
6781
  }
5575
6782
  /**
5576
- * Get Platform
6783
+ * Reset custom email template
5577
6784
  *
5578
6785
  *
5579
6786
  * @param {string} projectId
5580
- * @param {string} platformId
6787
+ * @param {string} type
6788
+ * @param {string} locale
5581
6789
  * @throws {AppwriteException}
5582
6790
  * @returns {Promise}
5583
- */
5584
- getPlatform(projectId, platformId) {
6791
+ */
6792
+ deleteEmailTemplate(projectId, type, locale) {
5585
6793
  return __awaiter(this, void 0, void 0, function* () {
5586
6794
  if (typeof projectId === 'undefined') {
5587
6795
  throw new AppwriteException('Missing required parameter: "projectId"');
5588
6796
  }
5589
- if (typeof platformId === 'undefined') {
5590
- throw new AppwriteException('Missing required parameter: "platformId"');
6797
+ if (typeof type === 'undefined') {
6798
+ throw new AppwriteException('Missing required parameter: "type"');
5591
6799
  }
5592
- let path = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
6800
+ if (typeof locale === 'undefined') {
6801
+ throw new AppwriteException('Missing required parameter: "locale"');
6802
+ }
6803
+ let path = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
5593
6804
  let payload = {};
5594
6805
  const uri = new URL(this.client.config.endpoint + path);
5595
- return yield this.client.call('get', uri, {
6806
+ return yield this.client.call('delete', uri, {
5596
6807
  'content-type': 'application/json',
5597
6808
  }, payload);
5598
6809
  });
5599
6810
  }
5600
6811
  /**
5601
- * Update Platform
6812
+ * Get custom SMS template
5602
6813
  *
5603
6814
  *
5604
6815
  * @param {string} projectId
5605
- * @param {string} platformId
5606
- * @param {string} name
5607
- * @param {string} key
5608
- * @param {string} store
5609
- * @param {string} hostname
6816
+ * @param {string} type
6817
+ * @param {string} locale
5610
6818
  * @throws {AppwriteException}
5611
6819
  * @returns {Promise}
5612
- */
5613
- updatePlatform(projectId, platformId, name, key, store, hostname) {
6820
+ */
6821
+ getSmsTemplate(projectId, type, locale) {
5614
6822
  return __awaiter(this, void 0, void 0, function* () {
5615
6823
  if (typeof projectId === 'undefined') {
5616
6824
  throw new AppwriteException('Missing required parameter: "projectId"');
5617
6825
  }
5618
- if (typeof platformId === 'undefined') {
5619
- throw new AppwriteException('Missing required parameter: "platformId"');
6826
+ if (typeof type === 'undefined') {
6827
+ throw new AppwriteException('Missing required parameter: "type"');
5620
6828
  }
5621
- if (typeof name === 'undefined') {
5622
- throw new AppwriteException('Missing required parameter: "name"');
6829
+ if (typeof locale === 'undefined') {
6830
+ throw new AppwriteException('Missing required parameter: "locale"');
5623
6831
  }
5624
- let path = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
6832
+ let path = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
5625
6833
  let payload = {};
5626
- if (typeof name !== 'undefined') {
5627
- payload['name'] = name;
6834
+ const uri = new URL(this.client.config.endpoint + path);
6835
+ return yield this.client.call('get', uri, {
6836
+ 'content-type': 'application/json',
6837
+ }, payload);
6838
+ });
6839
+ }
6840
+ /**
6841
+ * Update custom SMS template
6842
+ *
6843
+ *
6844
+ * @param {string} projectId
6845
+ * @param {string} type
6846
+ * @param {string} locale
6847
+ * @param {string} message
6848
+ * @throws {AppwriteException}
6849
+ * @returns {Promise}
6850
+ */
6851
+ updateSmsTemplate(projectId, type, locale, message) {
6852
+ return __awaiter(this, void 0, void 0, function* () {
6853
+ if (typeof projectId === 'undefined') {
6854
+ throw new AppwriteException('Missing required parameter: "projectId"');
5628
6855
  }
5629
- if (typeof key !== 'undefined') {
5630
- payload['key'] = key;
6856
+ if (typeof type === 'undefined') {
6857
+ throw new AppwriteException('Missing required parameter: "type"');
5631
6858
  }
5632
- if (typeof store !== 'undefined') {
5633
- payload['store'] = store;
6859
+ if (typeof locale === 'undefined') {
6860
+ throw new AppwriteException('Missing required parameter: "locale"');
5634
6861
  }
5635
- if (typeof hostname !== 'undefined') {
5636
- payload['hostname'] = hostname;
6862
+ if (typeof message === 'undefined') {
6863
+ throw new AppwriteException('Missing required parameter: "message"');
6864
+ }
6865
+ let path = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
6866
+ let payload = {};
6867
+ if (typeof message !== 'undefined') {
6868
+ payload['message'] = message;
5637
6869
  }
5638
6870
  const uri = new URL(this.client.config.endpoint + path);
5639
- return yield this.client.call('put', uri, {
6871
+ return yield this.client.call('patch', uri, {
5640
6872
  'content-type': 'application/json',
5641
6873
  }, payload);
5642
6874
  });
5643
6875
  }
5644
6876
  /**
5645
- * Delete Platform
6877
+ * Reset custom SMS template
5646
6878
  *
5647
6879
  *
5648
6880
  * @param {string} projectId
5649
- * @param {string} platformId
6881
+ * @param {string} type
6882
+ * @param {string} locale
5650
6883
  * @throws {AppwriteException}
5651
6884
  * @returns {Promise}
5652
- */
5653
- deletePlatform(projectId, platformId) {
6885
+ */
6886
+ deleteSmsTemplate(projectId, type, locale) {
5654
6887
  return __awaiter(this, void 0, void 0, function* () {
5655
6888
  if (typeof projectId === 'undefined') {
5656
6889
  throw new AppwriteException('Missing required parameter: "projectId"');
5657
6890
  }
5658
- if (typeof platformId === 'undefined') {
5659
- throw new AppwriteException('Missing required parameter: "platformId"');
6891
+ if (typeof type === 'undefined') {
6892
+ throw new AppwriteException('Missing required parameter: "type"');
5660
6893
  }
5661
- let path = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
6894
+ if (typeof locale === 'undefined') {
6895
+ throw new AppwriteException('Missing required parameter: "locale"');
6896
+ }
6897
+ let path = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
5662
6898
  let payload = {};
5663
6899
  const uri = new URL(this.client.config.endpoint + path);
5664
6900
  return yield this.client.call('delete', uri, {
@@ -5667,36 +6903,26 @@ class Projects extends Service {
5667
6903
  });
5668
6904
  }
5669
6905
  /**
5670
- * Update service status
6906
+ * Get usage stats for a project
5671
6907
  *
5672
6908
  *
5673
6909
  * @param {string} projectId
5674
- * @param {string} service
5675
- * @param {boolean} status
6910
+ * @param {string} range
5676
6911
  * @throws {AppwriteException}
5677
6912
  * @returns {Promise}
5678
- */
5679
- updateServiceStatus(projectId, service, status) {
6913
+ */
6914
+ getUsage(projectId, range) {
5680
6915
  return __awaiter(this, void 0, void 0, function* () {
5681
6916
  if (typeof projectId === 'undefined') {
5682
6917
  throw new AppwriteException('Missing required parameter: "projectId"');
5683
6918
  }
5684
- if (typeof service === 'undefined') {
5685
- throw new AppwriteException('Missing required parameter: "service"');
5686
- }
5687
- if (typeof status === 'undefined') {
5688
- throw new AppwriteException('Missing required parameter: "status"');
5689
- }
5690
- let path = '/projects/{projectId}/service'.replace('{projectId}', projectId);
6919
+ let path = '/projects/{projectId}/usage'.replace('{projectId}', projectId);
5691
6920
  let payload = {};
5692
- if (typeof service !== 'undefined') {
5693
- payload['service'] = service;
5694
- }
5695
- if (typeof status !== 'undefined') {
5696
- payload['status'] = status;
6921
+ if (typeof range !== 'undefined') {
6922
+ payload['range'] = range;
5697
6923
  }
5698
6924
  const uri = new URL(this.client.config.endpoint + path);
5699
- return yield this.client.call('patch', uri, {
6925
+ return yield this.client.call('get', uri, {
5700
6926
  'content-type': 'application/json',
5701
6927
  }, payload);
5702
6928
  });
@@ -5708,7 +6934,7 @@ class Projects extends Service {
5708
6934
  * @param {string} projectId
5709
6935
  * @throws {AppwriteException}
5710
6936
  * @returns {Promise}
5711
- */
6937
+ */
5712
6938
  listWebhooks(projectId) {
5713
6939
  return __awaiter(this, void 0, void 0, function* () {
5714
6940
  if (typeof projectId === 'undefined') {
@@ -5735,7 +6961,7 @@ class Projects extends Service {
5735
6961
  * @param {string} httpPass
5736
6962
  * @throws {AppwriteException}
5737
6963
  * @returns {Promise}
5738
- */
6964
+ */
5739
6965
  createWebhook(projectId, name, events, url, security, httpUser, httpPass) {
5740
6966
  return __awaiter(this, void 0, void 0, function* () {
5741
6967
  if (typeof projectId === 'undefined') {
@@ -5787,7 +7013,7 @@ class Projects extends Service {
5787
7013
  * @param {string} webhookId
5788
7014
  * @throws {AppwriteException}
5789
7015
  * @returns {Promise}
5790
- */
7016
+ */
5791
7017
  getWebhook(projectId, webhookId) {
5792
7018
  return __awaiter(this, void 0, void 0, function* () {
5793
7019
  if (typeof projectId === 'undefined') {
@@ -5818,7 +7044,7 @@ class Projects extends Service {
5818
7044
  * @param {string} httpPass
5819
7045
  * @throws {AppwriteException}
5820
7046
  * @returns {Promise}
5821
- */
7047
+ */
5822
7048
  updateWebhook(projectId, webhookId, name, events, url, security, httpUser, httpPass) {
5823
7049
  return __awaiter(this, void 0, void 0, function* () {
5824
7050
  if (typeof projectId === 'undefined') {
@@ -5873,7 +7099,7 @@ class Projects extends Service {
5873
7099
  * @param {string} webhookId
5874
7100
  * @throws {AppwriteException}
5875
7101
  * @returns {Promise}
5876
- */
7102
+ */
5877
7103
  deleteWebhook(projectId, webhookId) {
5878
7104
  return __awaiter(this, void 0, void 0, function* () {
5879
7105
  if (typeof projectId === 'undefined') {
@@ -5898,7 +7124,7 @@ class Projects extends Service {
5898
7124
  * @param {string} webhookId
5899
7125
  * @throws {AppwriteException}
5900
7126
  * @returns {Promise}
5901
- */
7127
+ */
5902
7128
  updateWebhookSignature(projectId, webhookId) {
5903
7129
  return __awaiter(this, void 0, void 0, function* () {
5904
7130
  if (typeof projectId === 'undefined') {
@@ -5917,6 +7143,140 @@ class Projects extends Service {
5917
7143
  }
5918
7144
  }
5919
7145
 
7146
+ class Proxy extends Service {
7147
+ constructor(client) {
7148
+ super(client);
7149
+ }
7150
+ /**
7151
+ * List Rules
7152
+ *
7153
+ * Get a list of all the proxy rules. You can use the query params to filter
7154
+ * your results.
7155
+ *
7156
+ * @param {string[]} queries
7157
+ * @param {string} search
7158
+ * @throws {AppwriteException}
7159
+ * @returns {Promise}
7160
+ */
7161
+ listRules(queries, search) {
7162
+ return __awaiter(this, void 0, void 0, function* () {
7163
+ let path = '/proxy/rules';
7164
+ let payload = {};
7165
+ if (typeof queries !== 'undefined') {
7166
+ payload['queries'] = queries;
7167
+ }
7168
+ if (typeof search !== 'undefined') {
7169
+ payload['search'] = search;
7170
+ }
7171
+ const uri = new URL(this.client.config.endpoint + path);
7172
+ return yield this.client.call('get', uri, {
7173
+ 'content-type': 'application/json',
7174
+ }, payload);
7175
+ });
7176
+ }
7177
+ /**
7178
+ * Create Rule
7179
+ *
7180
+ * Create a new proxy rule.
7181
+ *
7182
+ * @param {string} domain
7183
+ * @param {string} resourceType
7184
+ * @param {string} resourceId
7185
+ * @throws {AppwriteException}
7186
+ * @returns {Promise}
7187
+ */
7188
+ createRule(domain, resourceType, resourceId) {
7189
+ return __awaiter(this, void 0, void 0, function* () {
7190
+ if (typeof domain === 'undefined') {
7191
+ throw new AppwriteException('Missing required parameter: "domain"');
7192
+ }
7193
+ if (typeof resourceType === 'undefined') {
7194
+ throw new AppwriteException('Missing required parameter: "resourceType"');
7195
+ }
7196
+ let path = '/proxy/rules';
7197
+ let payload = {};
7198
+ if (typeof domain !== 'undefined') {
7199
+ payload['domain'] = domain;
7200
+ }
7201
+ if (typeof resourceType !== 'undefined') {
7202
+ payload['resourceType'] = resourceType;
7203
+ }
7204
+ if (typeof resourceId !== 'undefined') {
7205
+ payload['resourceId'] = resourceId;
7206
+ }
7207
+ const uri = new URL(this.client.config.endpoint + path);
7208
+ return yield this.client.call('post', uri, {
7209
+ 'content-type': 'application/json',
7210
+ }, payload);
7211
+ });
7212
+ }
7213
+ /**
7214
+ * Get Rule
7215
+ *
7216
+ * Get a proxy rule by its unique ID.
7217
+ *
7218
+ * @param {string} ruleId
7219
+ * @throws {AppwriteException}
7220
+ * @returns {Promise}
7221
+ */
7222
+ getRule(ruleId) {
7223
+ return __awaiter(this, void 0, void 0, function* () {
7224
+ if (typeof ruleId === 'undefined') {
7225
+ throw new AppwriteException('Missing required parameter: "ruleId"');
7226
+ }
7227
+ let path = '/proxy/rules/{ruleId}'.replace('{ruleId}', ruleId);
7228
+ let payload = {};
7229
+ const uri = new URL(this.client.config.endpoint + path);
7230
+ return yield this.client.call('get', uri, {
7231
+ 'content-type': 'application/json',
7232
+ }, payload);
7233
+ });
7234
+ }
7235
+ /**
7236
+ * Delete Rule
7237
+ *
7238
+ * Delete a proxy rule by its unique ID.
7239
+ *
7240
+ * @param {string} ruleId
7241
+ * @throws {AppwriteException}
7242
+ * @returns {Promise}
7243
+ */
7244
+ deleteRule(ruleId) {
7245
+ return __awaiter(this, void 0, void 0, function* () {
7246
+ if (typeof ruleId === 'undefined') {
7247
+ throw new AppwriteException('Missing required parameter: "ruleId"');
7248
+ }
7249
+ let path = '/proxy/rules/{ruleId}'.replace('{ruleId}', ruleId);
7250
+ let payload = {};
7251
+ const uri = new URL(this.client.config.endpoint + path);
7252
+ return yield this.client.call('delete', uri, {
7253
+ 'content-type': 'application/json',
7254
+ }, payload);
7255
+ });
7256
+ }
7257
+ /**
7258
+ * Update Rule Verification Status
7259
+ *
7260
+ *
7261
+ * @param {string} ruleId
7262
+ * @throws {AppwriteException}
7263
+ * @returns {Promise}
7264
+ */
7265
+ updateRuleVerification(ruleId) {
7266
+ return __awaiter(this, void 0, void 0, function* () {
7267
+ if (typeof ruleId === 'undefined') {
7268
+ throw new AppwriteException('Missing required parameter: "ruleId"');
7269
+ }
7270
+ let path = '/proxy/rules/{ruleId}/verification'.replace('{ruleId}', ruleId);
7271
+ let payload = {};
7272
+ const uri = new URL(this.client.config.endpoint + path);
7273
+ return yield this.client.call('patch', uri, {
7274
+ 'content-type': 'application/json',
7275
+ }, payload);
7276
+ });
7277
+ }
7278
+ }
7279
+
5920
7280
  class Storage extends Service {
5921
7281
  constructor(client) {
5922
7282
  super(client);
@@ -5931,7 +7291,7 @@ class Storage extends Service {
5931
7291
  * @param {string} search
5932
7292
  * @throws {AppwriteException}
5933
7293
  * @returns {Promise}
5934
- */
7294
+ */
5935
7295
  listBuckets(queries, search) {
5936
7296
  return __awaiter(this, void 0, void 0, function* () {
5937
7297
  let path = '/storage/buckets';
@@ -5965,7 +7325,7 @@ class Storage extends Service {
5965
7325
  * @param {boolean} antivirus
5966
7326
  * @throws {AppwriteException}
5967
7327
  * @returns {Promise}
5968
- */
7328
+ */
5969
7329
  createBucket(bucketId, name, permissions, fileSecurity, enabled, maximumFileSize, allowedFileExtensions, compression, encryption, antivirus) {
5970
7330
  return __awaiter(this, void 0, void 0, function* () {
5971
7331
  if (typeof bucketId === 'undefined') {
@@ -6021,7 +7381,7 @@ class Storage extends Service {
6021
7381
  * @param {string} bucketId
6022
7382
  * @throws {AppwriteException}
6023
7383
  * @returns {Promise}
6024
- */
7384
+ */
6025
7385
  getBucket(bucketId) {
6026
7386
  return __awaiter(this, void 0, void 0, function* () {
6027
7387
  if (typeof bucketId === 'undefined') {
@@ -6052,7 +7412,7 @@ class Storage extends Service {
6052
7412
  * @param {boolean} antivirus
6053
7413
  * @throws {AppwriteException}
6054
7414
  * @returns {Promise}
6055
- */
7415
+ */
6056
7416
  updateBucket(bucketId, name, permissions, fileSecurity, enabled, maximumFileSize, allowedFileExtensions, compression, encryption, antivirus) {
6057
7417
  return __awaiter(this, void 0, void 0, function* () {
6058
7418
  if (typeof bucketId === 'undefined') {
@@ -6104,7 +7464,7 @@ class Storage extends Service {
6104
7464
  * @param {string} bucketId
6105
7465
  * @throws {AppwriteException}
6106
7466
  * @returns {Promise}
6107
- */
7467
+ */
6108
7468
  deleteBucket(bucketId) {
6109
7469
  return __awaiter(this, void 0, void 0, function* () {
6110
7470
  if (typeof bucketId === 'undefined') {
@@ -6129,7 +7489,7 @@ class Storage extends Service {
6129
7489
  * @param {string} search
6130
7490
  * @throws {AppwriteException}
6131
7491
  * @returns {Promise}
6132
- */
7492
+ */
6133
7493
  listFiles(bucketId, queries, search) {
6134
7494
  return __awaiter(this, void 0, void 0, function* () {
6135
7495
  if (typeof bucketId === 'undefined') {
@@ -6177,7 +7537,7 @@ class Storage extends Service {
6177
7537
  * @param {string[]} permissions
6178
7538
  * @throws {AppwriteException}
6179
7539
  * @returns {Promise}
6180
- */
7540
+ */
6181
7541
  createFile(bucketId, fileId, file, permissions, onProgress = (progress) => { }) {
6182
7542
  return __awaiter(this, void 0, void 0, function* () {
6183
7543
  if (typeof bucketId === 'undefined') {
@@ -6261,7 +7621,7 @@ class Storage extends Service {
6261
7621
  * @param {string} fileId
6262
7622
  * @throws {AppwriteException}
6263
7623
  * @returns {Promise}
6264
- */
7624
+ */
6265
7625
  getFile(bucketId, fileId) {
6266
7626
  return __awaiter(this, void 0, void 0, function* () {
6267
7627
  if (typeof bucketId === 'undefined') {
@@ -6286,11 +7646,12 @@ class Storage extends Service {
6286
7646
  *
6287
7647
  * @param {string} bucketId
6288
7648
  * @param {string} fileId
7649
+ * @param {string} name
6289
7650
  * @param {string[]} permissions
6290
7651
  * @throws {AppwriteException}
6291
7652
  * @returns {Promise}
6292
- */
6293
- updateFile(bucketId, fileId, permissions) {
7653
+ */
7654
+ updateFile(bucketId, fileId, name, permissions) {
6294
7655
  return __awaiter(this, void 0, void 0, function* () {
6295
7656
  if (typeof bucketId === 'undefined') {
6296
7657
  throw new AppwriteException('Missing required parameter: "bucketId"');
@@ -6300,6 +7661,9 @@ class Storage extends Service {
6300
7661
  }
6301
7662
  let path = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);
6302
7663
  let payload = {};
7664
+ if (typeof name !== 'undefined') {
7665
+ payload['name'] = name;
7666
+ }
6303
7667
  if (typeof permissions !== 'undefined') {
6304
7668
  payload['permissions'] = permissions;
6305
7669
  }
@@ -6319,7 +7683,7 @@ class Storage extends Service {
6319
7683
  * @param {string} fileId
6320
7684
  * @throws {AppwriteException}
6321
7685
  * @returns {Promise}
6322
- */
7686
+ */
6323
7687
  deleteFile(bucketId, fileId) {
6324
7688
  return __awaiter(this, void 0, void 0, function* () {
6325
7689
  if (typeof bucketId === 'undefined') {
@@ -6347,7 +7711,7 @@ class Storage extends Service {
6347
7711
  * @param {string} fileId
6348
7712
  * @throws {AppwriteException}
6349
7713
  * @returns {URL}
6350
- */
7714
+ */
6351
7715
  getFileDownload(bucketId, fileId) {
6352
7716
  if (typeof bucketId === 'undefined') {
6353
7717
  throw new AppwriteException('Missing required parameter: "bucketId"');
@@ -6388,7 +7752,7 @@ class Storage extends Service {
6388
7752
  * @param {string} output
6389
7753
  * @throws {AppwriteException}
6390
7754
  * @returns {URL}
6391
- */
7755
+ */
6392
7756
  getFilePreview(bucketId, fileId, width, height, gravity, quality, borderWidth, borderColor, borderRadius, opacity, rotation, background, output) {
6393
7757
  if (typeof bucketId === 'undefined') {
6394
7758
  throw new AppwriteException('Missing required parameter: "bucketId"');
@@ -6449,7 +7813,7 @@ class Storage extends Service {
6449
7813
  * @param {string} fileId
6450
7814
  * @throws {AppwriteException}
6451
7815
  * @returns {URL}
6452
- */
7816
+ */
6453
7817
  getFileView(bucketId, fileId) {
6454
7818
  if (typeof bucketId === 'undefined') {
6455
7819
  throw new AppwriteException('Missing required parameter: "bucketId"');
@@ -6473,7 +7837,7 @@ class Storage extends Service {
6473
7837
  * @param {string} range
6474
7838
  * @throws {AppwriteException}
6475
7839
  * @returns {Promise}
6476
- */
7840
+ */
6477
7841
  getUsage(range) {
6478
7842
  return __awaiter(this, void 0, void 0, function* () {
6479
7843
  let path = '/storage/usage';
@@ -6488,14 +7852,14 @@ class Storage extends Service {
6488
7852
  });
6489
7853
  }
6490
7854
  /**
6491
- * Get usage stats for storage bucket
7855
+ * Get usage stats for a storage bucket
6492
7856
  *
6493
7857
  *
6494
7858
  * @param {string} bucketId
6495
7859
  * @param {string} range
6496
7860
  * @throws {AppwriteException}
6497
7861
  * @returns {Promise}
6498
- */
7862
+ */
6499
7863
  getBucketUsage(bucketId, range) {
6500
7864
  return __awaiter(this, void 0, void 0, function* () {
6501
7865
  if (typeof bucketId === 'undefined') {
@@ -6528,7 +7892,7 @@ class Teams extends Service {
6528
7892
  * @param {string} search
6529
7893
  * @throws {AppwriteException}
6530
7894
  * @returns {Promise}
6531
- */
7895
+ */
6532
7896
  list(queries, search) {
6533
7897
  return __awaiter(this, void 0, void 0, function* () {
6534
7898
  let path = '/teams';
@@ -6557,7 +7921,7 @@ class Teams extends Service {
6557
7921
  * @param {string[]} roles
6558
7922
  * @throws {AppwriteException}
6559
7923
  * @returns {Promise}
6560
- */
7924
+ */
6561
7925
  create(teamId, name, roles) {
6562
7926
  return __awaiter(this, void 0, void 0, function* () {
6563
7927
  if (typeof teamId === 'undefined') {
@@ -6591,7 +7955,7 @@ class Teams extends Service {
6591
7955
  * @param {string} teamId
6592
7956
  * @throws {AppwriteException}
6593
7957
  * @returns {Promise}
6594
- */
7958
+ */
6595
7959
  get(teamId) {
6596
7960
  return __awaiter(this, void 0, void 0, function* () {
6597
7961
  if (typeof teamId === 'undefined') {
@@ -6614,7 +7978,7 @@ class Teams extends Service {
6614
7978
  * @param {string} name
6615
7979
  * @throws {AppwriteException}
6616
7980
  * @returns {Promise}
6617
- */
7981
+ */
6618
7982
  updateName(teamId, name) {
6619
7983
  return __awaiter(this, void 0, void 0, function* () {
6620
7984
  if (typeof teamId === 'undefined') {
@@ -6643,7 +8007,7 @@ class Teams extends Service {
6643
8007
  * @param {string} teamId
6644
8008
  * @throws {AppwriteException}
6645
8009
  * @returns {Promise}
6646
- */
8010
+ */
6647
8011
  delete(teamId) {
6648
8012
  return __awaiter(this, void 0, void 0, function* () {
6649
8013
  if (typeof teamId === 'undefined') {
@@ -6666,7 +8030,7 @@ class Teams extends Service {
6666
8030
  * @param {string[]} queries
6667
8031
  * @throws {AppwriteException}
6668
8032
  * @returns {Promise}
6669
- */
8033
+ */
6670
8034
  listLogs(teamId, queries) {
6671
8035
  return __awaiter(this, void 0, void 0, function* () {
6672
8036
  if (typeof teamId === 'undefined') {
@@ -6694,7 +8058,7 @@ class Teams extends Service {
6694
8058
  * @param {string} search
6695
8059
  * @throws {AppwriteException}
6696
8060
  * @returns {Promise}
6697
- */
8061
+ */
6698
8062
  listMemberships(teamId, queries, search) {
6699
8063
  return __awaiter(this, void 0, void 0, function* () {
6700
8064
  if (typeof teamId === 'undefined') {
@@ -6748,7 +8112,7 @@ class Teams extends Service {
6748
8112
  * @param {string} name
6749
8113
  * @throws {AppwriteException}
6750
8114
  * @returns {Promise}
6751
- */
8115
+ */
6752
8116
  createMembership(teamId, roles, url, email, userId, phone, name) {
6753
8117
  return __awaiter(this, void 0, void 0, function* () {
6754
8118
  if (typeof teamId === 'undefined') {
@@ -6796,7 +8160,7 @@ class Teams extends Service {
6796
8160
  * @param {string} membershipId
6797
8161
  * @throws {AppwriteException}
6798
8162
  * @returns {Promise}
6799
- */
8163
+ */
6800
8164
  getMembership(teamId, membershipId) {
6801
8165
  return __awaiter(this, void 0, void 0, function* () {
6802
8166
  if (typeof teamId === 'undefined') {
@@ -6814,19 +8178,20 @@ class Teams extends Service {
6814
8178
  });
6815
8179
  }
6816
8180
  /**
6817
- * Update Membership Roles
8181
+ * Update Membership
6818
8182
  *
6819
8183
  * Modify the roles of a team member. Only team members with the owner role
6820
8184
  * have access to this endpoint. Learn more about [roles and
6821
8185
  * permissions](/docs/permissions).
6822
8186
  *
8187
+ *
6823
8188
  * @param {string} teamId
6824
8189
  * @param {string} membershipId
6825
8190
  * @param {string[]} roles
6826
8191
  * @throws {AppwriteException}
6827
8192
  * @returns {Promise}
6828
- */
6829
- updateMembershipRoles(teamId, membershipId, roles) {
8193
+ */
8194
+ updateMembership(teamId, membershipId, roles) {
6830
8195
  return __awaiter(this, void 0, void 0, function* () {
6831
8196
  if (typeof teamId === 'undefined') {
6832
8197
  throw new AppwriteException('Missing required parameter: "teamId"');
@@ -6859,7 +8224,7 @@ class Teams extends Service {
6859
8224
  * @param {string} membershipId
6860
8225
  * @throws {AppwriteException}
6861
8226
  * @returns {Promise}
6862
- */
8227
+ */
6863
8228
  deleteMembership(teamId, membershipId) {
6864
8229
  return __awaiter(this, void 0, void 0, function* () {
6865
8230
  if (typeof teamId === 'undefined') {
@@ -6893,7 +8258,7 @@ class Teams extends Service {
6893
8258
  * @param {string} secret
6894
8259
  * @throws {AppwriteException}
6895
8260
  * @returns {Promise}
6896
- */
8261
+ */
6897
8262
  updateMembershipStatus(teamId, membershipId, userId, secret) {
6898
8263
  return __awaiter(this, void 0, void 0, function* () {
6899
8264
  if (typeof teamId === 'undefined') {
@@ -6932,7 +8297,7 @@ class Teams extends Service {
6932
8297
  * @param {string} teamId
6933
8298
  * @throws {AppwriteException}
6934
8299
  * @returns {Promise}
6935
- */
8300
+ */
6936
8301
  getPrefs(teamId) {
6937
8302
  return __awaiter(this, void 0, void 0, function* () {
6938
8303
  if (typeof teamId === 'undefined') {
@@ -6957,7 +8322,7 @@ class Teams extends Service {
6957
8322
  * @param {object} prefs
6958
8323
  * @throws {AppwriteException}
6959
8324
  * @returns {Promise}
6960
- */
8325
+ */
6961
8326
  updatePrefs(teamId, prefs) {
6962
8327
  return __awaiter(this, void 0, void 0, function* () {
6963
8328
  if (typeof teamId === 'undefined') {
@@ -6993,7 +8358,7 @@ class Users extends Service {
6993
8358
  * @param {string} search
6994
8359
  * @throws {AppwriteException}
6995
8360
  * @returns {Promise}
6996
- */
8361
+ */
6997
8362
  list(queries, search) {
6998
8363
  return __awaiter(this, void 0, void 0, function* () {
6999
8364
  let path = '/users';
@@ -7022,7 +8387,7 @@ class Users extends Service {
7022
8387
  * @param {string} name
7023
8388
  * @throws {AppwriteException}
7024
8389
  * @returns {Promise}
7025
- */
8390
+ */
7026
8391
  create(userId, email, phone, password, name) {
7027
8392
  return __awaiter(this, void 0, void 0, function* () {
7028
8393
  if (typeof userId === 'undefined') {
@@ -7065,7 +8430,7 @@ class Users extends Service {
7065
8430
  * @param {string} name
7066
8431
  * @throws {AppwriteException}
7067
8432
  * @returns {Promise}
7068
- */
8433
+ */
7069
8434
  createArgon2User(userId, email, password, name) {
7070
8435
  return __awaiter(this, void 0, void 0, function* () {
7071
8436
  if (typeof userId === 'undefined') {
@@ -7111,7 +8476,7 @@ class Users extends Service {
7111
8476
  * @param {string} name
7112
8477
  * @throws {AppwriteException}
7113
8478
  * @returns {Promise}
7114
- */
8479
+ */
7115
8480
  createBcryptUser(userId, email, password, name) {
7116
8481
  return __awaiter(this, void 0, void 0, function* () {
7117
8482
  if (typeof userId === 'undefined') {
@@ -7143,6 +8508,54 @@ class Users extends Service {
7143
8508
  }, payload);
7144
8509
  });
7145
8510
  }
8511
+ /**
8512
+ * List Identities
8513
+ *
8514
+ * Get identities for all users.
8515
+ *
8516
+ * @param {string} queries
8517
+ * @param {string} search
8518
+ * @throws {AppwriteException}
8519
+ * @returns {Promise}
8520
+ */
8521
+ listIdentities(queries, search) {
8522
+ return __awaiter(this, void 0, void 0, function* () {
8523
+ let path = '/users/identities';
8524
+ let payload = {};
8525
+ if (typeof queries !== 'undefined') {
8526
+ payload['queries'] = queries;
8527
+ }
8528
+ if (typeof search !== 'undefined') {
8529
+ payload['search'] = search;
8530
+ }
8531
+ const uri = new URL(this.client.config.endpoint + path);
8532
+ return yield this.client.call('get', uri, {
8533
+ 'content-type': 'application/json',
8534
+ }, payload);
8535
+ });
8536
+ }
8537
+ /**
8538
+ * Delete Identity
8539
+ *
8540
+ * Delete an identity by its unique ID.
8541
+ *
8542
+ * @param {string} identityId
8543
+ * @throws {AppwriteException}
8544
+ * @returns {Promise}
8545
+ */
8546
+ deleteIdentity(identityId) {
8547
+ return __awaiter(this, void 0, void 0, function* () {
8548
+ if (typeof identityId === 'undefined') {
8549
+ throw new AppwriteException('Missing required parameter: "identityId"');
8550
+ }
8551
+ let path = '/users/identities/{identityId}'.replace('{identityId}', identityId);
8552
+ let payload = {};
8553
+ const uri = new URL(this.client.config.endpoint + path);
8554
+ return yield this.client.call('delete', uri, {
8555
+ 'content-type': 'application/json',
8556
+ }, payload);
8557
+ });
8558
+ }
7146
8559
  /**
7147
8560
  * Create User with MD5 Password
7148
8561
  *
@@ -7157,7 +8570,7 @@ class Users extends Service {
7157
8570
  * @param {string} name
7158
8571
  * @throws {AppwriteException}
7159
8572
  * @returns {Promise}
7160
- */
8573
+ */
7161
8574
  createMD5User(userId, email, password, name) {
7162
8575
  return __awaiter(this, void 0, void 0, function* () {
7163
8576
  if (typeof userId === 'undefined') {
@@ -7203,7 +8616,7 @@ class Users extends Service {
7203
8616
  * @param {string} name
7204
8617
  * @throws {AppwriteException}
7205
8618
  * @returns {Promise}
7206
- */
8619
+ */
7207
8620
  createPHPassUser(userId, email, password, name) {
7208
8621
  return __awaiter(this, void 0, void 0, function* () {
7209
8622
  if (typeof userId === 'undefined') {
@@ -7254,7 +8667,7 @@ class Users extends Service {
7254
8667
  * @param {string} name
7255
8668
  * @throws {AppwriteException}
7256
8669
  * @returns {Promise}
7257
- */
8670
+ */
7258
8671
  createScryptUser(userId, email, password, passwordSalt, passwordCpu, passwordMemory, passwordParallel, passwordLength, name) {
7259
8672
  return __awaiter(this, void 0, void 0, function* () {
7260
8673
  if (typeof userId === 'undefined') {
@@ -7333,7 +8746,7 @@ class Users extends Service {
7333
8746
  * @param {string} name
7334
8747
  * @throws {AppwriteException}
7335
8748
  * @returns {Promise}
7336
- */
8749
+ */
7337
8750
  createScryptModifiedUser(userId, email, password, passwordSalt, passwordSaltSeparator, passwordSignerKey, name) {
7338
8751
  return __awaiter(this, void 0, void 0, function* () {
7339
8752
  if (typeof userId === 'undefined') {
@@ -7398,7 +8811,7 @@ class Users extends Service {
7398
8811
  * @param {string} name
7399
8812
  * @throws {AppwriteException}
7400
8813
  * @returns {Promise}
7401
- */
8814
+ */
7402
8815
  createSHAUser(userId, email, password, passwordVersion, name) {
7403
8816
  return __awaiter(this, void 0, void 0, function* () {
7404
8817
  if (typeof userId === 'undefined') {
@@ -7438,16 +8851,20 @@ class Users extends Service {
7438
8851
  *
7439
8852
  *
7440
8853
  * @param {string} range
8854
+ * @param {string} provider
7441
8855
  * @throws {AppwriteException}
7442
8856
  * @returns {Promise}
7443
- */
7444
- getUsage(range) {
8857
+ */
8858
+ getUsage(range, provider) {
7445
8859
  return __awaiter(this, void 0, void 0, function* () {
7446
8860
  let path = '/users/usage';
7447
8861
  let payload = {};
7448
8862
  if (typeof range !== 'undefined') {
7449
8863
  payload['range'] = range;
7450
8864
  }
8865
+ if (typeof provider !== 'undefined') {
8866
+ payload['provider'] = provider;
8867
+ }
7451
8868
  const uri = new URL(this.client.config.endpoint + path);
7452
8869
  return yield this.client.call('get', uri, {
7453
8870
  'content-type': 'application/json',
@@ -7462,7 +8879,7 @@ class Users extends Service {
7462
8879
  * @param {string} userId
7463
8880
  * @throws {AppwriteException}
7464
8881
  * @returns {Promise}
7465
- */
8882
+ */
7466
8883
  get(userId) {
7467
8884
  return __awaiter(this, void 0, void 0, function* () {
7468
8885
  if (typeof userId === 'undefined') {
@@ -7488,7 +8905,7 @@ class Users extends Service {
7488
8905
  * @param {string} userId
7489
8906
  * @throws {AppwriteException}
7490
8907
  * @returns {Promise}
7491
- */
8908
+ */
7492
8909
  delete(userId) {
7493
8910
  return __awaiter(this, void 0, void 0, function* () {
7494
8911
  if (typeof userId === 'undefined') {
@@ -7511,7 +8928,7 @@ class Users extends Service {
7511
8928
  * @param {string} email
7512
8929
  * @throws {AppwriteException}
7513
8930
  * @returns {Promise}
7514
- */
8931
+ */
7515
8932
  updateEmail(userId, email) {
7516
8933
  return __awaiter(this, void 0, void 0, function* () {
7517
8934
  if (typeof userId === 'undefined') {
@@ -7531,6 +8948,40 @@ class Users extends Service {
7531
8948
  }, payload);
7532
8949
  });
7533
8950
  }
8951
+ /**
8952
+ * Update User Labels
8953
+ *
8954
+ * Update the user labels by its unique ID.
8955
+ *
8956
+ * Labels can be used to grant access to resources. While teams are a way for
8957
+ * user's to share access to a resource, labels can be defined by the
8958
+ * developer to grant access without an invitation. See the [Permissions
8959
+ * docs](/docs/permissions) for more info.
8960
+ *
8961
+ * @param {string} userId
8962
+ * @param {string[]} labels
8963
+ * @throws {AppwriteException}
8964
+ * @returns {Promise}
8965
+ */
8966
+ updateLabels(userId, labels) {
8967
+ return __awaiter(this, void 0, void 0, function* () {
8968
+ if (typeof userId === 'undefined') {
8969
+ throw new AppwriteException('Missing required parameter: "userId"');
8970
+ }
8971
+ if (typeof labels === 'undefined') {
8972
+ throw new AppwriteException('Missing required parameter: "labels"');
8973
+ }
8974
+ let path = '/users/{userId}/labels'.replace('{userId}', userId);
8975
+ let payload = {};
8976
+ if (typeof labels !== 'undefined') {
8977
+ payload['labels'] = labels;
8978
+ }
8979
+ const uri = new URL(this.client.config.endpoint + path);
8980
+ return yield this.client.call('put', uri, {
8981
+ 'content-type': 'application/json',
8982
+ }, payload);
8983
+ });
8984
+ }
7534
8985
  /**
7535
8986
  * List User Logs
7536
8987
  *
@@ -7540,7 +8991,7 @@ class Users extends Service {
7540
8991
  * @param {string[]} queries
7541
8992
  * @throws {AppwriteException}
7542
8993
  * @returns {Promise}
7543
- */
8994
+ */
7544
8995
  listLogs(userId, queries) {
7545
8996
  return __awaiter(this, void 0, void 0, function* () {
7546
8997
  if (typeof userId === 'undefined') {
@@ -7565,7 +9016,7 @@ class Users extends Service {
7565
9016
  * @param {string} userId
7566
9017
  * @throws {AppwriteException}
7567
9018
  * @returns {Promise}
7568
- */
9019
+ */
7569
9020
  listMemberships(userId) {
7570
9021
  return __awaiter(this, void 0, void 0, function* () {
7571
9022
  if (typeof userId === 'undefined') {
@@ -7588,7 +9039,7 @@ class Users extends Service {
7588
9039
  * @param {string} name
7589
9040
  * @throws {AppwriteException}
7590
9041
  * @returns {Promise}
7591
- */
9042
+ */
7592
9043
  updateName(userId, name) {
7593
9044
  return __awaiter(this, void 0, void 0, function* () {
7594
9045
  if (typeof userId === 'undefined') {
@@ -7617,7 +9068,7 @@ class Users extends Service {
7617
9068
  * @param {string} password
7618
9069
  * @throws {AppwriteException}
7619
9070
  * @returns {Promise}
7620
- */
9071
+ */
7621
9072
  updatePassword(userId, password) {
7622
9073
  return __awaiter(this, void 0, void 0, function* () {
7623
9074
  if (typeof userId === 'undefined') {
@@ -7646,7 +9097,7 @@ class Users extends Service {
7646
9097
  * @param {string} number
7647
9098
  * @throws {AppwriteException}
7648
9099
  * @returns {Promise}
7649
- */
9100
+ */
7650
9101
  updatePhone(userId, number) {
7651
9102
  return __awaiter(this, void 0, void 0, function* () {
7652
9103
  if (typeof userId === 'undefined') {
@@ -7674,7 +9125,7 @@ class Users extends Service {
7674
9125
  * @param {string} userId
7675
9126
  * @throws {AppwriteException}
7676
9127
  * @returns {Promise}
7677
- */
9128
+ */
7678
9129
  getPrefs(userId) {
7679
9130
  return __awaiter(this, void 0, void 0, function* () {
7680
9131
  if (typeof userId === 'undefined') {
@@ -7699,7 +9150,7 @@ class Users extends Service {
7699
9150
  * @param {object} prefs
7700
9151
  * @throws {AppwriteException}
7701
9152
  * @returns {Promise}
7702
- */
9153
+ */
7703
9154
  updatePrefs(userId, prefs) {
7704
9155
  return __awaiter(this, void 0, void 0, function* () {
7705
9156
  if (typeof userId === 'undefined') {
@@ -7727,7 +9178,7 @@ class Users extends Service {
7727
9178
  * @param {string} userId
7728
9179
  * @throws {AppwriteException}
7729
9180
  * @returns {Promise}
7730
- */
9181
+ */
7731
9182
  listSessions(userId) {
7732
9183
  return __awaiter(this, void 0, void 0, function* () {
7733
9184
  if (typeof userId === 'undefined') {
@@ -7749,7 +9200,7 @@ class Users extends Service {
7749
9200
  * @param {string} userId
7750
9201
  * @throws {AppwriteException}
7751
9202
  * @returns {Promise}
7752
- */
9203
+ */
7753
9204
  deleteSessions(userId) {
7754
9205
  return __awaiter(this, void 0, void 0, function* () {
7755
9206
  if (typeof userId === 'undefined') {
@@ -7772,7 +9223,7 @@ class Users extends Service {
7772
9223
  * @param {string} sessionId
7773
9224
  * @throws {AppwriteException}
7774
9225
  * @returns {Promise}
7775
- */
9226
+ */
7776
9227
  deleteSession(userId, sessionId) {
7777
9228
  return __awaiter(this, void 0, void 0, function* () {
7778
9229
  if (typeof userId === 'undefined') {
@@ -7799,7 +9250,7 @@ class Users extends Service {
7799
9250
  * @param {boolean} status
7800
9251
  * @throws {AppwriteException}
7801
9252
  * @returns {Promise}
7802
- */
9253
+ */
7803
9254
  updateStatus(userId, status) {
7804
9255
  return __awaiter(this, void 0, void 0, function* () {
7805
9256
  if (typeof userId === 'undefined') {
@@ -7828,7 +9279,7 @@ class Users extends Service {
7828
9279
  * @param {boolean} emailVerification
7829
9280
  * @throws {AppwriteException}
7830
9281
  * @returns {Promise}
7831
- */
9282
+ */
7832
9283
  updateEmailVerification(userId, emailVerification) {
7833
9284
  return __awaiter(this, void 0, void 0, function* () {
7834
9285
  if (typeof userId === 'undefined') {
@@ -7857,7 +9308,7 @@ class Users extends Service {
7857
9308
  * @param {boolean} phoneVerification
7858
9309
  * @throws {AppwriteException}
7859
9310
  * @returns {Promise}
7860
- */
9311
+ */
7861
9312
  updatePhoneVerification(userId, phoneVerification) {
7862
9313
  return __awaiter(this, void 0, void 0, function* () {
7863
9314
  if (typeof userId === 'undefined') {
@@ -7879,6 +9330,250 @@ class Users extends Service {
7879
9330
  }
7880
9331
  }
7881
9332
 
9333
+ class Vcs extends Service {
9334
+ constructor(client) {
9335
+ super(client);
9336
+ }
9337
+ /**
9338
+ * List Repositories
9339
+ *
9340
+ *
9341
+ * @param {string} installationId
9342
+ * @param {string} search
9343
+ * @throws {AppwriteException}
9344
+ * @returns {Promise}
9345
+ */
9346
+ listRepositories(installationId, search) {
9347
+ return __awaiter(this, void 0, void 0, function* () {
9348
+ if (typeof installationId === 'undefined') {
9349
+ throw new AppwriteException('Missing required parameter: "installationId"');
9350
+ }
9351
+ let path = '/vcs/github/installations/{installationId}/providerRepositories'.replace('{installationId}', installationId);
9352
+ let payload = {};
9353
+ if (typeof search !== 'undefined') {
9354
+ payload['search'] = search;
9355
+ }
9356
+ const uri = new URL(this.client.config.endpoint + path);
9357
+ return yield this.client.call('get', uri, {
9358
+ 'content-type': 'application/json',
9359
+ }, payload);
9360
+ });
9361
+ }
9362
+ /**
9363
+ * Create repository
9364
+ *
9365
+ *
9366
+ * @param {string} installationId
9367
+ * @param {string} name
9368
+ * @param {boolean} xprivate
9369
+ * @throws {AppwriteException}
9370
+ * @returns {Promise}
9371
+ */
9372
+ createRepository(installationId, name, xprivate) {
9373
+ return __awaiter(this, void 0, void 0, function* () {
9374
+ if (typeof installationId === 'undefined') {
9375
+ throw new AppwriteException('Missing required parameter: "installationId"');
9376
+ }
9377
+ if (typeof name === 'undefined') {
9378
+ throw new AppwriteException('Missing required parameter: "name"');
9379
+ }
9380
+ if (typeof xprivate === 'undefined') {
9381
+ throw new AppwriteException('Missing required parameter: "xprivate"');
9382
+ }
9383
+ let path = '/vcs/github/installations/{installationId}/providerRepositories'.replace('{installationId}', installationId);
9384
+ let payload = {};
9385
+ if (typeof name !== 'undefined') {
9386
+ payload['name'] = name;
9387
+ }
9388
+ if (typeof xprivate !== 'undefined') {
9389
+ payload['private'] = xprivate;
9390
+ }
9391
+ const uri = new URL(this.client.config.endpoint + path);
9392
+ return yield this.client.call('post', uri, {
9393
+ 'content-type': 'application/json',
9394
+ }, payload);
9395
+ });
9396
+ }
9397
+ /**
9398
+ * Get repository
9399
+ *
9400
+ *
9401
+ * @param {string} installationId
9402
+ * @param {string} providerRepositoryId
9403
+ * @throws {AppwriteException}
9404
+ * @returns {Promise}
9405
+ */
9406
+ getRepository(installationId, providerRepositoryId) {
9407
+ return __awaiter(this, void 0, void 0, function* () {
9408
+ if (typeof installationId === 'undefined') {
9409
+ throw new AppwriteException('Missing required parameter: "installationId"');
9410
+ }
9411
+ if (typeof providerRepositoryId === 'undefined') {
9412
+ throw new AppwriteException('Missing required parameter: "providerRepositoryId"');
9413
+ }
9414
+ let path = '/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}'.replace('{installationId}', installationId).replace('{providerRepositoryId}', providerRepositoryId);
9415
+ let payload = {};
9416
+ const uri = new URL(this.client.config.endpoint + path);
9417
+ return yield this.client.call('get', uri, {
9418
+ 'content-type': 'application/json',
9419
+ }, payload);
9420
+ });
9421
+ }
9422
+ /**
9423
+ * List Repository Branches
9424
+ *
9425
+ *
9426
+ * @param {string} installationId
9427
+ * @param {string} providerRepositoryId
9428
+ * @throws {AppwriteException}
9429
+ * @returns {Promise}
9430
+ */
9431
+ listRepositoryBranches(installationId, providerRepositoryId) {
9432
+ return __awaiter(this, void 0, void 0, function* () {
9433
+ if (typeof installationId === 'undefined') {
9434
+ throw new AppwriteException('Missing required parameter: "installationId"');
9435
+ }
9436
+ if (typeof providerRepositoryId === 'undefined') {
9437
+ throw new AppwriteException('Missing required parameter: "providerRepositoryId"');
9438
+ }
9439
+ let path = '/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}/branches'.replace('{installationId}', installationId).replace('{providerRepositoryId}', providerRepositoryId);
9440
+ let payload = {};
9441
+ const uri = new URL(this.client.config.endpoint + path);
9442
+ return yield this.client.call('get', uri, {
9443
+ 'content-type': 'application/json',
9444
+ }, payload);
9445
+ });
9446
+ }
9447
+ /**
9448
+ * Detect runtime settings from source code
9449
+ *
9450
+ *
9451
+ * @param {string} installationId
9452
+ * @param {string} providerRepositoryId
9453
+ * @param {string} providerRootDirectory
9454
+ * @throws {AppwriteException}
9455
+ * @returns {Promise}
9456
+ */
9457
+ createRepositoryDetection(installationId, providerRepositoryId, providerRootDirectory) {
9458
+ return __awaiter(this, void 0, void 0, function* () {
9459
+ if (typeof installationId === 'undefined') {
9460
+ throw new AppwriteException('Missing required parameter: "installationId"');
9461
+ }
9462
+ if (typeof providerRepositoryId === 'undefined') {
9463
+ throw new AppwriteException('Missing required parameter: "providerRepositoryId"');
9464
+ }
9465
+ let path = '/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}/detection'.replace('{installationId}', installationId).replace('{providerRepositoryId}', providerRepositoryId);
9466
+ let payload = {};
9467
+ if (typeof providerRootDirectory !== 'undefined') {
9468
+ payload['providerRootDirectory'] = providerRootDirectory;
9469
+ }
9470
+ const uri = new URL(this.client.config.endpoint + path);
9471
+ return yield this.client.call('post', uri, {
9472
+ 'content-type': 'application/json',
9473
+ }, payload);
9474
+ });
9475
+ }
9476
+ /**
9477
+ * Authorize external deployment
9478
+ *
9479
+ *
9480
+ * @param {string} installationId
9481
+ * @param {string} repositoryId
9482
+ * @param {string} providerPullRequestId
9483
+ * @throws {AppwriteException}
9484
+ * @returns {Promise}
9485
+ */
9486
+ updateExternalDeployments(installationId, repositoryId, providerPullRequestId) {
9487
+ return __awaiter(this, void 0, void 0, function* () {
9488
+ if (typeof installationId === 'undefined') {
9489
+ throw new AppwriteException('Missing required parameter: "installationId"');
9490
+ }
9491
+ if (typeof repositoryId === 'undefined') {
9492
+ throw new AppwriteException('Missing required parameter: "repositoryId"');
9493
+ }
9494
+ if (typeof providerPullRequestId === 'undefined') {
9495
+ throw new AppwriteException('Missing required parameter: "providerPullRequestId"');
9496
+ }
9497
+ let path = '/vcs/github/installations/{installationId}/repositories/{repositoryId}'.replace('{installationId}', installationId).replace('{repositoryId}', repositoryId);
9498
+ let payload = {};
9499
+ if (typeof providerPullRequestId !== 'undefined') {
9500
+ payload['providerPullRequestId'] = providerPullRequestId;
9501
+ }
9502
+ const uri = new URL(this.client.config.endpoint + path);
9503
+ return yield this.client.call('patch', uri, {
9504
+ 'content-type': 'application/json',
9505
+ }, payload);
9506
+ });
9507
+ }
9508
+ /**
9509
+ * List installations
9510
+ *
9511
+ *
9512
+ * @param {string[]} queries
9513
+ * @param {string} search
9514
+ * @throws {AppwriteException}
9515
+ * @returns {Promise}
9516
+ */
9517
+ listInstallations(queries, search) {
9518
+ return __awaiter(this, void 0, void 0, function* () {
9519
+ let path = '/vcs/installations';
9520
+ let payload = {};
9521
+ if (typeof queries !== 'undefined') {
9522
+ payload['queries'] = queries;
9523
+ }
9524
+ if (typeof search !== 'undefined') {
9525
+ payload['search'] = search;
9526
+ }
9527
+ const uri = new URL(this.client.config.endpoint + path);
9528
+ return yield this.client.call('get', uri, {
9529
+ 'content-type': 'application/json',
9530
+ }, payload);
9531
+ });
9532
+ }
9533
+ /**
9534
+ * Get installation
9535
+ *
9536
+ *
9537
+ * @param {string} installationId
9538
+ * @throws {AppwriteException}
9539
+ * @returns {Promise}
9540
+ */
9541
+ getInstallation(installationId) {
9542
+ return __awaiter(this, void 0, void 0, function* () {
9543
+ if (typeof installationId === 'undefined') {
9544
+ throw new AppwriteException('Missing required parameter: "installationId"');
9545
+ }
9546
+ let path = '/vcs/installations/{installationId}'.replace('{installationId}', installationId);
9547
+ let payload = {};
9548
+ const uri = new URL(this.client.config.endpoint + path);
9549
+ return yield this.client.call('get', uri, {
9550
+ 'content-type': 'application/json',
9551
+ }, payload);
9552
+ });
9553
+ }
9554
+ /**
9555
+ * Delete Installation
9556
+ *
9557
+ *
9558
+ * @param {string} installationId
9559
+ * @throws {AppwriteException}
9560
+ * @returns {Promise}
9561
+ */
9562
+ deleteInstallation(installationId) {
9563
+ return __awaiter(this, void 0, void 0, function* () {
9564
+ if (typeof installationId === 'undefined') {
9565
+ throw new AppwriteException('Missing required parameter: "installationId"');
9566
+ }
9567
+ let path = '/vcs/installations/{installationId}'.replace('{installationId}', installationId);
9568
+ let payload = {};
9569
+ const uri = new URL(this.client.config.endpoint + path);
9570
+ return yield this.client.call('delete', uri, {
9571
+ 'content-type': 'application/json',
9572
+ }, payload);
9573
+ });
9574
+ }
9575
+ }
9576
+
7882
9577
  class Permission {
7883
9578
  }
7884
9579
  Permission.read = (role) => {
@@ -7936,5 +9631,5 @@ class ID {
7936
9631
  }
7937
9632
  }
7938
9633
 
7939
- export { Account, AppwriteException, Avatars, Client, Console, Databases, Functions, Graphql, Health, ID, Locale, Permission, Project, Projects, Query, Role, Storage, Teams, Users };
9634
+ export { Account, AppwriteException, Assistant, Avatars, Client, Console, Databases, Functions, Graphql, Health, ID, Locale, Migrations, Permission, Project, Projects, Proxy, Query, Role, Storage, Teams, Users, Vcs };
7940
9635
  //# sourceMappingURL=sdk.js.map