@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/cjs/sdk.js CHANGED
@@ -104,8 +104,8 @@ class Client {
104
104
  'x-sdk-name': 'Console',
105
105
  'x-sdk-platform': 'console',
106
106
  'x-sdk-language': 'web',
107
- 'x-sdk-version': '0.2.0',
108
- 'X-Appwrite-Response-Format': '1.0.0',
107
+ 'x-sdk-version': '0.1.0',
108
+ 'X-Appwrite-Response-Format': '1.4.0',
109
109
  };
110
110
  this.realtime = {
111
111
  socket: undefined,
@@ -444,11 +444,11 @@ class Account extends Service {
444
444
  /**
445
445
  * Get Account
446
446
  *
447
- * Get currently logged in user data as JSON object.
447
+ * Get the currently logged in user.
448
448
  *
449
449
  * @throws {AppwriteException}
450
450
  * @returns {Promise}
451
- */
451
+ */
452
452
  get() {
453
453
  return __awaiter(this, void 0, void 0, function* () {
454
454
  let path = '/account';
@@ -475,7 +475,7 @@ class Account extends Service {
475
475
  * @param {string} name
476
476
  * @throws {AppwriteException}
477
477
  * @returns {Promise}
478
- */
478
+ */
479
479
  create(userId, email, password, name) {
480
480
  return __awaiter(this, void 0, void 0, function* () {
481
481
  if (typeof userId === 'undefined') {
@@ -523,7 +523,7 @@ class Account extends Service {
523
523
  * @param {string} password
524
524
  * @throws {AppwriteException}
525
525
  * @returns {Promise}
526
- */
526
+ */
527
527
  updateEmail(email, password) {
528
528
  return __awaiter(this, void 0, void 0, function* () {
529
529
  if (typeof email === 'undefined') {
@@ -546,6 +546,50 @@ class Account extends Service {
546
546
  }, payload);
547
547
  });
548
548
  }
549
+ /**
550
+ * List Identities
551
+ *
552
+ * Get the list of identities for the currently logged in user.
553
+ *
554
+ * @param {string} queries
555
+ * @throws {AppwriteException}
556
+ * @returns {Promise}
557
+ */
558
+ listIdentities(queries) {
559
+ return __awaiter(this, void 0, void 0, function* () {
560
+ let path = '/account/identities';
561
+ let payload = {};
562
+ if (typeof queries !== 'undefined') {
563
+ payload['queries'] = queries;
564
+ }
565
+ const uri = new URL(this.client.config.endpoint + path);
566
+ return yield this.client.call('get', uri, {
567
+ 'content-type': 'application/json',
568
+ }, payload);
569
+ });
570
+ }
571
+ /**
572
+ * Delete Identity
573
+ *
574
+ * Delete an identity by its unique ID.
575
+ *
576
+ * @param {string} identityId
577
+ * @throws {AppwriteException}
578
+ * @returns {Promise}
579
+ */
580
+ deleteIdentity(identityId) {
581
+ return __awaiter(this, void 0, void 0, function* () {
582
+ if (typeof identityId === 'undefined') {
583
+ throw new AppwriteException('Missing required parameter: "identityId"');
584
+ }
585
+ let path = '/account/identities/{identityId}'.replace('{identityId}', identityId);
586
+ let payload = {};
587
+ const uri = new URL(this.client.config.endpoint + path);
588
+ return yield this.client.call('delete', uri, {
589
+ 'content-type': 'application/json',
590
+ }, payload);
591
+ });
592
+ }
549
593
  /**
550
594
  * Create account using an invite code
551
595
  *
@@ -563,7 +607,7 @@ class Account extends Service {
563
607
  * @param {string} code
564
608
  * @throws {AppwriteException}
565
609
  * @returns {Promise}
566
- */
610
+ */
567
611
  createWithInviteCode(userId, email, password, name, code) {
568
612
  return __awaiter(this, void 0, void 0, function* () {
569
613
  if (typeof userId === 'undefined') {
@@ -609,7 +653,7 @@ class Account extends Service {
609
653
  *
610
654
  * @throws {AppwriteException}
611
655
  * @returns {Promise}
612
- */
656
+ */
613
657
  createJWT() {
614
658
  return __awaiter(this, void 0, void 0, function* () {
615
659
  let path = '/account/jwt';
@@ -623,13 +667,13 @@ class Account extends Service {
623
667
  /**
624
668
  * List Logs
625
669
  *
626
- * Get currently logged in user list of latest security activity logs. Each
627
- * log returns user IP address, location and date and time of log.
670
+ * Get the list of latest security activity logs for the currently logged in
671
+ * user. Each log returns user IP address, location and date and time of log.
628
672
  *
629
673
  * @param {string[]} queries
630
674
  * @throws {AppwriteException}
631
675
  * @returns {Promise}
632
- */
676
+ */
633
677
  listLogs(queries) {
634
678
  return __awaiter(this, void 0, void 0, function* () {
635
679
  let path = '/account/logs';
@@ -651,7 +695,7 @@ class Account extends Service {
651
695
  * @param {string} name
652
696
  * @throws {AppwriteException}
653
697
  * @returns {Promise}
654
- */
698
+ */
655
699
  updateName(name) {
656
700
  return __awaiter(this, void 0, void 0, function* () {
657
701
  if (typeof name === 'undefined') {
@@ -679,7 +723,7 @@ class Account extends Service {
679
723
  * @param {string} oldPassword
680
724
  * @throws {AppwriteException}
681
725
  * @returns {Promise}
682
- */
726
+ */
683
727
  updatePassword(password, oldPassword) {
684
728
  return __awaiter(this, void 0, void 0, function* () {
685
729
  if (typeof password === 'undefined') {
@@ -712,7 +756,7 @@ class Account extends Service {
712
756
  * @param {string} password
713
757
  * @throws {AppwriteException}
714
758
  * @returns {Promise}
715
- */
759
+ */
716
760
  updatePhone(phone, password) {
717
761
  return __awaiter(this, void 0, void 0, function* () {
718
762
  if (typeof phone === 'undefined') {
@@ -738,11 +782,11 @@ class Account extends Service {
738
782
  /**
739
783
  * Get Account Preferences
740
784
  *
741
- * Get currently logged in user preferences as a key-value object.
785
+ * Get the preferences as a key-value object for the currently logged in user.
742
786
  *
743
787
  * @throws {AppwriteException}
744
788
  * @returns {Promise}
745
- */
789
+ */
746
790
  getPrefs() {
747
791
  return __awaiter(this, void 0, void 0, function* () {
748
792
  let path = '/account/prefs';
@@ -763,7 +807,7 @@ class Account extends Service {
763
807
  * @param {Partial<Preferences>} prefs
764
808
  * @throws {AppwriteException}
765
809
  * @returns {Promise}
766
- */
810
+ */
767
811
  updatePrefs(prefs) {
768
812
  return __awaiter(this, void 0, void 0, function* () {
769
813
  if (typeof prefs === 'undefined') {
@@ -796,7 +840,7 @@ class Account extends Service {
796
840
  * @param {string} url
797
841
  * @throws {AppwriteException}
798
842
  * @returns {Promise}
799
- */
843
+ */
800
844
  createRecovery(email, url) {
801
845
  return __awaiter(this, void 0, void 0, function* () {
802
846
  if (typeof email === 'undefined') {
@@ -838,7 +882,7 @@ class Account extends Service {
838
882
  * @param {string} passwordAgain
839
883
  * @throws {AppwriteException}
840
884
  * @returns {Promise}
841
- */
885
+ */
842
886
  updateRecovery(userId, secret, password, passwordAgain) {
843
887
  return __awaiter(this, void 0, void 0, function* () {
844
888
  if (typeof userId === 'undefined') {
@@ -876,12 +920,12 @@ class Account extends Service {
876
920
  /**
877
921
  * List Sessions
878
922
  *
879
- * Get currently logged in user list of active sessions across different
880
- * devices.
923
+ * Get the list of active sessions across different devices for the currently
924
+ * logged in user.
881
925
  *
882
926
  * @throws {AppwriteException}
883
927
  * @returns {Promise}
884
- */
928
+ */
885
929
  listSessions() {
886
930
  return __awaiter(this, void 0, void 0, function* () {
887
931
  let path = '/account/sessions';
@@ -900,7 +944,7 @@ class Account extends Service {
900
944
  *
901
945
  * @throws {AppwriteException}
902
946
  * @returns {Promise}
903
- */
947
+ */
904
948
  deleteSessions() {
905
949
  return __awaiter(this, void 0, void 0, function* () {
906
950
  let path = '/account/sessions';
@@ -923,7 +967,7 @@ class Account extends Service {
923
967
  *
924
968
  * @throws {AppwriteException}
925
969
  * @returns {Promise}
926
- */
970
+ */
927
971
  createAnonymousSession() {
928
972
  return __awaiter(this, void 0, void 0, function* () {
929
973
  let path = '/account/sessions/anonymous';
@@ -947,7 +991,7 @@ class Account extends Service {
947
991
  * @param {string} password
948
992
  * @throws {AppwriteException}
949
993
  * @returns {Promise}
950
- */
994
+ */
951
995
  createEmailSession(email, password) {
952
996
  return __awaiter(this, void 0, void 0, function* () {
953
997
  if (typeof email === 'undefined') {
@@ -974,7 +1018,7 @@ class Account extends Service {
974
1018
  * Create Magic URL session
975
1019
  *
976
1020
  * Sends the user an email with a secret key for creating a session. If the
977
- * provided user ID has not be registered, a new user will be created. When
1021
+ * provided user ID has not been registered, a new user will be created. When
978
1022
  * the user clicks the link in the email, the user is redirected back to the
979
1023
  * URL you provided with the secret key and userId values attached to the URL
980
1024
  * query string. Use the query string parameters to submit a request to the
@@ -988,12 +1032,13 @@ class Account extends Service {
988
1032
  * A user is limited to 10 active sessions at a time by default. [Learn more
989
1033
  * about session limits](/docs/authentication-security#limits).
990
1034
  *
1035
+ *
991
1036
  * @param {string} userId
992
1037
  * @param {string} email
993
1038
  * @param {string} url
994
1039
  * @throws {AppwriteException}
995
1040
  * @returns {Promise}
996
- */
1041
+ */
997
1042
  createMagicURLSession(userId, email, url) {
998
1043
  return __awaiter(this, void 0, void 0, function* () {
999
1044
  if (typeof userId === 'undefined') {
@@ -1038,7 +1083,7 @@ class Account extends Service {
1038
1083
  * @param {string} secret
1039
1084
  * @throws {AppwriteException}
1040
1085
  * @returns {Promise}
1041
- */
1086
+ */
1042
1087
  updateMagicURLSession(userId, secret) {
1043
1088
  return __awaiter(this, void 0, void 0, function* () {
1044
1089
  if (typeof userId === 'undefined') {
@@ -1086,7 +1131,7 @@ class Account extends Service {
1086
1131
  * @param {string[]} scopes
1087
1132
  * @throws {AppwriteException}
1088
1133
  * @returns {void|string}
1089
- */
1134
+ */
1090
1135
  createOAuth2Session(provider, success, failure, scopes) {
1091
1136
  if (typeof provider === 'undefined') {
1092
1137
  throw new AppwriteException('Missing required parameter: "provider"');
@@ -1131,7 +1176,7 @@ class Account extends Service {
1131
1176
  * @param {string} phone
1132
1177
  * @throws {AppwriteException}
1133
1178
  * @returns {Promise}
1134
- */
1179
+ */
1135
1180
  createPhoneSession(userId, phone) {
1136
1181
  return __awaiter(this, void 0, void 0, function* () {
1137
1182
  if (typeof userId === 'undefined') {
@@ -1167,7 +1212,7 @@ class Account extends Service {
1167
1212
  * @param {string} secret
1168
1213
  * @throws {AppwriteException}
1169
1214
  * @returns {Promise}
1170
- */
1215
+ */
1171
1216
  updatePhoneSession(userId, secret) {
1172
1217
  return __awaiter(this, void 0, void 0, function* () {
1173
1218
  if (typeof userId === 'undefined') {
@@ -1199,7 +1244,7 @@ class Account extends Service {
1199
1244
  * @param {string} sessionId
1200
1245
  * @throws {AppwriteException}
1201
1246
  * @returns {Promise}
1202
- */
1247
+ */
1203
1248
  getSession(sessionId) {
1204
1249
  return __awaiter(this, void 0, void 0, function* () {
1205
1250
  if (typeof sessionId === 'undefined') {
@@ -1223,7 +1268,7 @@ class Account extends Service {
1223
1268
  * @param {string} sessionId
1224
1269
  * @throws {AppwriteException}
1225
1270
  * @returns {Promise}
1226
- */
1271
+ */
1227
1272
  updateSession(sessionId) {
1228
1273
  return __awaiter(this, void 0, void 0, function* () {
1229
1274
  if (typeof sessionId === 'undefined') {
@@ -1240,15 +1285,15 @@ class Account extends Service {
1240
1285
  /**
1241
1286
  * Delete Session
1242
1287
  *
1243
- * Use this endpoint to log out the currently logged in user from all their
1244
- * account sessions across all of their different devices. When using the
1245
- * Session ID argument, only the unique session ID provided is deleted.
1246
- *
1288
+ * Logout the user. Use 'current' as the session ID to logout on this device,
1289
+ * use a session ID to logout on another device. If you're looking to logout
1290
+ * the user on all devices, use [Delete
1291
+ * Sessions](/docs/client/account#accountDeleteSessions) instead.
1247
1292
  *
1248
1293
  * @param {string} sessionId
1249
1294
  * @throws {AppwriteException}
1250
1295
  * @returns {Promise}
1251
- */
1296
+ */
1252
1297
  deleteSession(sessionId) {
1253
1298
  return __awaiter(this, void 0, void 0, function* () {
1254
1299
  if (typeof sessionId === 'undefined') {
@@ -1271,7 +1316,7 @@ class Account extends Service {
1271
1316
  *
1272
1317
  * @throws {AppwriteException}
1273
1318
  * @returns {Promise}
1274
- */
1319
+ */
1275
1320
  updateStatus() {
1276
1321
  return __awaiter(this, void 0, void 0, function* () {
1277
1322
  let path = '/account/status';
@@ -1304,7 +1349,7 @@ class Account extends Service {
1304
1349
  * @param {string} url
1305
1350
  * @throws {AppwriteException}
1306
1351
  * @returns {Promise}
1307
- */
1352
+ */
1308
1353
  createVerification(url) {
1309
1354
  return __awaiter(this, void 0, void 0, function* () {
1310
1355
  if (typeof url === 'undefined') {
@@ -1333,7 +1378,7 @@ class Account extends Service {
1333
1378
  * @param {string} secret
1334
1379
  * @throws {AppwriteException}
1335
1380
  * @returns {Promise}
1336
- */
1381
+ */
1337
1382
  updateVerification(userId, secret) {
1338
1383
  return __awaiter(this, void 0, void 0, function* () {
1339
1384
  if (typeof userId === 'undefined') {
@@ -1368,7 +1413,7 @@ class Account extends Service {
1368
1413
  *
1369
1414
  * @throws {AppwriteException}
1370
1415
  * @returns {Promise}
1371
- */
1416
+ */
1372
1417
  createPhoneVerification() {
1373
1418
  return __awaiter(this, void 0, void 0, function* () {
1374
1419
  let path = '/account/verification/phone';
@@ -1391,7 +1436,7 @@ class Account extends Service {
1391
1436
  * @param {string} secret
1392
1437
  * @throws {AppwriteException}
1393
1438
  * @returns {Promise}
1394
- */
1439
+ */
1395
1440
  updatePhoneVerification(userId, secret) {
1396
1441
  return __awaiter(this, void 0, void 0, function* () {
1397
1442
  if (typeof userId === 'undefined') {
@@ -1439,7 +1484,7 @@ class Avatars extends Service {
1439
1484
  * @param {number} quality
1440
1485
  * @throws {AppwriteException}
1441
1486
  * @returns {URL}
1442
- */
1487
+ */
1443
1488
  getBrowser(code, width, height, quality) {
1444
1489
  if (typeof code === 'undefined') {
1445
1490
  throw new AppwriteException('Missing required parameter: "code"');
@@ -1481,7 +1526,7 @@ class Avatars extends Service {
1481
1526
  * @param {number} quality
1482
1527
  * @throws {AppwriteException}
1483
1528
  * @returns {URL}
1484
- */
1529
+ */
1485
1530
  getCreditCard(code, width, height, quality) {
1486
1531
  if (typeof code === 'undefined') {
1487
1532
  throw new AppwriteException('Missing required parameter: "code"');
@@ -1514,7 +1559,7 @@ class Avatars extends Service {
1514
1559
  * @param {string} url
1515
1560
  * @throws {AppwriteException}
1516
1561
  * @returns {URL}
1517
- */
1562
+ */
1518
1563
  getFavicon(url) {
1519
1564
  if (typeof url === 'undefined') {
1520
1565
  throw new AppwriteException('Missing required parameter: "url"');
@@ -1551,7 +1596,7 @@ class Avatars extends Service {
1551
1596
  * @param {number} quality
1552
1597
  * @throws {AppwriteException}
1553
1598
  * @returns {URL}
1554
- */
1599
+ */
1555
1600
  getFlag(code, width, height, quality) {
1556
1601
  if (typeof code === 'undefined') {
1557
1602
  throw new AppwriteException('Missing required parameter: "code"');
@@ -1593,7 +1638,7 @@ class Avatars extends Service {
1593
1638
  * @param {number} height
1594
1639
  * @throws {AppwriteException}
1595
1640
  * @returns {URL}
1596
- */
1641
+ */
1597
1642
  getImage(url, width, height) {
1598
1643
  if (typeof url === 'undefined') {
1599
1644
  throw new AppwriteException('Missing required parameter: "url"');
@@ -1642,7 +1687,7 @@ class Avatars extends Service {
1642
1687
  * @param {string} background
1643
1688
  * @throws {AppwriteException}
1644
1689
  * @returns {URL}
1645
- */
1690
+ */
1646
1691
  getInitials(name, width, height, background) {
1647
1692
  let path = '/avatars/initials';
1648
1693
  let payload = {};
@@ -1678,7 +1723,7 @@ class Avatars extends Service {
1678
1723
  * @param {boolean} download
1679
1724
  * @throws {AppwriteException}
1680
1725
  * @returns {URL}
1681
- */
1726
+ */
1682
1727
  getQR(text, size, margin, download) {
1683
1728
  if (typeof text === 'undefined') {
1684
1729
  throw new AppwriteException('Missing required parameter: "text"');
@@ -1706,6 +1751,36 @@ class Avatars extends Service {
1706
1751
  }
1707
1752
  }
1708
1753
 
1754
+ class Assistant extends Service {
1755
+ constructor(client) {
1756
+ super(client);
1757
+ }
1758
+ /**
1759
+ * Ask Query
1760
+ *
1761
+ *
1762
+ * @param {string} prompt
1763
+ * @throws {AppwriteException}
1764
+ * @returns {Promise}
1765
+ */
1766
+ chat(prompt) {
1767
+ return __awaiter(this, void 0, void 0, function* () {
1768
+ if (typeof prompt === 'undefined') {
1769
+ throw new AppwriteException('Missing required parameter: "prompt"');
1770
+ }
1771
+ let path = '/console/assistant';
1772
+ let payload = {};
1773
+ if (typeof prompt !== 'undefined') {
1774
+ payload['prompt'] = prompt;
1775
+ }
1776
+ const uri = new URL(this.client.config.endpoint + path);
1777
+ return yield this.client.call('post', uri, {
1778
+ 'content-type': 'application/json',
1779
+ }, payload);
1780
+ });
1781
+ }
1782
+ }
1783
+
1709
1784
  class Console extends Service {
1710
1785
  constructor(client) {
1711
1786
  super(client);
@@ -1717,7 +1792,7 @@ class Console extends Service {
1717
1792
  *
1718
1793
  * @throws {AppwriteException}
1719
1794
  * @returns {Promise}
1720
- */
1795
+ */
1721
1796
  variables() {
1722
1797
  return __awaiter(this, void 0, void 0, function* () {
1723
1798
  let path = '/console/variables';
@@ -1744,7 +1819,7 @@ class Databases extends Service {
1744
1819
  * @param {string} search
1745
1820
  * @throws {AppwriteException}
1746
1821
  * @returns {Promise}
1747
- */
1822
+ */
1748
1823
  list(queries, search) {
1749
1824
  return __awaiter(this, void 0, void 0, function* () {
1750
1825
  let path = '/databases';
@@ -1769,10 +1844,11 @@ class Databases extends Service {
1769
1844
  *
1770
1845
  * @param {string} databaseId
1771
1846
  * @param {string} name
1847
+ * @param {boolean} enabled
1772
1848
  * @throws {AppwriteException}
1773
1849
  * @returns {Promise}
1774
- */
1775
- create(databaseId, name) {
1850
+ */
1851
+ create(databaseId, name, enabled) {
1776
1852
  return __awaiter(this, void 0, void 0, function* () {
1777
1853
  if (typeof databaseId === 'undefined') {
1778
1854
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -1788,6 +1864,9 @@ class Databases extends Service {
1788
1864
  if (typeof name !== 'undefined') {
1789
1865
  payload['name'] = name;
1790
1866
  }
1867
+ if (typeof enabled !== 'undefined') {
1868
+ payload['enabled'] = enabled;
1869
+ }
1791
1870
  const uri = new URL(this.client.config.endpoint + path);
1792
1871
  return yield this.client.call('post', uri, {
1793
1872
  'content-type': 'application/json',
@@ -1801,7 +1880,7 @@ class Databases extends Service {
1801
1880
  * @param {string} range
1802
1881
  * @throws {AppwriteException}
1803
1882
  * @returns {Promise}
1804
- */
1883
+ */
1805
1884
  getUsage(range) {
1806
1885
  return __awaiter(this, void 0, void 0, function* () {
1807
1886
  let path = '/databases/usage';
@@ -1824,7 +1903,7 @@ class Databases extends Service {
1824
1903
  * @param {string} databaseId
1825
1904
  * @throws {AppwriteException}
1826
1905
  * @returns {Promise}
1827
- */
1906
+ */
1828
1907
  get(databaseId) {
1829
1908
  return __awaiter(this, void 0, void 0, function* () {
1830
1909
  if (typeof databaseId === 'undefined') {
@@ -1845,10 +1924,11 @@ class Databases extends Service {
1845
1924
  *
1846
1925
  * @param {string} databaseId
1847
1926
  * @param {string} name
1927
+ * @param {boolean} enabled
1848
1928
  * @throws {AppwriteException}
1849
1929
  * @returns {Promise}
1850
- */
1851
- update(databaseId, name) {
1930
+ */
1931
+ update(databaseId, name, enabled) {
1852
1932
  return __awaiter(this, void 0, void 0, function* () {
1853
1933
  if (typeof databaseId === 'undefined') {
1854
1934
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -1861,6 +1941,9 @@ class Databases extends Service {
1861
1941
  if (typeof name !== 'undefined') {
1862
1942
  payload['name'] = name;
1863
1943
  }
1944
+ if (typeof enabled !== 'undefined') {
1945
+ payload['enabled'] = enabled;
1946
+ }
1864
1947
  const uri = new URL(this.client.config.endpoint + path);
1865
1948
  return yield this.client.call('put', uri, {
1866
1949
  'content-type': 'application/json',
@@ -1876,7 +1959,7 @@ class Databases extends Service {
1876
1959
  * @param {string} databaseId
1877
1960
  * @throws {AppwriteException}
1878
1961
  * @returns {Promise}
1879
- */
1962
+ */
1880
1963
  delete(databaseId) {
1881
1964
  return __awaiter(this, void 0, void 0, function* () {
1882
1965
  if (typeof databaseId === 'undefined') {
@@ -1901,7 +1984,7 @@ class Databases extends Service {
1901
1984
  * @param {string} search
1902
1985
  * @throws {AppwriteException}
1903
1986
  * @returns {Promise}
1904
- */
1987
+ */
1905
1988
  listCollections(databaseId, queries, search) {
1906
1989
  return __awaiter(this, void 0, void 0, function* () {
1907
1990
  if (typeof databaseId === 'undefined') {
@@ -1934,10 +2017,11 @@ class Databases extends Service {
1934
2017
  * @param {string} name
1935
2018
  * @param {string[]} permissions
1936
2019
  * @param {boolean} documentSecurity
2020
+ * @param {boolean} enabled
1937
2021
  * @throws {AppwriteException}
1938
2022
  * @returns {Promise}
1939
- */
1940
- createCollection(databaseId, collectionId, name, permissions, documentSecurity) {
2023
+ */
2024
+ createCollection(databaseId, collectionId, name, permissions, documentSecurity, enabled) {
1941
2025
  return __awaiter(this, void 0, void 0, function* () {
1942
2026
  if (typeof databaseId === 'undefined') {
1943
2027
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -1962,6 +2046,9 @@ class Databases extends Service {
1962
2046
  if (typeof documentSecurity !== 'undefined') {
1963
2047
  payload['documentSecurity'] = documentSecurity;
1964
2048
  }
2049
+ if (typeof enabled !== 'undefined') {
2050
+ payload['enabled'] = enabled;
2051
+ }
1965
2052
  const uri = new URL(this.client.config.endpoint + path);
1966
2053
  return yield this.client.call('post', uri, {
1967
2054
  'content-type': 'application/json',
@@ -1978,7 +2065,7 @@ class Databases extends Service {
1978
2065
  * @param {string} collectionId
1979
2066
  * @throws {AppwriteException}
1980
2067
  * @returns {Promise}
1981
- */
2068
+ */
1982
2069
  getCollection(databaseId, collectionId) {
1983
2070
  return __awaiter(this, void 0, void 0, function* () {
1984
2071
  if (typeof databaseId === 'undefined') {
@@ -2008,7 +2095,7 @@ class Databases extends Service {
2008
2095
  * @param {boolean} enabled
2009
2096
  * @throws {AppwriteException}
2010
2097
  * @returns {Promise}
2011
- */
2098
+ */
2012
2099
  updateCollection(databaseId, collectionId, name, permissions, documentSecurity, enabled) {
2013
2100
  return __awaiter(this, void 0, void 0, function* () {
2014
2101
  if (typeof databaseId === 'undefined') {
@@ -2050,7 +2137,7 @@ class Databases extends Service {
2050
2137
  * @param {string} collectionId
2051
2138
  * @throws {AppwriteException}
2052
2139
  * @returns {Promise}
2053
- */
2140
+ */
2054
2141
  deleteCollection(databaseId, collectionId) {
2055
2142
  return __awaiter(this, void 0, void 0, function* () {
2056
2143
  if (typeof databaseId === 'undefined') {
@@ -2073,10 +2160,11 @@ class Databases extends Service {
2073
2160
  *
2074
2161
  * @param {string} databaseId
2075
2162
  * @param {string} collectionId
2163
+ * @param {string[]} queries
2076
2164
  * @throws {AppwriteException}
2077
2165
  * @returns {Promise}
2078
- */
2079
- listAttributes(databaseId, collectionId) {
2166
+ */
2167
+ listAttributes(databaseId, collectionId, queries) {
2080
2168
  return __awaiter(this, void 0, void 0, function* () {
2081
2169
  if (typeof databaseId === 'undefined') {
2082
2170
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -2086,6 +2174,9 @@ class Databases extends Service {
2086
2174
  }
2087
2175
  let path = '/databases/{databaseId}/collections/{collectionId}/attributes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
2088
2176
  let payload = {};
2177
+ if (typeof queries !== 'undefined') {
2178
+ payload['queries'] = queries;
2179
+ }
2089
2180
  const uri = new URL(this.client.config.endpoint + path);
2090
2181
  return yield this.client.call('get', uri, {
2091
2182
  'content-type': 'application/json',
@@ -2106,7 +2197,7 @@ class Databases extends Service {
2106
2197
  * @param {boolean} array
2107
2198
  * @throws {AppwriteException}
2108
2199
  * @returns {Promise}
2109
- */
2200
+ */
2110
2201
  createBooleanAttribute(databaseId, collectionId, key, required, xdefault, array) {
2111
2202
  return __awaiter(this, void 0, void 0, function* () {
2112
2203
  if (typeof databaseId === 'undefined') {
@@ -2152,7 +2243,7 @@ class Databases extends Service {
2152
2243
  * @param {boolean} xdefault
2153
2244
  * @throws {AppwriteException}
2154
2245
  * @returns {Promise}
2155
- */
2246
+ */
2156
2247
  updateBooleanAttribute(databaseId, collectionId, key, required, xdefault) {
2157
2248
  return __awaiter(this, void 0, void 0, function* () {
2158
2249
  if (typeof databaseId === 'undefined') {
@@ -2196,7 +2287,7 @@ class Databases extends Service {
2196
2287
  * @param {boolean} array
2197
2288
  * @throws {AppwriteException}
2198
2289
  * @returns {Promise}
2199
- */
2290
+ */
2200
2291
  createDatetimeAttribute(databaseId, collectionId, key, required, xdefault, array) {
2201
2292
  return __awaiter(this, void 0, void 0, function* () {
2202
2293
  if (typeof databaseId === 'undefined') {
@@ -2242,7 +2333,7 @@ class Databases extends Service {
2242
2333
  * @param {string} xdefault
2243
2334
  * @throws {AppwriteException}
2244
2335
  * @returns {Promise}
2245
- */
2336
+ */
2246
2337
  updateDatetimeAttribute(databaseId, collectionId, key, required, xdefault) {
2247
2338
  return __awaiter(this, void 0, void 0, function* () {
2248
2339
  if (typeof databaseId === 'undefined') {
@@ -2288,7 +2379,7 @@ class Databases extends Service {
2288
2379
  * @param {boolean} array
2289
2380
  * @throws {AppwriteException}
2290
2381
  * @returns {Promise}
2291
- */
2382
+ */
2292
2383
  createEmailAttribute(databaseId, collectionId, key, required, xdefault, array) {
2293
2384
  return __awaiter(this, void 0, void 0, function* () {
2294
2385
  if (typeof databaseId === 'undefined') {
@@ -2337,7 +2428,7 @@ class Databases extends Service {
2337
2428
  * @param {string} xdefault
2338
2429
  * @throws {AppwriteException}
2339
2430
  * @returns {Promise}
2340
- */
2431
+ */
2341
2432
  updateEmailAttribute(databaseId, collectionId, key, required, xdefault) {
2342
2433
  return __awaiter(this, void 0, void 0, function* () {
2343
2434
  if (typeof databaseId === 'undefined') {
@@ -2382,7 +2473,7 @@ class Databases extends Service {
2382
2473
  * @param {boolean} array
2383
2474
  * @throws {AppwriteException}
2384
2475
  * @returns {Promise}
2385
- */
2476
+ */
2386
2477
  createEnumAttribute(databaseId, collectionId, key, elements, required, xdefault, array) {
2387
2478
  return __awaiter(this, void 0, void 0, function* () {
2388
2479
  if (typeof databaseId === 'undefined') {
@@ -2438,7 +2529,7 @@ class Databases extends Service {
2438
2529
  * @param {string} xdefault
2439
2530
  * @throws {AppwriteException}
2440
2531
  * @returns {Promise}
2441
- */
2532
+ */
2442
2533
  updateEnumAttribute(databaseId, collectionId, key, elements, required, xdefault) {
2443
2534
  return __awaiter(this, void 0, void 0, function* () {
2444
2535
  if (typeof databaseId === 'undefined') {
@@ -2493,7 +2584,7 @@ class Databases extends Service {
2493
2584
  * @param {boolean} array
2494
2585
  * @throws {AppwriteException}
2495
2586
  * @returns {Promise}
2496
- */
2587
+ */
2497
2588
  createFloatAttribute(databaseId, collectionId, key, required, min, max, xdefault, array) {
2498
2589
  return __awaiter(this, void 0, void 0, function* () {
2499
2590
  if (typeof databaseId === 'undefined') {
@@ -2550,7 +2641,7 @@ class Databases extends Service {
2550
2641
  * @param {number} xdefault
2551
2642
  * @throws {AppwriteException}
2552
2643
  * @returns {Promise}
2553
- */
2644
+ */
2554
2645
  updateFloatAttribute(databaseId, collectionId, key, required, min, max, xdefault) {
2555
2646
  return __awaiter(this, void 0, void 0, function* () {
2556
2647
  if (typeof databaseId === 'undefined') {
@@ -2611,7 +2702,7 @@ class Databases extends Service {
2611
2702
  * @param {boolean} array
2612
2703
  * @throws {AppwriteException}
2613
2704
  * @returns {Promise}
2614
- */
2705
+ */
2615
2706
  createIntegerAttribute(databaseId, collectionId, key, required, min, max, xdefault, array) {
2616
2707
  return __awaiter(this, void 0, void 0, function* () {
2617
2708
  if (typeof databaseId === 'undefined') {
@@ -2668,7 +2759,7 @@ class Databases extends Service {
2668
2759
  * @param {number} xdefault
2669
2760
  * @throws {AppwriteException}
2670
2761
  * @returns {Promise}
2671
- */
2762
+ */
2672
2763
  updateIntegerAttribute(databaseId, collectionId, key, required, min, max, xdefault) {
2673
2764
  return __awaiter(this, void 0, void 0, function* () {
2674
2765
  if (typeof databaseId === 'undefined') {
@@ -2726,7 +2817,7 @@ class Databases extends Service {
2726
2817
  * @param {boolean} array
2727
2818
  * @throws {AppwriteException}
2728
2819
  * @returns {Promise}
2729
- */
2820
+ */
2730
2821
  createIpAttribute(databaseId, collectionId, key, required, xdefault, array) {
2731
2822
  return __awaiter(this, void 0, void 0, function* () {
2732
2823
  if (typeof databaseId === 'undefined') {
@@ -2775,7 +2866,7 @@ class Databases extends Service {
2775
2866
  * @param {string} xdefault
2776
2867
  * @throws {AppwriteException}
2777
2868
  * @returns {Promise}
2778
- */
2869
+ */
2779
2870
  updateIpAttribute(databaseId, collectionId, key, required, xdefault) {
2780
2871
  return __awaiter(this, void 0, void 0, function* () {
2781
2872
  if (typeof databaseId === 'undefined') {
@@ -2824,7 +2915,7 @@ class Databases extends Service {
2824
2915
  * @param {string} onDelete
2825
2916
  * @throws {AppwriteException}
2826
2917
  * @returns {Promise}
2827
- */
2918
+ */
2828
2919
  createRelationshipAttribute(databaseId, collectionId, relatedCollectionId, type, twoWay, key, twoWayKey, onDelete) {
2829
2920
  return __awaiter(this, void 0, void 0, function* () {
2830
2921
  if (typeof databaseId === 'undefined') {
@@ -2878,10 +2969,11 @@ class Databases extends Service {
2878
2969
  * @param {boolean} required
2879
2970
  * @param {string} xdefault
2880
2971
  * @param {boolean} array
2972
+ * @param {boolean} encrypt
2881
2973
  * @throws {AppwriteException}
2882
2974
  * @returns {Promise}
2883
- */
2884
- createStringAttribute(databaseId, collectionId, key, size, required, xdefault, array) {
2975
+ */
2976
+ createStringAttribute(databaseId, collectionId, key, size, required, xdefault, array, encrypt) {
2885
2977
  return __awaiter(this, void 0, void 0, function* () {
2886
2978
  if (typeof databaseId === 'undefined') {
2887
2979
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -2915,6 +3007,9 @@ class Databases extends Service {
2915
3007
  if (typeof array !== 'undefined') {
2916
3008
  payload['array'] = array;
2917
3009
  }
3010
+ if (typeof encrypt !== 'undefined') {
3011
+ payload['encrypt'] = encrypt;
3012
+ }
2918
3013
  const uri = new URL(this.client.config.endpoint + path);
2919
3014
  return yield this.client.call('post', uri, {
2920
3015
  'content-type': 'application/json',
@@ -2935,7 +3030,7 @@ class Databases extends Service {
2935
3030
  * @param {string} xdefault
2936
3031
  * @throws {AppwriteException}
2937
3032
  * @returns {Promise}
2938
- */
3033
+ */
2939
3034
  updateStringAttribute(databaseId, collectionId, key, required, xdefault) {
2940
3035
  return __awaiter(this, void 0, void 0, function* () {
2941
3036
  if (typeof databaseId === 'undefined') {
@@ -2981,7 +3076,7 @@ class Databases extends Service {
2981
3076
  * @param {boolean} array
2982
3077
  * @throws {AppwriteException}
2983
3078
  * @returns {Promise}
2984
- */
3079
+ */
2985
3080
  createUrlAttribute(databaseId, collectionId, key, required, xdefault, array) {
2986
3081
  return __awaiter(this, void 0, void 0, function* () {
2987
3082
  if (typeof databaseId === 'undefined') {
@@ -3030,7 +3125,7 @@ class Databases extends Service {
3030
3125
  * @param {string} xdefault
3031
3126
  * @throws {AppwriteException}
3032
3127
  * @returns {Promise}
3033
- */
3128
+ */
3034
3129
  updateUrlAttribute(databaseId, collectionId, key, required, xdefault) {
3035
3130
  return __awaiter(this, void 0, void 0, function* () {
3036
3131
  if (typeof databaseId === 'undefined') {
@@ -3071,7 +3166,7 @@ class Databases extends Service {
3071
3166
  * @param {string} key
3072
3167
  * @throws {AppwriteException}
3073
3168
  * @returns {Promise}
3074
- */
3169
+ */
3075
3170
  getAttribute(databaseId, collectionId, key) {
3076
3171
  return __awaiter(this, void 0, void 0, function* () {
3077
3172
  if (typeof databaseId === 'undefined') {
@@ -3100,7 +3195,7 @@ class Databases extends Service {
3100
3195
  * @param {string} key
3101
3196
  * @throws {AppwriteException}
3102
3197
  * @returns {Promise}
3103
- */
3198
+ */
3104
3199
  deleteAttribute(databaseId, collectionId, key) {
3105
3200
  return __awaiter(this, void 0, void 0, function* () {
3106
3201
  if (typeof databaseId === 'undefined') {
@@ -3133,7 +3228,7 @@ class Databases extends Service {
3133
3228
  * @param {string} onDelete
3134
3229
  * @throws {AppwriteException}
3135
3230
  * @returns {Promise}
3136
- */
3231
+ */
3137
3232
  updateRelationshipAttribute(databaseId, collectionId, key, onDelete) {
3138
3233
  return __awaiter(this, void 0, void 0, function* () {
3139
3234
  if (typeof databaseId === 'undefined') {
@@ -3167,7 +3262,7 @@ class Databases extends Service {
3167
3262
  * @param {string[]} queries
3168
3263
  * @throws {AppwriteException}
3169
3264
  * @returns {Promise}
3170
- */
3265
+ */
3171
3266
  listDocuments(databaseId, collectionId, queries) {
3172
3267
  return __awaiter(this, void 0, void 0, function* () {
3173
3268
  if (typeof databaseId === 'undefined') {
@@ -3202,7 +3297,7 @@ class Databases extends Service {
3202
3297
  * @param {string[]} permissions
3203
3298
  * @throws {AppwriteException}
3204
3299
  * @returns {Promise}
3205
- */
3300
+ */
3206
3301
  createDocument(databaseId, collectionId, documentId, data, permissions) {
3207
3302
  return __awaiter(this, void 0, void 0, function* () {
3208
3303
  if (typeof databaseId === 'undefined') {
@@ -3246,7 +3341,7 @@ class Databases extends Service {
3246
3341
  * @param {string[]} queries
3247
3342
  * @throws {AppwriteException}
3248
3343
  * @returns {Promise}
3249
- */
3344
+ */
3250
3345
  getDocument(databaseId, collectionId, documentId, queries) {
3251
3346
  return __awaiter(this, void 0, void 0, function* () {
3252
3347
  if (typeof databaseId === 'undefined') {
@@ -3282,7 +3377,7 @@ class Databases extends Service {
3282
3377
  * @param {string[]} permissions
3283
3378
  * @throws {AppwriteException}
3284
3379
  * @returns {Promise}
3285
- */
3380
+ */
3286
3381
  updateDocument(databaseId, collectionId, documentId, data, permissions) {
3287
3382
  return __awaiter(this, void 0, void 0, function* () {
3288
3383
  if (typeof databaseId === 'undefined') {
@@ -3318,7 +3413,7 @@ class Databases extends Service {
3318
3413
  * @param {string} documentId
3319
3414
  * @throws {AppwriteException}
3320
3415
  * @returns {Promise}
3321
- */
3416
+ */
3322
3417
  deleteDocument(databaseId, collectionId, documentId) {
3323
3418
  return __awaiter(this, void 0, void 0, function* () {
3324
3419
  if (typeof databaseId === 'undefined') {
@@ -3349,7 +3444,7 @@ class Databases extends Service {
3349
3444
  * @param {string[]} queries
3350
3445
  * @throws {AppwriteException}
3351
3446
  * @returns {Promise}
3352
- */
3447
+ */
3353
3448
  listDocumentLogs(databaseId, collectionId, documentId, queries) {
3354
3449
  return __awaiter(this, void 0, void 0, function* () {
3355
3450
  if (typeof databaseId === 'undefined') {
@@ -3378,10 +3473,11 @@ class Databases extends Service {
3378
3473
  *
3379
3474
  * @param {string} databaseId
3380
3475
  * @param {string} collectionId
3476
+ * @param {string[]} queries
3381
3477
  * @throws {AppwriteException}
3382
3478
  * @returns {Promise}
3383
- */
3384
- listIndexes(databaseId, collectionId) {
3479
+ */
3480
+ listIndexes(databaseId, collectionId, queries) {
3385
3481
  return __awaiter(this, void 0, void 0, function* () {
3386
3482
  if (typeof databaseId === 'undefined') {
3387
3483
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -3391,6 +3487,9 @@ class Databases extends Service {
3391
3487
  }
3392
3488
  let path = '/databases/{databaseId}/collections/{collectionId}/indexes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
3393
3489
  let payload = {};
3490
+ if (typeof queries !== 'undefined') {
3491
+ payload['queries'] = queries;
3492
+ }
3394
3493
  const uri = new URL(this.client.config.endpoint + path);
3395
3494
  return yield this.client.call('get', uri, {
3396
3495
  'content-type': 'application/json',
@@ -3409,7 +3508,7 @@ class Databases extends Service {
3409
3508
  * @param {string[]} orders
3410
3509
  * @throws {AppwriteException}
3411
3510
  * @returns {Promise}
3412
- */
3511
+ */
3413
3512
  createIndex(databaseId, collectionId, key, type, attributes, orders) {
3414
3513
  return __awaiter(this, void 0, void 0, function* () {
3415
3514
  if (typeof databaseId === 'undefined') {
@@ -3456,7 +3555,7 @@ class Databases extends Service {
3456
3555
  * @param {string} key
3457
3556
  * @throws {AppwriteException}
3458
3557
  * @returns {Promise}
3459
- */
3558
+ */
3460
3559
  getIndex(databaseId, collectionId, key) {
3461
3560
  return __awaiter(this, void 0, void 0, function* () {
3462
3561
  if (typeof databaseId === 'undefined') {
@@ -3485,7 +3584,7 @@ class Databases extends Service {
3485
3584
  * @param {string} key
3486
3585
  * @throws {AppwriteException}
3487
3586
  * @returns {Promise}
3488
- */
3587
+ */
3489
3588
  deleteIndex(databaseId, collectionId, key) {
3490
3589
  return __awaiter(this, void 0, void 0, function* () {
3491
3590
  if (typeof databaseId === 'undefined') {
@@ -3515,7 +3614,7 @@ class Databases extends Service {
3515
3614
  * @param {string[]} queries
3516
3615
  * @throws {AppwriteException}
3517
3616
  * @returns {Promise}
3518
- */
3617
+ */
3519
3618
  listCollectionLogs(databaseId, collectionId, queries) {
3520
3619
  return __awaiter(this, void 0, void 0, function* () {
3521
3620
  if (typeof databaseId === 'undefined') {
@@ -3544,7 +3643,7 @@ class Databases extends Service {
3544
3643
  * @param {string} range
3545
3644
  * @throws {AppwriteException}
3546
3645
  * @returns {Promise}
3547
- */
3646
+ */
3548
3647
  getCollectionUsage(databaseId, collectionId, range) {
3549
3648
  return __awaiter(this, void 0, void 0, function* () {
3550
3649
  if (typeof databaseId === 'undefined') {
@@ -3573,7 +3672,7 @@ class Databases extends Service {
3573
3672
  * @param {string[]} queries
3574
3673
  * @throws {AppwriteException}
3575
3674
  * @returns {Promise}
3576
- */
3675
+ */
3577
3676
  listLogs(databaseId, queries) {
3578
3677
  return __awaiter(this, void 0, void 0, function* () {
3579
3678
  if (typeof databaseId === 'undefined') {
@@ -3598,7 +3697,7 @@ class Databases extends Service {
3598
3697
  * @param {string} range
3599
3698
  * @throws {AppwriteException}
3600
3699
  * @returns {Promise}
3601
- */
3700
+ */
3602
3701
  getDatabaseUsage(databaseId, range) {
3603
3702
  return __awaiter(this, void 0, void 0, function* () {
3604
3703
  if (typeof databaseId === 'undefined') {
@@ -3631,7 +3730,7 @@ class Functions extends Service {
3631
3730
  * @param {string} search
3632
3731
  * @throws {AppwriteException}
3633
3732
  * @returns {Promise}
3634
- */
3733
+ */
3635
3734
  list(queries, search) {
3636
3735
  return __awaiter(this, void 0, void 0, function* () {
3637
3736
  let path = '/functions';
@@ -3663,10 +3762,22 @@ class Functions extends Service {
3663
3762
  * @param {string} schedule
3664
3763
  * @param {number} timeout
3665
3764
  * @param {boolean} enabled
3765
+ * @param {boolean} logging
3766
+ * @param {string} entrypoint
3767
+ * @param {string} commands
3768
+ * @param {string} installationId
3769
+ * @param {string} providerRepositoryId
3770
+ * @param {string} providerBranch
3771
+ * @param {boolean} providerSilentMode
3772
+ * @param {string} providerRootDirectory
3773
+ * @param {string} templateRepository
3774
+ * @param {string} templateOwner
3775
+ * @param {string} templateRootDirectory
3776
+ * @param {string} templateBranch
3666
3777
  * @throws {AppwriteException}
3667
3778
  * @returns {Promise}
3668
- */
3669
- create(functionId, name, runtime, execute, events, schedule, timeout, enabled) {
3779
+ */
3780
+ create(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, templateRepository, templateOwner, templateRootDirectory, templateBranch) {
3670
3781
  return __awaiter(this, void 0, void 0, function* () {
3671
3782
  if (typeof functionId === 'undefined') {
3672
3783
  throw new AppwriteException('Missing required parameter: "functionId"');
@@ -3685,12 +3796,12 @@ class Functions extends Service {
3685
3796
  if (typeof name !== 'undefined') {
3686
3797
  payload['name'] = name;
3687
3798
  }
3688
- if (typeof execute !== 'undefined') {
3689
- payload['execute'] = execute;
3690
- }
3691
3799
  if (typeof runtime !== 'undefined') {
3692
3800
  payload['runtime'] = runtime;
3693
3801
  }
3802
+ if (typeof execute !== 'undefined') {
3803
+ payload['execute'] = execute;
3804
+ }
3694
3805
  if (typeof events !== 'undefined') {
3695
3806
  payload['events'] = events;
3696
3807
  }
@@ -3703,6 +3814,42 @@ class Functions extends Service {
3703
3814
  if (typeof enabled !== 'undefined') {
3704
3815
  payload['enabled'] = enabled;
3705
3816
  }
3817
+ if (typeof logging !== 'undefined') {
3818
+ payload['logging'] = logging;
3819
+ }
3820
+ if (typeof entrypoint !== 'undefined') {
3821
+ payload['entrypoint'] = entrypoint;
3822
+ }
3823
+ if (typeof commands !== 'undefined') {
3824
+ payload['commands'] = commands;
3825
+ }
3826
+ if (typeof installationId !== 'undefined') {
3827
+ payload['installationId'] = installationId;
3828
+ }
3829
+ if (typeof providerRepositoryId !== 'undefined') {
3830
+ payload['providerRepositoryId'] = providerRepositoryId;
3831
+ }
3832
+ if (typeof providerBranch !== 'undefined') {
3833
+ payload['providerBranch'] = providerBranch;
3834
+ }
3835
+ if (typeof providerSilentMode !== 'undefined') {
3836
+ payload['providerSilentMode'] = providerSilentMode;
3837
+ }
3838
+ if (typeof providerRootDirectory !== 'undefined') {
3839
+ payload['providerRootDirectory'] = providerRootDirectory;
3840
+ }
3841
+ if (typeof templateRepository !== 'undefined') {
3842
+ payload['templateRepository'] = templateRepository;
3843
+ }
3844
+ if (typeof templateOwner !== 'undefined') {
3845
+ payload['templateOwner'] = templateOwner;
3846
+ }
3847
+ if (typeof templateRootDirectory !== 'undefined') {
3848
+ payload['templateRootDirectory'] = templateRootDirectory;
3849
+ }
3850
+ if (typeof templateBranch !== 'undefined') {
3851
+ payload['templateBranch'] = templateBranch;
3852
+ }
3706
3853
  const uri = new URL(this.client.config.endpoint + path);
3707
3854
  return yield this.client.call('post', uri, {
3708
3855
  'content-type': 'application/json',
@@ -3716,7 +3863,7 @@ class Functions extends Service {
3716
3863
  *
3717
3864
  * @throws {AppwriteException}
3718
3865
  * @returns {Promise}
3719
- */
3866
+ */
3720
3867
  listRuntimes() {
3721
3868
  return __awaiter(this, void 0, void 0, function* () {
3722
3869
  let path = '/functions/runtimes';
@@ -3734,7 +3881,7 @@ class Functions extends Service {
3734
3881
  * @param {string} range
3735
3882
  * @throws {AppwriteException}
3736
3883
  * @returns {Promise}
3737
- */
3884
+ */
3738
3885
  getUsage(range) {
3739
3886
  return __awaiter(this, void 0, void 0, function* () {
3740
3887
  let path = '/functions/usage';
@@ -3756,7 +3903,7 @@ class Functions extends Service {
3756
3903
  * @param {string} functionId
3757
3904
  * @throws {AppwriteException}
3758
3905
  * @returns {Promise}
3759
- */
3906
+ */
3760
3907
  get(functionId) {
3761
3908
  return __awaiter(this, void 0, void 0, function* () {
3762
3909
  if (typeof functionId === 'undefined') {
@@ -3777,15 +3924,24 @@ class Functions extends Service {
3777
3924
  *
3778
3925
  * @param {string} functionId
3779
3926
  * @param {string} name
3927
+ * @param {string} runtime
3780
3928
  * @param {string[]} execute
3781
3929
  * @param {string[]} events
3782
3930
  * @param {string} schedule
3783
3931
  * @param {number} timeout
3784
3932
  * @param {boolean} enabled
3933
+ * @param {boolean} logging
3934
+ * @param {string} entrypoint
3935
+ * @param {string} commands
3936
+ * @param {string} installationId
3937
+ * @param {string} providerRepositoryId
3938
+ * @param {string} providerBranch
3939
+ * @param {boolean} providerSilentMode
3940
+ * @param {string} providerRootDirectory
3785
3941
  * @throws {AppwriteException}
3786
3942
  * @returns {Promise}
3787
- */
3788
- update(functionId, name, execute, events, schedule, timeout, enabled) {
3943
+ */
3944
+ update(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory) {
3789
3945
  return __awaiter(this, void 0, void 0, function* () {
3790
3946
  if (typeof functionId === 'undefined') {
3791
3947
  throw new AppwriteException('Missing required parameter: "functionId"');
@@ -3793,11 +3949,17 @@ class Functions extends Service {
3793
3949
  if (typeof name === 'undefined') {
3794
3950
  throw new AppwriteException('Missing required parameter: "name"');
3795
3951
  }
3952
+ if (typeof runtime === 'undefined') {
3953
+ throw new AppwriteException('Missing required parameter: "runtime"');
3954
+ }
3796
3955
  let path = '/functions/{functionId}'.replace('{functionId}', functionId);
3797
3956
  let payload = {};
3798
3957
  if (typeof name !== 'undefined') {
3799
3958
  payload['name'] = name;
3800
3959
  }
3960
+ if (typeof runtime !== 'undefined') {
3961
+ payload['runtime'] = runtime;
3962
+ }
3801
3963
  if (typeof execute !== 'undefined') {
3802
3964
  payload['execute'] = execute;
3803
3965
  }
@@ -3813,6 +3975,30 @@ class Functions extends Service {
3813
3975
  if (typeof enabled !== 'undefined') {
3814
3976
  payload['enabled'] = enabled;
3815
3977
  }
3978
+ if (typeof logging !== 'undefined') {
3979
+ payload['logging'] = logging;
3980
+ }
3981
+ if (typeof entrypoint !== 'undefined') {
3982
+ payload['entrypoint'] = entrypoint;
3983
+ }
3984
+ if (typeof commands !== 'undefined') {
3985
+ payload['commands'] = commands;
3986
+ }
3987
+ if (typeof installationId !== 'undefined') {
3988
+ payload['installationId'] = installationId;
3989
+ }
3990
+ if (typeof providerRepositoryId !== 'undefined') {
3991
+ payload['providerRepositoryId'] = providerRepositoryId;
3992
+ }
3993
+ if (typeof providerBranch !== 'undefined') {
3994
+ payload['providerBranch'] = providerBranch;
3995
+ }
3996
+ if (typeof providerSilentMode !== 'undefined') {
3997
+ payload['providerSilentMode'] = providerSilentMode;
3998
+ }
3999
+ if (typeof providerRootDirectory !== 'undefined') {
4000
+ payload['providerRootDirectory'] = providerRootDirectory;
4001
+ }
3816
4002
  const uri = new URL(this.client.config.endpoint + path);
3817
4003
  return yield this.client.call('put', uri, {
3818
4004
  'content-type': 'application/json',
@@ -3827,7 +4013,7 @@ class Functions extends Service {
3827
4013
  * @param {string} functionId
3828
4014
  * @throws {AppwriteException}
3829
4015
  * @returns {Promise}
3830
- */
4016
+ */
3831
4017
  delete(functionId) {
3832
4018
  return __awaiter(this, void 0, void 0, function* () {
3833
4019
  if (typeof functionId === 'undefined') {
@@ -3852,7 +4038,7 @@ class Functions extends Service {
3852
4038
  * @param {string} search
3853
4039
  * @throws {AppwriteException}
3854
4040
  * @returns {Promise}
3855
- */
4041
+ */
3856
4042
  listDeployments(functionId, queries, search) {
3857
4043
  return __awaiter(this, void 0, void 0, function* () {
3858
4044
  if (typeof functionId === 'undefined') {
@@ -3884,23 +4070,21 @@ class Functions extends Service {
3884
4070
  * learn more about code packaging in the [Appwrite Cloud Functions
3885
4071
  * tutorial](/docs/functions).
3886
4072
  *
3887
- * Use the "command" param to set the entry point used to execute your code.
4073
+ * Use the "command" param to set the entrypoint used to execute your code.
3888
4074
  *
3889
4075
  * @param {string} functionId
3890
- * @param {string} entrypoint
3891
4076
  * @param {File} code
3892
4077
  * @param {boolean} activate
4078
+ * @param {string} entrypoint
4079
+ * @param {string} commands
3893
4080
  * @throws {AppwriteException}
3894
4081
  * @returns {Promise}
3895
- */
3896
- createDeployment(functionId, entrypoint, code, activate, onProgress = (progress) => { }) {
4082
+ */
4083
+ createDeployment(functionId, code, activate, entrypoint, commands, onProgress = (progress) => { }) {
3897
4084
  return __awaiter(this, void 0, void 0, function* () {
3898
4085
  if (typeof functionId === 'undefined') {
3899
4086
  throw new AppwriteException('Missing required parameter: "functionId"');
3900
4087
  }
3901
- if (typeof entrypoint === 'undefined') {
3902
- throw new AppwriteException('Missing required parameter: "entrypoint"');
3903
- }
3904
4088
  if (typeof code === 'undefined') {
3905
4089
  throw new AppwriteException('Missing required parameter: "code"');
3906
4090
  }
@@ -3912,6 +4096,9 @@ class Functions extends Service {
3912
4096
  if (typeof entrypoint !== 'undefined') {
3913
4097
  payload['entrypoint'] = entrypoint;
3914
4098
  }
4099
+ if (typeof commands !== 'undefined') {
4100
+ payload['commands'] = commands;
4101
+ }
3915
4102
  if (typeof code !== 'undefined') {
3916
4103
  payload['code'] = code;
3917
4104
  }
@@ -3970,7 +4157,7 @@ class Functions extends Service {
3970
4157
  * @param {string} deploymentId
3971
4158
  * @throws {AppwriteException}
3972
4159
  * @returns {Promise}
3973
- */
4160
+ */
3974
4161
  getDeployment(functionId, deploymentId) {
3975
4162
  return __awaiter(this, void 0, void 0, function* () {
3976
4163
  if (typeof functionId === 'undefined') {
@@ -3998,7 +4185,7 @@ class Functions extends Service {
3998
4185
  * @param {string} deploymentId
3999
4186
  * @throws {AppwriteException}
4000
4187
  * @returns {Promise}
4001
- */
4188
+ */
4002
4189
  updateDeployment(functionId, deploymentId) {
4003
4190
  return __awaiter(this, void 0, void 0, function* () {
4004
4191
  if (typeof functionId === 'undefined') {
@@ -4024,7 +4211,7 @@ class Functions extends Service {
4024
4211
  * @param {string} deploymentId
4025
4212
  * @throws {AppwriteException}
4026
4213
  * @returns {Promise}
4027
- */
4214
+ */
4028
4215
  deleteDeployment(functionId, deploymentId) {
4029
4216
  return __awaiter(this, void 0, void 0, function* () {
4030
4217
  if (typeof functionId === 'undefined') {
@@ -4050,7 +4237,7 @@ class Functions extends Service {
4050
4237
  * @param {string} buildId
4051
4238
  * @throws {AppwriteException}
4052
4239
  * @returns {Promise}
4053
- */
4240
+ */
4054
4241
  createBuild(functionId, deploymentId, buildId) {
4055
4242
  return __awaiter(this, void 0, void 0, function* () {
4056
4243
  if (typeof functionId === 'undefined') {
@@ -4070,6 +4257,31 @@ class Functions extends Service {
4070
4257
  }, payload);
4071
4258
  });
4072
4259
  }
4260
+ /**
4261
+ * Download Deployment
4262
+ *
4263
+ *
4264
+ * @param {string} functionId
4265
+ * @param {string} deploymentId
4266
+ * @throws {AppwriteException}
4267
+ * @returns {URL}
4268
+ */
4269
+ downloadDeployment(functionId, deploymentId) {
4270
+ if (typeof functionId === 'undefined') {
4271
+ throw new AppwriteException('Missing required parameter: "functionId"');
4272
+ }
4273
+ if (typeof deploymentId === 'undefined') {
4274
+ throw new AppwriteException('Missing required parameter: "deploymentId"');
4275
+ }
4276
+ let path = '/functions/{functionId}/deployments/{deploymentId}/download'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId);
4277
+ let payload = {};
4278
+ const uri = new URL(this.client.config.endpoint + path);
4279
+ payload['project'] = this.client.config.project;
4280
+ for (const [key, value] of Object.entries(Service.flatten(payload))) {
4281
+ uri.searchParams.append(key, value);
4282
+ }
4283
+ return uri;
4284
+ }
4073
4285
  /**
4074
4286
  * List Executions
4075
4287
  *
@@ -4081,7 +4293,7 @@ class Functions extends Service {
4081
4293
  * @param {string} search
4082
4294
  * @throws {AppwriteException}
4083
4295
  * @returns {Promise}
4084
- */
4296
+ */
4085
4297
  listExecutions(functionId, queries, search) {
4086
4298
  return __awaiter(this, void 0, void 0, function* () {
4087
4299
  if (typeof functionId === 'undefined') {
@@ -4110,25 +4322,37 @@ class Functions extends Service {
4110
4322
  * function execution process will start asynchronously.
4111
4323
  *
4112
4324
  * @param {string} functionId
4113
- * @param {string} data
4325
+ * @param {string} body
4114
4326
  * @param {boolean} async
4327
+ * @param {string} path
4328
+ * @param {string} method
4329
+ * @param {object} headers
4115
4330
  * @throws {AppwriteException}
4116
4331
  * @returns {Promise}
4117
- */
4118
- createExecution(functionId, data, async) {
4332
+ */
4333
+ createExecution(functionId, body, async, path, method, headers) {
4119
4334
  return __awaiter(this, void 0, void 0, function* () {
4120
4335
  if (typeof functionId === 'undefined') {
4121
4336
  throw new AppwriteException('Missing required parameter: "functionId"');
4122
4337
  }
4123
- let path = '/functions/{functionId}/executions'.replace('{functionId}', functionId);
4338
+ let _path = '/functions/{functionId}/executions'.replace('{functionId}', functionId);
4124
4339
  let payload = {};
4125
- if (typeof data !== 'undefined') {
4126
- payload['data'] = data;
4340
+ if (typeof body !== 'undefined') {
4341
+ payload['body'] = body;
4127
4342
  }
4128
4343
  if (typeof async !== 'undefined') {
4129
4344
  payload['async'] = async;
4130
4345
  }
4131
- const uri = new URL(this.client.config.endpoint + path);
4346
+ if (typeof path !== 'undefined') {
4347
+ payload['path'] = path;
4348
+ }
4349
+ if (typeof method !== 'undefined') {
4350
+ payload['method'] = method;
4351
+ }
4352
+ if (typeof headers !== 'undefined') {
4353
+ payload['headers'] = headers;
4354
+ }
4355
+ const uri = new URL(this.client.config.endpoint + _path);
4132
4356
  return yield this.client.call('post', uri, {
4133
4357
  'content-type': 'application/json',
4134
4358
  }, payload);
@@ -4143,7 +4367,7 @@ class Functions extends Service {
4143
4367
  * @param {string} executionId
4144
4368
  * @throws {AppwriteException}
4145
4369
  * @returns {Promise}
4146
- */
4370
+ */
4147
4371
  getExecution(functionId, executionId) {
4148
4372
  return __awaiter(this, void 0, void 0, function* () {
4149
4373
  if (typeof functionId === 'undefined') {
@@ -4168,7 +4392,7 @@ class Functions extends Service {
4168
4392
  * @param {string} range
4169
4393
  * @throws {AppwriteException}
4170
4394
  * @returns {Promise}
4171
- */
4395
+ */
4172
4396
  getFunctionUsage(functionId, range) {
4173
4397
  return __awaiter(this, void 0, void 0, function* () {
4174
4398
  if (typeof functionId === 'undefined') {
@@ -4193,7 +4417,7 @@ class Functions extends Service {
4193
4417
  * @param {string} functionId
4194
4418
  * @throws {AppwriteException}
4195
4419
  * @returns {Promise}
4196
- */
4420
+ */
4197
4421
  listVariables(functionId) {
4198
4422
  return __awaiter(this, void 0, void 0, function* () {
4199
4423
  if (typeof functionId === 'undefined') {
@@ -4210,15 +4434,15 @@ class Functions extends Service {
4210
4434
  /**
4211
4435
  * Create Variable
4212
4436
  *
4213
- * Create a new function variable. These variables can be accessed within
4214
- * function in the `env` object under the request variable.
4437
+ * Create a new function environment variable. These variables can be accessed
4438
+ * in the function at runtime as environment variables.
4215
4439
  *
4216
4440
  * @param {string} functionId
4217
4441
  * @param {string} key
4218
4442
  * @param {string} value
4219
4443
  * @throws {AppwriteException}
4220
4444
  * @returns {Promise}
4221
- */
4445
+ */
4222
4446
  createVariable(functionId, key, value) {
4223
4447
  return __awaiter(this, void 0, void 0, function* () {
4224
4448
  if (typeof functionId === 'undefined') {
@@ -4253,7 +4477,7 @@ class Functions extends Service {
4253
4477
  * @param {string} variableId
4254
4478
  * @throws {AppwriteException}
4255
4479
  * @returns {Promise}
4256
- */
4480
+ */
4257
4481
  getVariable(functionId, variableId) {
4258
4482
  return __awaiter(this, void 0, void 0, function* () {
4259
4483
  if (typeof functionId === 'undefined') {
@@ -4281,7 +4505,7 @@ class Functions extends Service {
4281
4505
  * @param {string} value
4282
4506
  * @throws {AppwriteException}
4283
4507
  * @returns {Promise}
4284
- */
4508
+ */
4285
4509
  updateVariable(functionId, variableId, key, value) {
4286
4510
  return __awaiter(this, void 0, void 0, function* () {
4287
4511
  if (typeof functionId === 'undefined') {
@@ -4316,7 +4540,7 @@ class Functions extends Service {
4316
4540
  * @param {string} variableId
4317
4541
  * @throws {AppwriteException}
4318
4542
  * @returns {Promise}
4319
- */
4543
+ */
4320
4544
  deleteVariable(functionId, variableId) {
4321
4545
  return __awaiter(this, void 0, void 0, function* () {
4322
4546
  if (typeof functionId === 'undefined') {
@@ -4347,7 +4571,7 @@ class Graphql extends Service {
4347
4571
  * @param {object} query
4348
4572
  * @throws {AppwriteException}
4349
4573
  * @returns {Promise}
4350
- */
4574
+ */
4351
4575
  query(query) {
4352
4576
  return __awaiter(this, void 0, void 0, function* () {
4353
4577
  if (typeof query === 'undefined') {
@@ -4373,7 +4597,7 @@ class Graphql extends Service {
4373
4597
  * @param {object} query
4374
4598
  * @throws {AppwriteException}
4375
4599
  * @returns {Promise}
4376
- */
4600
+ */
4377
4601
  mutation(query) {
4378
4602
  return __awaiter(this, void 0, void 0, function* () {
4379
4603
  if (typeof query === 'undefined') {
@@ -4404,7 +4628,7 @@ class Health extends Service {
4404
4628
  *
4405
4629
  * @throws {AppwriteException}
4406
4630
  * @returns {Promise}
4407
- */
4631
+ */
4408
4632
  get() {
4409
4633
  return __awaiter(this, void 0, void 0, function* () {
4410
4634
  let path = '/health';
@@ -4422,7 +4646,7 @@ class Health extends Service {
4422
4646
  *
4423
4647
  * @throws {AppwriteException}
4424
4648
  * @returns {Promise}
4425
- */
4649
+ */
4426
4650
  getAntivirus() {
4427
4651
  return __awaiter(this, void 0, void 0, function* () {
4428
4652
  let path = '/health/anti-virus';
@@ -4441,7 +4665,7 @@ class Health extends Service {
4441
4665
  *
4442
4666
  * @throws {AppwriteException}
4443
4667
  * @returns {Promise}
4444
- */
4668
+ */
4445
4669
  getCache() {
4446
4670
  return __awaiter(this, void 0, void 0, function* () {
4447
4671
  let path = '/health/cache';
@@ -4459,7 +4683,7 @@ class Health extends Service {
4459
4683
  *
4460
4684
  * @throws {AppwriteException}
4461
4685
  * @returns {Promise}
4462
- */
4686
+ */
4463
4687
  getDB() {
4464
4688
  return __awaiter(this, void 0, void 0, function* () {
4465
4689
  let path = '/health/db';
@@ -4477,7 +4701,7 @@ class Health extends Service {
4477
4701
  *
4478
4702
  * @throws {AppwriteException}
4479
4703
  * @returns {Promise}
4480
- */
4704
+ */
4481
4705
  getPubSub() {
4482
4706
  return __awaiter(this, void 0, void 0, function* () {
4483
4707
  let path = '/health/pubsub';
@@ -4496,7 +4720,7 @@ class Health extends Service {
4496
4720
  *
4497
4721
  * @throws {AppwriteException}
4498
4722
  * @returns {Promise}
4499
- */
4723
+ */
4500
4724
  getQueue() {
4501
4725
  return __awaiter(this, void 0, void 0, function* () {
4502
4726
  let path = '/health/queue';
@@ -4516,7 +4740,7 @@ class Health extends Service {
4516
4740
  *
4517
4741
  * @throws {AppwriteException}
4518
4742
  * @returns {Promise}
4519
- */
4743
+ */
4520
4744
  getQueueCertificates() {
4521
4745
  return __awaiter(this, void 0, void 0, function* () {
4522
4746
  let path = '/health/queue/certificates';
@@ -4533,7 +4757,7 @@ class Health extends Service {
4533
4757
  *
4534
4758
  * @throws {AppwriteException}
4535
4759
  * @returns {Promise}
4536
- */
4760
+ */
4537
4761
  getQueueFunctions() {
4538
4762
  return __awaiter(this, void 0, void 0, function* () {
4539
4763
  let path = '/health/queue/functions';
@@ -4552,7 +4776,7 @@ class Health extends Service {
4552
4776
  *
4553
4777
  * @throws {AppwriteException}
4554
4778
  * @returns {Promise}
4555
- */
4779
+ */
4556
4780
  getQueueLogs() {
4557
4781
  return __awaiter(this, void 0, void 0, function* () {
4558
4782
  let path = '/health/queue/logs';
@@ -4571,7 +4795,7 @@ class Health extends Service {
4571
4795
  *
4572
4796
  * @throws {AppwriteException}
4573
4797
  * @returns {Promise}
4574
- */
4798
+ */
4575
4799
  getQueueWebhooks() {
4576
4800
  return __awaiter(this, void 0, void 0, function* () {
4577
4801
  let path = '/health/queue/webhooks';
@@ -4589,7 +4813,7 @@ class Health extends Service {
4589
4813
  *
4590
4814
  * @throws {AppwriteException}
4591
4815
  * @returns {Promise}
4592
- */
4816
+ */
4593
4817
  getStorageLocal() {
4594
4818
  return __awaiter(this, void 0, void 0, function* () {
4595
4819
  let path = '/health/storage/local';
@@ -4613,7 +4837,7 @@ class Health extends Service {
4613
4837
  *
4614
4838
  * @throws {AppwriteException}
4615
4839
  * @returns {Promise}
4616
- */
4840
+ */
4617
4841
  getTime() {
4618
4842
  return __awaiter(this, void 0, void 0, function* () {
4619
4843
  let path = '/health/time';
@@ -4642,7 +4866,7 @@ class Locale extends Service {
4642
4866
  *
4643
4867
  * @throws {AppwriteException}
4644
4868
  * @returns {Promise}
4645
- */
4869
+ */
4646
4870
  get() {
4647
4871
  return __awaiter(this, void 0, void 0, function* () {
4648
4872
  let path = '/locale';
@@ -4653,6 +4877,25 @@ class Locale extends Service {
4653
4877
  }, payload);
4654
4878
  });
4655
4879
  }
4880
+ /**
4881
+ * List Locale Codes
4882
+ *
4883
+ * List of all locale codes in [ISO
4884
+ * 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
4885
+ *
4886
+ * @throws {AppwriteException}
4887
+ * @returns {Promise}
4888
+ */
4889
+ listCodes() {
4890
+ return __awaiter(this, void 0, void 0, function* () {
4891
+ let path = '/locale/codes';
4892
+ let payload = {};
4893
+ const uri = new URL(this.client.config.endpoint + path);
4894
+ return yield this.client.call('get', uri, {
4895
+ 'content-type': 'application/json',
4896
+ }, payload);
4897
+ });
4898
+ }
4656
4899
  /**
4657
4900
  * List Continents
4658
4901
  *
@@ -4661,7 +4904,7 @@ class Locale extends Service {
4661
4904
  *
4662
4905
  * @throws {AppwriteException}
4663
4906
  * @returns {Promise}
4664
- */
4907
+ */
4665
4908
  listContinents() {
4666
4909
  return __awaiter(this, void 0, void 0, function* () {
4667
4910
  let path = '/locale/continents';
@@ -4680,7 +4923,7 @@ class Locale extends Service {
4680
4923
  *
4681
4924
  * @throws {AppwriteException}
4682
4925
  * @returns {Promise}
4683
- */
4926
+ */
4684
4927
  listCountries() {
4685
4928
  return __awaiter(this, void 0, void 0, function* () {
4686
4929
  let path = '/locale/countries';
@@ -4699,7 +4942,7 @@ class Locale extends Service {
4699
4942
  *
4700
4943
  * @throws {AppwriteException}
4701
4944
  * @returns {Promise}
4702
- */
4945
+ */
4703
4946
  listCountriesEU() {
4704
4947
  return __awaiter(this, void 0, void 0, function* () {
4705
4948
  let path = '/locale/countries/eu';
@@ -4718,7 +4961,7 @@ class Locale extends Service {
4718
4961
  *
4719
4962
  * @throws {AppwriteException}
4720
4963
  * @returns {Promise}
4721
- */
4964
+ */
4722
4965
  listCountriesPhones() {
4723
4966
  return __awaiter(this, void 0, void 0, function* () {
4724
4967
  let path = '/locale/countries/phones';
@@ -4738,7 +4981,7 @@ class Locale extends Service {
4738
4981
  *
4739
4982
  * @throws {AppwriteException}
4740
4983
  * @returns {Promise}
4741
- */
4984
+ */
4742
4985
  listCurrencies() {
4743
4986
  return __awaiter(this, void 0, void 0, function* () {
4744
4987
  let path = '/locale/currencies';
@@ -4757,7 +5000,7 @@ class Locale extends Service {
4757
5000
  *
4758
5001
  * @throws {AppwriteException}
4759
5002
  * @returns {Promise}
4760
- */
5003
+ */
4761
5004
  listLanguages() {
4762
5005
  return __awaiter(this, void 0, void 0, function* () {
4763
5006
  let path = '/locale/languages';
@@ -4770,49 +5013,22 @@ class Locale extends Service {
4770
5013
  }
4771
5014
  }
4772
5015
 
4773
- class Project extends Service {
4774
- constructor(client) {
4775
- super(client);
4776
- }
4777
- /**
4778
- * Get usage stats for a project
4779
- *
4780
- *
4781
- * @param {string} range
4782
- * @throws {AppwriteException}
4783
- * @returns {Promise}
4784
- */
4785
- getUsage(range) {
4786
- return __awaiter(this, void 0, void 0, function* () {
4787
- let path = '/project/usage';
4788
- let payload = {};
4789
- if (typeof range !== 'undefined') {
4790
- payload['range'] = range;
4791
- }
4792
- const uri = new URL(this.client.config.endpoint + path);
4793
- return yield this.client.call('get', uri, {
4794
- 'content-type': 'application/json',
4795
- }, payload);
4796
- });
4797
- }
4798
- }
4799
-
4800
- class Projects extends Service {
5016
+ class Migrations extends Service {
4801
5017
  constructor(client) {
4802
5018
  super(client);
4803
5019
  }
4804
5020
  /**
4805
- * List Projects
5021
+ * List Migrations
4806
5022
  *
4807
5023
  *
4808
- * @param {string[]} queries
5024
+ * @param {string} queries
4809
5025
  * @param {string} search
4810
5026
  * @throws {AppwriteException}
4811
5027
  * @returns {Promise}
4812
- */
5028
+ */
4813
5029
  list(queries, search) {
4814
5030
  return __awaiter(this, void 0, void 0, function* () {
4815
- let path = '/projects';
5031
+ let path = '/migrations';
4816
5032
  let payload = {};
4817
5033
  if (typeof queries !== 'undefined') {
4818
5034
  payload['queries'] = queries;
@@ -4827,76 +5043,43 @@ class Projects extends Service {
4827
5043
  });
4828
5044
  }
4829
5045
  /**
4830
- * Create Project
5046
+ * Migrate Appwrite Data
4831
5047
  *
4832
5048
  *
5049
+ * @param {string[]} resources
5050
+ * @param {string} endpoint
4833
5051
  * @param {string} projectId
4834
- * @param {string} name
4835
- * @param {string} teamId
4836
- * @param {string} region
4837
- * @param {string} description
4838
- * @param {string} logo
4839
- * @param {string} url
4840
- * @param {string} legalName
4841
- * @param {string} legalCountry
4842
- * @param {string} legalState
4843
- * @param {string} legalCity
4844
- * @param {string} legalAddress
4845
- * @param {string} legalTaxId
5052
+ * @param {string} apiKey
4846
5053
  * @throws {AppwriteException}
4847
5054
  * @returns {Promise}
4848
- */
4849
- create(projectId, name, teamId, region, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId) {
5055
+ */
5056
+ createAppwriteMigration(resources, endpoint, projectId, apiKey) {
4850
5057
  return __awaiter(this, void 0, void 0, function* () {
5058
+ if (typeof resources === 'undefined') {
5059
+ throw new AppwriteException('Missing required parameter: "resources"');
5060
+ }
5061
+ if (typeof endpoint === 'undefined') {
5062
+ throw new AppwriteException('Missing required parameter: "endpoint"');
5063
+ }
4851
5064
  if (typeof projectId === 'undefined') {
4852
5065
  throw new AppwriteException('Missing required parameter: "projectId"');
4853
5066
  }
4854
- if (typeof name === 'undefined') {
4855
- throw new AppwriteException('Missing required parameter: "name"');
4856
- }
4857
- if (typeof teamId === 'undefined') {
4858
- throw new AppwriteException('Missing required parameter: "teamId"');
5067
+ if (typeof apiKey === 'undefined') {
5068
+ throw new AppwriteException('Missing required parameter: "apiKey"');
4859
5069
  }
4860
- let path = '/projects';
5070
+ let path = '/migrations/appwrite';
4861
5071
  let payload = {};
4862
- if (typeof projectId !== 'undefined') {
4863
- payload['projectId'] = projectId;
4864
- }
4865
- if (typeof name !== 'undefined') {
4866
- payload['name'] = name;
4867
- }
4868
- if (typeof teamId !== 'undefined') {
4869
- payload['teamId'] = teamId;
4870
- }
4871
- if (typeof region !== 'undefined') {
4872
- payload['region'] = region;
4873
- }
4874
- if (typeof description !== 'undefined') {
4875
- payload['description'] = description;
4876
- }
4877
- if (typeof logo !== 'undefined') {
4878
- payload['logo'] = logo;
4879
- }
4880
- if (typeof url !== 'undefined') {
4881
- payload['url'] = url;
4882
- }
4883
- if (typeof legalName !== 'undefined') {
4884
- payload['legalName'] = legalName;
4885
- }
4886
- if (typeof legalCountry !== 'undefined') {
4887
- payload['legalCountry'] = legalCountry;
4888
- }
4889
- if (typeof legalState !== 'undefined') {
4890
- payload['legalState'] = legalState;
5072
+ if (typeof resources !== 'undefined') {
5073
+ payload['resources'] = resources;
4891
5074
  }
4892
- if (typeof legalCity !== 'undefined') {
4893
- payload['legalCity'] = legalCity;
5075
+ if (typeof endpoint !== 'undefined') {
5076
+ payload['endpoint'] = endpoint;
4894
5077
  }
4895
- if (typeof legalAddress !== 'undefined') {
4896
- payload['legalAddress'] = legalAddress;
5078
+ if (typeof projectId !== 'undefined') {
5079
+ payload['projectId'] = projectId;
4897
5080
  }
4898
- if (typeof legalTaxId !== 'undefined') {
4899
- payload['legalTaxId'] = legalTaxId;
5081
+ if (typeof apiKey !== 'undefined') {
5082
+ payload['apiKey'] = apiKey;
4900
5083
  }
4901
5084
  const uri = new URL(this.client.config.endpoint + path);
4902
5085
  return yield this.client.call('post', uri, {
@@ -4905,20 +5088,44 @@ class Projects extends Service {
4905
5088
  });
4906
5089
  }
4907
5090
  /**
4908
- * Get Project
5091
+ * Generate a report on Appwrite Data
4909
5092
  *
4910
5093
  *
4911
- * @param {string} projectId
5094
+ * @param {string[]} resources
5095
+ * @param {string} endpoint
5096
+ * @param {string} projectID
5097
+ * @param {string} key
4912
5098
  * @throws {AppwriteException}
4913
5099
  * @returns {Promise}
4914
- */
4915
- get(projectId) {
5100
+ */
5101
+ getAppwriteReport(resources, endpoint, projectID, key) {
4916
5102
  return __awaiter(this, void 0, void 0, function* () {
4917
- if (typeof projectId === 'undefined') {
4918
- throw new AppwriteException('Missing required parameter: "projectId"');
5103
+ if (typeof resources === 'undefined') {
5104
+ throw new AppwriteException('Missing required parameter: "resources"');
4919
5105
  }
4920
- let path = '/projects/{projectId}'.replace('{projectId}', projectId);
5106
+ if (typeof endpoint === 'undefined') {
5107
+ throw new AppwriteException('Missing required parameter: "endpoint"');
5108
+ }
5109
+ if (typeof projectID === 'undefined') {
5110
+ throw new AppwriteException('Missing required parameter: "projectID"');
5111
+ }
5112
+ if (typeof key === 'undefined') {
5113
+ throw new AppwriteException('Missing required parameter: "key"');
5114
+ }
5115
+ let path = '/migrations/appwrite/report';
4921
5116
  let payload = {};
5117
+ if (typeof resources !== 'undefined') {
5118
+ payload['resources'] = resources;
5119
+ }
5120
+ if (typeof endpoint !== 'undefined') {
5121
+ payload['endpoint'] = endpoint;
5122
+ }
5123
+ if (typeof projectID !== 'undefined') {
5124
+ payload['projectID'] = projectID;
5125
+ }
5126
+ if (typeof key !== 'undefined') {
5127
+ payload['key'] = key;
5128
+ }
4922
5129
  const uri = new URL(this.client.config.endpoint + path);
4923
5130
  return yield this.client.call('get', uri, {
4924
5131
  'content-type': 'application/json',
@@ -4926,191 +5133,958 @@ class Projects extends Service {
4926
5133
  });
4927
5134
  }
4928
5135
  /**
4929
- * Update Project
5136
+ * Migrate Firebase Data (Service Account)
4930
5137
  *
4931
5138
  *
4932
- * @param {string} projectId
4933
- * @param {string} name
4934
- * @param {string} description
4935
- * @param {string} logo
4936
- * @param {string} url
4937
- * @param {string} legalName
4938
- * @param {string} legalCountry
4939
- * @param {string} legalState
4940
- * @param {string} legalCity
4941
- * @param {string} legalAddress
4942
- * @param {string} legalTaxId
5139
+ * @param {string[]} resources
5140
+ * @param {string} serviceAccount
4943
5141
  * @throws {AppwriteException}
4944
5142
  * @returns {Promise}
4945
- */
4946
- update(projectId, name, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId) {
5143
+ */
5144
+ createFirebaseMigration(resources, serviceAccount) {
4947
5145
  return __awaiter(this, void 0, void 0, function* () {
4948
- if (typeof projectId === 'undefined') {
4949
- throw new AppwriteException('Missing required parameter: "projectId"');
5146
+ if (typeof resources === 'undefined') {
5147
+ throw new AppwriteException('Missing required parameter: "resources"');
4950
5148
  }
4951
- if (typeof name === 'undefined') {
4952
- throw new AppwriteException('Missing required parameter: "name"');
5149
+ if (typeof serviceAccount === 'undefined') {
5150
+ throw new AppwriteException('Missing required parameter: "serviceAccount"');
4953
5151
  }
4954
- let path = '/projects/{projectId}'.replace('{projectId}', projectId);
5152
+ let path = '/migrations/firebase';
4955
5153
  let payload = {};
4956
- if (typeof name !== 'undefined') {
4957
- payload['name'] = name;
4958
- }
4959
- if (typeof description !== 'undefined') {
4960
- payload['description'] = description;
4961
- }
4962
- if (typeof logo !== 'undefined') {
4963
- payload['logo'] = logo;
4964
- }
4965
- if (typeof url !== 'undefined') {
4966
- payload['url'] = url;
4967
- }
4968
- if (typeof legalName !== 'undefined') {
4969
- payload['legalName'] = legalName;
4970
- }
4971
- if (typeof legalCountry !== 'undefined') {
4972
- payload['legalCountry'] = legalCountry;
5154
+ if (typeof resources !== 'undefined') {
5155
+ payload['resources'] = resources;
4973
5156
  }
4974
- if (typeof legalState !== 'undefined') {
4975
- payload['legalState'] = legalState;
4976
- }
4977
- if (typeof legalCity !== 'undefined') {
4978
- payload['legalCity'] = legalCity;
4979
- }
4980
- if (typeof legalAddress !== 'undefined') {
4981
- payload['legalAddress'] = legalAddress;
4982
- }
4983
- if (typeof legalTaxId !== 'undefined') {
4984
- payload['legalTaxId'] = legalTaxId;
5157
+ if (typeof serviceAccount !== 'undefined') {
5158
+ payload['serviceAccount'] = serviceAccount;
4985
5159
  }
4986
5160
  const uri = new URL(this.client.config.endpoint + path);
4987
- return yield this.client.call('patch', uri, {
5161
+ return yield this.client.call('post', uri, {
4988
5162
  'content-type': 'application/json',
4989
5163
  }, payload);
4990
5164
  });
4991
5165
  }
4992
5166
  /**
4993
- * Delete Project
5167
+ * Revoke Appwrite&#039;s authorization to access Firebase Projects
4994
5168
  *
4995
5169
  *
4996
- * @param {string} projectId
4997
- * @param {string} password
4998
5170
  * @throws {AppwriteException}
4999
5171
  * @returns {Promise}
5000
- */
5001
- delete(projectId, password) {
5172
+ */
5173
+ deleteFirebaseAuth() {
5002
5174
  return __awaiter(this, void 0, void 0, function* () {
5003
- if (typeof projectId === 'undefined') {
5004
- throw new AppwriteException('Missing required parameter: "projectId"');
5005
- }
5006
- if (typeof password === 'undefined') {
5007
- throw new AppwriteException('Missing required parameter: "password"');
5008
- }
5009
- let path = '/projects/{projectId}'.replace('{projectId}', projectId);
5175
+ let path = '/migrations/firebase/deauthorize';
5010
5176
  let payload = {};
5011
- if (typeof password !== 'undefined') {
5012
- payload['password'] = password;
5013
- }
5014
5177
  const uri = new URL(this.client.config.endpoint + path);
5015
- return yield this.client.call('delete', uri, {
5178
+ return yield this.client.call('get', uri, {
5016
5179
  'content-type': 'application/json',
5017
5180
  }, payload);
5018
5181
  });
5019
5182
  }
5020
5183
  /**
5021
- * Update Project Authentication Duration
5184
+ * Migrate Firebase Data (OAuth)
5022
5185
  *
5023
5186
  *
5187
+ * @param {string[]} resources
5024
5188
  * @param {string} projectId
5025
- * @param {number} duration
5026
5189
  * @throws {AppwriteException}
5027
5190
  * @returns {Promise}
5028
- */
5029
- updateAuthDuration(projectId, duration) {
5191
+ */
5192
+ createFirebaseOAuthMigration(resources, projectId) {
5030
5193
  return __awaiter(this, void 0, void 0, function* () {
5194
+ if (typeof resources === 'undefined') {
5195
+ throw new AppwriteException('Missing required parameter: "resources"');
5196
+ }
5031
5197
  if (typeof projectId === 'undefined') {
5032
5198
  throw new AppwriteException('Missing required parameter: "projectId"');
5033
5199
  }
5034
- if (typeof duration === 'undefined') {
5035
- throw new AppwriteException('Missing required parameter: "duration"');
5036
- }
5037
- let path = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
5200
+ let path = '/migrations/firebase/oauth';
5038
5201
  let payload = {};
5039
- if (typeof duration !== 'undefined') {
5040
- payload['duration'] = duration;
5202
+ if (typeof resources !== 'undefined') {
5203
+ payload['resources'] = resources;
5204
+ }
5205
+ if (typeof projectId !== 'undefined') {
5206
+ payload['projectId'] = projectId;
5041
5207
  }
5042
5208
  const uri = new URL(this.client.config.endpoint + path);
5043
- return yield this.client.call('patch', uri, {
5209
+ return yield this.client.call('post', uri, {
5044
5210
  'content-type': 'application/json',
5045
5211
  }, payload);
5046
5212
  });
5047
5213
  }
5048
5214
  /**
5049
- * Update Project users limit
5215
+ * List Firebase Projects
5050
5216
  *
5051
5217
  *
5052
- * @param {string} projectId
5053
- * @param {number} limit
5054
5218
  * @throws {AppwriteException}
5055
5219
  * @returns {Promise}
5056
- */
5057
- updateAuthLimit(projectId, limit) {
5220
+ */
5221
+ listFirebaseProjects() {
5058
5222
  return __awaiter(this, void 0, void 0, function* () {
5059
- if (typeof projectId === 'undefined') {
5060
- throw new AppwriteException('Missing required parameter: "projectId"');
5061
- }
5062
- if (typeof limit === 'undefined') {
5063
- throw new AppwriteException('Missing required parameter: "limit"');
5064
- }
5065
- let path = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
5223
+ let path = '/migrations/firebase/projects';
5066
5224
  let payload = {};
5067
- if (typeof limit !== 'undefined') {
5068
- payload['limit'] = limit;
5069
- }
5070
5225
  const uri = new URL(this.client.config.endpoint + path);
5071
- return yield this.client.call('patch', uri, {
5226
+ return yield this.client.call('get', uri, {
5072
5227
  'content-type': 'application/json',
5073
5228
  }, payload);
5074
5229
  });
5075
5230
  }
5076
5231
  /**
5077
- * Update Project user sessions limit
5232
+ * Generate a report on Firebase Data
5078
5233
  *
5079
5234
  *
5080
- * @param {string} projectId
5081
- * @param {number} limit
5235
+ * @param {string[]} resources
5236
+ * @param {string} serviceAccount
5082
5237
  * @throws {AppwriteException}
5083
5238
  * @returns {Promise}
5084
- */
5085
- updateAuthSessionsLimit(projectId, limit) {
5239
+ */
5240
+ getFirebaseReport(resources, serviceAccount) {
5086
5241
  return __awaiter(this, void 0, void 0, function* () {
5087
- if (typeof projectId === 'undefined') {
5088
- throw new AppwriteException('Missing required parameter: "projectId"');
5242
+ if (typeof resources === 'undefined') {
5243
+ throw new AppwriteException('Missing required parameter: "resources"');
5089
5244
  }
5090
- if (typeof limit === 'undefined') {
5091
- throw new AppwriteException('Missing required parameter: "limit"');
5245
+ if (typeof serviceAccount === 'undefined') {
5246
+ throw new AppwriteException('Missing required parameter: "serviceAccount"');
5092
5247
  }
5093
- let path = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
5248
+ let path = '/migrations/firebase/report';
5094
5249
  let payload = {};
5095
- if (typeof limit !== 'undefined') {
5096
- payload['limit'] = limit;
5250
+ if (typeof resources !== 'undefined') {
5251
+ payload['resources'] = resources;
5252
+ }
5253
+ if (typeof serviceAccount !== 'undefined') {
5254
+ payload['serviceAccount'] = serviceAccount;
5097
5255
  }
5098
5256
  const uri = new URL(this.client.config.endpoint + path);
5099
- return yield this.client.call('patch', uri, {
5257
+ return yield this.client.call('get', uri, {
5100
5258
  'content-type': 'application/json',
5101
5259
  }, payload);
5102
5260
  });
5103
5261
  }
5104
5262
  /**
5105
- * Update authentication password disctionary status. Use this endpoint to enable or disable the dicitonary check for user password
5263
+ * Generate a report on Firebase Data using OAuth
5106
5264
  *
5107
5265
  *
5266
+ * @param {string[]} resources
5108
5267
  * @param {string} projectId
5109
- * @param {boolean} enabled
5110
5268
  * @throws {AppwriteException}
5111
5269
  * @returns {Promise}
5112
- */
5113
- updateAuthPasswordDictionary(projectId, enabled) {
5270
+ */
5271
+ getFirebaseReportOAuth(resources, projectId) {
5272
+ return __awaiter(this, void 0, void 0, function* () {
5273
+ if (typeof resources === 'undefined') {
5274
+ throw new AppwriteException('Missing required parameter: "resources"');
5275
+ }
5276
+ if (typeof projectId === 'undefined') {
5277
+ throw new AppwriteException('Missing required parameter: "projectId"');
5278
+ }
5279
+ let path = '/migrations/firebase/report/oauth';
5280
+ let payload = {};
5281
+ if (typeof resources !== 'undefined') {
5282
+ payload['resources'] = resources;
5283
+ }
5284
+ if (typeof projectId !== 'undefined') {
5285
+ payload['projectId'] = projectId;
5286
+ }
5287
+ const uri = new URL(this.client.config.endpoint + path);
5288
+ return yield this.client.call('get', uri, {
5289
+ 'content-type': 'application/json',
5290
+ }, payload);
5291
+ });
5292
+ }
5293
+ /**
5294
+ * Migrate NHost Data
5295
+ *
5296
+ *
5297
+ * @param {string[]} resources
5298
+ * @param {string} subdomain
5299
+ * @param {string} region
5300
+ * @param {string} adminSecret
5301
+ * @param {string} database
5302
+ * @param {string} username
5303
+ * @param {string} password
5304
+ * @param {number} port
5305
+ * @throws {AppwriteException}
5306
+ * @returns {Promise}
5307
+ */
5308
+ createNHostMigration(resources, subdomain, region, adminSecret, database, username, password, port) {
5309
+ return __awaiter(this, void 0, void 0, function* () {
5310
+ if (typeof resources === 'undefined') {
5311
+ throw new AppwriteException('Missing required parameter: "resources"');
5312
+ }
5313
+ if (typeof subdomain === 'undefined') {
5314
+ throw new AppwriteException('Missing required parameter: "subdomain"');
5315
+ }
5316
+ if (typeof region === 'undefined') {
5317
+ throw new AppwriteException('Missing required parameter: "region"');
5318
+ }
5319
+ if (typeof adminSecret === 'undefined') {
5320
+ throw new AppwriteException('Missing required parameter: "adminSecret"');
5321
+ }
5322
+ if (typeof database === 'undefined') {
5323
+ throw new AppwriteException('Missing required parameter: "database"');
5324
+ }
5325
+ if (typeof username === 'undefined') {
5326
+ throw new AppwriteException('Missing required parameter: "username"');
5327
+ }
5328
+ if (typeof password === 'undefined') {
5329
+ throw new AppwriteException('Missing required parameter: "password"');
5330
+ }
5331
+ let path = '/migrations/nhost';
5332
+ let payload = {};
5333
+ if (typeof resources !== 'undefined') {
5334
+ payload['resources'] = resources;
5335
+ }
5336
+ if (typeof subdomain !== 'undefined') {
5337
+ payload['subdomain'] = subdomain;
5338
+ }
5339
+ if (typeof region !== 'undefined') {
5340
+ payload['region'] = region;
5341
+ }
5342
+ if (typeof adminSecret !== 'undefined') {
5343
+ payload['adminSecret'] = adminSecret;
5344
+ }
5345
+ if (typeof database !== 'undefined') {
5346
+ payload['database'] = database;
5347
+ }
5348
+ if (typeof username !== 'undefined') {
5349
+ payload['username'] = username;
5350
+ }
5351
+ if (typeof password !== 'undefined') {
5352
+ payload['password'] = password;
5353
+ }
5354
+ if (typeof port !== 'undefined') {
5355
+ payload['port'] = port;
5356
+ }
5357
+ const uri = new URL(this.client.config.endpoint + path);
5358
+ return yield this.client.call('post', uri, {
5359
+ 'content-type': 'application/json',
5360
+ }, payload);
5361
+ });
5362
+ }
5363
+ /**
5364
+ * Generate a report on NHost Data
5365
+ *
5366
+ *
5367
+ * @param {string[]} resources
5368
+ * @param {string} subdomain
5369
+ * @param {string} region
5370
+ * @param {string} adminSecret
5371
+ * @param {string} database
5372
+ * @param {string} username
5373
+ * @param {string} password
5374
+ * @param {number} port
5375
+ * @throws {AppwriteException}
5376
+ * @returns {Promise}
5377
+ */
5378
+ getNHostReport(resources, subdomain, region, adminSecret, database, username, password, port) {
5379
+ return __awaiter(this, void 0, void 0, function* () {
5380
+ if (typeof resources === 'undefined') {
5381
+ throw new AppwriteException('Missing required parameter: "resources"');
5382
+ }
5383
+ if (typeof subdomain === 'undefined') {
5384
+ throw new AppwriteException('Missing required parameter: "subdomain"');
5385
+ }
5386
+ if (typeof region === 'undefined') {
5387
+ throw new AppwriteException('Missing required parameter: "region"');
5388
+ }
5389
+ if (typeof adminSecret === 'undefined') {
5390
+ throw new AppwriteException('Missing required parameter: "adminSecret"');
5391
+ }
5392
+ if (typeof database === 'undefined') {
5393
+ throw new AppwriteException('Missing required parameter: "database"');
5394
+ }
5395
+ if (typeof username === 'undefined') {
5396
+ throw new AppwriteException('Missing required parameter: "username"');
5397
+ }
5398
+ if (typeof password === 'undefined') {
5399
+ throw new AppwriteException('Missing required parameter: "password"');
5400
+ }
5401
+ let path = '/migrations/nhost/report';
5402
+ let payload = {};
5403
+ if (typeof resources !== 'undefined') {
5404
+ payload['resources'] = resources;
5405
+ }
5406
+ if (typeof subdomain !== 'undefined') {
5407
+ payload['subdomain'] = subdomain;
5408
+ }
5409
+ if (typeof region !== 'undefined') {
5410
+ payload['region'] = region;
5411
+ }
5412
+ if (typeof adminSecret !== 'undefined') {
5413
+ payload['adminSecret'] = adminSecret;
5414
+ }
5415
+ if (typeof database !== 'undefined') {
5416
+ payload['database'] = database;
5417
+ }
5418
+ if (typeof username !== 'undefined') {
5419
+ payload['username'] = username;
5420
+ }
5421
+ if (typeof password !== 'undefined') {
5422
+ payload['password'] = password;
5423
+ }
5424
+ if (typeof port !== 'undefined') {
5425
+ payload['port'] = port;
5426
+ }
5427
+ const uri = new URL(this.client.config.endpoint + path);
5428
+ return yield this.client.call('get', uri, {
5429
+ 'content-type': 'application/json',
5430
+ }, payload);
5431
+ });
5432
+ }
5433
+ /**
5434
+ * Migrate Supabase Data
5435
+ *
5436
+ *
5437
+ * @param {string[]} resources
5438
+ * @param {string} endpoint
5439
+ * @param {string} apiKey
5440
+ * @param {string} databaseHost
5441
+ * @param {string} username
5442
+ * @param {string} password
5443
+ * @param {number} port
5444
+ * @throws {AppwriteException}
5445
+ * @returns {Promise}
5446
+ */
5447
+ createSupabaseMigration(resources, endpoint, apiKey, databaseHost, username, password, port) {
5448
+ return __awaiter(this, void 0, void 0, function* () {
5449
+ if (typeof resources === 'undefined') {
5450
+ throw new AppwriteException('Missing required parameter: "resources"');
5451
+ }
5452
+ if (typeof endpoint === 'undefined') {
5453
+ throw new AppwriteException('Missing required parameter: "endpoint"');
5454
+ }
5455
+ if (typeof apiKey === 'undefined') {
5456
+ throw new AppwriteException('Missing required parameter: "apiKey"');
5457
+ }
5458
+ if (typeof databaseHost === 'undefined') {
5459
+ throw new AppwriteException('Missing required parameter: "databaseHost"');
5460
+ }
5461
+ if (typeof username === 'undefined') {
5462
+ throw new AppwriteException('Missing required parameter: "username"');
5463
+ }
5464
+ if (typeof password === 'undefined') {
5465
+ throw new AppwriteException('Missing required parameter: "password"');
5466
+ }
5467
+ let path = '/migrations/supabase';
5468
+ let payload = {};
5469
+ if (typeof resources !== 'undefined') {
5470
+ payload['resources'] = resources;
5471
+ }
5472
+ if (typeof endpoint !== 'undefined') {
5473
+ payload['endpoint'] = endpoint;
5474
+ }
5475
+ if (typeof apiKey !== 'undefined') {
5476
+ payload['apiKey'] = apiKey;
5477
+ }
5478
+ if (typeof databaseHost !== 'undefined') {
5479
+ payload['databaseHost'] = databaseHost;
5480
+ }
5481
+ if (typeof username !== 'undefined') {
5482
+ payload['username'] = username;
5483
+ }
5484
+ if (typeof password !== 'undefined') {
5485
+ payload['password'] = password;
5486
+ }
5487
+ if (typeof port !== 'undefined') {
5488
+ payload['port'] = port;
5489
+ }
5490
+ const uri = new URL(this.client.config.endpoint + path);
5491
+ return yield this.client.call('post', uri, {
5492
+ 'content-type': 'application/json',
5493
+ }, payload);
5494
+ });
5495
+ }
5496
+ /**
5497
+ * Generate a report on Supabase Data
5498
+ *
5499
+ *
5500
+ * @param {string[]} resources
5501
+ * @param {string} endpoint
5502
+ * @param {string} apiKey
5503
+ * @param {string} databaseHost
5504
+ * @param {string} username
5505
+ * @param {string} password
5506
+ * @param {number} port
5507
+ * @throws {AppwriteException}
5508
+ * @returns {Promise}
5509
+ */
5510
+ getSupabaseReport(resources, endpoint, apiKey, databaseHost, username, password, port) {
5511
+ return __awaiter(this, void 0, void 0, function* () {
5512
+ if (typeof resources === 'undefined') {
5513
+ throw new AppwriteException('Missing required parameter: "resources"');
5514
+ }
5515
+ if (typeof endpoint === 'undefined') {
5516
+ throw new AppwriteException('Missing required parameter: "endpoint"');
5517
+ }
5518
+ if (typeof apiKey === 'undefined') {
5519
+ throw new AppwriteException('Missing required parameter: "apiKey"');
5520
+ }
5521
+ if (typeof databaseHost === 'undefined') {
5522
+ throw new AppwriteException('Missing required parameter: "databaseHost"');
5523
+ }
5524
+ if (typeof username === 'undefined') {
5525
+ throw new AppwriteException('Missing required parameter: "username"');
5526
+ }
5527
+ if (typeof password === 'undefined') {
5528
+ throw new AppwriteException('Missing required parameter: "password"');
5529
+ }
5530
+ let path = '/migrations/supabase/report';
5531
+ let payload = {};
5532
+ if (typeof resources !== 'undefined') {
5533
+ payload['resources'] = resources;
5534
+ }
5535
+ if (typeof endpoint !== 'undefined') {
5536
+ payload['endpoint'] = endpoint;
5537
+ }
5538
+ if (typeof apiKey !== 'undefined') {
5539
+ payload['apiKey'] = apiKey;
5540
+ }
5541
+ if (typeof databaseHost !== 'undefined') {
5542
+ payload['databaseHost'] = databaseHost;
5543
+ }
5544
+ if (typeof username !== 'undefined') {
5545
+ payload['username'] = username;
5546
+ }
5547
+ if (typeof password !== 'undefined') {
5548
+ payload['password'] = password;
5549
+ }
5550
+ if (typeof port !== 'undefined') {
5551
+ payload['port'] = port;
5552
+ }
5553
+ const uri = new URL(this.client.config.endpoint + path);
5554
+ return yield this.client.call('get', uri, {
5555
+ 'content-type': 'application/json',
5556
+ }, payload);
5557
+ });
5558
+ }
5559
+ /**
5560
+ * Get Migration
5561
+ *
5562
+ *
5563
+ * @param {string} migrationId
5564
+ * @throws {AppwriteException}
5565
+ * @returns {Promise}
5566
+ */
5567
+ get(migrationId) {
5568
+ return __awaiter(this, void 0, void 0, function* () {
5569
+ if (typeof migrationId === 'undefined') {
5570
+ throw new AppwriteException('Missing required parameter: "migrationId"');
5571
+ }
5572
+ let path = '/migrations/{migrationId}'.replace('{migrationId}', migrationId);
5573
+ let payload = {};
5574
+ const uri = new URL(this.client.config.endpoint + path);
5575
+ return yield this.client.call('get', uri, {
5576
+ 'content-type': 'application/json',
5577
+ }, payload);
5578
+ });
5579
+ }
5580
+ /**
5581
+ * Retry Migration
5582
+ *
5583
+ *
5584
+ * @param {string} migrationId
5585
+ * @throws {AppwriteException}
5586
+ * @returns {Promise}
5587
+ */
5588
+ retry(migrationId) {
5589
+ return __awaiter(this, void 0, void 0, function* () {
5590
+ if (typeof migrationId === 'undefined') {
5591
+ throw new AppwriteException('Missing required parameter: "migrationId"');
5592
+ }
5593
+ let path = '/migrations/{migrationId}'.replace('{migrationId}', migrationId);
5594
+ let payload = {};
5595
+ const uri = new URL(this.client.config.endpoint + path);
5596
+ return yield this.client.call('patch', uri, {
5597
+ 'content-type': 'application/json',
5598
+ }, payload);
5599
+ });
5600
+ }
5601
+ /**
5602
+ * Delete Migration
5603
+ *
5604
+ *
5605
+ * @param {string} migrationId
5606
+ * @throws {AppwriteException}
5607
+ * @returns {Promise}
5608
+ */
5609
+ delete(migrationId) {
5610
+ return __awaiter(this, void 0, void 0, function* () {
5611
+ if (typeof migrationId === 'undefined') {
5612
+ throw new AppwriteException('Missing required parameter: "migrationId"');
5613
+ }
5614
+ let path = '/migrations/{migrationId}'.replace('{migrationId}', migrationId);
5615
+ let payload = {};
5616
+ const uri = new URL(this.client.config.endpoint + path);
5617
+ return yield this.client.call('delete', uri, {
5618
+ 'content-type': 'application/json',
5619
+ }, payload);
5620
+ });
5621
+ }
5622
+ }
5623
+
5624
+ class Project extends Service {
5625
+ constructor(client) {
5626
+ super(client);
5627
+ }
5628
+ /**
5629
+ * Get usage stats for a project
5630
+ *
5631
+ *
5632
+ * @param {string} range
5633
+ * @throws {AppwriteException}
5634
+ * @returns {Promise}
5635
+ */
5636
+ getUsage(range) {
5637
+ return __awaiter(this, void 0, void 0, function* () {
5638
+ let path = '/project/usage';
5639
+ let payload = {};
5640
+ if (typeof range !== 'undefined') {
5641
+ payload['range'] = range;
5642
+ }
5643
+ const uri = new URL(this.client.config.endpoint + path);
5644
+ return yield this.client.call('get', uri, {
5645
+ 'content-type': 'application/json',
5646
+ }, payload);
5647
+ });
5648
+ }
5649
+ /**
5650
+ * List Variables
5651
+ *
5652
+ * Get a list of all project variables. These variables will be accessible in
5653
+ * all Appwrite Functions at runtime.
5654
+ *
5655
+ * @throws {AppwriteException}
5656
+ * @returns {Promise}
5657
+ */
5658
+ listVariables() {
5659
+ return __awaiter(this, void 0, void 0, function* () {
5660
+ let path = '/project/variables';
5661
+ let payload = {};
5662
+ const uri = new URL(this.client.config.endpoint + path);
5663
+ return yield this.client.call('get', uri, {
5664
+ 'content-type': 'application/json',
5665
+ }, payload);
5666
+ });
5667
+ }
5668
+ /**
5669
+ * Create Variable
5670
+ *
5671
+ * Create a new project variable. This variable will be accessible in all
5672
+ * Appwrite Functions at runtime.
5673
+ *
5674
+ * @param {string} key
5675
+ * @param {string} value
5676
+ * @throws {AppwriteException}
5677
+ * @returns {Promise}
5678
+ */
5679
+ createVariable(key, value) {
5680
+ return __awaiter(this, void 0, void 0, function* () {
5681
+ if (typeof key === 'undefined') {
5682
+ throw new AppwriteException('Missing required parameter: "key"');
5683
+ }
5684
+ if (typeof value === 'undefined') {
5685
+ throw new AppwriteException('Missing required parameter: "value"');
5686
+ }
5687
+ let path = '/project/variables';
5688
+ let payload = {};
5689
+ if (typeof key !== 'undefined') {
5690
+ payload['key'] = key;
5691
+ }
5692
+ if (typeof value !== 'undefined') {
5693
+ payload['value'] = value;
5694
+ }
5695
+ const uri = new URL(this.client.config.endpoint + path);
5696
+ return yield this.client.call('post', uri, {
5697
+ 'content-type': 'application/json',
5698
+ }, payload);
5699
+ });
5700
+ }
5701
+ /**
5702
+ * Get Variable
5703
+ *
5704
+ * Get a project variable by its unique ID.
5705
+ *
5706
+ * @param {string} variableId
5707
+ * @throws {AppwriteException}
5708
+ * @returns {Promise}
5709
+ */
5710
+ getVariable(variableId) {
5711
+ return __awaiter(this, void 0, void 0, function* () {
5712
+ if (typeof variableId === 'undefined') {
5713
+ throw new AppwriteException('Missing required parameter: "variableId"');
5714
+ }
5715
+ let path = '/project/variables/{variableId}'.replace('{variableId}', variableId);
5716
+ let payload = {};
5717
+ const uri = new URL(this.client.config.endpoint + path);
5718
+ return yield this.client.call('get', uri, {
5719
+ 'content-type': 'application/json',
5720
+ }, payload);
5721
+ });
5722
+ }
5723
+ /**
5724
+ * Update Variable
5725
+ *
5726
+ * Update project variable by its unique ID. This variable will be accessible
5727
+ * in all Appwrite Functions at runtime.
5728
+ *
5729
+ * @param {string} variableId
5730
+ * @param {string} key
5731
+ * @param {string} value
5732
+ * @throws {AppwriteException}
5733
+ * @returns {Promise}
5734
+ */
5735
+ updateVariable(variableId, key, value) {
5736
+ return __awaiter(this, void 0, void 0, function* () {
5737
+ if (typeof variableId === 'undefined') {
5738
+ throw new AppwriteException('Missing required parameter: "variableId"');
5739
+ }
5740
+ if (typeof key === 'undefined') {
5741
+ throw new AppwriteException('Missing required parameter: "key"');
5742
+ }
5743
+ let path = '/project/variables/{variableId}'.replace('{variableId}', variableId);
5744
+ let payload = {};
5745
+ if (typeof key !== 'undefined') {
5746
+ payload['key'] = key;
5747
+ }
5748
+ if (typeof value !== 'undefined') {
5749
+ payload['value'] = value;
5750
+ }
5751
+ const uri = new URL(this.client.config.endpoint + path);
5752
+ return yield this.client.call('put', uri, {
5753
+ 'content-type': 'application/json',
5754
+ }, payload);
5755
+ });
5756
+ }
5757
+ /**
5758
+ * Delete Variable
5759
+ *
5760
+ * Delete a project variable by its unique ID.
5761
+ *
5762
+ * @param {string} variableId
5763
+ * @throws {AppwriteException}
5764
+ * @returns {Promise}
5765
+ */
5766
+ deleteVariable(variableId) {
5767
+ return __awaiter(this, void 0, void 0, function* () {
5768
+ if (typeof variableId === 'undefined') {
5769
+ throw new AppwriteException('Missing required parameter: "variableId"');
5770
+ }
5771
+ let path = '/project/variables/{variableId}'.replace('{variableId}', variableId);
5772
+ let payload = {};
5773
+ const uri = new URL(this.client.config.endpoint + path);
5774
+ return yield this.client.call('delete', uri, {
5775
+ 'content-type': 'application/json',
5776
+ }, payload);
5777
+ });
5778
+ }
5779
+ }
5780
+
5781
+ class Projects extends Service {
5782
+ constructor(client) {
5783
+ super(client);
5784
+ }
5785
+ /**
5786
+ * List Projects
5787
+ *
5788
+ *
5789
+ * @param {string[]} queries
5790
+ * @param {string} search
5791
+ * @throws {AppwriteException}
5792
+ * @returns {Promise}
5793
+ */
5794
+ list(queries, search) {
5795
+ return __awaiter(this, void 0, void 0, function* () {
5796
+ let path = '/projects';
5797
+ let payload = {};
5798
+ if (typeof queries !== 'undefined') {
5799
+ payload['queries'] = queries;
5800
+ }
5801
+ if (typeof search !== 'undefined') {
5802
+ payload['search'] = search;
5803
+ }
5804
+ const uri = new URL(this.client.config.endpoint + path);
5805
+ return yield this.client.call('get', uri, {
5806
+ 'content-type': 'application/json',
5807
+ }, payload);
5808
+ });
5809
+ }
5810
+ /**
5811
+ * Create Project
5812
+ *
5813
+ *
5814
+ * @param {string} projectId
5815
+ * @param {string} name
5816
+ * @param {string} teamId
5817
+ * @param {string} region
5818
+ * @param {string} description
5819
+ * @param {string} logo
5820
+ * @param {string} url
5821
+ * @param {string} legalName
5822
+ * @param {string} legalCountry
5823
+ * @param {string} legalState
5824
+ * @param {string} legalCity
5825
+ * @param {string} legalAddress
5826
+ * @param {string} legalTaxId
5827
+ * @throws {AppwriteException}
5828
+ * @returns {Promise}
5829
+ */
5830
+ create(projectId, name, teamId, region, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId) {
5831
+ return __awaiter(this, void 0, void 0, function* () {
5832
+ if (typeof projectId === 'undefined') {
5833
+ throw new AppwriteException('Missing required parameter: "projectId"');
5834
+ }
5835
+ if (typeof name === 'undefined') {
5836
+ throw new AppwriteException('Missing required parameter: "name"');
5837
+ }
5838
+ if (typeof teamId === 'undefined') {
5839
+ throw new AppwriteException('Missing required parameter: "teamId"');
5840
+ }
5841
+ let path = '/projects';
5842
+ let payload = {};
5843
+ if (typeof projectId !== 'undefined') {
5844
+ payload['projectId'] = projectId;
5845
+ }
5846
+ if (typeof name !== 'undefined') {
5847
+ payload['name'] = name;
5848
+ }
5849
+ if (typeof teamId !== 'undefined') {
5850
+ payload['teamId'] = teamId;
5851
+ }
5852
+ if (typeof region !== 'undefined') {
5853
+ payload['region'] = region;
5854
+ }
5855
+ if (typeof description !== 'undefined') {
5856
+ payload['description'] = description;
5857
+ }
5858
+ if (typeof logo !== 'undefined') {
5859
+ payload['logo'] = logo;
5860
+ }
5861
+ if (typeof url !== 'undefined') {
5862
+ payload['url'] = url;
5863
+ }
5864
+ if (typeof legalName !== 'undefined') {
5865
+ payload['legalName'] = legalName;
5866
+ }
5867
+ if (typeof legalCountry !== 'undefined') {
5868
+ payload['legalCountry'] = legalCountry;
5869
+ }
5870
+ if (typeof legalState !== 'undefined') {
5871
+ payload['legalState'] = legalState;
5872
+ }
5873
+ if (typeof legalCity !== 'undefined') {
5874
+ payload['legalCity'] = legalCity;
5875
+ }
5876
+ if (typeof legalAddress !== 'undefined') {
5877
+ payload['legalAddress'] = legalAddress;
5878
+ }
5879
+ if (typeof legalTaxId !== 'undefined') {
5880
+ payload['legalTaxId'] = legalTaxId;
5881
+ }
5882
+ const uri = new URL(this.client.config.endpoint + path);
5883
+ return yield this.client.call('post', uri, {
5884
+ 'content-type': 'application/json',
5885
+ }, payload);
5886
+ });
5887
+ }
5888
+ /**
5889
+ * Get Project
5890
+ *
5891
+ *
5892
+ * @param {string} projectId
5893
+ * @throws {AppwriteException}
5894
+ * @returns {Promise}
5895
+ */
5896
+ get(projectId) {
5897
+ return __awaiter(this, void 0, void 0, function* () {
5898
+ if (typeof projectId === 'undefined') {
5899
+ throw new AppwriteException('Missing required parameter: "projectId"');
5900
+ }
5901
+ let path = '/projects/{projectId}'.replace('{projectId}', projectId);
5902
+ let payload = {};
5903
+ const uri = new URL(this.client.config.endpoint + path);
5904
+ return yield this.client.call('get', uri, {
5905
+ 'content-type': 'application/json',
5906
+ }, payload);
5907
+ });
5908
+ }
5909
+ /**
5910
+ * Update Project
5911
+ *
5912
+ *
5913
+ * @param {string} projectId
5914
+ * @param {string} name
5915
+ * @param {string} description
5916
+ * @param {string} logo
5917
+ * @param {string} url
5918
+ * @param {string} legalName
5919
+ * @param {string} legalCountry
5920
+ * @param {string} legalState
5921
+ * @param {string} legalCity
5922
+ * @param {string} legalAddress
5923
+ * @param {string} legalTaxId
5924
+ * @throws {AppwriteException}
5925
+ * @returns {Promise}
5926
+ */
5927
+ update(projectId, name, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId) {
5928
+ return __awaiter(this, void 0, void 0, function* () {
5929
+ if (typeof projectId === 'undefined') {
5930
+ throw new AppwriteException('Missing required parameter: "projectId"');
5931
+ }
5932
+ if (typeof name === 'undefined') {
5933
+ throw new AppwriteException('Missing required parameter: "name"');
5934
+ }
5935
+ let path = '/projects/{projectId}'.replace('{projectId}', projectId);
5936
+ let payload = {};
5937
+ if (typeof name !== 'undefined') {
5938
+ payload['name'] = name;
5939
+ }
5940
+ if (typeof description !== 'undefined') {
5941
+ payload['description'] = description;
5942
+ }
5943
+ if (typeof logo !== 'undefined') {
5944
+ payload['logo'] = logo;
5945
+ }
5946
+ if (typeof url !== 'undefined') {
5947
+ payload['url'] = url;
5948
+ }
5949
+ if (typeof legalName !== 'undefined') {
5950
+ payload['legalName'] = legalName;
5951
+ }
5952
+ if (typeof legalCountry !== 'undefined') {
5953
+ payload['legalCountry'] = legalCountry;
5954
+ }
5955
+ if (typeof legalState !== 'undefined') {
5956
+ payload['legalState'] = legalState;
5957
+ }
5958
+ if (typeof legalCity !== 'undefined') {
5959
+ payload['legalCity'] = legalCity;
5960
+ }
5961
+ if (typeof legalAddress !== 'undefined') {
5962
+ payload['legalAddress'] = legalAddress;
5963
+ }
5964
+ if (typeof legalTaxId !== 'undefined') {
5965
+ payload['legalTaxId'] = legalTaxId;
5966
+ }
5967
+ const uri = new URL(this.client.config.endpoint + path);
5968
+ return yield this.client.call('patch', uri, {
5969
+ 'content-type': 'application/json',
5970
+ }, payload);
5971
+ });
5972
+ }
5973
+ /**
5974
+ * Delete Project
5975
+ *
5976
+ *
5977
+ * @param {string} projectId
5978
+ * @throws {AppwriteException}
5979
+ * @returns {Promise}
5980
+ */
5981
+ delete(projectId) {
5982
+ return __awaiter(this, void 0, void 0, function* () {
5983
+ if (typeof projectId === 'undefined') {
5984
+ throw new AppwriteException('Missing required parameter: "projectId"');
5985
+ }
5986
+ let path = '/projects/{projectId}'.replace('{projectId}', projectId);
5987
+ let payload = {};
5988
+ const uri = new URL(this.client.config.endpoint + path);
5989
+ return yield this.client.call('delete', uri, {
5990
+ 'content-type': 'application/json',
5991
+ }, payload);
5992
+ });
5993
+ }
5994
+ /**
5995
+ * Update Project Authentication Duration
5996
+ *
5997
+ *
5998
+ * @param {string} projectId
5999
+ * @param {number} duration
6000
+ * @throws {AppwriteException}
6001
+ * @returns {Promise}
6002
+ */
6003
+ updateAuthDuration(projectId, duration) {
6004
+ return __awaiter(this, void 0, void 0, function* () {
6005
+ if (typeof projectId === 'undefined') {
6006
+ throw new AppwriteException('Missing required parameter: "projectId"');
6007
+ }
6008
+ if (typeof duration === 'undefined') {
6009
+ throw new AppwriteException('Missing required parameter: "duration"');
6010
+ }
6011
+ let path = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
6012
+ let payload = {};
6013
+ if (typeof duration !== 'undefined') {
6014
+ payload['duration'] = duration;
6015
+ }
6016
+ const uri = new URL(this.client.config.endpoint + path);
6017
+ return yield this.client.call('patch', uri, {
6018
+ 'content-type': 'application/json',
6019
+ }, payload);
6020
+ });
6021
+ }
6022
+ /**
6023
+ * Update Project users limit
6024
+ *
6025
+ *
6026
+ * @param {string} projectId
6027
+ * @param {number} limit
6028
+ * @throws {AppwriteException}
6029
+ * @returns {Promise}
6030
+ */
6031
+ updateAuthLimit(projectId, limit) {
6032
+ return __awaiter(this, void 0, void 0, function* () {
6033
+ if (typeof projectId === 'undefined') {
6034
+ throw new AppwriteException('Missing required parameter: "projectId"');
6035
+ }
6036
+ if (typeof limit === 'undefined') {
6037
+ throw new AppwriteException('Missing required parameter: "limit"');
6038
+ }
6039
+ let path = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
6040
+ let payload = {};
6041
+ if (typeof limit !== 'undefined') {
6042
+ payload['limit'] = limit;
6043
+ }
6044
+ const uri = new URL(this.client.config.endpoint + path);
6045
+ return yield this.client.call('patch', uri, {
6046
+ 'content-type': 'application/json',
6047
+ }, payload);
6048
+ });
6049
+ }
6050
+ /**
6051
+ * Update Project user sessions limit
6052
+ *
6053
+ *
6054
+ * @param {string} projectId
6055
+ * @param {number} limit
6056
+ * @throws {AppwriteException}
6057
+ * @returns {Promise}
6058
+ */
6059
+ updateAuthSessionsLimit(projectId, limit) {
6060
+ return __awaiter(this, void 0, void 0, function* () {
6061
+ if (typeof projectId === 'undefined') {
6062
+ throw new AppwriteException('Missing required parameter: "projectId"');
6063
+ }
6064
+ if (typeof limit === 'undefined') {
6065
+ throw new AppwriteException('Missing required parameter: "limit"');
6066
+ }
6067
+ let path = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
6068
+ let payload = {};
6069
+ if (typeof limit !== 'undefined') {
6070
+ payload['limit'] = limit;
6071
+ }
6072
+ const uri = new URL(this.client.config.endpoint + path);
6073
+ return yield this.client.call('patch', uri, {
6074
+ 'content-type': 'application/json',
6075
+ }, payload);
6076
+ });
6077
+ }
6078
+ /**
6079
+ * Update authentication password dictionary status. Use this endpoint to enable or disable the dicitonary check for user password
6080
+ *
6081
+ *
6082
+ * @param {string} projectId
6083
+ * @param {boolean} enabled
6084
+ * @throws {AppwriteException}
6085
+ * @returns {Promise}
6086
+ */
6087
+ updateAuthPasswordDictionary(projectId, enabled) {
5114
6088
  return __awaiter(this, void 0, void 0, function* () {
5115
6089
  if (typeof projectId === 'undefined') {
5116
6090
  throw new AppwriteException('Missing required parameter: "projectId"');
@@ -5137,7 +6111,7 @@ class Projects extends Service {
5137
6111
  * @param {number} limit
5138
6112
  * @throws {AppwriteException}
5139
6113
  * @returns {Promise}
5140
- */
6114
+ */
5141
6115
  updateAuthPasswordHistory(projectId, limit) {
5142
6116
  return __awaiter(this, void 0, void 0, function* () {
5143
6117
  if (typeof projectId === 'undefined') {
@@ -5157,6 +6131,34 @@ class Projects extends Service {
5157
6131
  }, payload);
5158
6132
  });
5159
6133
  }
6134
+ /**
6135
+ * Enable or disable checking user passwords for similarity with their personal data.
6136
+ *
6137
+ *
6138
+ * @param {string} projectId
6139
+ * @param {boolean} enabled
6140
+ * @throws {AppwriteException}
6141
+ * @returns {Promise}
6142
+ */
6143
+ updatePersonalDataCheck(projectId, enabled) {
6144
+ return __awaiter(this, void 0, void 0, function* () {
6145
+ if (typeof projectId === 'undefined') {
6146
+ throw new AppwriteException('Missing required parameter: "projectId"');
6147
+ }
6148
+ if (typeof enabled === 'undefined') {
6149
+ throw new AppwriteException('Missing required parameter: "enabled"');
6150
+ }
6151
+ let path = '/projects/{projectId}/auth/personal-data'.replace('{projectId}', projectId);
6152
+ let payload = {};
6153
+ if (typeof enabled !== 'undefined') {
6154
+ payload['enabled'] = enabled;
6155
+ }
6156
+ const uri = new URL(this.client.config.endpoint + path);
6157
+ return yield this.client.call('patch', uri, {
6158
+ 'content-type': 'application/json',
6159
+ }, payload);
6160
+ });
6161
+ }
5160
6162
  /**
5161
6163
  * Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.
5162
6164
  *
@@ -5166,7 +6168,7 @@ class Projects extends Service {
5166
6168
  * @param {boolean} status
5167
6169
  * @throws {AppwriteException}
5168
6170
  * @returns {Promise}
5169
- */
6171
+ */
5170
6172
  updateAuthStatus(projectId, method, status) {
5171
6173
  return __awaiter(this, void 0, void 0, function* () {
5172
6174
  if (typeof projectId === 'undefined') {
@@ -5190,143 +6192,284 @@ class Projects extends Service {
5190
6192
  });
5191
6193
  }
5192
6194
  /**
5193
- * List Domains
6195
+ * List Keys
6196
+ *
6197
+ *
6198
+ * @param {string} projectId
6199
+ * @throws {AppwriteException}
6200
+ * @returns {Promise}
6201
+ */
6202
+ listKeys(projectId) {
6203
+ return __awaiter(this, void 0, void 0, function* () {
6204
+ if (typeof projectId === 'undefined') {
6205
+ throw new AppwriteException('Missing required parameter: "projectId"');
6206
+ }
6207
+ let path = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
6208
+ let payload = {};
6209
+ const uri = new URL(this.client.config.endpoint + path);
6210
+ return yield this.client.call('get', uri, {
6211
+ 'content-type': 'application/json',
6212
+ }, payload);
6213
+ });
6214
+ }
6215
+ /**
6216
+ * Create Key
6217
+ *
6218
+ *
6219
+ * @param {string} projectId
6220
+ * @param {string} name
6221
+ * @param {string[]} scopes
6222
+ * @param {string} expire
6223
+ * @throws {AppwriteException}
6224
+ * @returns {Promise}
6225
+ */
6226
+ createKey(projectId, name, scopes, expire) {
6227
+ return __awaiter(this, void 0, void 0, function* () {
6228
+ if (typeof projectId === 'undefined') {
6229
+ throw new AppwriteException('Missing required parameter: "projectId"');
6230
+ }
6231
+ if (typeof name === 'undefined') {
6232
+ throw new AppwriteException('Missing required parameter: "name"');
6233
+ }
6234
+ if (typeof scopes === 'undefined') {
6235
+ throw new AppwriteException('Missing required parameter: "scopes"');
6236
+ }
6237
+ let path = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
6238
+ let payload = {};
6239
+ if (typeof name !== 'undefined') {
6240
+ payload['name'] = name;
6241
+ }
6242
+ if (typeof scopes !== 'undefined') {
6243
+ payload['scopes'] = scopes;
6244
+ }
6245
+ if (typeof expire !== 'undefined') {
6246
+ payload['expire'] = expire;
6247
+ }
6248
+ const uri = new URL(this.client.config.endpoint + path);
6249
+ return yield this.client.call('post', uri, {
6250
+ 'content-type': 'application/json',
6251
+ }, payload);
6252
+ });
6253
+ }
6254
+ /**
6255
+ * Get Key
6256
+ *
6257
+ *
6258
+ * @param {string} projectId
6259
+ * @param {string} keyId
6260
+ * @throws {AppwriteException}
6261
+ * @returns {Promise}
6262
+ */
6263
+ getKey(projectId, keyId) {
6264
+ return __awaiter(this, void 0, void 0, function* () {
6265
+ if (typeof projectId === 'undefined') {
6266
+ throw new AppwriteException('Missing required parameter: "projectId"');
6267
+ }
6268
+ if (typeof keyId === 'undefined') {
6269
+ throw new AppwriteException('Missing required parameter: "keyId"');
6270
+ }
6271
+ let path = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
6272
+ let payload = {};
6273
+ const uri = new URL(this.client.config.endpoint + path);
6274
+ return yield this.client.call('get', uri, {
6275
+ 'content-type': 'application/json',
6276
+ }, payload);
6277
+ });
6278
+ }
6279
+ /**
6280
+ * Update Key
5194
6281
  *
5195
6282
  *
5196
6283
  * @param {string} projectId
6284
+ * @param {string} keyId
6285
+ * @param {string} name
6286
+ * @param {string[]} scopes
6287
+ * @param {string} expire
5197
6288
  * @throws {AppwriteException}
5198
6289
  * @returns {Promise}
5199
- */
5200
- listDomains(projectId) {
6290
+ */
6291
+ updateKey(projectId, keyId, name, scopes, expire) {
5201
6292
  return __awaiter(this, void 0, void 0, function* () {
5202
6293
  if (typeof projectId === 'undefined') {
5203
6294
  throw new AppwriteException('Missing required parameter: "projectId"');
5204
6295
  }
5205
- let path = '/projects/{projectId}/domains'.replace('{projectId}', projectId);
6296
+ if (typeof keyId === 'undefined') {
6297
+ throw new AppwriteException('Missing required parameter: "keyId"');
6298
+ }
6299
+ if (typeof name === 'undefined') {
6300
+ throw new AppwriteException('Missing required parameter: "name"');
6301
+ }
6302
+ if (typeof scopes === 'undefined') {
6303
+ throw new AppwriteException('Missing required parameter: "scopes"');
6304
+ }
6305
+ let path = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
5206
6306
  let payload = {};
6307
+ if (typeof name !== 'undefined') {
6308
+ payload['name'] = name;
6309
+ }
6310
+ if (typeof scopes !== 'undefined') {
6311
+ payload['scopes'] = scopes;
6312
+ }
6313
+ if (typeof expire !== 'undefined') {
6314
+ payload['expire'] = expire;
6315
+ }
5207
6316
  const uri = new URL(this.client.config.endpoint + path);
5208
- return yield this.client.call('get', uri, {
6317
+ return yield this.client.call('put', uri, {
5209
6318
  'content-type': 'application/json',
5210
6319
  }, payload);
5211
6320
  });
5212
6321
  }
5213
6322
  /**
5214
- * Create Domain
6323
+ * Delete Key
5215
6324
  *
5216
6325
  *
5217
6326
  * @param {string} projectId
5218
- * @param {string} domain
6327
+ * @param {string} keyId
5219
6328
  * @throws {AppwriteException}
5220
6329
  * @returns {Promise}
5221
- */
5222
- createDomain(projectId, domain) {
6330
+ */
6331
+ deleteKey(projectId, keyId) {
5223
6332
  return __awaiter(this, void 0, void 0, function* () {
5224
6333
  if (typeof projectId === 'undefined') {
5225
6334
  throw new AppwriteException('Missing required parameter: "projectId"');
5226
6335
  }
5227
- if (typeof domain === 'undefined') {
5228
- throw new AppwriteException('Missing required parameter: "domain"');
6336
+ if (typeof keyId === 'undefined') {
6337
+ throw new AppwriteException('Missing required parameter: "keyId"');
5229
6338
  }
5230
- let path = '/projects/{projectId}/domains'.replace('{projectId}', projectId);
6339
+ let path = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
5231
6340
  let payload = {};
5232
- if (typeof domain !== 'undefined') {
5233
- payload['domain'] = domain;
5234
- }
5235
6341
  const uri = new URL(this.client.config.endpoint + path);
5236
- return yield this.client.call('post', uri, {
6342
+ return yield this.client.call('delete', uri, {
5237
6343
  'content-type': 'application/json',
5238
6344
  }, payload);
5239
6345
  });
5240
6346
  }
5241
6347
  /**
5242
- * Get Domain
6348
+ * Update Project OAuth2
5243
6349
  *
5244
6350
  *
5245
6351
  * @param {string} projectId
5246
- * @param {string} domainId
6352
+ * @param {string} provider
6353
+ * @param {string} appId
6354
+ * @param {string} secret
6355
+ * @param {boolean} enabled
5247
6356
  * @throws {AppwriteException}
5248
6357
  * @returns {Promise}
5249
- */
5250
- getDomain(projectId, domainId) {
6358
+ */
6359
+ updateOAuth2(projectId, provider, appId, secret, enabled) {
5251
6360
  return __awaiter(this, void 0, void 0, function* () {
5252
6361
  if (typeof projectId === 'undefined') {
5253
6362
  throw new AppwriteException('Missing required parameter: "projectId"');
5254
6363
  }
5255
- if (typeof domainId === 'undefined') {
5256
- throw new AppwriteException('Missing required parameter: "domainId"');
6364
+ if (typeof provider === 'undefined') {
6365
+ throw new AppwriteException('Missing required parameter: "provider"');
5257
6366
  }
5258
- let path = '/projects/{projectId}/domains/{domainId}'.replace('{projectId}', projectId).replace('{domainId}', domainId);
6367
+ let path = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
5259
6368
  let payload = {};
6369
+ if (typeof provider !== 'undefined') {
6370
+ payload['provider'] = provider;
6371
+ }
6372
+ if (typeof appId !== 'undefined') {
6373
+ payload['appId'] = appId;
6374
+ }
6375
+ if (typeof secret !== 'undefined') {
6376
+ payload['secret'] = secret;
6377
+ }
6378
+ if (typeof enabled !== 'undefined') {
6379
+ payload['enabled'] = enabled;
6380
+ }
5260
6381
  const uri = new URL(this.client.config.endpoint + path);
5261
- return yield this.client.call('get', uri, {
6382
+ return yield this.client.call('patch', uri, {
5262
6383
  'content-type': 'application/json',
5263
6384
  }, payload);
5264
6385
  });
5265
6386
  }
5266
6387
  /**
5267
- * Delete Domain
6388
+ * List Platforms
5268
6389
  *
5269
6390
  *
5270
6391
  * @param {string} projectId
5271
- * @param {string} domainId
5272
6392
  * @throws {AppwriteException}
5273
6393
  * @returns {Promise}
5274
- */
5275
- deleteDomain(projectId, domainId) {
6394
+ */
6395
+ listPlatforms(projectId) {
5276
6396
  return __awaiter(this, void 0, void 0, function* () {
5277
6397
  if (typeof projectId === 'undefined') {
5278
6398
  throw new AppwriteException('Missing required parameter: "projectId"');
5279
6399
  }
5280
- if (typeof domainId === 'undefined') {
5281
- throw new AppwriteException('Missing required parameter: "domainId"');
5282
- }
5283
- let path = '/projects/{projectId}/domains/{domainId}'.replace('{projectId}', projectId).replace('{domainId}', domainId);
6400
+ let path = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
5284
6401
  let payload = {};
5285
6402
  const uri = new URL(this.client.config.endpoint + path);
5286
- return yield this.client.call('delete', uri, {
6403
+ return yield this.client.call('get', uri, {
5287
6404
  'content-type': 'application/json',
5288
6405
  }, payload);
5289
6406
  });
5290
6407
  }
5291
6408
  /**
5292
- * Update Domain Verification Status
6409
+ * Create Platform
5293
6410
  *
5294
6411
  *
5295
6412
  * @param {string} projectId
5296
- * @param {string} domainId
6413
+ * @param {string} type
6414
+ * @param {string} name
6415
+ * @param {string} key
6416
+ * @param {string} store
6417
+ * @param {string} hostname
5297
6418
  * @throws {AppwriteException}
5298
6419
  * @returns {Promise}
5299
- */
5300
- updateDomainVerification(projectId, domainId) {
6420
+ */
6421
+ createPlatform(projectId, type, name, key, store, hostname) {
5301
6422
  return __awaiter(this, void 0, void 0, function* () {
5302
6423
  if (typeof projectId === 'undefined') {
5303
6424
  throw new AppwriteException('Missing required parameter: "projectId"');
5304
6425
  }
5305
- if (typeof domainId === 'undefined') {
5306
- throw new AppwriteException('Missing required parameter: "domainId"');
6426
+ if (typeof type === 'undefined') {
6427
+ throw new AppwriteException('Missing required parameter: "type"');
6428
+ }
6429
+ if (typeof name === 'undefined') {
6430
+ throw new AppwriteException('Missing required parameter: "name"');
5307
6431
  }
5308
- let path = '/projects/{projectId}/domains/{domainId}/verification'.replace('{projectId}', projectId).replace('{domainId}', domainId);
6432
+ let path = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
5309
6433
  let payload = {};
6434
+ if (typeof type !== 'undefined') {
6435
+ payload['type'] = type;
6436
+ }
6437
+ if (typeof name !== 'undefined') {
6438
+ payload['name'] = name;
6439
+ }
6440
+ if (typeof key !== 'undefined') {
6441
+ payload['key'] = key;
6442
+ }
6443
+ if (typeof store !== 'undefined') {
6444
+ payload['store'] = store;
6445
+ }
6446
+ if (typeof hostname !== 'undefined') {
6447
+ payload['hostname'] = hostname;
6448
+ }
5310
6449
  const uri = new URL(this.client.config.endpoint + path);
5311
- return yield this.client.call('patch', uri, {
6450
+ return yield this.client.call('post', uri, {
5312
6451
  'content-type': 'application/json',
5313
6452
  }, payload);
5314
6453
  });
5315
6454
  }
5316
6455
  /**
5317
- * List Keys
6456
+ * Get Platform
5318
6457
  *
5319
6458
  *
5320
6459
  * @param {string} projectId
6460
+ * @param {string} platformId
5321
6461
  * @throws {AppwriteException}
5322
6462
  * @returns {Promise}
5323
- */
5324
- listKeys(projectId) {
6463
+ */
6464
+ getPlatform(projectId, platformId) {
5325
6465
  return __awaiter(this, void 0, void 0, function* () {
5326
6466
  if (typeof projectId === 'undefined') {
5327
6467
  throw new AppwriteException('Missing required parameter: "projectId"');
5328
6468
  }
5329
- let path = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
6469
+ if (typeof platformId === 'undefined') {
6470
+ throw new AppwriteException('Missing required parameter: "platformId"');
6471
+ }
6472
+ let path = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
5330
6473
  let payload = {};
5331
6474
  const uri = new URL(this.client.config.endpoint + path);
5332
6475
  return yield this.client.call('get', uri, {
@@ -5335,170 +6478,218 @@ class Projects extends Service {
5335
6478
  });
5336
6479
  }
5337
6480
  /**
5338
- * Create Key
6481
+ * Update Platform
5339
6482
  *
5340
6483
  *
5341
6484
  * @param {string} projectId
6485
+ * @param {string} platformId
5342
6486
  * @param {string} name
5343
- * @param {string[]} scopes
5344
- * @param {string} expire
6487
+ * @param {string} key
6488
+ * @param {string} store
6489
+ * @param {string} hostname
5345
6490
  * @throws {AppwriteException}
5346
6491
  * @returns {Promise}
5347
- */
5348
- createKey(projectId, name, scopes, expire) {
6492
+ */
6493
+ updatePlatform(projectId, platformId, name, key, store, hostname) {
5349
6494
  return __awaiter(this, void 0, void 0, function* () {
5350
6495
  if (typeof projectId === 'undefined') {
5351
6496
  throw new AppwriteException('Missing required parameter: "projectId"');
5352
6497
  }
6498
+ if (typeof platformId === 'undefined') {
6499
+ throw new AppwriteException('Missing required parameter: "platformId"');
6500
+ }
5353
6501
  if (typeof name === 'undefined') {
5354
6502
  throw new AppwriteException('Missing required parameter: "name"');
5355
6503
  }
5356
- if (typeof scopes === 'undefined') {
5357
- throw new AppwriteException('Missing required parameter: "scopes"');
5358
- }
5359
- let path = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
6504
+ let path = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
5360
6505
  let payload = {};
5361
6506
  if (typeof name !== 'undefined') {
5362
6507
  payload['name'] = name;
5363
6508
  }
5364
- if (typeof scopes !== 'undefined') {
5365
- payload['scopes'] = scopes;
6509
+ if (typeof key !== 'undefined') {
6510
+ payload['key'] = key;
5366
6511
  }
5367
- if (typeof expire !== 'undefined') {
5368
- payload['expire'] = expire;
6512
+ if (typeof store !== 'undefined') {
6513
+ payload['store'] = store;
6514
+ }
6515
+ if (typeof hostname !== 'undefined') {
6516
+ payload['hostname'] = hostname;
5369
6517
  }
5370
6518
  const uri = new URL(this.client.config.endpoint + path);
5371
- return yield this.client.call('post', uri, {
6519
+ return yield this.client.call('put', uri, {
5372
6520
  'content-type': 'application/json',
5373
6521
  }, payload);
5374
6522
  });
5375
6523
  }
5376
6524
  /**
5377
- * Get Key
6525
+ * Delete Platform
5378
6526
  *
5379
6527
  *
5380
6528
  * @param {string} projectId
5381
- * @param {string} keyId
6529
+ * @param {string} platformId
5382
6530
  * @throws {AppwriteException}
5383
6531
  * @returns {Promise}
5384
- */
5385
- getKey(projectId, keyId) {
6532
+ */
6533
+ deletePlatform(projectId, platformId) {
5386
6534
  return __awaiter(this, void 0, void 0, function* () {
5387
6535
  if (typeof projectId === 'undefined') {
5388
6536
  throw new AppwriteException('Missing required parameter: "projectId"');
5389
6537
  }
5390
- if (typeof keyId === 'undefined') {
5391
- throw new AppwriteException('Missing required parameter: "keyId"');
6538
+ if (typeof platformId === 'undefined') {
6539
+ throw new AppwriteException('Missing required parameter: "platformId"');
5392
6540
  }
5393
- let path = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
6541
+ let path = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
5394
6542
  let payload = {};
5395
6543
  const uri = new URL(this.client.config.endpoint + path);
5396
- return yield this.client.call('get', uri, {
6544
+ return yield this.client.call('delete', uri, {
5397
6545
  'content-type': 'application/json',
5398
6546
  }, payload);
5399
6547
  });
5400
6548
  }
5401
6549
  /**
5402
- * Update Key
6550
+ * Update service status
5403
6551
  *
5404
6552
  *
5405
6553
  * @param {string} projectId
5406
- * @param {string} keyId
5407
- * @param {string} name
5408
- * @param {string[]} scopes
5409
- * @param {string} expire
6554
+ * @param {string} service
6555
+ * @param {boolean} status
5410
6556
  * @throws {AppwriteException}
5411
6557
  * @returns {Promise}
5412
- */
5413
- updateKey(projectId, keyId, name, scopes, expire) {
6558
+ */
6559
+ updateServiceStatus(projectId, service, status) {
5414
6560
  return __awaiter(this, void 0, void 0, function* () {
5415
6561
  if (typeof projectId === 'undefined') {
5416
6562
  throw new AppwriteException('Missing required parameter: "projectId"');
5417
6563
  }
5418
- if (typeof keyId === 'undefined') {
5419
- throw new AppwriteException('Missing required parameter: "keyId"');
5420
- }
5421
- if (typeof name === 'undefined') {
5422
- throw new AppwriteException('Missing required parameter: "name"');
6564
+ if (typeof service === 'undefined') {
6565
+ throw new AppwriteException('Missing required parameter: "service"');
5423
6566
  }
5424
- if (typeof scopes === 'undefined') {
5425
- throw new AppwriteException('Missing required parameter: "scopes"');
6567
+ if (typeof status === 'undefined') {
6568
+ throw new AppwriteException('Missing required parameter: "status"');
5426
6569
  }
5427
- let path = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
6570
+ let path = '/projects/{projectId}/service'.replace('{projectId}', projectId);
5428
6571
  let payload = {};
5429
- if (typeof name !== 'undefined') {
5430
- payload['name'] = name;
5431
- }
5432
- if (typeof scopes !== 'undefined') {
5433
- payload['scopes'] = scopes;
6572
+ if (typeof service !== 'undefined') {
6573
+ payload['service'] = service;
5434
6574
  }
5435
- if (typeof expire !== 'undefined') {
5436
- payload['expire'] = expire;
6575
+ if (typeof status !== 'undefined') {
6576
+ payload['status'] = status;
5437
6577
  }
5438
6578
  const uri = new URL(this.client.config.endpoint + path);
5439
- return yield this.client.call('put', uri, {
6579
+ return yield this.client.call('patch', uri, {
5440
6580
  'content-type': 'application/json',
5441
6581
  }, payload);
5442
6582
  });
5443
6583
  }
5444
6584
  /**
5445
- * Delete Key
6585
+ * Update all service status
5446
6586
  *
5447
6587
  *
5448
6588
  * @param {string} projectId
5449
- * @param {string} keyId
6589
+ * @param {boolean} status
5450
6590
  * @throws {AppwriteException}
5451
6591
  * @returns {Promise}
5452
- */
5453
- deleteKey(projectId, keyId) {
6592
+ */
6593
+ updateServiceStatusAll(projectId, status) {
5454
6594
  return __awaiter(this, void 0, void 0, function* () {
5455
6595
  if (typeof projectId === 'undefined') {
5456
6596
  throw new AppwriteException('Missing required parameter: "projectId"');
5457
6597
  }
5458
- if (typeof keyId === 'undefined') {
5459
- throw new AppwriteException('Missing required parameter: "keyId"');
6598
+ if (typeof status === 'undefined') {
6599
+ throw new AppwriteException('Missing required parameter: "status"');
5460
6600
  }
5461
- let path = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
6601
+ let path = '/projects/{projectId}/service/all'.replace('{projectId}', projectId);
5462
6602
  let payload = {};
6603
+ if (typeof status !== 'undefined') {
6604
+ payload['status'] = status;
6605
+ }
5463
6606
  const uri = new URL(this.client.config.endpoint + path);
5464
- return yield this.client.call('delete', uri, {
6607
+ return yield this.client.call('patch', uri, {
5465
6608
  'content-type': 'application/json',
5466
6609
  }, payload);
5467
6610
  });
5468
6611
  }
5469
6612
  /**
5470
- * Update Project OAuth2
6613
+ * Update SMTP configuration
5471
6614
  *
5472
6615
  *
5473
6616
  * @param {string} projectId
5474
- * @param {string} provider
5475
- * @param {string} appId
5476
- * @param {string} secret
5477
6617
  * @param {boolean} enabled
6618
+ * @param {string} senderName
6619
+ * @param {string} senderEmail
6620
+ * @param {string} replyTo
6621
+ * @param {string} host
6622
+ * @param {number} port
6623
+ * @param {string} username
6624
+ * @param {string} password
6625
+ * @param {string} secure
5478
6626
  * @throws {AppwriteException}
5479
6627
  * @returns {Promise}
5480
- */
5481
- updateOAuth2(projectId, provider, appId, secret, enabled) {
6628
+ */
6629
+ updateSmtpConfiguration(projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure) {
5482
6630
  return __awaiter(this, void 0, void 0, function* () {
5483
6631
  if (typeof projectId === 'undefined') {
5484
6632
  throw new AppwriteException('Missing required parameter: "projectId"');
5485
6633
  }
5486
- if (typeof provider === 'undefined') {
5487
- throw new AppwriteException('Missing required parameter: "provider"');
6634
+ if (typeof enabled === 'undefined') {
6635
+ throw new AppwriteException('Missing required parameter: "enabled"');
5488
6636
  }
5489
- let path = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
6637
+ let path = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
5490
6638
  let payload = {};
5491
- if (typeof provider !== 'undefined') {
5492
- payload['provider'] = provider;
6639
+ if (typeof enabled !== 'undefined') {
6640
+ payload['enabled'] = enabled;
5493
6641
  }
5494
- if (typeof appId !== 'undefined') {
5495
- payload['appId'] = appId;
6642
+ if (typeof senderName !== 'undefined') {
6643
+ payload['senderName'] = senderName;
6644
+ }
6645
+ if (typeof senderEmail !== 'undefined') {
6646
+ payload['senderEmail'] = senderEmail;
6647
+ }
6648
+ if (typeof replyTo !== 'undefined') {
6649
+ payload['replyTo'] = replyTo;
6650
+ }
6651
+ if (typeof host !== 'undefined') {
6652
+ payload['host'] = host;
6653
+ }
6654
+ if (typeof port !== 'undefined') {
6655
+ payload['port'] = port;
6656
+ }
6657
+ if (typeof username !== 'undefined') {
6658
+ payload['username'] = username;
6659
+ }
6660
+ if (typeof password !== 'undefined') {
6661
+ payload['password'] = password;
6662
+ }
6663
+ if (typeof secure !== 'undefined') {
6664
+ payload['secure'] = secure;
6665
+ }
6666
+ const uri = new URL(this.client.config.endpoint + path);
6667
+ return yield this.client.call('patch', uri, {
6668
+ 'content-type': 'application/json',
6669
+ }, payload);
6670
+ });
6671
+ }
6672
+ /**
6673
+ * Update Project Team
6674
+ *
6675
+ *
6676
+ * @param {string} projectId
6677
+ * @param {string} teamId
6678
+ * @throws {AppwriteException}
6679
+ * @returns {Promise}
6680
+ */
6681
+ updateTeam(projectId, teamId) {
6682
+ return __awaiter(this, void 0, void 0, function* () {
6683
+ if (typeof projectId === 'undefined') {
6684
+ throw new AppwriteException('Missing required parameter: "projectId"');
5496
6685
  }
5497
- if (typeof secret !== 'undefined') {
5498
- payload['secret'] = secret;
6686
+ if (typeof teamId === 'undefined') {
6687
+ throw new AppwriteException('Missing required parameter: "teamId"');
5499
6688
  }
5500
- if (typeof enabled !== 'undefined') {
5501
- payload['enabled'] = enabled;
6689
+ let path = '/projects/{projectId}/team'.replace('{projectId}', projectId);
6690
+ let payload = {};
6691
+ if (typeof teamId !== 'undefined') {
6692
+ payload['teamId'] = teamId;
5502
6693
  }
5503
6694
  const uri = new URL(this.client.config.endpoint + path);
5504
6695
  return yield this.client.call('patch', uri, {
@@ -5507,19 +6698,27 @@ class Projects extends Service {
5507
6698
  });
5508
6699
  }
5509
6700
  /**
5510
- * List Platforms
6701
+ * Get custom email template
5511
6702
  *
5512
6703
  *
5513
6704
  * @param {string} projectId
6705
+ * @param {string} type
6706
+ * @param {string} locale
5514
6707
  * @throws {AppwriteException}
5515
6708
  * @returns {Promise}
5516
- */
5517
- listPlatforms(projectId) {
6709
+ */
6710
+ getEmailTemplate(projectId, type, locale) {
5518
6711
  return __awaiter(this, void 0, void 0, function* () {
5519
6712
  if (typeof projectId === 'undefined') {
5520
6713
  throw new AppwriteException('Missing required parameter: "projectId"');
5521
6714
  }
5522
- let path = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
6715
+ if (typeof type === 'undefined') {
6716
+ throw new AppwriteException('Missing required parameter: "type"');
6717
+ }
6718
+ if (typeof locale === 'undefined') {
6719
+ throw new AppwriteException('Missing required parameter: "locale"');
6720
+ }
6721
+ let path = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
5523
6722
  let payload = {};
5524
6723
  const uri = new URL(this.client.config.endpoint + path);
5525
6724
  return yield this.client.call('get', uri, {
@@ -5528,19 +6727,21 @@ class Projects extends Service {
5528
6727
  });
5529
6728
  }
5530
6729
  /**
5531
- * Create Platform
6730
+ * Update custom email templates
5532
6731
  *
5533
6732
  *
5534
6733
  * @param {string} projectId
5535
6734
  * @param {string} type
5536
- * @param {string} name
5537
- * @param {string} key
5538
- * @param {string} store
5539
- * @param {string} hostname
6735
+ * @param {string} locale
6736
+ * @param {string} subject
6737
+ * @param {string} message
6738
+ * @param {string} senderName
6739
+ * @param {string} senderEmail
6740
+ * @param {string} replyTo
5540
6741
  * @throws {AppwriteException}
5541
6742
  * @returns {Promise}
5542
- */
5543
- createPlatform(projectId, type, name, key, store, hostname) {
6743
+ */
6744
+ updateEmailTemplate(projectId, type, locale, subject, message, senderName, senderEmail, replyTo) {
5544
6745
  return __awaiter(this, void 0, void 0, function* () {
5545
6746
  if (typeof projectId === 'undefined') {
5546
6747
  throw new AppwriteException('Missing required parameter: "projectId"');
@@ -5548,119 +6749,154 @@ class Projects extends Service {
5548
6749
  if (typeof type === 'undefined') {
5549
6750
  throw new AppwriteException('Missing required parameter: "type"');
5550
6751
  }
5551
- if (typeof name === 'undefined') {
5552
- throw new AppwriteException('Missing required parameter: "name"');
6752
+ if (typeof locale === 'undefined') {
6753
+ throw new AppwriteException('Missing required parameter: "locale"');
5553
6754
  }
5554
- let path = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
6755
+ if (typeof subject === 'undefined') {
6756
+ throw new AppwriteException('Missing required parameter: "subject"');
6757
+ }
6758
+ if (typeof message === 'undefined') {
6759
+ throw new AppwriteException('Missing required parameter: "message"');
6760
+ }
6761
+ let path = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
5555
6762
  let payload = {};
5556
- if (typeof type !== 'undefined') {
5557
- payload['type'] = type;
6763
+ if (typeof subject !== 'undefined') {
6764
+ payload['subject'] = subject;
5558
6765
  }
5559
- if (typeof name !== 'undefined') {
5560
- payload['name'] = name;
6766
+ if (typeof message !== 'undefined') {
6767
+ payload['message'] = message;
5561
6768
  }
5562
- if (typeof key !== 'undefined') {
5563
- payload['key'] = key;
6769
+ if (typeof senderName !== 'undefined') {
6770
+ payload['senderName'] = senderName;
5564
6771
  }
5565
- if (typeof store !== 'undefined') {
5566
- payload['store'] = store;
6772
+ if (typeof senderEmail !== 'undefined') {
6773
+ payload['senderEmail'] = senderEmail;
5567
6774
  }
5568
- if (typeof hostname !== 'undefined') {
5569
- payload['hostname'] = hostname;
6775
+ if (typeof replyTo !== 'undefined') {
6776
+ payload['replyTo'] = replyTo;
5570
6777
  }
5571
6778
  const uri = new URL(this.client.config.endpoint + path);
5572
- return yield this.client.call('post', uri, {
6779
+ return yield this.client.call('patch', uri, {
5573
6780
  'content-type': 'application/json',
5574
6781
  }, payload);
5575
6782
  });
5576
6783
  }
5577
6784
  /**
5578
- * Get Platform
6785
+ * Reset custom email template
5579
6786
  *
5580
6787
  *
5581
6788
  * @param {string} projectId
5582
- * @param {string} platformId
6789
+ * @param {string} type
6790
+ * @param {string} locale
5583
6791
  * @throws {AppwriteException}
5584
6792
  * @returns {Promise}
5585
- */
5586
- getPlatform(projectId, platformId) {
6793
+ */
6794
+ deleteEmailTemplate(projectId, type, locale) {
5587
6795
  return __awaiter(this, void 0, void 0, function* () {
5588
6796
  if (typeof projectId === 'undefined') {
5589
6797
  throw new AppwriteException('Missing required parameter: "projectId"');
5590
6798
  }
5591
- if (typeof platformId === 'undefined') {
5592
- throw new AppwriteException('Missing required parameter: "platformId"');
6799
+ if (typeof type === 'undefined') {
6800
+ throw new AppwriteException('Missing required parameter: "type"');
5593
6801
  }
5594
- let path = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
6802
+ if (typeof locale === 'undefined') {
6803
+ throw new AppwriteException('Missing required parameter: "locale"');
6804
+ }
6805
+ let path = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
5595
6806
  let payload = {};
5596
6807
  const uri = new URL(this.client.config.endpoint + path);
5597
- return yield this.client.call('get', uri, {
6808
+ return yield this.client.call('delete', uri, {
5598
6809
  'content-type': 'application/json',
5599
6810
  }, payload);
5600
6811
  });
5601
6812
  }
5602
6813
  /**
5603
- * Update Platform
6814
+ * Get custom SMS template
5604
6815
  *
5605
6816
  *
5606
6817
  * @param {string} projectId
5607
- * @param {string} platformId
5608
- * @param {string} name
5609
- * @param {string} key
5610
- * @param {string} store
5611
- * @param {string} hostname
6818
+ * @param {string} type
6819
+ * @param {string} locale
5612
6820
  * @throws {AppwriteException}
5613
6821
  * @returns {Promise}
5614
- */
5615
- updatePlatform(projectId, platformId, name, key, store, hostname) {
6822
+ */
6823
+ getSmsTemplate(projectId, type, locale) {
5616
6824
  return __awaiter(this, void 0, void 0, function* () {
5617
6825
  if (typeof projectId === 'undefined') {
5618
6826
  throw new AppwriteException('Missing required parameter: "projectId"');
5619
6827
  }
5620
- if (typeof platformId === 'undefined') {
5621
- throw new AppwriteException('Missing required parameter: "platformId"');
6828
+ if (typeof type === 'undefined') {
6829
+ throw new AppwriteException('Missing required parameter: "type"');
5622
6830
  }
5623
- if (typeof name === 'undefined') {
5624
- throw new AppwriteException('Missing required parameter: "name"');
6831
+ if (typeof locale === 'undefined') {
6832
+ throw new AppwriteException('Missing required parameter: "locale"');
5625
6833
  }
5626
- let path = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
6834
+ let path = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
5627
6835
  let payload = {};
5628
- if (typeof name !== 'undefined') {
5629
- payload['name'] = name;
6836
+ const uri = new URL(this.client.config.endpoint + path);
6837
+ return yield this.client.call('get', uri, {
6838
+ 'content-type': 'application/json',
6839
+ }, payload);
6840
+ });
6841
+ }
6842
+ /**
6843
+ * Update custom SMS template
6844
+ *
6845
+ *
6846
+ * @param {string} projectId
6847
+ * @param {string} type
6848
+ * @param {string} locale
6849
+ * @param {string} message
6850
+ * @throws {AppwriteException}
6851
+ * @returns {Promise}
6852
+ */
6853
+ updateSmsTemplate(projectId, type, locale, message) {
6854
+ return __awaiter(this, void 0, void 0, function* () {
6855
+ if (typeof projectId === 'undefined') {
6856
+ throw new AppwriteException('Missing required parameter: "projectId"');
5630
6857
  }
5631
- if (typeof key !== 'undefined') {
5632
- payload['key'] = key;
6858
+ if (typeof type === 'undefined') {
6859
+ throw new AppwriteException('Missing required parameter: "type"');
5633
6860
  }
5634
- if (typeof store !== 'undefined') {
5635
- payload['store'] = store;
6861
+ if (typeof locale === 'undefined') {
6862
+ throw new AppwriteException('Missing required parameter: "locale"');
5636
6863
  }
5637
- if (typeof hostname !== 'undefined') {
5638
- payload['hostname'] = hostname;
6864
+ if (typeof message === 'undefined') {
6865
+ throw new AppwriteException('Missing required parameter: "message"');
6866
+ }
6867
+ let path = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
6868
+ let payload = {};
6869
+ if (typeof message !== 'undefined') {
6870
+ payload['message'] = message;
5639
6871
  }
5640
6872
  const uri = new URL(this.client.config.endpoint + path);
5641
- return yield this.client.call('put', uri, {
6873
+ return yield this.client.call('patch', uri, {
5642
6874
  'content-type': 'application/json',
5643
6875
  }, payload);
5644
6876
  });
5645
6877
  }
5646
6878
  /**
5647
- * Delete Platform
6879
+ * Reset custom SMS template
5648
6880
  *
5649
6881
  *
5650
6882
  * @param {string} projectId
5651
- * @param {string} platformId
6883
+ * @param {string} type
6884
+ * @param {string} locale
5652
6885
  * @throws {AppwriteException}
5653
6886
  * @returns {Promise}
5654
- */
5655
- deletePlatform(projectId, platformId) {
6887
+ */
6888
+ deleteSmsTemplate(projectId, type, locale) {
5656
6889
  return __awaiter(this, void 0, void 0, function* () {
5657
6890
  if (typeof projectId === 'undefined') {
5658
6891
  throw new AppwriteException('Missing required parameter: "projectId"');
5659
6892
  }
5660
- if (typeof platformId === 'undefined') {
5661
- throw new AppwriteException('Missing required parameter: "platformId"');
6893
+ if (typeof type === 'undefined') {
6894
+ throw new AppwriteException('Missing required parameter: "type"');
5662
6895
  }
5663
- let path = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
6896
+ if (typeof locale === 'undefined') {
6897
+ throw new AppwriteException('Missing required parameter: "locale"');
6898
+ }
6899
+ let path = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
5664
6900
  let payload = {};
5665
6901
  const uri = new URL(this.client.config.endpoint + path);
5666
6902
  return yield this.client.call('delete', uri, {
@@ -5669,36 +6905,26 @@ class Projects extends Service {
5669
6905
  });
5670
6906
  }
5671
6907
  /**
5672
- * Update service status
6908
+ * Get usage stats for a project
5673
6909
  *
5674
6910
  *
5675
6911
  * @param {string} projectId
5676
- * @param {string} service
5677
- * @param {boolean} status
6912
+ * @param {string} range
5678
6913
  * @throws {AppwriteException}
5679
6914
  * @returns {Promise}
5680
- */
5681
- updateServiceStatus(projectId, service, status) {
6915
+ */
6916
+ getUsage(projectId, range) {
5682
6917
  return __awaiter(this, void 0, void 0, function* () {
5683
6918
  if (typeof projectId === 'undefined') {
5684
6919
  throw new AppwriteException('Missing required parameter: "projectId"');
5685
6920
  }
5686
- if (typeof service === 'undefined') {
5687
- throw new AppwriteException('Missing required parameter: "service"');
5688
- }
5689
- if (typeof status === 'undefined') {
5690
- throw new AppwriteException('Missing required parameter: "status"');
5691
- }
5692
- let path = '/projects/{projectId}/service'.replace('{projectId}', projectId);
6921
+ let path = '/projects/{projectId}/usage'.replace('{projectId}', projectId);
5693
6922
  let payload = {};
5694
- if (typeof service !== 'undefined') {
5695
- payload['service'] = service;
5696
- }
5697
- if (typeof status !== 'undefined') {
5698
- payload['status'] = status;
6923
+ if (typeof range !== 'undefined') {
6924
+ payload['range'] = range;
5699
6925
  }
5700
6926
  const uri = new URL(this.client.config.endpoint + path);
5701
- return yield this.client.call('patch', uri, {
6927
+ return yield this.client.call('get', uri, {
5702
6928
  'content-type': 'application/json',
5703
6929
  }, payload);
5704
6930
  });
@@ -5710,7 +6936,7 @@ class Projects extends Service {
5710
6936
  * @param {string} projectId
5711
6937
  * @throws {AppwriteException}
5712
6938
  * @returns {Promise}
5713
- */
6939
+ */
5714
6940
  listWebhooks(projectId) {
5715
6941
  return __awaiter(this, void 0, void 0, function* () {
5716
6942
  if (typeof projectId === 'undefined') {
@@ -5737,7 +6963,7 @@ class Projects extends Service {
5737
6963
  * @param {string} httpPass
5738
6964
  * @throws {AppwriteException}
5739
6965
  * @returns {Promise}
5740
- */
6966
+ */
5741
6967
  createWebhook(projectId, name, events, url, security, httpUser, httpPass) {
5742
6968
  return __awaiter(this, void 0, void 0, function* () {
5743
6969
  if (typeof projectId === 'undefined') {
@@ -5789,7 +7015,7 @@ class Projects extends Service {
5789
7015
  * @param {string} webhookId
5790
7016
  * @throws {AppwriteException}
5791
7017
  * @returns {Promise}
5792
- */
7018
+ */
5793
7019
  getWebhook(projectId, webhookId) {
5794
7020
  return __awaiter(this, void 0, void 0, function* () {
5795
7021
  if (typeof projectId === 'undefined') {
@@ -5820,7 +7046,7 @@ class Projects extends Service {
5820
7046
  * @param {string} httpPass
5821
7047
  * @throws {AppwriteException}
5822
7048
  * @returns {Promise}
5823
- */
7049
+ */
5824
7050
  updateWebhook(projectId, webhookId, name, events, url, security, httpUser, httpPass) {
5825
7051
  return __awaiter(this, void 0, void 0, function* () {
5826
7052
  if (typeof projectId === 'undefined') {
@@ -5875,7 +7101,7 @@ class Projects extends Service {
5875
7101
  * @param {string} webhookId
5876
7102
  * @throws {AppwriteException}
5877
7103
  * @returns {Promise}
5878
- */
7104
+ */
5879
7105
  deleteWebhook(projectId, webhookId) {
5880
7106
  return __awaiter(this, void 0, void 0, function* () {
5881
7107
  if (typeof projectId === 'undefined') {
@@ -5900,7 +7126,7 @@ class Projects extends Service {
5900
7126
  * @param {string} webhookId
5901
7127
  * @throws {AppwriteException}
5902
7128
  * @returns {Promise}
5903
- */
7129
+ */
5904
7130
  updateWebhookSignature(projectId, webhookId) {
5905
7131
  return __awaiter(this, void 0, void 0, function* () {
5906
7132
  if (typeof projectId === 'undefined') {
@@ -5919,6 +7145,140 @@ class Projects extends Service {
5919
7145
  }
5920
7146
  }
5921
7147
 
7148
+ class Proxy extends Service {
7149
+ constructor(client) {
7150
+ super(client);
7151
+ }
7152
+ /**
7153
+ * List Rules
7154
+ *
7155
+ * Get a list of all the proxy rules. You can use the query params to filter
7156
+ * your results.
7157
+ *
7158
+ * @param {string[]} queries
7159
+ * @param {string} search
7160
+ * @throws {AppwriteException}
7161
+ * @returns {Promise}
7162
+ */
7163
+ listRules(queries, search) {
7164
+ return __awaiter(this, void 0, void 0, function* () {
7165
+ let path = '/proxy/rules';
7166
+ let payload = {};
7167
+ if (typeof queries !== 'undefined') {
7168
+ payload['queries'] = queries;
7169
+ }
7170
+ if (typeof search !== 'undefined') {
7171
+ payload['search'] = search;
7172
+ }
7173
+ const uri = new URL(this.client.config.endpoint + path);
7174
+ return yield this.client.call('get', uri, {
7175
+ 'content-type': 'application/json',
7176
+ }, payload);
7177
+ });
7178
+ }
7179
+ /**
7180
+ * Create Rule
7181
+ *
7182
+ * Create a new proxy rule.
7183
+ *
7184
+ * @param {string} domain
7185
+ * @param {string} resourceType
7186
+ * @param {string} resourceId
7187
+ * @throws {AppwriteException}
7188
+ * @returns {Promise}
7189
+ */
7190
+ createRule(domain, resourceType, resourceId) {
7191
+ return __awaiter(this, void 0, void 0, function* () {
7192
+ if (typeof domain === 'undefined') {
7193
+ throw new AppwriteException('Missing required parameter: "domain"');
7194
+ }
7195
+ if (typeof resourceType === 'undefined') {
7196
+ throw new AppwriteException('Missing required parameter: "resourceType"');
7197
+ }
7198
+ let path = '/proxy/rules';
7199
+ let payload = {};
7200
+ if (typeof domain !== 'undefined') {
7201
+ payload['domain'] = domain;
7202
+ }
7203
+ if (typeof resourceType !== 'undefined') {
7204
+ payload['resourceType'] = resourceType;
7205
+ }
7206
+ if (typeof resourceId !== 'undefined') {
7207
+ payload['resourceId'] = resourceId;
7208
+ }
7209
+ const uri = new URL(this.client.config.endpoint + path);
7210
+ return yield this.client.call('post', uri, {
7211
+ 'content-type': 'application/json',
7212
+ }, payload);
7213
+ });
7214
+ }
7215
+ /**
7216
+ * Get Rule
7217
+ *
7218
+ * Get a proxy rule by its unique ID.
7219
+ *
7220
+ * @param {string} ruleId
7221
+ * @throws {AppwriteException}
7222
+ * @returns {Promise}
7223
+ */
7224
+ getRule(ruleId) {
7225
+ return __awaiter(this, void 0, void 0, function* () {
7226
+ if (typeof ruleId === 'undefined') {
7227
+ throw new AppwriteException('Missing required parameter: "ruleId"');
7228
+ }
7229
+ let path = '/proxy/rules/{ruleId}'.replace('{ruleId}', ruleId);
7230
+ let payload = {};
7231
+ const uri = new URL(this.client.config.endpoint + path);
7232
+ return yield this.client.call('get', uri, {
7233
+ 'content-type': 'application/json',
7234
+ }, payload);
7235
+ });
7236
+ }
7237
+ /**
7238
+ * Delete Rule
7239
+ *
7240
+ * Delete a proxy rule by its unique ID.
7241
+ *
7242
+ * @param {string} ruleId
7243
+ * @throws {AppwriteException}
7244
+ * @returns {Promise}
7245
+ */
7246
+ deleteRule(ruleId) {
7247
+ return __awaiter(this, void 0, void 0, function* () {
7248
+ if (typeof ruleId === 'undefined') {
7249
+ throw new AppwriteException('Missing required parameter: "ruleId"');
7250
+ }
7251
+ let path = '/proxy/rules/{ruleId}'.replace('{ruleId}', ruleId);
7252
+ let payload = {};
7253
+ const uri = new URL(this.client.config.endpoint + path);
7254
+ return yield this.client.call('delete', uri, {
7255
+ 'content-type': 'application/json',
7256
+ }, payload);
7257
+ });
7258
+ }
7259
+ /**
7260
+ * Update Rule Verification Status
7261
+ *
7262
+ *
7263
+ * @param {string} ruleId
7264
+ * @throws {AppwriteException}
7265
+ * @returns {Promise}
7266
+ */
7267
+ updateRuleVerification(ruleId) {
7268
+ return __awaiter(this, void 0, void 0, function* () {
7269
+ if (typeof ruleId === 'undefined') {
7270
+ throw new AppwriteException('Missing required parameter: "ruleId"');
7271
+ }
7272
+ let path = '/proxy/rules/{ruleId}/verification'.replace('{ruleId}', ruleId);
7273
+ let payload = {};
7274
+ const uri = new URL(this.client.config.endpoint + path);
7275
+ return yield this.client.call('patch', uri, {
7276
+ 'content-type': 'application/json',
7277
+ }, payload);
7278
+ });
7279
+ }
7280
+ }
7281
+
5922
7282
  class Storage extends Service {
5923
7283
  constructor(client) {
5924
7284
  super(client);
@@ -5933,7 +7293,7 @@ class Storage extends Service {
5933
7293
  * @param {string} search
5934
7294
  * @throws {AppwriteException}
5935
7295
  * @returns {Promise}
5936
- */
7296
+ */
5937
7297
  listBuckets(queries, search) {
5938
7298
  return __awaiter(this, void 0, void 0, function* () {
5939
7299
  let path = '/storage/buckets';
@@ -5967,7 +7327,7 @@ class Storage extends Service {
5967
7327
  * @param {boolean} antivirus
5968
7328
  * @throws {AppwriteException}
5969
7329
  * @returns {Promise}
5970
- */
7330
+ */
5971
7331
  createBucket(bucketId, name, permissions, fileSecurity, enabled, maximumFileSize, allowedFileExtensions, compression, encryption, antivirus) {
5972
7332
  return __awaiter(this, void 0, void 0, function* () {
5973
7333
  if (typeof bucketId === 'undefined') {
@@ -6023,7 +7383,7 @@ class Storage extends Service {
6023
7383
  * @param {string} bucketId
6024
7384
  * @throws {AppwriteException}
6025
7385
  * @returns {Promise}
6026
- */
7386
+ */
6027
7387
  getBucket(bucketId) {
6028
7388
  return __awaiter(this, void 0, void 0, function* () {
6029
7389
  if (typeof bucketId === 'undefined') {
@@ -6054,7 +7414,7 @@ class Storage extends Service {
6054
7414
  * @param {boolean} antivirus
6055
7415
  * @throws {AppwriteException}
6056
7416
  * @returns {Promise}
6057
- */
7417
+ */
6058
7418
  updateBucket(bucketId, name, permissions, fileSecurity, enabled, maximumFileSize, allowedFileExtensions, compression, encryption, antivirus) {
6059
7419
  return __awaiter(this, void 0, void 0, function* () {
6060
7420
  if (typeof bucketId === 'undefined') {
@@ -6106,7 +7466,7 @@ class Storage extends Service {
6106
7466
  * @param {string} bucketId
6107
7467
  * @throws {AppwriteException}
6108
7468
  * @returns {Promise}
6109
- */
7469
+ */
6110
7470
  deleteBucket(bucketId) {
6111
7471
  return __awaiter(this, void 0, void 0, function* () {
6112
7472
  if (typeof bucketId === 'undefined') {
@@ -6131,7 +7491,7 @@ class Storage extends Service {
6131
7491
  * @param {string} search
6132
7492
  * @throws {AppwriteException}
6133
7493
  * @returns {Promise}
6134
- */
7494
+ */
6135
7495
  listFiles(bucketId, queries, search) {
6136
7496
  return __awaiter(this, void 0, void 0, function* () {
6137
7497
  if (typeof bucketId === 'undefined') {
@@ -6179,7 +7539,7 @@ class Storage extends Service {
6179
7539
  * @param {string[]} permissions
6180
7540
  * @throws {AppwriteException}
6181
7541
  * @returns {Promise}
6182
- */
7542
+ */
6183
7543
  createFile(bucketId, fileId, file, permissions, onProgress = (progress) => { }) {
6184
7544
  return __awaiter(this, void 0, void 0, function* () {
6185
7545
  if (typeof bucketId === 'undefined') {
@@ -6263,7 +7623,7 @@ class Storage extends Service {
6263
7623
  * @param {string} fileId
6264
7624
  * @throws {AppwriteException}
6265
7625
  * @returns {Promise}
6266
- */
7626
+ */
6267
7627
  getFile(bucketId, fileId) {
6268
7628
  return __awaiter(this, void 0, void 0, function* () {
6269
7629
  if (typeof bucketId === 'undefined') {
@@ -6288,11 +7648,12 @@ class Storage extends Service {
6288
7648
  *
6289
7649
  * @param {string} bucketId
6290
7650
  * @param {string} fileId
7651
+ * @param {string} name
6291
7652
  * @param {string[]} permissions
6292
7653
  * @throws {AppwriteException}
6293
7654
  * @returns {Promise}
6294
- */
6295
- updateFile(bucketId, fileId, permissions) {
7655
+ */
7656
+ updateFile(bucketId, fileId, name, permissions) {
6296
7657
  return __awaiter(this, void 0, void 0, function* () {
6297
7658
  if (typeof bucketId === 'undefined') {
6298
7659
  throw new AppwriteException('Missing required parameter: "bucketId"');
@@ -6302,6 +7663,9 @@ class Storage extends Service {
6302
7663
  }
6303
7664
  let path = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);
6304
7665
  let payload = {};
7666
+ if (typeof name !== 'undefined') {
7667
+ payload['name'] = name;
7668
+ }
6305
7669
  if (typeof permissions !== 'undefined') {
6306
7670
  payload['permissions'] = permissions;
6307
7671
  }
@@ -6321,7 +7685,7 @@ class Storage extends Service {
6321
7685
  * @param {string} fileId
6322
7686
  * @throws {AppwriteException}
6323
7687
  * @returns {Promise}
6324
- */
7688
+ */
6325
7689
  deleteFile(bucketId, fileId) {
6326
7690
  return __awaiter(this, void 0, void 0, function* () {
6327
7691
  if (typeof bucketId === 'undefined') {
@@ -6349,7 +7713,7 @@ class Storage extends Service {
6349
7713
  * @param {string} fileId
6350
7714
  * @throws {AppwriteException}
6351
7715
  * @returns {URL}
6352
- */
7716
+ */
6353
7717
  getFileDownload(bucketId, fileId) {
6354
7718
  if (typeof bucketId === 'undefined') {
6355
7719
  throw new AppwriteException('Missing required parameter: "bucketId"');
@@ -6390,7 +7754,7 @@ class Storage extends Service {
6390
7754
  * @param {string} output
6391
7755
  * @throws {AppwriteException}
6392
7756
  * @returns {URL}
6393
- */
7757
+ */
6394
7758
  getFilePreview(bucketId, fileId, width, height, gravity, quality, borderWidth, borderColor, borderRadius, opacity, rotation, background, output) {
6395
7759
  if (typeof bucketId === 'undefined') {
6396
7760
  throw new AppwriteException('Missing required parameter: "bucketId"');
@@ -6451,7 +7815,7 @@ class Storage extends Service {
6451
7815
  * @param {string} fileId
6452
7816
  * @throws {AppwriteException}
6453
7817
  * @returns {URL}
6454
- */
7818
+ */
6455
7819
  getFileView(bucketId, fileId) {
6456
7820
  if (typeof bucketId === 'undefined') {
6457
7821
  throw new AppwriteException('Missing required parameter: "bucketId"');
@@ -6475,7 +7839,7 @@ class Storage extends Service {
6475
7839
  * @param {string} range
6476
7840
  * @throws {AppwriteException}
6477
7841
  * @returns {Promise}
6478
- */
7842
+ */
6479
7843
  getUsage(range) {
6480
7844
  return __awaiter(this, void 0, void 0, function* () {
6481
7845
  let path = '/storage/usage';
@@ -6490,14 +7854,14 @@ class Storage extends Service {
6490
7854
  });
6491
7855
  }
6492
7856
  /**
6493
- * Get usage stats for storage bucket
7857
+ * Get usage stats for a storage bucket
6494
7858
  *
6495
7859
  *
6496
7860
  * @param {string} bucketId
6497
7861
  * @param {string} range
6498
7862
  * @throws {AppwriteException}
6499
7863
  * @returns {Promise}
6500
- */
7864
+ */
6501
7865
  getBucketUsage(bucketId, range) {
6502
7866
  return __awaiter(this, void 0, void 0, function* () {
6503
7867
  if (typeof bucketId === 'undefined') {
@@ -6530,7 +7894,7 @@ class Teams extends Service {
6530
7894
  * @param {string} search
6531
7895
  * @throws {AppwriteException}
6532
7896
  * @returns {Promise}
6533
- */
7897
+ */
6534
7898
  list(queries, search) {
6535
7899
  return __awaiter(this, void 0, void 0, function* () {
6536
7900
  let path = '/teams';
@@ -6559,7 +7923,7 @@ class Teams extends Service {
6559
7923
  * @param {string[]} roles
6560
7924
  * @throws {AppwriteException}
6561
7925
  * @returns {Promise}
6562
- */
7926
+ */
6563
7927
  create(teamId, name, roles) {
6564
7928
  return __awaiter(this, void 0, void 0, function* () {
6565
7929
  if (typeof teamId === 'undefined') {
@@ -6593,7 +7957,7 @@ class Teams extends Service {
6593
7957
  * @param {string} teamId
6594
7958
  * @throws {AppwriteException}
6595
7959
  * @returns {Promise}
6596
- */
7960
+ */
6597
7961
  get(teamId) {
6598
7962
  return __awaiter(this, void 0, void 0, function* () {
6599
7963
  if (typeof teamId === 'undefined') {
@@ -6616,7 +7980,7 @@ class Teams extends Service {
6616
7980
  * @param {string} name
6617
7981
  * @throws {AppwriteException}
6618
7982
  * @returns {Promise}
6619
- */
7983
+ */
6620
7984
  updateName(teamId, name) {
6621
7985
  return __awaiter(this, void 0, void 0, function* () {
6622
7986
  if (typeof teamId === 'undefined') {
@@ -6645,7 +8009,7 @@ class Teams extends Service {
6645
8009
  * @param {string} teamId
6646
8010
  * @throws {AppwriteException}
6647
8011
  * @returns {Promise}
6648
- */
8012
+ */
6649
8013
  delete(teamId) {
6650
8014
  return __awaiter(this, void 0, void 0, function* () {
6651
8015
  if (typeof teamId === 'undefined') {
@@ -6668,7 +8032,7 @@ class Teams extends Service {
6668
8032
  * @param {string[]} queries
6669
8033
  * @throws {AppwriteException}
6670
8034
  * @returns {Promise}
6671
- */
8035
+ */
6672
8036
  listLogs(teamId, queries) {
6673
8037
  return __awaiter(this, void 0, void 0, function* () {
6674
8038
  if (typeof teamId === 'undefined') {
@@ -6696,7 +8060,7 @@ class Teams extends Service {
6696
8060
  * @param {string} search
6697
8061
  * @throws {AppwriteException}
6698
8062
  * @returns {Promise}
6699
- */
8063
+ */
6700
8064
  listMemberships(teamId, queries, search) {
6701
8065
  return __awaiter(this, void 0, void 0, function* () {
6702
8066
  if (typeof teamId === 'undefined') {
@@ -6750,7 +8114,7 @@ class Teams extends Service {
6750
8114
  * @param {string} name
6751
8115
  * @throws {AppwriteException}
6752
8116
  * @returns {Promise}
6753
- */
8117
+ */
6754
8118
  createMembership(teamId, roles, url, email, userId, phone, name) {
6755
8119
  return __awaiter(this, void 0, void 0, function* () {
6756
8120
  if (typeof teamId === 'undefined') {
@@ -6798,7 +8162,7 @@ class Teams extends Service {
6798
8162
  * @param {string} membershipId
6799
8163
  * @throws {AppwriteException}
6800
8164
  * @returns {Promise}
6801
- */
8165
+ */
6802
8166
  getMembership(teamId, membershipId) {
6803
8167
  return __awaiter(this, void 0, void 0, function* () {
6804
8168
  if (typeof teamId === 'undefined') {
@@ -6816,19 +8180,20 @@ class Teams extends Service {
6816
8180
  });
6817
8181
  }
6818
8182
  /**
6819
- * Update Membership Roles
8183
+ * Update Membership
6820
8184
  *
6821
8185
  * Modify the roles of a team member. Only team members with the owner role
6822
8186
  * have access to this endpoint. Learn more about [roles and
6823
8187
  * permissions](/docs/permissions).
6824
8188
  *
8189
+ *
6825
8190
  * @param {string} teamId
6826
8191
  * @param {string} membershipId
6827
8192
  * @param {string[]} roles
6828
8193
  * @throws {AppwriteException}
6829
8194
  * @returns {Promise}
6830
- */
6831
- updateMembershipRoles(teamId, membershipId, roles) {
8195
+ */
8196
+ updateMembership(teamId, membershipId, roles) {
6832
8197
  return __awaiter(this, void 0, void 0, function* () {
6833
8198
  if (typeof teamId === 'undefined') {
6834
8199
  throw new AppwriteException('Missing required parameter: "teamId"');
@@ -6861,7 +8226,7 @@ class Teams extends Service {
6861
8226
  * @param {string} membershipId
6862
8227
  * @throws {AppwriteException}
6863
8228
  * @returns {Promise}
6864
- */
8229
+ */
6865
8230
  deleteMembership(teamId, membershipId) {
6866
8231
  return __awaiter(this, void 0, void 0, function* () {
6867
8232
  if (typeof teamId === 'undefined') {
@@ -6895,7 +8260,7 @@ class Teams extends Service {
6895
8260
  * @param {string} secret
6896
8261
  * @throws {AppwriteException}
6897
8262
  * @returns {Promise}
6898
- */
8263
+ */
6899
8264
  updateMembershipStatus(teamId, membershipId, userId, secret) {
6900
8265
  return __awaiter(this, void 0, void 0, function* () {
6901
8266
  if (typeof teamId === 'undefined') {
@@ -6934,7 +8299,7 @@ class Teams extends Service {
6934
8299
  * @param {string} teamId
6935
8300
  * @throws {AppwriteException}
6936
8301
  * @returns {Promise}
6937
- */
8302
+ */
6938
8303
  getPrefs(teamId) {
6939
8304
  return __awaiter(this, void 0, void 0, function* () {
6940
8305
  if (typeof teamId === 'undefined') {
@@ -6959,7 +8324,7 @@ class Teams extends Service {
6959
8324
  * @param {object} prefs
6960
8325
  * @throws {AppwriteException}
6961
8326
  * @returns {Promise}
6962
- */
8327
+ */
6963
8328
  updatePrefs(teamId, prefs) {
6964
8329
  return __awaiter(this, void 0, void 0, function* () {
6965
8330
  if (typeof teamId === 'undefined') {
@@ -6995,7 +8360,7 @@ class Users extends Service {
6995
8360
  * @param {string} search
6996
8361
  * @throws {AppwriteException}
6997
8362
  * @returns {Promise}
6998
- */
8363
+ */
6999
8364
  list(queries, search) {
7000
8365
  return __awaiter(this, void 0, void 0, function* () {
7001
8366
  let path = '/users';
@@ -7024,7 +8389,7 @@ class Users extends Service {
7024
8389
  * @param {string} name
7025
8390
  * @throws {AppwriteException}
7026
8391
  * @returns {Promise}
7027
- */
8392
+ */
7028
8393
  create(userId, email, phone, password, name) {
7029
8394
  return __awaiter(this, void 0, void 0, function* () {
7030
8395
  if (typeof userId === 'undefined') {
@@ -7067,7 +8432,7 @@ class Users extends Service {
7067
8432
  * @param {string} name
7068
8433
  * @throws {AppwriteException}
7069
8434
  * @returns {Promise}
7070
- */
8435
+ */
7071
8436
  createArgon2User(userId, email, password, name) {
7072
8437
  return __awaiter(this, void 0, void 0, function* () {
7073
8438
  if (typeof userId === 'undefined') {
@@ -7113,7 +8478,7 @@ class Users extends Service {
7113
8478
  * @param {string} name
7114
8479
  * @throws {AppwriteException}
7115
8480
  * @returns {Promise}
7116
- */
8481
+ */
7117
8482
  createBcryptUser(userId, email, password, name) {
7118
8483
  return __awaiter(this, void 0, void 0, function* () {
7119
8484
  if (typeof userId === 'undefined') {
@@ -7145,6 +8510,54 @@ class Users extends Service {
7145
8510
  }, payload);
7146
8511
  });
7147
8512
  }
8513
+ /**
8514
+ * List Identities
8515
+ *
8516
+ * Get identities for all users.
8517
+ *
8518
+ * @param {string} queries
8519
+ * @param {string} search
8520
+ * @throws {AppwriteException}
8521
+ * @returns {Promise}
8522
+ */
8523
+ listIdentities(queries, search) {
8524
+ return __awaiter(this, void 0, void 0, function* () {
8525
+ let path = '/users/identities';
8526
+ let payload = {};
8527
+ if (typeof queries !== 'undefined') {
8528
+ payload['queries'] = queries;
8529
+ }
8530
+ if (typeof search !== 'undefined') {
8531
+ payload['search'] = search;
8532
+ }
8533
+ const uri = new URL(this.client.config.endpoint + path);
8534
+ return yield this.client.call('get', uri, {
8535
+ 'content-type': 'application/json',
8536
+ }, payload);
8537
+ });
8538
+ }
8539
+ /**
8540
+ * Delete Identity
8541
+ *
8542
+ * Delete an identity by its unique ID.
8543
+ *
8544
+ * @param {string} identityId
8545
+ * @throws {AppwriteException}
8546
+ * @returns {Promise}
8547
+ */
8548
+ deleteIdentity(identityId) {
8549
+ return __awaiter(this, void 0, void 0, function* () {
8550
+ if (typeof identityId === 'undefined') {
8551
+ throw new AppwriteException('Missing required parameter: "identityId"');
8552
+ }
8553
+ let path = '/users/identities/{identityId}'.replace('{identityId}', identityId);
8554
+ let payload = {};
8555
+ const uri = new URL(this.client.config.endpoint + path);
8556
+ return yield this.client.call('delete', uri, {
8557
+ 'content-type': 'application/json',
8558
+ }, payload);
8559
+ });
8560
+ }
7148
8561
  /**
7149
8562
  * Create User with MD5 Password
7150
8563
  *
@@ -7159,7 +8572,7 @@ class Users extends Service {
7159
8572
  * @param {string} name
7160
8573
  * @throws {AppwriteException}
7161
8574
  * @returns {Promise}
7162
- */
8575
+ */
7163
8576
  createMD5User(userId, email, password, name) {
7164
8577
  return __awaiter(this, void 0, void 0, function* () {
7165
8578
  if (typeof userId === 'undefined') {
@@ -7205,7 +8618,7 @@ class Users extends Service {
7205
8618
  * @param {string} name
7206
8619
  * @throws {AppwriteException}
7207
8620
  * @returns {Promise}
7208
- */
8621
+ */
7209
8622
  createPHPassUser(userId, email, password, name) {
7210
8623
  return __awaiter(this, void 0, void 0, function* () {
7211
8624
  if (typeof userId === 'undefined') {
@@ -7256,7 +8669,7 @@ class Users extends Service {
7256
8669
  * @param {string} name
7257
8670
  * @throws {AppwriteException}
7258
8671
  * @returns {Promise}
7259
- */
8672
+ */
7260
8673
  createScryptUser(userId, email, password, passwordSalt, passwordCpu, passwordMemory, passwordParallel, passwordLength, name) {
7261
8674
  return __awaiter(this, void 0, void 0, function* () {
7262
8675
  if (typeof userId === 'undefined') {
@@ -7335,7 +8748,7 @@ class Users extends Service {
7335
8748
  * @param {string} name
7336
8749
  * @throws {AppwriteException}
7337
8750
  * @returns {Promise}
7338
- */
8751
+ */
7339
8752
  createScryptModifiedUser(userId, email, password, passwordSalt, passwordSaltSeparator, passwordSignerKey, name) {
7340
8753
  return __awaiter(this, void 0, void 0, function* () {
7341
8754
  if (typeof userId === 'undefined') {
@@ -7400,7 +8813,7 @@ class Users extends Service {
7400
8813
  * @param {string} name
7401
8814
  * @throws {AppwriteException}
7402
8815
  * @returns {Promise}
7403
- */
8816
+ */
7404
8817
  createSHAUser(userId, email, password, passwordVersion, name) {
7405
8818
  return __awaiter(this, void 0, void 0, function* () {
7406
8819
  if (typeof userId === 'undefined') {
@@ -7440,16 +8853,20 @@ class Users extends Service {
7440
8853
  *
7441
8854
  *
7442
8855
  * @param {string} range
8856
+ * @param {string} provider
7443
8857
  * @throws {AppwriteException}
7444
8858
  * @returns {Promise}
7445
- */
7446
- getUsage(range) {
8859
+ */
8860
+ getUsage(range, provider) {
7447
8861
  return __awaiter(this, void 0, void 0, function* () {
7448
8862
  let path = '/users/usage';
7449
8863
  let payload = {};
7450
8864
  if (typeof range !== 'undefined') {
7451
8865
  payload['range'] = range;
7452
8866
  }
8867
+ if (typeof provider !== 'undefined') {
8868
+ payload['provider'] = provider;
8869
+ }
7453
8870
  const uri = new URL(this.client.config.endpoint + path);
7454
8871
  return yield this.client.call('get', uri, {
7455
8872
  'content-type': 'application/json',
@@ -7464,7 +8881,7 @@ class Users extends Service {
7464
8881
  * @param {string} userId
7465
8882
  * @throws {AppwriteException}
7466
8883
  * @returns {Promise}
7467
- */
8884
+ */
7468
8885
  get(userId) {
7469
8886
  return __awaiter(this, void 0, void 0, function* () {
7470
8887
  if (typeof userId === 'undefined') {
@@ -7490,7 +8907,7 @@ class Users extends Service {
7490
8907
  * @param {string} userId
7491
8908
  * @throws {AppwriteException}
7492
8909
  * @returns {Promise}
7493
- */
8910
+ */
7494
8911
  delete(userId) {
7495
8912
  return __awaiter(this, void 0, void 0, function* () {
7496
8913
  if (typeof userId === 'undefined') {
@@ -7513,7 +8930,7 @@ class Users extends Service {
7513
8930
  * @param {string} email
7514
8931
  * @throws {AppwriteException}
7515
8932
  * @returns {Promise}
7516
- */
8933
+ */
7517
8934
  updateEmail(userId, email) {
7518
8935
  return __awaiter(this, void 0, void 0, function* () {
7519
8936
  if (typeof userId === 'undefined') {
@@ -7533,6 +8950,40 @@ class Users extends Service {
7533
8950
  }, payload);
7534
8951
  });
7535
8952
  }
8953
+ /**
8954
+ * Update User Labels
8955
+ *
8956
+ * Update the user labels by its unique ID.
8957
+ *
8958
+ * Labels can be used to grant access to resources. While teams are a way for
8959
+ * user's to share access to a resource, labels can be defined by the
8960
+ * developer to grant access without an invitation. See the [Permissions
8961
+ * docs](/docs/permissions) for more info.
8962
+ *
8963
+ * @param {string} userId
8964
+ * @param {string[]} labels
8965
+ * @throws {AppwriteException}
8966
+ * @returns {Promise}
8967
+ */
8968
+ updateLabels(userId, labels) {
8969
+ return __awaiter(this, void 0, void 0, function* () {
8970
+ if (typeof userId === 'undefined') {
8971
+ throw new AppwriteException('Missing required parameter: "userId"');
8972
+ }
8973
+ if (typeof labels === 'undefined') {
8974
+ throw new AppwriteException('Missing required parameter: "labels"');
8975
+ }
8976
+ let path = '/users/{userId}/labels'.replace('{userId}', userId);
8977
+ let payload = {};
8978
+ if (typeof labels !== 'undefined') {
8979
+ payload['labels'] = labels;
8980
+ }
8981
+ const uri = new URL(this.client.config.endpoint + path);
8982
+ return yield this.client.call('put', uri, {
8983
+ 'content-type': 'application/json',
8984
+ }, payload);
8985
+ });
8986
+ }
7536
8987
  /**
7537
8988
  * List User Logs
7538
8989
  *
@@ -7542,7 +8993,7 @@ class Users extends Service {
7542
8993
  * @param {string[]} queries
7543
8994
  * @throws {AppwriteException}
7544
8995
  * @returns {Promise}
7545
- */
8996
+ */
7546
8997
  listLogs(userId, queries) {
7547
8998
  return __awaiter(this, void 0, void 0, function* () {
7548
8999
  if (typeof userId === 'undefined') {
@@ -7567,7 +9018,7 @@ class Users extends Service {
7567
9018
  * @param {string} userId
7568
9019
  * @throws {AppwriteException}
7569
9020
  * @returns {Promise}
7570
- */
9021
+ */
7571
9022
  listMemberships(userId) {
7572
9023
  return __awaiter(this, void 0, void 0, function* () {
7573
9024
  if (typeof userId === 'undefined') {
@@ -7590,7 +9041,7 @@ class Users extends Service {
7590
9041
  * @param {string} name
7591
9042
  * @throws {AppwriteException}
7592
9043
  * @returns {Promise}
7593
- */
9044
+ */
7594
9045
  updateName(userId, name) {
7595
9046
  return __awaiter(this, void 0, void 0, function* () {
7596
9047
  if (typeof userId === 'undefined') {
@@ -7619,7 +9070,7 @@ class Users extends Service {
7619
9070
  * @param {string} password
7620
9071
  * @throws {AppwriteException}
7621
9072
  * @returns {Promise}
7622
- */
9073
+ */
7623
9074
  updatePassword(userId, password) {
7624
9075
  return __awaiter(this, void 0, void 0, function* () {
7625
9076
  if (typeof userId === 'undefined') {
@@ -7648,7 +9099,7 @@ class Users extends Service {
7648
9099
  * @param {string} number
7649
9100
  * @throws {AppwriteException}
7650
9101
  * @returns {Promise}
7651
- */
9102
+ */
7652
9103
  updatePhone(userId, number) {
7653
9104
  return __awaiter(this, void 0, void 0, function* () {
7654
9105
  if (typeof userId === 'undefined') {
@@ -7676,7 +9127,7 @@ class Users extends Service {
7676
9127
  * @param {string} userId
7677
9128
  * @throws {AppwriteException}
7678
9129
  * @returns {Promise}
7679
- */
9130
+ */
7680
9131
  getPrefs(userId) {
7681
9132
  return __awaiter(this, void 0, void 0, function* () {
7682
9133
  if (typeof userId === 'undefined') {
@@ -7701,7 +9152,7 @@ class Users extends Service {
7701
9152
  * @param {object} prefs
7702
9153
  * @throws {AppwriteException}
7703
9154
  * @returns {Promise}
7704
- */
9155
+ */
7705
9156
  updatePrefs(userId, prefs) {
7706
9157
  return __awaiter(this, void 0, void 0, function* () {
7707
9158
  if (typeof userId === 'undefined') {
@@ -7729,7 +9180,7 @@ class Users extends Service {
7729
9180
  * @param {string} userId
7730
9181
  * @throws {AppwriteException}
7731
9182
  * @returns {Promise}
7732
- */
9183
+ */
7733
9184
  listSessions(userId) {
7734
9185
  return __awaiter(this, void 0, void 0, function* () {
7735
9186
  if (typeof userId === 'undefined') {
@@ -7751,7 +9202,7 @@ class Users extends Service {
7751
9202
  * @param {string} userId
7752
9203
  * @throws {AppwriteException}
7753
9204
  * @returns {Promise}
7754
- */
9205
+ */
7755
9206
  deleteSessions(userId) {
7756
9207
  return __awaiter(this, void 0, void 0, function* () {
7757
9208
  if (typeof userId === 'undefined') {
@@ -7774,7 +9225,7 @@ class Users extends Service {
7774
9225
  * @param {string} sessionId
7775
9226
  * @throws {AppwriteException}
7776
9227
  * @returns {Promise}
7777
- */
9228
+ */
7778
9229
  deleteSession(userId, sessionId) {
7779
9230
  return __awaiter(this, void 0, void 0, function* () {
7780
9231
  if (typeof userId === 'undefined') {
@@ -7801,7 +9252,7 @@ class Users extends Service {
7801
9252
  * @param {boolean} status
7802
9253
  * @throws {AppwriteException}
7803
9254
  * @returns {Promise}
7804
- */
9255
+ */
7805
9256
  updateStatus(userId, status) {
7806
9257
  return __awaiter(this, void 0, void 0, function* () {
7807
9258
  if (typeof userId === 'undefined') {
@@ -7830,7 +9281,7 @@ class Users extends Service {
7830
9281
  * @param {boolean} emailVerification
7831
9282
  * @throws {AppwriteException}
7832
9283
  * @returns {Promise}
7833
- */
9284
+ */
7834
9285
  updateEmailVerification(userId, emailVerification) {
7835
9286
  return __awaiter(this, void 0, void 0, function* () {
7836
9287
  if (typeof userId === 'undefined') {
@@ -7859,7 +9310,7 @@ class Users extends Service {
7859
9310
  * @param {boolean} phoneVerification
7860
9311
  * @throws {AppwriteException}
7861
9312
  * @returns {Promise}
7862
- */
9313
+ */
7863
9314
  updatePhoneVerification(userId, phoneVerification) {
7864
9315
  return __awaiter(this, void 0, void 0, function* () {
7865
9316
  if (typeof userId === 'undefined') {
@@ -7881,6 +9332,250 @@ class Users extends Service {
7881
9332
  }
7882
9333
  }
7883
9334
 
9335
+ class Vcs extends Service {
9336
+ constructor(client) {
9337
+ super(client);
9338
+ }
9339
+ /**
9340
+ * List Repositories
9341
+ *
9342
+ *
9343
+ * @param {string} installationId
9344
+ * @param {string} search
9345
+ * @throws {AppwriteException}
9346
+ * @returns {Promise}
9347
+ */
9348
+ listRepositories(installationId, search) {
9349
+ return __awaiter(this, void 0, void 0, function* () {
9350
+ if (typeof installationId === 'undefined') {
9351
+ throw new AppwriteException('Missing required parameter: "installationId"');
9352
+ }
9353
+ let path = '/vcs/github/installations/{installationId}/providerRepositories'.replace('{installationId}', installationId);
9354
+ let payload = {};
9355
+ if (typeof search !== 'undefined') {
9356
+ payload['search'] = search;
9357
+ }
9358
+ const uri = new URL(this.client.config.endpoint + path);
9359
+ return yield this.client.call('get', uri, {
9360
+ 'content-type': 'application/json',
9361
+ }, payload);
9362
+ });
9363
+ }
9364
+ /**
9365
+ * Create repository
9366
+ *
9367
+ *
9368
+ * @param {string} installationId
9369
+ * @param {string} name
9370
+ * @param {boolean} xprivate
9371
+ * @throws {AppwriteException}
9372
+ * @returns {Promise}
9373
+ */
9374
+ createRepository(installationId, name, xprivate) {
9375
+ return __awaiter(this, void 0, void 0, function* () {
9376
+ if (typeof installationId === 'undefined') {
9377
+ throw new AppwriteException('Missing required parameter: "installationId"');
9378
+ }
9379
+ if (typeof name === 'undefined') {
9380
+ throw new AppwriteException('Missing required parameter: "name"');
9381
+ }
9382
+ if (typeof xprivate === 'undefined') {
9383
+ throw new AppwriteException('Missing required parameter: "xprivate"');
9384
+ }
9385
+ let path = '/vcs/github/installations/{installationId}/providerRepositories'.replace('{installationId}', installationId);
9386
+ let payload = {};
9387
+ if (typeof name !== 'undefined') {
9388
+ payload['name'] = name;
9389
+ }
9390
+ if (typeof xprivate !== 'undefined') {
9391
+ payload['private'] = xprivate;
9392
+ }
9393
+ const uri = new URL(this.client.config.endpoint + path);
9394
+ return yield this.client.call('post', uri, {
9395
+ 'content-type': 'application/json',
9396
+ }, payload);
9397
+ });
9398
+ }
9399
+ /**
9400
+ * Get repository
9401
+ *
9402
+ *
9403
+ * @param {string} installationId
9404
+ * @param {string} providerRepositoryId
9405
+ * @throws {AppwriteException}
9406
+ * @returns {Promise}
9407
+ */
9408
+ getRepository(installationId, providerRepositoryId) {
9409
+ return __awaiter(this, void 0, void 0, function* () {
9410
+ if (typeof installationId === 'undefined') {
9411
+ throw new AppwriteException('Missing required parameter: "installationId"');
9412
+ }
9413
+ if (typeof providerRepositoryId === 'undefined') {
9414
+ throw new AppwriteException('Missing required parameter: "providerRepositoryId"');
9415
+ }
9416
+ let path = '/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}'.replace('{installationId}', installationId).replace('{providerRepositoryId}', providerRepositoryId);
9417
+ let payload = {};
9418
+ const uri = new URL(this.client.config.endpoint + path);
9419
+ return yield this.client.call('get', uri, {
9420
+ 'content-type': 'application/json',
9421
+ }, payload);
9422
+ });
9423
+ }
9424
+ /**
9425
+ * List Repository Branches
9426
+ *
9427
+ *
9428
+ * @param {string} installationId
9429
+ * @param {string} providerRepositoryId
9430
+ * @throws {AppwriteException}
9431
+ * @returns {Promise}
9432
+ */
9433
+ listRepositoryBranches(installationId, providerRepositoryId) {
9434
+ return __awaiter(this, void 0, void 0, function* () {
9435
+ if (typeof installationId === 'undefined') {
9436
+ throw new AppwriteException('Missing required parameter: "installationId"');
9437
+ }
9438
+ if (typeof providerRepositoryId === 'undefined') {
9439
+ throw new AppwriteException('Missing required parameter: "providerRepositoryId"');
9440
+ }
9441
+ let path = '/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}/branches'.replace('{installationId}', installationId).replace('{providerRepositoryId}', providerRepositoryId);
9442
+ let payload = {};
9443
+ const uri = new URL(this.client.config.endpoint + path);
9444
+ return yield this.client.call('get', uri, {
9445
+ 'content-type': 'application/json',
9446
+ }, payload);
9447
+ });
9448
+ }
9449
+ /**
9450
+ * Detect runtime settings from source code
9451
+ *
9452
+ *
9453
+ * @param {string} installationId
9454
+ * @param {string} providerRepositoryId
9455
+ * @param {string} providerRootDirectory
9456
+ * @throws {AppwriteException}
9457
+ * @returns {Promise}
9458
+ */
9459
+ createRepositoryDetection(installationId, providerRepositoryId, providerRootDirectory) {
9460
+ return __awaiter(this, void 0, void 0, function* () {
9461
+ if (typeof installationId === 'undefined') {
9462
+ throw new AppwriteException('Missing required parameter: "installationId"');
9463
+ }
9464
+ if (typeof providerRepositoryId === 'undefined') {
9465
+ throw new AppwriteException('Missing required parameter: "providerRepositoryId"');
9466
+ }
9467
+ let path = '/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}/detection'.replace('{installationId}', installationId).replace('{providerRepositoryId}', providerRepositoryId);
9468
+ let payload = {};
9469
+ if (typeof providerRootDirectory !== 'undefined') {
9470
+ payload['providerRootDirectory'] = providerRootDirectory;
9471
+ }
9472
+ const uri = new URL(this.client.config.endpoint + path);
9473
+ return yield this.client.call('post', uri, {
9474
+ 'content-type': 'application/json',
9475
+ }, payload);
9476
+ });
9477
+ }
9478
+ /**
9479
+ * Authorize external deployment
9480
+ *
9481
+ *
9482
+ * @param {string} installationId
9483
+ * @param {string} repositoryId
9484
+ * @param {string} providerPullRequestId
9485
+ * @throws {AppwriteException}
9486
+ * @returns {Promise}
9487
+ */
9488
+ updateExternalDeployments(installationId, repositoryId, providerPullRequestId) {
9489
+ return __awaiter(this, void 0, void 0, function* () {
9490
+ if (typeof installationId === 'undefined') {
9491
+ throw new AppwriteException('Missing required parameter: "installationId"');
9492
+ }
9493
+ if (typeof repositoryId === 'undefined') {
9494
+ throw new AppwriteException('Missing required parameter: "repositoryId"');
9495
+ }
9496
+ if (typeof providerPullRequestId === 'undefined') {
9497
+ throw new AppwriteException('Missing required parameter: "providerPullRequestId"');
9498
+ }
9499
+ let path = '/vcs/github/installations/{installationId}/repositories/{repositoryId}'.replace('{installationId}', installationId).replace('{repositoryId}', repositoryId);
9500
+ let payload = {};
9501
+ if (typeof providerPullRequestId !== 'undefined') {
9502
+ payload['providerPullRequestId'] = providerPullRequestId;
9503
+ }
9504
+ const uri = new URL(this.client.config.endpoint + path);
9505
+ return yield this.client.call('patch', uri, {
9506
+ 'content-type': 'application/json',
9507
+ }, payload);
9508
+ });
9509
+ }
9510
+ /**
9511
+ * List installations
9512
+ *
9513
+ *
9514
+ * @param {string[]} queries
9515
+ * @param {string} search
9516
+ * @throws {AppwriteException}
9517
+ * @returns {Promise}
9518
+ */
9519
+ listInstallations(queries, search) {
9520
+ return __awaiter(this, void 0, void 0, function* () {
9521
+ let path = '/vcs/installations';
9522
+ let payload = {};
9523
+ if (typeof queries !== 'undefined') {
9524
+ payload['queries'] = queries;
9525
+ }
9526
+ if (typeof search !== 'undefined') {
9527
+ payload['search'] = search;
9528
+ }
9529
+ const uri = new URL(this.client.config.endpoint + path);
9530
+ return yield this.client.call('get', uri, {
9531
+ 'content-type': 'application/json',
9532
+ }, payload);
9533
+ });
9534
+ }
9535
+ /**
9536
+ * Get installation
9537
+ *
9538
+ *
9539
+ * @param {string} installationId
9540
+ * @throws {AppwriteException}
9541
+ * @returns {Promise}
9542
+ */
9543
+ getInstallation(installationId) {
9544
+ return __awaiter(this, void 0, void 0, function* () {
9545
+ if (typeof installationId === 'undefined') {
9546
+ throw new AppwriteException('Missing required parameter: "installationId"');
9547
+ }
9548
+ let path = '/vcs/installations/{installationId}'.replace('{installationId}', installationId);
9549
+ let payload = {};
9550
+ const uri = new URL(this.client.config.endpoint + path);
9551
+ return yield this.client.call('get', uri, {
9552
+ 'content-type': 'application/json',
9553
+ }, payload);
9554
+ });
9555
+ }
9556
+ /**
9557
+ * Delete Installation
9558
+ *
9559
+ *
9560
+ * @param {string} installationId
9561
+ * @throws {AppwriteException}
9562
+ * @returns {Promise}
9563
+ */
9564
+ deleteInstallation(installationId) {
9565
+ return __awaiter(this, void 0, void 0, function* () {
9566
+ if (typeof installationId === 'undefined') {
9567
+ throw new AppwriteException('Missing required parameter: "installationId"');
9568
+ }
9569
+ let path = '/vcs/installations/{installationId}'.replace('{installationId}', installationId);
9570
+ let payload = {};
9571
+ const uri = new URL(this.client.config.endpoint + path);
9572
+ return yield this.client.call('delete', uri, {
9573
+ 'content-type': 'application/json',
9574
+ }, payload);
9575
+ });
9576
+ }
9577
+ }
9578
+
7884
9579
  class Permission {
7885
9580
  }
7886
9581
  Permission.read = (role) => {
@@ -7940,6 +9635,7 @@ class ID {
7940
9635
 
7941
9636
  exports.Account = Account;
7942
9637
  exports.AppwriteException = AppwriteException;
9638
+ exports.Assistant = Assistant;
7943
9639
  exports.Avatars = Avatars;
7944
9640
  exports.Client = Client;
7945
9641
  exports.Console = Console;
@@ -7949,12 +9645,15 @@ exports.Graphql = Graphql;
7949
9645
  exports.Health = Health;
7950
9646
  exports.ID = ID;
7951
9647
  exports.Locale = Locale;
9648
+ exports.Migrations = Migrations;
7952
9649
  exports.Permission = Permission;
7953
9650
  exports.Project = Project;
7954
9651
  exports.Projects = Projects;
9652
+ exports.Proxy = Proxy;
7955
9653
  exports.Query = Query;
7956
9654
  exports.Role = Role;
7957
9655
  exports.Storage = Storage;
7958
9656
  exports.Teams = Teams;
7959
9657
  exports.Users = Users;
9658
+ exports.Vcs = Vcs;
7960
9659
  //# sourceMappingURL=sdk.js.map