@appwrite.io/console 2.1.3 → 2.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 (734) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/sdk.js +2201 -692
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +2202 -693
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +2201 -692
  8. package/docs/examples/account/create-anonymous-session.md +2 -0
  9. package/docs/examples/account/create-billing-address.md +2 -0
  10. package/docs/examples/account/create-email-password-session.md +2 -0
  11. package/docs/examples/account/create-email-token.md +2 -0
  12. package/docs/examples/account/create-email-verification.md +2 -0
  13. package/docs/examples/account/create-jwt.md +2 -0
  14. package/docs/examples/account/create-key.md +17 -0
  15. package/docs/examples/account/create-magic-url-token.md +2 -0
  16. package/docs/examples/account/create-mfa-authenticator.md +2 -0
  17. package/docs/examples/account/create-mfa-challenge.md +2 -0
  18. package/docs/examples/account/create-mfa-recovery-codes.md +2 -0
  19. package/docs/examples/account/create-o-auth-2-session.md +2 -0
  20. package/docs/examples/account/create-o-auth-2-token.md +2 -0
  21. package/docs/examples/account/create-payment-method.md +2 -0
  22. package/docs/examples/account/create-phone-token.md +2 -0
  23. package/docs/examples/account/create-phone-verification.md +2 -0
  24. package/docs/examples/account/create-push-target.md +2 -0
  25. package/docs/examples/account/create-recovery.md +2 -0
  26. package/docs/examples/account/create-session.md +2 -0
  27. package/docs/examples/account/create-verification.md +2 -0
  28. package/docs/examples/account/create.md +2 -0
  29. package/docs/examples/account/delete-billing-address.md +2 -0
  30. package/docs/examples/account/delete-identity.md +2 -0
  31. package/docs/examples/account/delete-key.md +15 -0
  32. package/docs/examples/account/delete-mfa-authenticator.md +2 -0
  33. package/docs/examples/account/delete-payment-method.md +2 -0
  34. package/docs/examples/account/delete-push-target.md +2 -0
  35. package/docs/examples/account/delete-session.md +2 -0
  36. package/docs/examples/account/delete-sessions.md +2 -0
  37. package/docs/examples/account/delete.md +2 -0
  38. package/docs/examples/account/get-billing-address.md +2 -0
  39. package/docs/examples/account/get-coupon.md +2 -0
  40. package/docs/examples/account/get-key.md +15 -0
  41. package/docs/examples/account/get-mfa-recovery-codes.md +2 -0
  42. package/docs/examples/account/get-payment-method.md +2 -0
  43. package/docs/examples/account/get-prefs.md +2 -0
  44. package/docs/examples/account/get-session.md +2 -0
  45. package/docs/examples/account/get.md +2 -0
  46. package/docs/examples/account/list-billing-addresses.md +2 -0
  47. package/docs/examples/account/list-identities.md +2 -0
  48. package/docs/examples/account/list-invoices.md +2 -0
  49. package/docs/examples/account/list-keys.md +15 -0
  50. package/docs/examples/account/list-logs.md +2 -0
  51. package/docs/examples/account/list-mfa-factors.md +2 -0
  52. package/docs/examples/account/list-payment-methods.md +2 -0
  53. package/docs/examples/account/list-sessions.md +2 -0
  54. package/docs/examples/account/update-billing-address.md +2 -0
  55. package/docs/examples/account/update-email-verification.md +2 -0
  56. package/docs/examples/account/update-email.md +2 -0
  57. package/docs/examples/account/update-key.md +18 -0
  58. package/docs/examples/account/update-magic-url-session.md +2 -0
  59. package/docs/examples/account/update-mfa-authenticator.md +2 -0
  60. package/docs/examples/account/update-mfa-challenge.md +2 -0
  61. package/docs/examples/account/update-mfa-recovery-codes.md +2 -0
  62. package/docs/examples/account/update-mfa.md +2 -0
  63. package/docs/examples/account/update-name.md +2 -0
  64. package/docs/examples/account/update-password.md +2 -0
  65. package/docs/examples/account/update-payment-method-mandate-options.md +2 -0
  66. package/docs/examples/account/update-payment-method-provider.md +2 -0
  67. package/docs/examples/account/update-payment-method.md +2 -0
  68. package/docs/examples/account/update-phone-session.md +2 -0
  69. package/docs/examples/account/update-phone-verification.md +2 -0
  70. package/docs/examples/account/update-phone.md +2 -0
  71. package/docs/examples/account/update-prefs.md +2 -0
  72. package/docs/examples/account/update-push-target.md +2 -0
  73. package/docs/examples/account/update-recovery.md +2 -0
  74. package/docs/examples/account/update-session.md +2 -0
  75. package/docs/examples/account/update-status.md +2 -0
  76. package/docs/examples/account/update-verification.md +2 -0
  77. package/docs/examples/assistant/chat.md +2 -0
  78. package/docs/examples/avatars/get-browser.md +2 -0
  79. package/docs/examples/avatars/get-credit-card.md +2 -0
  80. package/docs/examples/avatars/get-favicon.md +2 -0
  81. package/docs/examples/avatars/get-flag.md +2 -0
  82. package/docs/examples/avatars/get-image.md +2 -0
  83. package/docs/examples/avatars/get-initials.md +2 -0
  84. package/docs/examples/avatars/get-qr.md +2 -0
  85. package/docs/examples/avatars/get-screenshot.md +7 -5
  86. package/docs/examples/backups/create-archive.md +4 -2
  87. package/docs/examples/backups/create-policy.md +4 -2
  88. package/docs/examples/backups/create-restoration.md +4 -2
  89. package/docs/examples/backups/delete-archive.md +2 -0
  90. package/docs/examples/backups/delete-policy.md +2 -0
  91. package/docs/examples/backups/get-archive.md +2 -0
  92. package/docs/examples/backups/get-policy.md +2 -0
  93. package/docs/examples/backups/get-restoration.md +2 -0
  94. package/docs/examples/backups/list-archives.md +2 -0
  95. package/docs/examples/backups/list-policies.md +2 -0
  96. package/docs/examples/backups/list-restorations.md +2 -0
  97. package/docs/examples/backups/update-policy.md +2 -0
  98. package/docs/examples/console/create-program-membership.md +2 -0
  99. package/docs/examples/console/create-source.md +2 -0
  100. package/docs/examples/console/get-campaign.md +2 -0
  101. package/docs/examples/console/get-coupon.md +2 -0
  102. package/docs/examples/console/get-plan.md +2 -0
  103. package/docs/examples/console/get-plans.md +2 -0
  104. package/docs/examples/console/get-program.md +2 -0
  105. package/docs/examples/console/get-resource.md +2 -0
  106. package/docs/examples/console/{get-regions.md → list-regions.md} +3 -3
  107. package/docs/examples/console/suggest-columns.md +2 -0
  108. package/docs/examples/console/suggest-indexes.md +2 -0
  109. package/docs/examples/console/variables.md +2 -0
  110. package/docs/examples/databases/create-boolean-attribute.md +2 -0
  111. package/docs/examples/databases/create-collection.md +2 -0
  112. package/docs/examples/databases/create-datetime-attribute.md +2 -0
  113. package/docs/examples/databases/create-document.md +2 -0
  114. package/docs/examples/databases/create-documents.md +2 -0
  115. package/docs/examples/databases/create-email-attribute.md +2 -0
  116. package/docs/examples/databases/create-enum-attribute.md +2 -0
  117. package/docs/examples/databases/create-float-attribute.md +2 -0
  118. package/docs/examples/databases/create-index.md +4 -2
  119. package/docs/examples/databases/create-integer-attribute.md +2 -0
  120. package/docs/examples/databases/create-ip-attribute.md +2 -0
  121. package/docs/examples/databases/create-line-attribute.md +2 -0
  122. package/docs/examples/databases/create-longtext-attribute.md +20 -0
  123. package/docs/examples/databases/create-mediumtext-attribute.md +20 -0
  124. package/docs/examples/databases/create-operations.md +2 -0
  125. package/docs/examples/databases/create-point-attribute.md +2 -0
  126. package/docs/examples/databases/create-polygon-attribute.md +2 -0
  127. package/docs/examples/databases/create-relationship-attribute.md +2 -0
  128. package/docs/examples/databases/create-string-attribute.md +2 -0
  129. package/docs/examples/databases/create-text-attribute.md +20 -0
  130. package/docs/examples/databases/create-transaction.md +2 -0
  131. package/docs/examples/databases/create-url-attribute.md +2 -0
  132. package/docs/examples/databases/create-varchar-attribute.md +21 -0
  133. package/docs/examples/databases/create.md +2 -0
  134. package/docs/examples/databases/decrement-document-attribute.md +2 -0
  135. package/docs/examples/databases/delete-attribute.md +2 -0
  136. package/docs/examples/databases/delete-collection.md +2 -0
  137. package/docs/examples/databases/delete-document.md +2 -0
  138. package/docs/examples/databases/delete-documents.md +2 -0
  139. package/docs/examples/databases/delete-index.md +2 -0
  140. package/docs/examples/databases/delete-transaction.md +2 -0
  141. package/docs/examples/databases/delete.md +2 -0
  142. package/docs/examples/databases/get-attribute.md +2 -0
  143. package/docs/examples/databases/get-collection-usage.md +2 -0
  144. package/docs/examples/databases/get-collection.md +2 -0
  145. package/docs/examples/databases/get-document.md +2 -0
  146. package/docs/examples/databases/get-index.md +2 -0
  147. package/docs/examples/databases/get-transaction.md +2 -0
  148. package/docs/examples/databases/get-usage.md +2 -0
  149. package/docs/examples/databases/get.md +2 -0
  150. package/docs/examples/databases/increment-document-attribute.md +2 -0
  151. package/docs/examples/databases/list-attributes.md +2 -0
  152. package/docs/examples/databases/list-collection-logs.md +2 -0
  153. package/docs/examples/databases/list-collections.md +2 -0
  154. package/docs/examples/databases/list-document-logs.md +2 -0
  155. package/docs/examples/databases/list-documents.md +2 -0
  156. package/docs/examples/databases/list-indexes.md +2 -0
  157. package/docs/examples/databases/list-logs.md +2 -0
  158. package/docs/examples/databases/list-transactions.md +2 -0
  159. package/docs/examples/databases/list-usage.md +2 -0
  160. package/docs/examples/databases/list.md +2 -0
  161. package/docs/examples/databases/update-boolean-attribute.md +2 -0
  162. package/docs/examples/databases/update-collection.md +3 -1
  163. package/docs/examples/databases/update-datetime-attribute.md +2 -0
  164. package/docs/examples/databases/update-document.md +2 -0
  165. package/docs/examples/databases/update-documents.md +2 -0
  166. package/docs/examples/databases/update-email-attribute.md +2 -0
  167. package/docs/examples/databases/update-enum-attribute.md +2 -0
  168. package/docs/examples/databases/update-float-attribute.md +2 -0
  169. package/docs/examples/databases/update-integer-attribute.md +2 -0
  170. package/docs/examples/databases/update-ip-attribute.md +2 -0
  171. package/docs/examples/databases/update-line-attribute.md +2 -0
  172. package/docs/examples/databases/update-longtext-attribute.md +20 -0
  173. package/docs/examples/databases/update-mediumtext-attribute.md +20 -0
  174. package/docs/examples/databases/update-point-attribute.md +2 -0
  175. package/docs/examples/databases/update-polygon-attribute.md +2 -0
  176. package/docs/examples/databases/update-relationship-attribute.md +2 -0
  177. package/docs/examples/databases/update-string-attribute.md +2 -0
  178. package/docs/examples/databases/update-text-attribute.md +20 -0
  179. package/docs/examples/databases/update-transaction.md +2 -0
  180. package/docs/examples/databases/update-url-attribute.md +2 -0
  181. package/docs/examples/databases/update-varchar-attribute.md +21 -0
  182. package/docs/examples/databases/update.md +3 -1
  183. package/docs/examples/databases/upsert-document.md +2 -0
  184. package/docs/examples/databases/upsert-documents.md +2 -0
  185. package/docs/examples/domains/create-preset-google-workspace.md +2 -0
  186. package/docs/examples/domains/create-preset-i-cloud.md +2 -0
  187. package/docs/examples/domains/create-preset-mailgun.md +2 -0
  188. package/docs/examples/domains/create-preset-outlook.md +2 -0
  189. package/docs/examples/domains/create-preset-proton-mail.md +2 -0
  190. package/docs/examples/domains/create-preset-zoho.md +2 -0
  191. package/docs/examples/domains/create-record-a.md +2 -0
  192. package/docs/examples/domains/create-record-aaaa.md +2 -0
  193. package/docs/examples/domains/create-record-alias.md +2 -0
  194. package/docs/examples/domains/create-record-caa.md +2 -0
  195. package/docs/examples/domains/create-record-cname.md +2 -0
  196. package/docs/examples/domains/create-record-https.md +2 -0
  197. package/docs/examples/domains/create-record-mx.md +2 -0
  198. package/docs/examples/domains/create-record-ns.md +2 -0
  199. package/docs/examples/domains/create-record-srv.md +2 -0
  200. package/docs/examples/domains/create-record-txt.md +2 -0
  201. package/docs/examples/domains/create.md +2 -0
  202. package/docs/examples/domains/delete-record.md +2 -0
  203. package/docs/examples/domains/delete.md +2 -0
  204. package/docs/examples/domains/get-preset-google-workspace.md +2 -0
  205. package/docs/examples/domains/get-preset-i-cloud.md +2 -0
  206. package/docs/examples/domains/get-preset-mailgun.md +2 -0
  207. package/docs/examples/domains/get-preset-outlook.md +2 -0
  208. package/docs/examples/domains/get-preset-proton-mail.md +2 -0
  209. package/docs/examples/domains/get-preset-zoho.md +2 -0
  210. package/docs/examples/domains/get-price.md +17 -0
  211. package/docs/examples/domains/get-record.md +2 -0
  212. package/docs/examples/domains/get-zone.md +2 -0
  213. package/docs/examples/domains/get.md +2 -0
  214. package/docs/examples/domains/list-records.md +2 -0
  215. package/docs/examples/domains/list-suggestions.md +2 -0
  216. package/docs/examples/domains/list.md +2 -0
  217. package/docs/examples/domains/update-nameservers.md +2 -0
  218. package/docs/examples/domains/update-record-a.md +2 -0
  219. package/docs/examples/domains/update-record-aaaa.md +2 -0
  220. package/docs/examples/domains/update-record-alias.md +2 -0
  221. package/docs/examples/domains/update-record-caa.md +2 -0
  222. package/docs/examples/domains/update-record-cname.md +2 -0
  223. package/docs/examples/domains/update-record-https.md +2 -0
  224. package/docs/examples/domains/update-record-mx.md +2 -0
  225. package/docs/examples/domains/update-record-ns.md +2 -0
  226. package/docs/examples/domains/update-record-srv.md +2 -0
  227. package/docs/examples/domains/update-record-txt.md +2 -0
  228. package/docs/examples/domains/update-team.md +2 -0
  229. package/docs/examples/domains/update-zone.md +2 -0
  230. package/docs/examples/functions/create-deployment.md +2 -0
  231. package/docs/examples/functions/create-duplicate-deployment.md +2 -0
  232. package/docs/examples/functions/create-execution.md +2 -0
  233. package/docs/examples/functions/create-template-deployment.md +2 -0
  234. package/docs/examples/functions/create-variable.md +2 -0
  235. package/docs/examples/functions/create-vcs-deployment.md +2 -0
  236. package/docs/examples/functions/create.md +4 -2
  237. package/docs/examples/functions/delete-deployment.md +2 -0
  238. package/docs/examples/functions/delete-execution.md +2 -0
  239. package/docs/examples/functions/delete-variable.md +2 -0
  240. package/docs/examples/functions/delete.md +2 -0
  241. package/docs/examples/functions/get-deployment-download.md +2 -0
  242. package/docs/examples/functions/get-deployment.md +2 -0
  243. package/docs/examples/functions/get-execution.md +2 -0
  244. package/docs/examples/functions/get-template.md +2 -0
  245. package/docs/examples/functions/get-usage.md +2 -0
  246. package/docs/examples/functions/get-variable.md +2 -0
  247. package/docs/examples/functions/get.md +2 -0
  248. package/docs/examples/functions/list-deployments.md +2 -0
  249. package/docs/examples/functions/list-executions.md +2 -0
  250. package/docs/examples/functions/list-runtimes.md +2 -0
  251. package/docs/examples/functions/list-specifications.md +2 -0
  252. package/docs/examples/functions/list-templates.md +5 -3
  253. package/docs/examples/functions/list-usage.md +2 -0
  254. package/docs/examples/functions/list-variables.md +2 -0
  255. package/docs/examples/functions/list.md +2 -0
  256. package/docs/examples/functions/update-deployment-status.md +2 -0
  257. package/docs/examples/functions/update-function-deployment.md +2 -0
  258. package/docs/examples/functions/update-variable.md +2 -0
  259. package/docs/examples/functions/update.md +4 -2
  260. package/docs/examples/graphql/mutation.md +2 -0
  261. package/docs/examples/graphql/query.md +2 -0
  262. package/docs/examples/health/get-antivirus.md +2 -0
  263. package/docs/examples/health/get-cache.md +2 -0
  264. package/docs/examples/health/get-certificate.md +2 -0
  265. package/docs/examples/health/get-db.md +2 -0
  266. package/docs/examples/health/get-failed-jobs.md +2 -0
  267. package/docs/examples/health/get-pub-sub.md +2 -0
  268. package/docs/examples/health/get-queue-audits.md +2 -0
  269. package/docs/examples/health/get-queue-billing-project-aggregation.md +2 -0
  270. package/docs/examples/health/get-queue-billing-team-aggregation.md +2 -0
  271. package/docs/examples/health/get-queue-builds.md +2 -0
  272. package/docs/examples/health/get-queue-certificates.md +2 -0
  273. package/docs/examples/health/get-queue-databases.md +2 -0
  274. package/docs/examples/health/get-queue-deletes.md +2 -0
  275. package/docs/examples/health/get-queue-functions.md +2 -0
  276. package/docs/examples/health/get-queue-logs.md +2 -0
  277. package/docs/examples/health/get-queue-mails.md +2 -0
  278. package/docs/examples/health/get-queue-messaging.md +2 -0
  279. package/docs/examples/health/get-queue-migrations.md +2 -0
  280. package/docs/examples/health/get-queue-priority-builds.md +2 -0
  281. package/docs/examples/health/get-queue-region-manager.md +2 -0
  282. package/docs/examples/health/get-queue-stats-resources.md +2 -0
  283. package/docs/examples/health/get-queue-threats.md +2 -0
  284. package/docs/examples/health/get-queue-usage.md +2 -0
  285. package/docs/examples/health/get-queue-webhooks.md +2 -0
  286. package/docs/examples/health/get-storage-local.md +2 -0
  287. package/docs/examples/health/get-storage.md +2 -0
  288. package/docs/examples/health/get-time.md +2 -0
  289. package/docs/examples/health/get.md +2 -0
  290. package/docs/examples/locale/get.md +2 -0
  291. package/docs/examples/locale/list-codes.md +2 -0
  292. package/docs/examples/locale/list-continents.md +2 -0
  293. package/docs/examples/locale/list-countries-eu.md +2 -0
  294. package/docs/examples/locale/list-countries-phones.md +2 -0
  295. package/docs/examples/locale/list-countries.md +2 -0
  296. package/docs/examples/locale/list-currencies.md +2 -0
  297. package/docs/examples/locale/list-languages.md +2 -0
  298. package/docs/examples/messaging/create-apns-provider.md +2 -0
  299. package/docs/examples/messaging/create-email.md +2 -0
  300. package/docs/examples/messaging/create-fcm-provider.md +2 -0
  301. package/docs/examples/messaging/create-mailgun-provider.md +2 -0
  302. package/docs/examples/messaging/create-msg-91-provider.md +2 -0
  303. package/docs/examples/messaging/create-push.md +2 -0
  304. package/docs/examples/messaging/create-resend-provider.md +2 -0
  305. package/docs/examples/messaging/create-sendgrid-provider.md +2 -0
  306. package/docs/examples/messaging/create-sms.md +2 -0
  307. package/docs/examples/messaging/create-smtp-provider.md +2 -0
  308. package/docs/examples/messaging/create-subscriber.md +2 -0
  309. package/docs/examples/messaging/create-telesign-provider.md +2 -0
  310. package/docs/examples/messaging/create-textmagic-provider.md +2 -0
  311. package/docs/examples/messaging/create-topic.md +2 -0
  312. package/docs/examples/messaging/create-twilio-provider.md +2 -0
  313. package/docs/examples/messaging/create-vonage-provider.md +2 -0
  314. package/docs/examples/messaging/delete-provider.md +2 -0
  315. package/docs/examples/messaging/delete-subscriber.md +2 -0
  316. package/docs/examples/messaging/delete-topic.md +2 -0
  317. package/docs/examples/messaging/delete.md +2 -0
  318. package/docs/examples/messaging/get-message.md +2 -0
  319. package/docs/examples/messaging/get-provider.md +2 -0
  320. package/docs/examples/messaging/get-subscriber.md +2 -0
  321. package/docs/examples/messaging/get-topic.md +2 -0
  322. package/docs/examples/messaging/list-message-logs.md +2 -0
  323. package/docs/examples/messaging/list-messages.md +2 -0
  324. package/docs/examples/messaging/list-provider-logs.md +2 -0
  325. package/docs/examples/messaging/list-providers.md +2 -0
  326. package/docs/examples/messaging/list-subscriber-logs.md +2 -0
  327. package/docs/examples/messaging/list-subscribers.md +2 -0
  328. package/docs/examples/messaging/list-targets.md +2 -0
  329. package/docs/examples/messaging/list-topic-logs.md +2 -0
  330. package/docs/examples/messaging/list-topics.md +2 -0
  331. package/docs/examples/messaging/update-apns-provider.md +2 -0
  332. package/docs/examples/messaging/update-email.md +2 -0
  333. package/docs/examples/messaging/update-fcm-provider.md +2 -0
  334. package/docs/examples/messaging/update-mailgun-provider.md +2 -0
  335. package/docs/examples/messaging/update-msg-91-provider.md +2 -0
  336. package/docs/examples/messaging/update-push.md +2 -0
  337. package/docs/examples/messaging/update-resend-provider.md +2 -0
  338. package/docs/examples/messaging/update-sendgrid-provider.md +2 -0
  339. package/docs/examples/messaging/update-sms.md +2 -0
  340. package/docs/examples/messaging/update-smtp-provider.md +2 -0
  341. package/docs/examples/messaging/update-telesign-provider.md +2 -0
  342. package/docs/examples/messaging/update-textmagic-provider.md +2 -0
  343. package/docs/examples/messaging/update-topic.md +2 -0
  344. package/docs/examples/messaging/update-twilio-provider.md +2 -0
  345. package/docs/examples/messaging/update-vonage-provider.md +2 -0
  346. package/docs/examples/migrations/create-appwrite-migration.md +4 -2
  347. package/docs/examples/migrations/create-csv-export.md +2 -0
  348. package/docs/examples/migrations/create-csv-import.md +2 -0
  349. package/docs/examples/migrations/create-firebase-migration.md +4 -2
  350. package/docs/examples/migrations/create-n-host-migration.md +4 -2
  351. package/docs/examples/migrations/create-supabase-migration.md +4 -2
  352. package/docs/examples/migrations/delete.md +2 -0
  353. package/docs/examples/migrations/get-appwrite-report.md +4 -2
  354. package/docs/examples/migrations/get-firebase-report.md +4 -2
  355. package/docs/examples/migrations/get-n-host-report.md +4 -2
  356. package/docs/examples/migrations/get-supabase-report.md +4 -2
  357. package/docs/examples/migrations/get.md +2 -0
  358. package/docs/examples/migrations/list.md +2 -0
  359. package/docs/examples/migrations/retry.md +2 -0
  360. package/docs/examples/organizations/add-credit.md +2 -0
  361. package/docs/examples/organizations/cancel-downgrade.md +2 -0
  362. package/docs/examples/organizations/create-downgrade-feedback.md +2 -0
  363. package/docs/examples/organizations/create-invoice-payment.md +2 -0
  364. package/docs/examples/organizations/create-key.md +18 -0
  365. package/docs/examples/organizations/create.md +4 -2
  366. package/docs/examples/organizations/delete-backup-payment-method.md +2 -0
  367. package/docs/examples/organizations/delete-billing-address.md +2 -0
  368. package/docs/examples/organizations/delete-default-payment-method.md +2 -0
  369. package/docs/examples/organizations/delete-key.md +16 -0
  370. package/docs/examples/organizations/delete.md +2 -0
  371. package/docs/examples/organizations/estimation-create-organization.md +4 -2
  372. package/docs/examples/organizations/estimation-delete-organization.md +2 -0
  373. package/docs/examples/organizations/estimation-update-plan.md +4 -2
  374. package/docs/examples/organizations/get-aggregation.md +2 -0
  375. package/docs/examples/organizations/get-available-credits.md +2 -0
  376. package/docs/examples/organizations/get-billing-address.md +2 -0
  377. package/docs/examples/organizations/get-credit.md +2 -0
  378. package/docs/examples/organizations/get-invoice-download.md +2 -0
  379. package/docs/examples/organizations/get-invoice-view.md +2 -0
  380. package/docs/examples/organizations/get-invoice.md +2 -0
  381. package/docs/examples/organizations/{update-projects.md → get-key.md} +4 -2
  382. package/docs/examples/organizations/get-payment-method.md +2 -0
  383. package/docs/examples/organizations/get-plan.md +2 -0
  384. package/docs/examples/organizations/get-scopes.md +2 -0
  385. package/docs/examples/organizations/get-usage.md +2 -0
  386. package/docs/examples/organizations/list-aggregations.md +2 -0
  387. package/docs/examples/organizations/list-credits.md +2 -0
  388. package/docs/examples/organizations/list-invoices.md +2 -0
  389. package/docs/examples/organizations/list-keys.md +16 -0
  390. package/docs/examples/organizations/list-regions.md +15 -0
  391. package/docs/examples/organizations/list.md +2 -0
  392. package/docs/examples/organizations/set-backup-payment-method.md +2 -0
  393. package/docs/examples/organizations/set-billing-address.md +2 -0
  394. package/docs/examples/organizations/set-billing-email.md +2 -0
  395. package/docs/examples/organizations/set-billing-tax-id.md +2 -0
  396. package/docs/examples/organizations/set-default-payment-method.md +2 -0
  397. package/docs/examples/organizations/update-budget.md +2 -0
  398. package/docs/examples/organizations/update-key.md +19 -0
  399. package/docs/examples/organizations/update-plan.md +4 -2
  400. package/docs/examples/organizations/validate-invoice.md +2 -0
  401. package/docs/examples/organizations/validate-payment.md +2 -0
  402. package/docs/examples/project/create-variable.md +2 -0
  403. package/docs/examples/project/delete-variable.md +2 -0
  404. package/docs/examples/project/get-usage.md +2 -0
  405. package/docs/examples/project/get-variable.md +2 -0
  406. package/docs/examples/project/list-variables.md +2 -0
  407. package/docs/examples/project/update-variable.md +2 -0
  408. package/docs/examples/projects/create-dev-key.md +2 -0
  409. package/docs/examples/projects/create-jwt.md +4 -2
  410. package/docs/examples/projects/create-key.md +5 -2
  411. package/docs/examples/projects/create-platform.md +2 -0
  412. package/docs/examples/projects/create-smtp-test.md +2 -0
  413. package/docs/examples/projects/create-webhook.md +2 -0
  414. package/docs/examples/projects/create.md +2 -0
  415. package/docs/examples/projects/delete-dev-key.md +2 -0
  416. package/docs/examples/projects/delete-email-template.md +2 -0
  417. package/docs/examples/projects/delete-key.md +2 -0
  418. package/docs/examples/projects/delete-platform.md +2 -0
  419. package/docs/examples/projects/delete-sms-template.md +2 -0
  420. package/docs/examples/projects/delete-webhook.md +2 -0
  421. package/docs/examples/projects/delete.md +2 -0
  422. package/docs/examples/projects/get-dev-key.md +2 -0
  423. package/docs/examples/projects/get-email-template.md +2 -0
  424. package/docs/examples/projects/get-key.md +2 -0
  425. package/docs/examples/projects/get-platform.md +2 -0
  426. package/docs/examples/projects/get-sms-template.md +2 -0
  427. package/docs/examples/projects/get-webhook.md +2 -0
  428. package/docs/examples/projects/get.md +2 -0
  429. package/docs/examples/projects/list-dev-keys.md +2 -0
  430. package/docs/examples/projects/list-keys.md +3 -0
  431. package/docs/examples/projects/list-platforms.md +2 -0
  432. package/docs/examples/projects/list-webhooks.md +2 -0
  433. package/docs/examples/projects/list.md +2 -0
  434. package/docs/examples/projects/update-api-status-all.md +2 -0
  435. package/docs/examples/projects/update-api-status.md +2 -0
  436. package/docs/examples/projects/update-auth-duration.md +2 -0
  437. package/docs/examples/projects/update-auth-limit.md +2 -0
  438. package/docs/examples/projects/update-auth-password-dictionary.md +2 -0
  439. package/docs/examples/projects/update-auth-password-history.md +2 -0
  440. package/docs/examples/projects/update-auth-sessions-limit.md +2 -0
  441. package/docs/examples/projects/update-auth-status.md +2 -0
  442. package/docs/examples/projects/update-dev-key.md +2 -0
  443. package/docs/examples/projects/update-email-template.md +2 -0
  444. package/docs/examples/projects/update-key.md +4 -2
  445. package/docs/examples/projects/update-labels.md +2 -0
  446. package/docs/examples/projects/update-memberships-privacy.md +2 -0
  447. package/docs/examples/projects/update-mock-numbers.md +2 -0
  448. package/docs/examples/projects/update-o-auth-2.md +2 -0
  449. package/docs/examples/projects/update-personal-data-check.md +2 -0
  450. package/docs/examples/projects/update-platform.md +2 -0
  451. package/docs/examples/projects/update-service-status-all.md +2 -0
  452. package/docs/examples/projects/update-service-status.md +2 -0
  453. package/docs/examples/projects/update-session-alerts.md +2 -0
  454. package/docs/examples/projects/update-session-invalidation.md +2 -0
  455. package/docs/examples/projects/update-sms-template.md +2 -0
  456. package/docs/examples/projects/update-smtp.md +2 -0
  457. package/docs/examples/projects/update-team.md +2 -0
  458. package/docs/examples/projects/update-webhook-signature.md +2 -0
  459. package/docs/examples/projects/update-webhook.md +2 -0
  460. package/docs/examples/projects/update.md +2 -0
  461. package/docs/examples/proxy/create-api-rule.md +2 -0
  462. package/docs/examples/proxy/create-function-rule.md +2 -0
  463. package/docs/examples/proxy/create-redirect-rule.md +2 -0
  464. package/docs/examples/proxy/create-site-rule.md +2 -0
  465. package/docs/examples/proxy/delete-rule.md +2 -0
  466. package/docs/examples/proxy/get-rule.md +2 -0
  467. package/docs/examples/proxy/list-rules.md +2 -0
  468. package/docs/examples/proxy/update-rule-verification.md +2 -0
  469. package/docs/examples/sites/create-deployment.md +2 -0
  470. package/docs/examples/sites/create-duplicate-deployment.md +2 -0
  471. package/docs/examples/sites/create-template-deployment.md +2 -0
  472. package/docs/examples/sites/create-variable.md +2 -0
  473. package/docs/examples/sites/create-vcs-deployment.md +2 -0
  474. package/docs/examples/sites/create.md +2 -0
  475. package/docs/examples/sites/delete-deployment.md +2 -0
  476. package/docs/examples/sites/delete-log.md +2 -0
  477. package/docs/examples/sites/delete-variable.md +2 -0
  478. package/docs/examples/sites/delete.md +2 -0
  479. package/docs/examples/sites/get-deployment-download.md +2 -0
  480. package/docs/examples/sites/get-deployment.md +2 -0
  481. package/docs/examples/sites/get-log.md +2 -0
  482. package/docs/examples/sites/get-template.md +2 -0
  483. package/docs/examples/sites/get-usage.md +2 -0
  484. package/docs/examples/sites/get-variable.md +2 -0
  485. package/docs/examples/sites/get.md +2 -0
  486. package/docs/examples/sites/list-deployments.md +2 -0
  487. package/docs/examples/sites/list-frameworks.md +2 -0
  488. package/docs/examples/sites/list-logs.md +2 -0
  489. package/docs/examples/sites/list-specifications.md +2 -0
  490. package/docs/examples/sites/list-templates.md +5 -3
  491. package/docs/examples/sites/list-usage.md +2 -0
  492. package/docs/examples/sites/list-variables.md +2 -0
  493. package/docs/examples/sites/list.md +2 -0
  494. package/docs/examples/sites/update-deployment-status.md +2 -0
  495. package/docs/examples/sites/update-site-deployment.md +2 -0
  496. package/docs/examples/sites/update-variable.md +2 -0
  497. package/docs/examples/sites/update.md +2 -0
  498. package/docs/examples/storage/create-bucket.md +2 -0
  499. package/docs/examples/storage/create-file.md +2 -0
  500. package/docs/examples/storage/delete-bucket.md +2 -0
  501. package/docs/examples/storage/delete-file.md +2 -0
  502. package/docs/examples/storage/get-bucket-usage.md +2 -0
  503. package/docs/examples/storage/get-bucket.md +2 -0
  504. package/docs/examples/storage/get-file-download.md +2 -0
  505. package/docs/examples/storage/get-file-preview.md +2 -0
  506. package/docs/examples/storage/get-file-view.md +2 -0
  507. package/docs/examples/storage/get-file.md +2 -0
  508. package/docs/examples/storage/get-usage.md +2 -0
  509. package/docs/examples/storage/list-buckets.md +2 -0
  510. package/docs/examples/storage/list-files.md +2 -0
  511. package/docs/examples/storage/update-bucket.md +2 -0
  512. package/docs/examples/storage/update-file.md +2 -0
  513. package/docs/examples/tablesdb/create-boolean-column.md +2 -0
  514. package/docs/examples/tablesdb/create-datetime-column.md +2 -0
  515. package/docs/examples/tablesdb/create-email-column.md +2 -0
  516. package/docs/examples/tablesdb/create-enum-column.md +2 -0
  517. package/docs/examples/tablesdb/create-float-column.md +2 -0
  518. package/docs/examples/tablesdb/create-index.md +4 -2
  519. package/docs/examples/tablesdb/create-integer-column.md +2 -0
  520. package/docs/examples/tablesdb/create-ip-column.md +2 -0
  521. package/docs/examples/tablesdb/create-line-column.md +2 -0
  522. package/docs/examples/tablesdb/create-longtext-column.md +20 -0
  523. package/docs/examples/tablesdb/create-mediumtext-column.md +20 -0
  524. package/docs/examples/tablesdb/create-operations.md +2 -0
  525. package/docs/examples/tablesdb/create-point-column.md +2 -0
  526. package/docs/examples/tablesdb/create-polygon-column.md +2 -0
  527. package/docs/examples/tablesdb/create-relationship-column.md +2 -0
  528. package/docs/examples/tablesdb/create-row.md +2 -0
  529. package/docs/examples/tablesdb/create-rows.md +2 -0
  530. package/docs/examples/tablesdb/create-string-column.md +2 -0
  531. package/docs/examples/tablesdb/create-table.md +2 -0
  532. package/docs/examples/tablesdb/create-text-column.md +20 -0
  533. package/docs/examples/tablesdb/create-transaction.md +2 -0
  534. package/docs/examples/tablesdb/create-url-column.md +2 -0
  535. package/docs/examples/tablesdb/create-varchar-column.md +21 -0
  536. package/docs/examples/tablesdb/create.md +2 -0
  537. package/docs/examples/tablesdb/decrement-row-column.md +2 -0
  538. package/docs/examples/tablesdb/delete-column.md +2 -0
  539. package/docs/examples/tablesdb/delete-index.md +2 -0
  540. package/docs/examples/tablesdb/delete-row.md +2 -0
  541. package/docs/examples/tablesdb/delete-rows.md +2 -0
  542. package/docs/examples/tablesdb/delete-table.md +2 -0
  543. package/docs/examples/tablesdb/delete-transaction.md +2 -0
  544. package/docs/examples/tablesdb/delete.md +2 -0
  545. package/docs/examples/tablesdb/get-column.md +2 -0
  546. package/docs/examples/tablesdb/get-index.md +2 -0
  547. package/docs/examples/tablesdb/get-row.md +2 -0
  548. package/docs/examples/tablesdb/get-table-usage.md +2 -0
  549. package/docs/examples/tablesdb/get-table.md +2 -0
  550. package/docs/examples/tablesdb/get-transaction.md +2 -0
  551. package/docs/examples/tablesdb/get-usage.md +2 -0
  552. package/docs/examples/tablesdb/get.md +2 -0
  553. package/docs/examples/tablesdb/increment-row-column.md +2 -0
  554. package/docs/examples/tablesdb/list-columns.md +2 -0
  555. package/docs/examples/tablesdb/list-indexes.md +2 -0
  556. package/docs/examples/tablesdb/list-row-logs.md +2 -0
  557. package/docs/examples/tablesdb/list-rows.md +2 -0
  558. package/docs/examples/tablesdb/list-table-logs.md +2 -0
  559. package/docs/examples/tablesdb/list-tables.md +2 -0
  560. package/docs/examples/tablesdb/list-transactions.md +2 -0
  561. package/docs/examples/tablesdb/list-usage.md +2 -0
  562. package/docs/examples/tablesdb/list.md +2 -0
  563. package/docs/examples/tablesdb/update-boolean-column.md +2 -0
  564. package/docs/examples/tablesdb/update-datetime-column.md +2 -0
  565. package/docs/examples/tablesdb/update-email-column.md +2 -0
  566. package/docs/examples/tablesdb/update-enum-column.md +2 -0
  567. package/docs/examples/tablesdb/update-float-column.md +2 -0
  568. package/docs/examples/tablesdb/update-integer-column.md +2 -0
  569. package/docs/examples/tablesdb/update-ip-column.md +2 -0
  570. package/docs/examples/tablesdb/update-line-column.md +2 -0
  571. package/docs/examples/tablesdb/update-longtext-column.md +20 -0
  572. package/docs/examples/tablesdb/update-mediumtext-column.md +20 -0
  573. package/docs/examples/tablesdb/update-point-column.md +2 -0
  574. package/docs/examples/tablesdb/update-polygon-column.md +2 -0
  575. package/docs/examples/tablesdb/update-relationship-column.md +2 -0
  576. package/docs/examples/tablesdb/update-row.md +2 -0
  577. package/docs/examples/tablesdb/update-rows.md +2 -0
  578. package/docs/examples/tablesdb/update-string-column.md +2 -0
  579. package/docs/examples/tablesdb/update-table.md +3 -1
  580. package/docs/examples/tablesdb/update-text-column.md +20 -0
  581. package/docs/examples/tablesdb/update-transaction.md +2 -0
  582. package/docs/examples/tablesdb/update-url-column.md +2 -0
  583. package/docs/examples/tablesdb/update-varchar-column.md +21 -0
  584. package/docs/examples/tablesdb/update.md +3 -1
  585. package/docs/examples/tablesdb/upsert-row.md +2 -0
  586. package/docs/examples/tablesdb/upsert-rows.md +2 -0
  587. package/docs/examples/teams/create-membership.md +2 -0
  588. package/docs/examples/teams/create.md +2 -0
  589. package/docs/examples/teams/delete-membership.md +2 -0
  590. package/docs/examples/teams/delete.md +2 -0
  591. package/docs/examples/teams/get-membership.md +2 -0
  592. package/docs/examples/teams/get-prefs.md +2 -0
  593. package/docs/examples/teams/get.md +2 -0
  594. package/docs/examples/teams/list-logs.md +2 -0
  595. package/docs/examples/teams/list-memberships.md +2 -0
  596. package/docs/examples/teams/list.md +2 -0
  597. package/docs/examples/teams/update-membership-status.md +2 -0
  598. package/docs/examples/teams/update-membership.md +2 -0
  599. package/docs/examples/teams/update-name.md +2 -0
  600. package/docs/examples/teams/update-prefs.md +2 -0
  601. package/docs/examples/tokens/create-file-token.md +2 -0
  602. package/docs/examples/tokens/delete.md +2 -0
  603. package/docs/examples/tokens/get.md +2 -0
  604. package/docs/examples/tokens/list.md +2 -0
  605. package/docs/examples/tokens/update.md +2 -0
  606. package/docs/examples/users/create-argon-2-user.md +2 -0
  607. package/docs/examples/users/create-bcrypt-user.md +2 -0
  608. package/docs/examples/users/create-jwt.md +2 -0
  609. package/docs/examples/users/create-md-5-user.md +2 -0
  610. package/docs/examples/users/create-mfa-recovery-codes.md +2 -0
  611. package/docs/examples/users/create-ph-pass-user.md +2 -0
  612. package/docs/examples/users/create-scrypt-modified-user.md +2 -0
  613. package/docs/examples/users/create-scrypt-user.md +2 -0
  614. package/docs/examples/users/create-session.md +2 -0
  615. package/docs/examples/users/create-sha-user.md +2 -0
  616. package/docs/examples/users/create-target.md +2 -0
  617. package/docs/examples/users/create-token.md +2 -0
  618. package/docs/examples/users/create.md +2 -0
  619. package/docs/examples/users/delete-identity.md +2 -0
  620. package/docs/examples/users/delete-mfa-authenticator.md +2 -0
  621. package/docs/examples/users/delete-session.md +2 -0
  622. package/docs/examples/users/delete-sessions.md +2 -0
  623. package/docs/examples/users/delete-target.md +2 -0
  624. package/docs/examples/users/delete.md +2 -0
  625. package/docs/examples/users/get-mfa-recovery-codes.md +2 -0
  626. package/docs/examples/users/get-prefs.md +2 -0
  627. package/docs/examples/users/get-target.md +2 -0
  628. package/docs/examples/users/get-usage.md +2 -0
  629. package/docs/examples/users/get.md +2 -0
  630. package/docs/examples/users/list-identities.md +2 -0
  631. package/docs/examples/users/list-logs.md +2 -0
  632. package/docs/examples/users/list-memberships.md +2 -0
  633. package/docs/examples/users/list-mfa-factors.md +2 -0
  634. package/docs/examples/users/list-sessions.md +2 -0
  635. package/docs/examples/users/list-targets.md +2 -0
  636. package/docs/examples/users/list.md +2 -0
  637. package/docs/examples/users/update-email-verification.md +2 -0
  638. package/docs/examples/users/update-email.md +2 -0
  639. package/docs/examples/users/update-labels.md +2 -0
  640. package/docs/examples/users/update-mfa-recovery-codes.md +2 -0
  641. package/docs/examples/users/update-mfa.md +2 -0
  642. package/docs/examples/users/update-name.md +2 -0
  643. package/docs/examples/users/update-password.md +2 -0
  644. package/docs/examples/users/update-phone-verification.md +2 -0
  645. package/docs/examples/users/update-phone.md +2 -0
  646. package/docs/examples/users/update-prefs.md +2 -0
  647. package/docs/examples/users/update-status.md +2 -0
  648. package/docs/examples/users/update-target.md +2 -0
  649. package/docs/examples/vcs/create-repository-detection.md +2 -0
  650. package/docs/examples/vcs/create-repository.md +2 -0
  651. package/docs/examples/vcs/delete-installation.md +2 -0
  652. package/docs/examples/vcs/get-installation.md +2 -0
  653. package/docs/examples/vcs/get-repository-contents.md +2 -0
  654. package/docs/examples/vcs/get-repository.md +2 -0
  655. package/docs/examples/vcs/list-installations.md +2 -0
  656. package/docs/examples/vcs/list-repositories.md +2 -0
  657. package/docs/examples/vcs/list-repository-branches.md +2 -0
  658. package/docs/examples/vcs/update-external-deployments.md +2 -0
  659. package/package.json +1 -1
  660. package/src/channel.ts +38 -22
  661. package/src/client.ts +110 -49
  662. package/src/enums/backup-services.ts +5 -0
  663. package/src/enums/browser-permission.ts +22 -0
  664. package/src/enums/build-runtime.ts +5 -0
  665. package/src/enums/deployment-status.ts +1 -0
  666. package/src/enums/frameworks.ts +17 -0
  667. package/src/enums/order-by.ts +4 -0
  668. package/src/enums/registration-type.ts +6 -0
  669. package/src/enums/resources.ts +13 -0
  670. package/src/enums/runtime.ts +5 -0
  671. package/src/enums/runtimes.ts +71 -0
  672. package/src/enums/scopes.ts +66 -0
  673. package/src/enums/use-cases.ts +11 -0
  674. package/src/index.ts +9 -2
  675. package/src/models.ts +394 -4
  676. package/src/services/account.ts +375 -67
  677. package/src/services/assistant.ts +1 -1
  678. package/src/services/avatars.ts +20 -19
  679. package/src/services/backups.ts +37 -36
  680. package/src/services/console.ts +12 -43
  681. package/src/services/databases.ts +1061 -281
  682. package/src/services/domains.ts +114 -44
  683. package/src/services/functions.ts +61 -58
  684. package/src/services/graphql.ts +4 -4
  685. package/src/services/health.ts +23 -21
  686. package/src/services/messaging.ts +56 -56
  687. package/src/services/migrations.ts +79 -78
  688. package/src/services/organizations.ts +430 -94
  689. package/src/services/project.ts +5 -5
  690. package/src/services/projects.ts +106 -155
  691. package/src/services/proxy.ts +8 -8
  692. package/src/services/realtime.ts +135 -58
  693. package/src/services/sites.ts +43 -41
  694. package/src/services/storage.ts +17 -17
  695. package/src/services/tables-db.ts +1051 -269
  696. package/src/services/teams.ts +14 -14
  697. package/src/services/tokens.ts +5 -5
  698. package/src/services/users.ts +50 -50
  699. package/src/services/vcs.ts +10 -10
  700. package/types/channel.d.ts +9 -7
  701. package/types/client.d.ts +7 -2
  702. package/types/enums/backup-services.d.ts +5 -0
  703. package/types/enums/browser-permission.d.ts +22 -0
  704. package/types/enums/build-runtime.d.ts +6 -1
  705. package/types/enums/deployment-status.d.ts +1 -0
  706. package/types/enums/frameworks.d.ts +17 -0
  707. package/types/enums/order-by.d.ts +4 -0
  708. package/types/enums/registration-type.d.ts +6 -0
  709. package/types/enums/resources.d.ts +13 -0
  710. package/types/enums/runtime.d.ts +6 -1
  711. package/types/enums/runtimes.d.ts +71 -0
  712. package/types/enums/scopes.d.ts +66 -0
  713. package/types/enums/use-cases.d.ts +11 -0
  714. package/types/index.d.ts +9 -2
  715. package/types/models.d.ts +385 -4
  716. package/types/services/account.d.ts +111 -0
  717. package/types/services/avatars.d.ts +5 -4
  718. package/types/services/backups.d.ts +13 -12
  719. package/types/services/console.d.ts +1 -13
  720. package/types/services/databases.d.ts +303 -8
  721. package/types/services/domains.d.ts +26 -0
  722. package/types/services/functions.d.ts +18 -15
  723. package/types/services/health.d.ts +2 -0
  724. package/types/services/migrations.d.ts +33 -32
  725. package/types/services/organizations.d.ts +151 -29
  726. package/types/services/projects.d.ts +20 -36
  727. package/types/services/realtime.d.ts +13 -6
  728. package/types/services/sites.d.ts +9 -7
  729. package/types/services/tables-db.d.ts +305 -8
  730. package/docs/examples/projects/update-status.md +0 -14
  731. package/src/enums/billing-plan.ts +0 -17
  732. package/src/enums/status.ts +0 -4
  733. package/types/enums/billing-plan.d.ts +0 -17
  734. package/types/enums/status.d.ts +0 -4
package/dist/cjs/sdk.js CHANGED
@@ -472,20 +472,9 @@ Query.notTouches = (attribute, values) => new Query("notTouches", attribute, [va
472
472
 
473
473
  const JSONbigParser = JSONbigModule__default["default"]({ storeAsString: false });
474
474
  const JSONbigSerializer = JSONbigModule__default["default"]({ useNativeBigInt: true });
475
- /**
476
- * Converts BigNumber objects from json-bigint to native types.
477
- * - Integer BigNumbers → BigInt (if unsafe) or number (if safe)
478
- * - Float BigNumbers → number
479
- * - Strings remain strings (never converted to BigNumber by json-bigint)
480
- */
481
475
  const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
482
476
  const MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
483
- function convertBigNumbers(value) {
484
- if (value === null || value === undefined)
485
- return value;
486
- if (Array.isArray(value)) {
487
- return value.map(convertBigNumbers);
488
- }
477
+ function reviver(_key, value) {
489
478
  if (BigNumber__default["default"].isBigNumber(value)) {
490
479
  if (value.isInteger()) {
491
480
  const str = value.toFixed();
@@ -495,20 +484,12 @@ function convertBigNumbers(value) {
495
484
  }
496
485
  return bi;
497
486
  }
498
- // float
499
487
  return value.toNumber();
500
488
  }
501
- if (typeof value === 'object') {
502
- const result = {};
503
- for (const [k, v] of Object.entries(value)) {
504
- result[k] = convertBigNumbers(v);
505
- }
506
- return result;
507
- }
508
489
  return value;
509
490
  }
510
491
  const JSONbig = {
511
- parse: (text) => convertBigNumbers(JSONbigParser.parse(text)),
492
+ parse: (text) => JSONbigParser.parse(text, reviver),
512
493
  stringify: JSONbigSerializer.stringify
513
494
  };
514
495
  /**
@@ -560,7 +541,7 @@ class Client {
560
541
  'x-sdk-name': 'Console',
561
542
  'x-sdk-platform': 'console',
562
543
  'x-sdk-language': 'web',
563
- 'x-sdk-version': '2.1.3',
544
+ 'x-sdk-version': '2.3.0',
564
545
  'X-Appwrite-Response-Format': '1.8.0',
565
546
  };
566
547
  this.realtime = {
@@ -569,7 +550,10 @@ class Client {
569
550
  heartbeat: undefined,
570
551
  url: '',
571
552
  channels: new Set(),
553
+ queries: new Set(),
572
554
  subscriptions: new Map(),
555
+ slotToSubscriptionId: new Map(),
556
+ subscriptionIdToSlot: new Map(),
573
557
  subscriptionsCounter: 0,
574
558
  reconnect: true,
575
559
  reconnectAttempts: 0,
@@ -604,26 +588,34 @@ class Client {
604
588
  }, 20000);
605
589
  },
606
590
  createSocket: () => {
607
- var _a, _b, _c;
608
- if (this.realtime.channels.size < 1) {
591
+ var _a, _b, _c, _d;
592
+ if (this.realtime.subscriptions.size < 1) {
609
593
  this.realtime.reconnect = false;
610
594
  (_a = this.realtime.socket) === null || _a === void 0 ? void 0 : _a.close();
611
595
  return;
612
596
  }
613
- const channels = new URLSearchParams();
614
- if (this.config.project) {
615
- channels.set('project', this.config.project);
616
- }
597
+ const encodedProject = encodeURIComponent((_b = this.config.project) !== null && _b !== void 0 ? _b : '');
598
+ let queryParams = 'project=' + encodedProject;
617
599
  this.realtime.channels.forEach(channel => {
618
- channels.append('channels[]', channel);
600
+ queryParams += '&channels[]=' + encodeURIComponent(channel);
601
+ });
602
+ // Per-subscription queries: channel[slot][]=query so server can route events by subscription
603
+ const selectAllQuery = Query.select(['*']).toString();
604
+ this.realtime.subscriptions.forEach((sub, slot) => {
605
+ const queries = sub.queries.length > 0 ? sub.queries : [selectAllQuery];
606
+ sub.channels.forEach(channel => {
607
+ queries.forEach(query => {
608
+ queryParams += '&' + encodeURIComponent(channel) + '[' + slot + '][]=' + encodeURIComponent(query);
609
+ });
610
+ });
619
611
  });
620
- const url = this.config.endpointRealtime + '/realtime?' + channels.toString();
612
+ const url = this.config.endpointRealtime + '/realtime?' + queryParams;
621
613
  if (url !== this.realtime.url || // Check if URL is present
622
614
  !this.realtime.socket || // Check if WebSocket has not been created
623
- ((_b = this.realtime.socket) === null || _b === void 0 ? void 0 : _b.readyState) > WebSocket.OPEN // Check if WebSocket is CLOSING (3) or CLOSED (4)
615
+ ((_c = this.realtime.socket) === null || _c === void 0 ? void 0 : _c.readyState) > WebSocket.OPEN // Check if WebSocket is CLOSING (3) or CLOSED (4)
624
616
  ) {
625
617
  if (this.realtime.socket &&
626
- ((_c = this.realtime.socket) === null || _c === void 0 ? void 0 : _c.readyState) < WebSocket.CLOSING // Close WebSocket if it is CONNECTING (0) or OPEN (1)
618
+ ((_d = this.realtime.socket) === null || _d === void 0 ? void 0 : _d.readyState) < WebSocket.CLOSING // Close WebSocket if it is CONNECTING (0) or OPEN (1)
627
619
  ) {
628
620
  this.realtime.reconnect = false;
629
621
  this.realtime.socket.close();
@@ -659,14 +651,25 @@ class Client {
659
651
  const message = JSONbig.parse(event.data);
660
652
  this.realtime.lastMessage = message;
661
653
  switch (message.type) {
662
- case 'connected':
654
+ case 'connected': {
655
+ const messageData = message.data;
656
+ if (messageData === null || messageData === void 0 ? void 0 : messageData.subscriptions) {
657
+ this.realtime.slotToSubscriptionId.clear();
658
+ this.realtime.subscriptionIdToSlot.clear();
659
+ for (const [slotStr, subscriptionId] of Object.entries(messageData.subscriptions)) {
660
+ const slot = Number(slotStr);
661
+ if (!isNaN(slot) && typeof subscriptionId === 'string') {
662
+ this.realtime.slotToSubscriptionId.set(slot, subscriptionId);
663
+ this.realtime.subscriptionIdToSlot.set(subscriptionId, slot);
664
+ }
665
+ }
666
+ }
663
667
  let session = this.config.session;
664
668
  if (!session) {
665
669
  const cookie = JSONbig.parse((_a = window.localStorage.getItem('cookieFallback')) !== null && _a !== void 0 ? _a : '{}');
666
670
  session = cookie === null || cookie === void 0 ? void 0 : cookie[`a_session_${this.config.project}`];
667
671
  }
668
- const messageData = message.data;
669
- if (session && !messageData.user) {
672
+ if (session && !(messageData === null || messageData === void 0 ? void 0 : messageData.user)) {
670
673
  (_b = this.realtime.socket) === null || _b === void 0 ? void 0 : _b.send(JSONbig.stringify({
671
674
  type: 'authentication',
672
675
  data: {
@@ -675,12 +678,27 @@ class Client {
675
678
  }));
676
679
  }
677
680
  break;
678
- case 'event':
679
- let data = message.data;
680
- if (data === null || data === void 0 ? void 0 : data.channels) {
681
+ }
682
+ case 'event': {
683
+ const data = message.data;
684
+ if (!(data === null || data === void 0 ? void 0 : data.channels))
685
+ break;
686
+ const eventSubIds = data.subscriptions;
687
+ if (eventSubIds && eventSubIds.length > 0) {
688
+ for (const subscriptionId of eventSubIds) {
689
+ const slot = this.realtime.subscriptionIdToSlot.get(subscriptionId);
690
+ if (slot !== undefined) {
691
+ const subscription = this.realtime.subscriptions.get(slot);
692
+ if (subscription) {
693
+ setTimeout(() => subscription.callback(data));
694
+ }
695
+ }
696
+ }
697
+ }
698
+ else {
681
699
  const isSubscribed = data.channels.some(channel => this.realtime.channels.has(channel));
682
700
  if (!isSubscribed)
683
- return;
701
+ break;
684
702
  this.realtime.subscriptions.forEach(subscription => {
685
703
  if (data.channels.some(channel => subscription.channels.includes(channel))) {
686
704
  setTimeout(() => subscription.callback(data));
@@ -688,6 +706,7 @@ class Client {
688
706
  });
689
707
  }
690
708
  break;
709
+ }
691
710
  case 'pong':
692
711
  break; // Handle pong response if needed
693
712
  case 'error':
@@ -700,7 +719,7 @@ class Client {
700
719
  console.error(e);
701
720
  }
702
721
  },
703
- cleanUp: channels => {
722
+ cleanUp: (channels, queries) => {
704
723
  this.realtime.channels.forEach(channel => {
705
724
  if (channels.includes(channel)) {
706
725
  let found = Array.from(this.realtime.subscriptions).some(([_key, subscription]) => {
@@ -711,6 +730,17 @@ class Client {
711
730
  }
712
731
  }
713
732
  });
733
+ this.realtime.queries.forEach(query => {
734
+ if (queries.includes(query)) {
735
+ let found = Array.from(this.realtime.subscriptions).some(([_key, subscription]) => {
736
+ var _a;
737
+ return (_a = subscription.queries) === null || _a === void 0 ? void 0 : _a.includes(query);
738
+ });
739
+ if (!found) {
740
+ this.realtime.queries.delete(query);
741
+ }
742
+ }
743
+ });
714
744
  }
715
745
  };
716
746
  }
@@ -891,7 +921,7 @@ class Client {
891
921
  * @param {(payload: RealtimeMessage) => void} callback Is called on every realtime update.
892
922
  * @returns {() => void} Unsubscribes from events.
893
923
  */
894
- subscribe(channels, callback) {
924
+ subscribe(channels, callback, queries = []) {
895
925
  const channelArray = Array.isArray(channels) ? channels : [channels];
896
926
  // Convert Channel instances to strings
897
927
  const channelStrings = channelArray.map(ch => {
@@ -906,15 +936,18 @@ class Client {
906
936
  return String(ch);
907
937
  });
908
938
  channelStrings.forEach(channel => this.realtime.channels.add(channel));
939
+ const queryStrings = (queries !== null && queries !== void 0 ? queries : []).map(q => typeof q === 'string' ? q : q.toString());
940
+ queryStrings.forEach(query => this.realtime.queries.add(query));
909
941
  const counter = this.realtime.subscriptionsCounter++;
910
942
  this.realtime.subscriptions.set(counter, {
911
943
  channels: channelStrings,
944
+ queries: queryStrings,
912
945
  callback
913
946
  });
914
947
  this.realtime.connect();
915
948
  return () => {
916
949
  this.realtime.subscriptions.delete(counter);
917
- this.realtime.cleanUp(channelStrings);
950
+ this.realtime.cleanUp(channelStrings, queryStrings);
918
951
  this.realtime.connect();
919
952
  };
920
953
  }
@@ -1491,6 +1524,149 @@ class Account {
1491
1524
  };
1492
1525
  return this.client.call('post', uri, apiHeaders, payload);
1493
1526
  }
1527
+ listKeys(paramsOrFirst) {
1528
+ let params;
1529
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1530
+ params = (paramsOrFirst || {});
1531
+ }
1532
+ else {
1533
+ params = {
1534
+ total: paramsOrFirst
1535
+ };
1536
+ }
1537
+ const total = params.total;
1538
+ const apiPath = '/account/keys';
1539
+ const payload = {};
1540
+ if (typeof total !== 'undefined') {
1541
+ payload['total'] = total;
1542
+ }
1543
+ const uri = new URL(this.client.config.endpoint + apiPath);
1544
+ const apiHeaders = {};
1545
+ return this.client.call('get', uri, apiHeaders, payload);
1546
+ }
1547
+ createKey(paramsOrFirst, ...rest) {
1548
+ let params;
1549
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1550
+ params = (paramsOrFirst || {});
1551
+ }
1552
+ else {
1553
+ params = {
1554
+ name: paramsOrFirst,
1555
+ scopes: rest[0],
1556
+ expire: rest[1]
1557
+ };
1558
+ }
1559
+ const name = params.name;
1560
+ const scopes = params.scopes;
1561
+ const expire = params.expire;
1562
+ if (typeof name === 'undefined') {
1563
+ throw new AppwriteException('Missing required parameter: "name"');
1564
+ }
1565
+ if (typeof scopes === 'undefined') {
1566
+ throw new AppwriteException('Missing required parameter: "scopes"');
1567
+ }
1568
+ const apiPath = '/account/keys';
1569
+ const payload = {};
1570
+ if (typeof name !== 'undefined') {
1571
+ payload['name'] = name;
1572
+ }
1573
+ if (typeof scopes !== 'undefined') {
1574
+ payload['scopes'] = scopes;
1575
+ }
1576
+ if (typeof expire !== 'undefined') {
1577
+ payload['expire'] = expire;
1578
+ }
1579
+ const uri = new URL(this.client.config.endpoint + apiPath);
1580
+ const apiHeaders = {
1581
+ 'content-type': 'application/json',
1582
+ };
1583
+ return this.client.call('post', uri, apiHeaders, payload);
1584
+ }
1585
+ getKey(paramsOrFirst) {
1586
+ let params;
1587
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1588
+ params = (paramsOrFirst || {});
1589
+ }
1590
+ else {
1591
+ params = {
1592
+ keyId: paramsOrFirst
1593
+ };
1594
+ }
1595
+ const keyId = params.keyId;
1596
+ if (typeof keyId === 'undefined') {
1597
+ throw new AppwriteException('Missing required parameter: "keyId"');
1598
+ }
1599
+ const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
1600
+ const payload = {};
1601
+ const uri = new URL(this.client.config.endpoint + apiPath);
1602
+ const apiHeaders = {};
1603
+ return this.client.call('get', uri, apiHeaders, payload);
1604
+ }
1605
+ updateKey(paramsOrFirst, ...rest) {
1606
+ let params;
1607
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1608
+ params = (paramsOrFirst || {});
1609
+ }
1610
+ else {
1611
+ params = {
1612
+ keyId: paramsOrFirst,
1613
+ name: rest[0],
1614
+ scopes: rest[1],
1615
+ expire: rest[2]
1616
+ };
1617
+ }
1618
+ const keyId = params.keyId;
1619
+ const name = params.name;
1620
+ const scopes = params.scopes;
1621
+ const expire = params.expire;
1622
+ if (typeof keyId === 'undefined') {
1623
+ throw new AppwriteException('Missing required parameter: "keyId"');
1624
+ }
1625
+ if (typeof name === 'undefined') {
1626
+ throw new AppwriteException('Missing required parameter: "name"');
1627
+ }
1628
+ if (typeof scopes === 'undefined') {
1629
+ throw new AppwriteException('Missing required parameter: "scopes"');
1630
+ }
1631
+ const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
1632
+ const payload = {};
1633
+ if (typeof name !== 'undefined') {
1634
+ payload['name'] = name;
1635
+ }
1636
+ if (typeof scopes !== 'undefined') {
1637
+ payload['scopes'] = scopes;
1638
+ }
1639
+ if (typeof expire !== 'undefined') {
1640
+ payload['expire'] = expire;
1641
+ }
1642
+ const uri = new URL(this.client.config.endpoint + apiPath);
1643
+ const apiHeaders = {
1644
+ 'content-type': 'application/json',
1645
+ };
1646
+ return this.client.call('put', uri, apiHeaders, payload);
1647
+ }
1648
+ deleteKey(paramsOrFirst) {
1649
+ let params;
1650
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1651
+ params = (paramsOrFirst || {});
1652
+ }
1653
+ else {
1654
+ params = {
1655
+ keyId: paramsOrFirst
1656
+ };
1657
+ }
1658
+ const keyId = params.keyId;
1659
+ if (typeof keyId === 'undefined') {
1660
+ throw new AppwriteException('Missing required parameter: "keyId"');
1661
+ }
1662
+ const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
1663
+ const payload = {};
1664
+ const uri = new URL(this.client.config.endpoint + apiPath);
1665
+ const apiHeaders = {
1666
+ 'content-type': 'application/json',
1667
+ };
1668
+ return this.client.call('delete', uri, apiHeaders, payload);
1669
+ }
1494
1670
  listLogs(paramsOrFirst, ...rest) {
1495
1671
  let params;
1496
1672
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -1543,7 +1719,7 @@ class Account {
1543
1719
  }
1544
1720
  createMfaAuthenticator(paramsOrFirst) {
1545
1721
  let params;
1546
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
1722
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
1547
1723
  params = (paramsOrFirst || {});
1548
1724
  }
1549
1725
  else {
@@ -1565,7 +1741,7 @@ class Account {
1565
1741
  }
1566
1742
  createMFAAuthenticator(paramsOrFirst) {
1567
1743
  let params;
1568
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
1744
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
1569
1745
  params = (paramsOrFirst || {});
1570
1746
  }
1571
1747
  else {
@@ -1587,7 +1763,7 @@ class Account {
1587
1763
  }
1588
1764
  updateMfaAuthenticator(paramsOrFirst, ...rest) {
1589
1765
  let params;
1590
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
1766
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst || 'otp' in paramsOrFirst))) {
1591
1767
  params = (paramsOrFirst || {});
1592
1768
  }
1593
1769
  else {
@@ -1617,7 +1793,7 @@ class Account {
1617
1793
  }
1618
1794
  updateMFAAuthenticator(paramsOrFirst, ...rest) {
1619
1795
  let params;
1620
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
1796
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst || 'otp' in paramsOrFirst))) {
1621
1797
  params = (paramsOrFirst || {});
1622
1798
  }
1623
1799
  else {
@@ -1647,7 +1823,7 @@ class Account {
1647
1823
  }
1648
1824
  deleteMfaAuthenticator(paramsOrFirst) {
1649
1825
  let params;
1650
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
1826
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
1651
1827
  params = (paramsOrFirst || {});
1652
1828
  }
1653
1829
  else {
@@ -1669,7 +1845,7 @@ class Account {
1669
1845
  }
1670
1846
  deleteMFAAuthenticator(paramsOrFirst) {
1671
1847
  let params;
1672
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'type' in paramsOrFirst)) {
1848
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('type' in paramsOrFirst))) {
1673
1849
  params = (paramsOrFirst || {});
1674
1850
  }
1675
1851
  else {
@@ -1691,7 +1867,7 @@ class Account {
1691
1867
  }
1692
1868
  createMfaChallenge(paramsOrFirst) {
1693
1869
  let params;
1694
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'factor' in paramsOrFirst)) {
1870
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('factor' in paramsOrFirst))) {
1695
1871
  params = (paramsOrFirst || {});
1696
1872
  }
1697
1873
  else {
@@ -1716,7 +1892,7 @@ class Account {
1716
1892
  }
1717
1893
  createMFAChallenge(paramsOrFirst) {
1718
1894
  let params;
1719
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'factor' in paramsOrFirst)) {
1895
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('factor' in paramsOrFirst))) {
1720
1896
  params = (paramsOrFirst || {});
1721
1897
  }
1722
1898
  else {
@@ -2209,7 +2385,7 @@ class Account {
2209
2385
  }
2210
2386
  updatePrefs(paramsOrFirst) {
2211
2387
  let params;
2212
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'prefs' in paramsOrFirst)) {
2388
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('prefs' in paramsOrFirst))) {
2213
2389
  params = (paramsOrFirst || {});
2214
2390
  }
2215
2391
  else {
@@ -2417,7 +2593,7 @@ class Account {
2417
2593
  }
2418
2594
  createOAuth2Session(paramsOrFirst, ...rest) {
2419
2595
  let params;
2420
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'provider' in paramsOrFirst)) {
2596
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('provider' in paramsOrFirst || 'success' in paramsOrFirst || 'failure' in paramsOrFirst || 'scopes' in paramsOrFirst))) {
2421
2597
  params = (paramsOrFirst || {});
2422
2598
  }
2423
2599
  else {
@@ -2777,7 +2953,7 @@ class Account {
2777
2953
  }
2778
2954
  createOAuth2Token(paramsOrFirst, ...rest) {
2779
2955
  let params;
2780
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'provider' in paramsOrFirst)) {
2956
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('provider' in paramsOrFirst || 'success' in paramsOrFirst || 'failure' in paramsOrFirst || 'scopes' in paramsOrFirst))) {
2781
2957
  params = (paramsOrFirst || {});
2782
2958
  }
2783
2959
  else {
@@ -3024,7 +3200,7 @@ class Avatars {
3024
3200
  }
3025
3201
  getBrowser(paramsOrFirst, ...rest) {
3026
3202
  let params;
3027
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
3203
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
3028
3204
  params = (paramsOrFirst || {});
3029
3205
  }
3030
3206
  else {
@@ -3062,7 +3238,7 @@ class Avatars {
3062
3238
  }
3063
3239
  getCreditCard(paramsOrFirst, ...rest) {
3064
3240
  let params;
3065
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
3241
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
3066
3242
  params = (paramsOrFirst || {});
3067
3243
  }
3068
3244
  else {
@@ -3126,7 +3302,7 @@ class Avatars {
3126
3302
  }
3127
3303
  getFlag(paramsOrFirst, ...rest) {
3128
3304
  let params;
3129
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {
3305
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('code' in paramsOrFirst || 'width' in paramsOrFirst || 'height' in paramsOrFirst || 'quality' in paramsOrFirst))) {
3130
3306
  params = (paramsOrFirst || {});
3131
3307
  }
3132
3308
  else {
@@ -3426,7 +3602,7 @@ class Backups {
3426
3602
  }
3427
3603
  createArchive(paramsOrFirst, ...rest) {
3428
3604
  let params;
3429
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3605
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('services' in paramsOrFirst || 'resourceId' in paramsOrFirst))) {
3430
3606
  params = (paramsOrFirst || {});
3431
3607
  }
3432
3608
  else {
@@ -3826,7 +4002,7 @@ class Console {
3826
4002
  }
3827
4003
  getPlans(paramsOrFirst) {
3828
4004
  let params;
3829
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'platform' in paramsOrFirst)) {
4005
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('platform' in paramsOrFirst))) {
3830
4006
  params = (paramsOrFirst || {});
3831
4007
  }
3832
4008
  else {
@@ -3906,25 +4082,15 @@ class Console {
3906
4082
  };
3907
4083
  return this.client.call('post', uri, apiHeaders, payload);
3908
4084
  }
3909
- getRegions(paramsOrFirst) {
3910
- let params;
3911
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3912
- params = (paramsOrFirst || {});
3913
- }
3914
- else {
3915
- params = {
3916
- organizationId: paramsOrFirst
3917
- };
3918
- }
3919
- const organizationId = params.organizationId;
3920
- if (typeof organizationId === 'undefined') {
3921
- throw new AppwriteException('Missing required parameter: "organizationId"');
3922
- }
4085
+ /**
4086
+ * Get all available regions for the console.
4087
+ *
4088
+ * @throws {AppwriteException}
4089
+ * @returns {Promise<Models.ConsoleRegionList>}
4090
+ */
4091
+ listRegions() {
3923
4092
  const apiPath = '/console/regions';
3924
4093
  const payload = {};
3925
- if (typeof organizationId !== 'undefined') {
3926
- payload['organizationId'] = organizationId;
3927
- }
3928
4094
  const uri = new URL(this.client.config.endpoint + apiPath);
3929
4095
  const apiHeaders = {};
3930
4096
  return this.client.call('get', uri, apiHeaders, payload);
@@ -4321,7 +4487,7 @@ class Databases {
4321
4487
  }
4322
4488
  listUsage(paramsOrFirst) {
4323
4489
  let params;
4324
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
4490
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
4325
4491
  params = (paramsOrFirst || {});
4326
4492
  }
4327
4493
  else {
@@ -4377,9 +4543,6 @@ class Databases {
4377
4543
  if (typeof databaseId === 'undefined') {
4378
4544
  throw new AppwriteException('Missing required parameter: "databaseId"');
4379
4545
  }
4380
- if (typeof name === 'undefined') {
4381
- throw new AppwriteException('Missing required parameter: "name"');
4382
- }
4383
4546
  const apiPath = '/databases/{databaseId}'.replace('{databaseId}', databaseId);
4384
4547
  const payload = {};
4385
4548
  if (typeof name !== 'undefined') {
@@ -4566,9 +4729,6 @@ class Databases {
4566
4729
  if (typeof collectionId === 'undefined') {
4567
4730
  throw new AppwriteException('Missing required parameter: "collectionId"');
4568
4731
  }
4569
- if (typeof name === 'undefined') {
4570
- throw new AppwriteException('Missing required parameter: "name"');
4571
- }
4572
4732
  const apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
4573
4733
  const payload = {};
4574
4734
  if (typeof name !== 'undefined') {
@@ -5547,7 +5707,7 @@ class Databases {
5547
5707
  };
5548
5708
  return this.client.call('patch', uri, apiHeaders, payload);
5549
5709
  }
5550
- createPointAttribute(paramsOrFirst, ...rest) {
5710
+ createLongtextAttribute(paramsOrFirst, ...rest) {
5551
5711
  let params;
5552
5712
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5553
5713
  params = (paramsOrFirst || {});
@@ -5558,7 +5718,8 @@ class Databases {
5558
5718
  collectionId: rest[0],
5559
5719
  key: rest[1],
5560
5720
  required: rest[2],
5561
- xdefault: rest[3]
5721
+ xdefault: rest[3],
5722
+ array: rest[4]
5562
5723
  };
5563
5724
  }
5564
5725
  const databaseId = params.databaseId;
@@ -5566,6 +5727,7 @@ class Databases {
5566
5727
  const key = params.key;
5567
5728
  const required = params.required;
5568
5729
  const xdefault = params.xdefault;
5730
+ const array = params.array;
5569
5731
  if (typeof databaseId === 'undefined') {
5570
5732
  throw new AppwriteException('Missing required parameter: "databaseId"');
5571
5733
  }
@@ -5578,7 +5740,7 @@ class Databases {
5578
5740
  if (typeof required === 'undefined') {
5579
5741
  throw new AppwriteException('Missing required parameter: "required"');
5580
5742
  }
5581
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5743
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5582
5744
  const payload = {};
5583
5745
  if (typeof key !== 'undefined') {
5584
5746
  payload['key'] = key;
@@ -5589,13 +5751,16 @@ class Databases {
5589
5751
  if (typeof xdefault !== 'undefined') {
5590
5752
  payload['default'] = xdefault;
5591
5753
  }
5754
+ if (typeof array !== 'undefined') {
5755
+ payload['array'] = array;
5756
+ }
5592
5757
  const uri = new URL(this.client.config.endpoint + apiPath);
5593
5758
  const apiHeaders = {
5594
5759
  'content-type': 'application/json',
5595
5760
  };
5596
5761
  return this.client.call('post', uri, apiHeaders, payload);
5597
5762
  }
5598
- updatePointAttribute(paramsOrFirst, ...rest) {
5763
+ updateLongtextAttribute(paramsOrFirst, ...rest) {
5599
5764
  let params;
5600
5765
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5601
5766
  params = (paramsOrFirst || {});
@@ -5628,7 +5793,10 @@ class Databases {
5628
5793
  if (typeof required === 'undefined') {
5629
5794
  throw new AppwriteException('Missing required parameter: "required"');
5630
5795
  }
5631
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5796
+ if (typeof xdefault === 'undefined') {
5797
+ throw new AppwriteException('Missing required parameter: "xdefault"');
5798
+ }
5799
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5632
5800
  const payload = {};
5633
5801
  if (typeof required !== 'undefined') {
5634
5802
  payload['required'] = required;
@@ -5645,7 +5813,7 @@ class Databases {
5645
5813
  };
5646
5814
  return this.client.call('patch', uri, apiHeaders, payload);
5647
5815
  }
5648
- createPolygonAttribute(paramsOrFirst, ...rest) {
5816
+ createMediumtextAttribute(paramsOrFirst, ...rest) {
5649
5817
  let params;
5650
5818
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5651
5819
  params = (paramsOrFirst || {});
@@ -5656,7 +5824,8 @@ class Databases {
5656
5824
  collectionId: rest[0],
5657
5825
  key: rest[1],
5658
5826
  required: rest[2],
5659
- xdefault: rest[3]
5827
+ xdefault: rest[3],
5828
+ array: rest[4]
5660
5829
  };
5661
5830
  }
5662
5831
  const databaseId = params.databaseId;
@@ -5664,6 +5833,7 @@ class Databases {
5664
5833
  const key = params.key;
5665
5834
  const required = params.required;
5666
5835
  const xdefault = params.xdefault;
5836
+ const array = params.array;
5667
5837
  if (typeof databaseId === 'undefined') {
5668
5838
  throw new AppwriteException('Missing required parameter: "databaseId"');
5669
5839
  }
@@ -5676,7 +5846,7 @@ class Databases {
5676
5846
  if (typeof required === 'undefined') {
5677
5847
  throw new AppwriteException('Missing required parameter: "required"');
5678
5848
  }
5679
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5849
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5680
5850
  const payload = {};
5681
5851
  if (typeof key !== 'undefined') {
5682
5852
  payload['key'] = key;
@@ -5687,13 +5857,16 @@ class Databases {
5687
5857
  if (typeof xdefault !== 'undefined') {
5688
5858
  payload['default'] = xdefault;
5689
5859
  }
5860
+ if (typeof array !== 'undefined') {
5861
+ payload['array'] = array;
5862
+ }
5690
5863
  const uri = new URL(this.client.config.endpoint + apiPath);
5691
5864
  const apiHeaders = {
5692
5865
  'content-type': 'application/json',
5693
5866
  };
5694
5867
  return this.client.call('post', uri, apiHeaders, payload);
5695
5868
  }
5696
- updatePolygonAttribute(paramsOrFirst, ...rest) {
5869
+ updateMediumtextAttribute(paramsOrFirst, ...rest) {
5697
5870
  let params;
5698
5871
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5699
5872
  params = (paramsOrFirst || {});
@@ -5726,7 +5899,10 @@ class Databases {
5726
5899
  if (typeof required === 'undefined') {
5727
5900
  throw new AppwriteException('Missing required parameter: "required"');
5728
5901
  }
5729
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5902
+ if (typeof xdefault === 'undefined') {
5903
+ throw new AppwriteException('Missing required parameter: "xdefault"');
5904
+ }
5905
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5730
5906
  const payload = {};
5731
5907
  if (typeof required !== 'undefined') {
5732
5908
  payload['required'] = required;
@@ -5743,7 +5919,7 @@ class Databases {
5743
5919
  };
5744
5920
  return this.client.call('patch', uri, apiHeaders, payload);
5745
5921
  }
5746
- createRelationshipAttribute(paramsOrFirst, ...rest) {
5922
+ createPointAttribute(paramsOrFirst, ...rest) {
5747
5923
  let params;
5748
5924
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5749
5925
  params = (paramsOrFirst || {});
@@ -5752,53 +5928,38 @@ class Databases {
5752
5928
  params = {
5753
5929
  databaseId: paramsOrFirst,
5754
5930
  collectionId: rest[0],
5755
- relatedCollectionId: rest[1],
5756
- type: rest[2],
5757
- twoWay: rest[3],
5758
- key: rest[4],
5759
- twoWayKey: rest[5],
5760
- onDelete: rest[6]
5931
+ key: rest[1],
5932
+ required: rest[2],
5933
+ xdefault: rest[3]
5761
5934
  };
5762
5935
  }
5763
5936
  const databaseId = params.databaseId;
5764
5937
  const collectionId = params.collectionId;
5765
- const relatedCollectionId = params.relatedCollectionId;
5766
- const type = params.type;
5767
- const twoWay = params.twoWay;
5768
5938
  const key = params.key;
5769
- const twoWayKey = params.twoWayKey;
5770
- const onDelete = params.onDelete;
5939
+ const required = params.required;
5940
+ const xdefault = params.xdefault;
5771
5941
  if (typeof databaseId === 'undefined') {
5772
5942
  throw new AppwriteException('Missing required parameter: "databaseId"');
5773
5943
  }
5774
5944
  if (typeof collectionId === 'undefined') {
5775
5945
  throw new AppwriteException('Missing required parameter: "collectionId"');
5776
5946
  }
5777
- if (typeof relatedCollectionId === 'undefined') {
5778
- throw new AppwriteException('Missing required parameter: "relatedCollectionId"');
5947
+ if (typeof key === 'undefined') {
5948
+ throw new AppwriteException('Missing required parameter: "key"');
5779
5949
  }
5780
- if (typeof type === 'undefined') {
5781
- throw new AppwriteException('Missing required parameter: "type"');
5950
+ if (typeof required === 'undefined') {
5951
+ throw new AppwriteException('Missing required parameter: "required"');
5782
5952
  }
5783
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5953
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5784
5954
  const payload = {};
5785
- if (typeof relatedCollectionId !== 'undefined') {
5786
- payload['relatedCollectionId'] = relatedCollectionId;
5787
- }
5788
- if (typeof type !== 'undefined') {
5789
- payload['type'] = type;
5790
- }
5791
- if (typeof twoWay !== 'undefined') {
5792
- payload['twoWay'] = twoWay;
5793
- }
5794
5955
  if (typeof key !== 'undefined') {
5795
5956
  payload['key'] = key;
5796
5957
  }
5797
- if (typeof twoWayKey !== 'undefined') {
5798
- payload['twoWayKey'] = twoWayKey;
5958
+ if (typeof required !== 'undefined') {
5959
+ payload['required'] = required;
5799
5960
  }
5800
- if (typeof onDelete !== 'undefined') {
5801
- payload['onDelete'] = onDelete;
5961
+ if (typeof xdefault !== 'undefined') {
5962
+ payload['default'] = xdefault;
5802
5963
  }
5803
5964
  const uri = new URL(this.client.config.endpoint + apiPath);
5804
5965
  const apiHeaders = {
@@ -5806,7 +5967,7 @@ class Databases {
5806
5967
  };
5807
5968
  return this.client.call('post', uri, apiHeaders, payload);
5808
5969
  }
5809
- createStringAttribute(paramsOrFirst, ...rest) {
5970
+ updatePointAttribute(paramsOrFirst, ...rest) {
5810
5971
  let params;
5811
5972
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5812
5973
  params = (paramsOrFirst || {});
@@ -5816,21 +5977,17 @@ class Databases {
5816
5977
  databaseId: paramsOrFirst,
5817
5978
  collectionId: rest[0],
5818
5979
  key: rest[1],
5819
- size: rest[2],
5820
- required: rest[3],
5821
- xdefault: rest[4],
5822
- array: rest[5],
5823
- encrypt: rest[6]
5980
+ required: rest[2],
5981
+ xdefault: rest[3],
5982
+ newKey: rest[4]
5824
5983
  };
5825
5984
  }
5826
5985
  const databaseId = params.databaseId;
5827
5986
  const collectionId = params.collectionId;
5828
5987
  const key = params.key;
5829
- const size = params.size;
5830
5988
  const required = params.required;
5831
5989
  const xdefault = params.xdefault;
5832
- const array = params.array;
5833
- const encrypt = params.encrypt;
5990
+ const newKey = params.newKey;
5834
5991
  if (typeof databaseId === 'undefined') {
5835
5992
  throw new AppwriteException('Missing required parameter: "databaseId"');
5836
5993
  }
@@ -5840,39 +5997,75 @@ class Databases {
5840
5997
  if (typeof key === 'undefined') {
5841
5998
  throw new AppwriteException('Missing required parameter: "key"');
5842
5999
  }
5843
- if (typeof size === 'undefined') {
5844
- throw new AppwriteException('Missing required parameter: "size"');
6000
+ if (typeof required === 'undefined') {
6001
+ throw new AppwriteException('Missing required parameter: "required"');
6002
+ }
6003
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6004
+ const payload = {};
6005
+ if (typeof required !== 'undefined') {
6006
+ payload['required'] = required;
6007
+ }
6008
+ if (typeof xdefault !== 'undefined') {
6009
+ payload['default'] = xdefault;
6010
+ }
6011
+ if (typeof newKey !== 'undefined') {
6012
+ payload['newKey'] = newKey;
6013
+ }
6014
+ const uri = new URL(this.client.config.endpoint + apiPath);
6015
+ const apiHeaders = {
6016
+ 'content-type': 'application/json',
6017
+ };
6018
+ return this.client.call('patch', uri, apiHeaders, payload);
6019
+ }
6020
+ createPolygonAttribute(paramsOrFirst, ...rest) {
6021
+ let params;
6022
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6023
+ params = (paramsOrFirst || {});
6024
+ }
6025
+ else {
6026
+ params = {
6027
+ databaseId: paramsOrFirst,
6028
+ collectionId: rest[0],
6029
+ key: rest[1],
6030
+ required: rest[2],
6031
+ xdefault: rest[3]
6032
+ };
6033
+ }
6034
+ const databaseId = params.databaseId;
6035
+ const collectionId = params.collectionId;
6036
+ const key = params.key;
6037
+ const required = params.required;
6038
+ const xdefault = params.xdefault;
6039
+ if (typeof databaseId === 'undefined') {
6040
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6041
+ }
6042
+ if (typeof collectionId === 'undefined') {
6043
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6044
+ }
6045
+ if (typeof key === 'undefined') {
6046
+ throw new AppwriteException('Missing required parameter: "key"');
5845
6047
  }
5846
6048
  if (typeof required === 'undefined') {
5847
6049
  throw new AppwriteException('Missing required parameter: "required"');
5848
6050
  }
5849
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6051
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5850
6052
  const payload = {};
5851
6053
  if (typeof key !== 'undefined') {
5852
6054
  payload['key'] = key;
5853
6055
  }
5854
- if (typeof size !== 'undefined') {
5855
- payload['size'] = size;
5856
- }
5857
6056
  if (typeof required !== 'undefined') {
5858
6057
  payload['required'] = required;
5859
6058
  }
5860
6059
  if (typeof xdefault !== 'undefined') {
5861
6060
  payload['default'] = xdefault;
5862
6061
  }
5863
- if (typeof array !== 'undefined') {
5864
- payload['array'] = array;
5865
- }
5866
- if (typeof encrypt !== 'undefined') {
5867
- payload['encrypt'] = encrypt;
5868
- }
5869
6062
  const uri = new URL(this.client.config.endpoint + apiPath);
5870
6063
  const apiHeaders = {
5871
6064
  'content-type': 'application/json',
5872
6065
  };
5873
6066
  return this.client.call('post', uri, apiHeaders, payload);
5874
6067
  }
5875
- updateStringAttribute(paramsOrFirst, ...rest) {
6068
+ updatePolygonAttribute(paramsOrFirst, ...rest) {
5876
6069
  let params;
5877
6070
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5878
6071
  params = (paramsOrFirst || {});
@@ -5884,8 +6077,7 @@ class Databases {
5884
6077
  key: rest[1],
5885
6078
  required: rest[2],
5886
6079
  xdefault: rest[3],
5887
- size: rest[4],
5888
- newKey: rest[5]
6080
+ newKey: rest[4]
5889
6081
  };
5890
6082
  }
5891
6083
  const databaseId = params.databaseId;
@@ -5893,7 +6085,6 @@ class Databases {
5893
6085
  const key = params.key;
5894
6086
  const required = params.required;
5895
6087
  const xdefault = params.xdefault;
5896
- const size = params.size;
5897
6088
  const newKey = params.newKey;
5898
6089
  if (typeof databaseId === 'undefined') {
5899
6090
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -5907,10 +6098,7 @@ class Databases {
5907
6098
  if (typeof required === 'undefined') {
5908
6099
  throw new AppwriteException('Missing required parameter: "required"');
5909
6100
  }
5910
- if (typeof xdefault === 'undefined') {
5911
- throw new AppwriteException('Missing required parameter: "xdefault"');
5912
- }
5913
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6101
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5914
6102
  const payload = {};
5915
6103
  if (typeof required !== 'undefined') {
5916
6104
  payload['required'] = required;
@@ -5918,9 +6106,6 @@ class Databases {
5918
6106
  if (typeof xdefault !== 'undefined') {
5919
6107
  payload['default'] = xdefault;
5920
6108
  }
5921
- if (typeof size !== 'undefined') {
5922
- payload['size'] = size;
5923
- }
5924
6109
  if (typeof newKey !== 'undefined') {
5925
6110
  payload['newKey'] = newKey;
5926
6111
  }
@@ -5930,7 +6115,70 @@ class Databases {
5930
6115
  };
5931
6116
  return this.client.call('patch', uri, apiHeaders, payload);
5932
6117
  }
5933
- createUrlAttribute(paramsOrFirst, ...rest) {
6118
+ createRelationshipAttribute(paramsOrFirst, ...rest) {
6119
+ let params;
6120
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6121
+ params = (paramsOrFirst || {});
6122
+ }
6123
+ else {
6124
+ params = {
6125
+ databaseId: paramsOrFirst,
6126
+ collectionId: rest[0],
6127
+ relatedCollectionId: rest[1],
6128
+ type: rest[2],
6129
+ twoWay: rest[3],
6130
+ key: rest[4],
6131
+ twoWayKey: rest[5],
6132
+ onDelete: rest[6]
6133
+ };
6134
+ }
6135
+ const databaseId = params.databaseId;
6136
+ const collectionId = params.collectionId;
6137
+ const relatedCollectionId = params.relatedCollectionId;
6138
+ const type = params.type;
6139
+ const twoWay = params.twoWay;
6140
+ const key = params.key;
6141
+ const twoWayKey = params.twoWayKey;
6142
+ const onDelete = params.onDelete;
6143
+ if (typeof databaseId === 'undefined') {
6144
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6145
+ }
6146
+ if (typeof collectionId === 'undefined') {
6147
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6148
+ }
6149
+ if (typeof relatedCollectionId === 'undefined') {
6150
+ throw new AppwriteException('Missing required parameter: "relatedCollectionId"');
6151
+ }
6152
+ if (typeof type === 'undefined') {
6153
+ throw new AppwriteException('Missing required parameter: "type"');
6154
+ }
6155
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6156
+ const payload = {};
6157
+ if (typeof relatedCollectionId !== 'undefined') {
6158
+ payload['relatedCollectionId'] = relatedCollectionId;
6159
+ }
6160
+ if (typeof type !== 'undefined') {
6161
+ payload['type'] = type;
6162
+ }
6163
+ if (typeof twoWay !== 'undefined') {
6164
+ payload['twoWay'] = twoWay;
6165
+ }
6166
+ if (typeof key !== 'undefined') {
6167
+ payload['key'] = key;
6168
+ }
6169
+ if (typeof twoWayKey !== 'undefined') {
6170
+ payload['twoWayKey'] = twoWayKey;
6171
+ }
6172
+ if (typeof onDelete !== 'undefined') {
6173
+ payload['onDelete'] = onDelete;
6174
+ }
6175
+ const uri = new URL(this.client.config.endpoint + apiPath);
6176
+ const apiHeaders = {
6177
+ 'content-type': 'application/json',
6178
+ };
6179
+ return this.client.call('post', uri, apiHeaders, payload);
6180
+ }
6181
+ createStringAttribute(paramsOrFirst, ...rest) {
5934
6182
  let params;
5935
6183
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5936
6184
  params = (paramsOrFirst || {});
@@ -5940,17 +6188,21 @@ class Databases {
5940
6188
  databaseId: paramsOrFirst,
5941
6189
  collectionId: rest[0],
5942
6190
  key: rest[1],
5943
- required: rest[2],
5944
- xdefault: rest[3],
5945
- array: rest[4]
6191
+ size: rest[2],
6192
+ required: rest[3],
6193
+ xdefault: rest[4],
6194
+ array: rest[5],
6195
+ encrypt: rest[6]
5946
6196
  };
5947
6197
  }
5948
6198
  const databaseId = params.databaseId;
5949
6199
  const collectionId = params.collectionId;
5950
6200
  const key = params.key;
6201
+ const size = params.size;
5951
6202
  const required = params.required;
5952
6203
  const xdefault = params.xdefault;
5953
6204
  const array = params.array;
6205
+ const encrypt = params.encrypt;
5954
6206
  if (typeof databaseId === 'undefined') {
5955
6207
  throw new AppwriteException('Missing required parameter: "databaseId"');
5956
6208
  }
@@ -5960,14 +6212,20 @@ class Databases {
5960
6212
  if (typeof key === 'undefined') {
5961
6213
  throw new AppwriteException('Missing required parameter: "key"');
5962
6214
  }
6215
+ if (typeof size === 'undefined') {
6216
+ throw new AppwriteException('Missing required parameter: "size"');
6217
+ }
5963
6218
  if (typeof required === 'undefined') {
5964
6219
  throw new AppwriteException('Missing required parameter: "required"');
5965
6220
  }
5966
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6221
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5967
6222
  const payload = {};
5968
6223
  if (typeof key !== 'undefined') {
5969
6224
  payload['key'] = key;
5970
6225
  }
6226
+ if (typeof size !== 'undefined') {
6227
+ payload['size'] = size;
6228
+ }
5971
6229
  if (typeof required !== 'undefined') {
5972
6230
  payload['required'] = required;
5973
6231
  }
@@ -5977,13 +6235,16 @@ class Databases {
5977
6235
  if (typeof array !== 'undefined') {
5978
6236
  payload['array'] = array;
5979
6237
  }
6238
+ if (typeof encrypt !== 'undefined') {
6239
+ payload['encrypt'] = encrypt;
6240
+ }
5980
6241
  const uri = new URL(this.client.config.endpoint + apiPath);
5981
6242
  const apiHeaders = {
5982
6243
  'content-type': 'application/json',
5983
6244
  };
5984
6245
  return this.client.call('post', uri, apiHeaders, payload);
5985
6246
  }
5986
- updateUrlAttribute(paramsOrFirst, ...rest) {
6247
+ updateStringAttribute(paramsOrFirst, ...rest) {
5987
6248
  let params;
5988
6249
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5989
6250
  params = (paramsOrFirst || {});
@@ -5995,7 +6256,8 @@ class Databases {
5995
6256
  key: rest[1],
5996
6257
  required: rest[2],
5997
6258
  xdefault: rest[3],
5998
- newKey: rest[4]
6259
+ size: rest[4],
6260
+ newKey: rest[5]
5999
6261
  };
6000
6262
  }
6001
6263
  const databaseId = params.databaseId;
@@ -6003,6 +6265,7 @@ class Databases {
6003
6265
  const key = params.key;
6004
6266
  const required = params.required;
6005
6267
  const xdefault = params.xdefault;
6268
+ const size = params.size;
6006
6269
  const newKey = params.newKey;
6007
6270
  if (typeof databaseId === 'undefined') {
6008
6271
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -6019,7 +6282,7 @@ class Databases {
6019
6282
  if (typeof xdefault === 'undefined') {
6020
6283
  throw new AppwriteException('Missing required parameter: "xdefault"');
6021
6284
  }
6022
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6285
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6023
6286
  const payload = {};
6024
6287
  if (typeof required !== 'undefined') {
6025
6288
  payload['required'] = required;
@@ -6027,6 +6290,9 @@ class Databases {
6027
6290
  if (typeof xdefault !== 'undefined') {
6028
6291
  payload['default'] = xdefault;
6029
6292
  }
6293
+ if (typeof size !== 'undefined') {
6294
+ payload['size'] = size;
6295
+ }
6030
6296
  if (typeof newKey !== 'undefined') {
6031
6297
  payload['newKey'] = newKey;
6032
6298
  }
@@ -6036,7 +6302,7 @@ class Databases {
6036
6302
  };
6037
6303
  return this.client.call('patch', uri, apiHeaders, payload);
6038
6304
  }
6039
- getAttribute(paramsOrFirst, ...rest) {
6305
+ createTextAttribute(paramsOrFirst, ...rest) {
6040
6306
  let params;
6041
6307
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6042
6308
  params = (paramsOrFirst || {});
@@ -6045,12 +6311,18 @@ class Databases {
6045
6311
  params = {
6046
6312
  databaseId: paramsOrFirst,
6047
6313
  collectionId: rest[0],
6048
- key: rest[1]
6314
+ key: rest[1],
6315
+ required: rest[2],
6316
+ xdefault: rest[3],
6317
+ array: rest[4]
6049
6318
  };
6050
6319
  }
6051
6320
  const databaseId = params.databaseId;
6052
6321
  const collectionId = params.collectionId;
6053
6322
  const key = params.key;
6323
+ const required = params.required;
6324
+ const xdefault = params.xdefault;
6325
+ const array = params.array;
6054
6326
  if (typeof databaseId === 'undefined') {
6055
6327
  throw new AppwriteException('Missing required parameter: "databaseId"');
6056
6328
  }
@@ -6060,13 +6332,30 @@ class Databases {
6060
6332
  if (typeof key === 'undefined') {
6061
6333
  throw new AppwriteException('Missing required parameter: "key"');
6062
6334
  }
6063
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6335
+ if (typeof required === 'undefined') {
6336
+ throw new AppwriteException('Missing required parameter: "required"');
6337
+ }
6338
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/text'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6064
6339
  const payload = {};
6340
+ if (typeof key !== 'undefined') {
6341
+ payload['key'] = key;
6342
+ }
6343
+ if (typeof required !== 'undefined') {
6344
+ payload['required'] = required;
6345
+ }
6346
+ if (typeof xdefault !== 'undefined') {
6347
+ payload['default'] = xdefault;
6348
+ }
6349
+ if (typeof array !== 'undefined') {
6350
+ payload['array'] = array;
6351
+ }
6065
6352
  const uri = new URL(this.client.config.endpoint + apiPath);
6066
- const apiHeaders = {};
6067
- return this.client.call('get', uri, apiHeaders, payload);
6353
+ const apiHeaders = {
6354
+ 'content-type': 'application/json',
6355
+ };
6356
+ return this.client.call('post', uri, apiHeaders, payload);
6068
6357
  }
6069
- deleteAttribute(paramsOrFirst, ...rest) {
6358
+ updateTextAttribute(paramsOrFirst, ...rest) {
6070
6359
  let params;
6071
6360
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6072
6361
  params = (paramsOrFirst || {});
@@ -6075,12 +6364,18 @@ class Databases {
6075
6364
  params = {
6076
6365
  databaseId: paramsOrFirst,
6077
6366
  collectionId: rest[0],
6078
- key: rest[1]
6367
+ key: rest[1],
6368
+ required: rest[2],
6369
+ xdefault: rest[3],
6370
+ newKey: rest[4]
6079
6371
  };
6080
6372
  }
6081
6373
  const databaseId = params.databaseId;
6082
6374
  const collectionId = params.collectionId;
6083
6375
  const key = params.key;
6376
+ const required = params.required;
6377
+ const xdefault = params.xdefault;
6378
+ const newKey = params.newKey;
6084
6379
  if (typeof databaseId === 'undefined') {
6085
6380
  throw new AppwriteException('Missing required parameter: "databaseId"');
6086
6381
  }
@@ -6090,15 +6385,30 @@ class Databases {
6090
6385
  if (typeof key === 'undefined') {
6091
6386
  throw new AppwriteException('Missing required parameter: "key"');
6092
6387
  }
6093
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6388
+ if (typeof required === 'undefined') {
6389
+ throw new AppwriteException('Missing required parameter: "required"');
6390
+ }
6391
+ if (typeof xdefault === 'undefined') {
6392
+ throw new AppwriteException('Missing required parameter: "xdefault"');
6393
+ }
6394
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/text/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6094
6395
  const payload = {};
6396
+ if (typeof required !== 'undefined') {
6397
+ payload['required'] = required;
6398
+ }
6399
+ if (typeof xdefault !== 'undefined') {
6400
+ payload['default'] = xdefault;
6401
+ }
6402
+ if (typeof newKey !== 'undefined') {
6403
+ payload['newKey'] = newKey;
6404
+ }
6095
6405
  const uri = new URL(this.client.config.endpoint + apiPath);
6096
6406
  const apiHeaders = {
6097
6407
  'content-type': 'application/json',
6098
6408
  };
6099
- return this.client.call('delete', uri, apiHeaders, payload);
6409
+ return this.client.call('patch', uri, apiHeaders, payload);
6100
6410
  }
6101
- updateRelationshipAttribute(paramsOrFirst, ...rest) {
6411
+ createUrlAttribute(paramsOrFirst, ...rest) {
6102
6412
  let params;
6103
6413
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6104
6414
  params = (paramsOrFirst || {});
@@ -6108,15 +6418,17 @@ class Databases {
6108
6418
  databaseId: paramsOrFirst,
6109
6419
  collectionId: rest[0],
6110
6420
  key: rest[1],
6111
- onDelete: rest[2],
6112
- newKey: rest[3]
6421
+ required: rest[2],
6422
+ xdefault: rest[3],
6423
+ array: rest[4]
6113
6424
  };
6114
6425
  }
6115
6426
  const databaseId = params.databaseId;
6116
6427
  const collectionId = params.collectionId;
6117
6428
  const key = params.key;
6118
- const onDelete = params.onDelete;
6119
- const newKey = params.newKey;
6429
+ const required = params.required;
6430
+ const xdefault = params.xdefault;
6431
+ const array = params.array;
6120
6432
  if (typeof databaseId === 'undefined') {
6121
6433
  throw new AppwriteException('Missing required parameter: "databaseId"');
6122
6434
  }
@@ -6126,21 +6438,30 @@ class Databases {
6126
6438
  if (typeof key === 'undefined') {
6127
6439
  throw new AppwriteException('Missing required parameter: "key"');
6128
6440
  }
6129
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6130
- const payload = {};
6131
- if (typeof onDelete !== 'undefined') {
6132
- payload['onDelete'] = onDelete;
6441
+ if (typeof required === 'undefined') {
6442
+ throw new AppwriteException('Missing required parameter: "required"');
6133
6443
  }
6134
- if (typeof newKey !== 'undefined') {
6135
- payload['newKey'] = newKey;
6444
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6445
+ const payload = {};
6446
+ if (typeof key !== 'undefined') {
6447
+ payload['key'] = key;
6448
+ }
6449
+ if (typeof required !== 'undefined') {
6450
+ payload['required'] = required;
6451
+ }
6452
+ if (typeof xdefault !== 'undefined') {
6453
+ payload['default'] = xdefault;
6454
+ }
6455
+ if (typeof array !== 'undefined') {
6456
+ payload['array'] = array;
6136
6457
  }
6137
6458
  const uri = new URL(this.client.config.endpoint + apiPath);
6138
6459
  const apiHeaders = {
6139
6460
  'content-type': 'application/json',
6140
6461
  };
6141
- return this.client.call('patch', uri, apiHeaders, payload);
6462
+ return this.client.call('post', uri, apiHeaders, payload);
6142
6463
  }
6143
- listDocuments(paramsOrFirst, ...rest) {
6464
+ updateUrlAttribute(paramsOrFirst, ...rest) {
6144
6465
  let params;
6145
6466
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6146
6467
  params = (paramsOrFirst || {});
@@ -6149,38 +6470,51 @@ class Databases {
6149
6470
  params = {
6150
6471
  databaseId: paramsOrFirst,
6151
6472
  collectionId: rest[0],
6152
- queries: rest[1],
6153
- transactionId: rest[2],
6154
- total: rest[3]
6473
+ key: rest[1],
6474
+ required: rest[2],
6475
+ xdefault: rest[3],
6476
+ newKey: rest[4]
6155
6477
  };
6156
6478
  }
6157
6479
  const databaseId = params.databaseId;
6158
6480
  const collectionId = params.collectionId;
6159
- const queries = params.queries;
6160
- const transactionId = params.transactionId;
6161
- const total = params.total;
6481
+ const key = params.key;
6482
+ const required = params.required;
6483
+ const xdefault = params.xdefault;
6484
+ const newKey = params.newKey;
6162
6485
  if (typeof databaseId === 'undefined') {
6163
6486
  throw new AppwriteException('Missing required parameter: "databaseId"');
6164
6487
  }
6165
6488
  if (typeof collectionId === 'undefined') {
6166
6489
  throw new AppwriteException('Missing required parameter: "collectionId"');
6167
6490
  }
6168
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6491
+ if (typeof key === 'undefined') {
6492
+ throw new AppwriteException('Missing required parameter: "key"');
6493
+ }
6494
+ if (typeof required === 'undefined') {
6495
+ throw new AppwriteException('Missing required parameter: "required"');
6496
+ }
6497
+ if (typeof xdefault === 'undefined') {
6498
+ throw new AppwriteException('Missing required parameter: "xdefault"');
6499
+ }
6500
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6169
6501
  const payload = {};
6170
- if (typeof queries !== 'undefined') {
6171
- payload['queries'] = queries;
6502
+ if (typeof required !== 'undefined') {
6503
+ payload['required'] = required;
6172
6504
  }
6173
- if (typeof transactionId !== 'undefined') {
6174
- payload['transactionId'] = transactionId;
6505
+ if (typeof xdefault !== 'undefined') {
6506
+ payload['default'] = xdefault;
6175
6507
  }
6176
- if (typeof total !== 'undefined') {
6177
- payload['total'] = total;
6508
+ if (typeof newKey !== 'undefined') {
6509
+ payload['newKey'] = newKey;
6178
6510
  }
6179
6511
  const uri = new URL(this.client.config.endpoint + apiPath);
6180
- const apiHeaders = {};
6181
- return this.client.call('get', uri, apiHeaders, payload);
6512
+ const apiHeaders = {
6513
+ 'content-type': 'application/json',
6514
+ };
6515
+ return this.client.call('patch', uri, apiHeaders, payload);
6182
6516
  }
6183
- createDocument(paramsOrFirst, ...rest) {
6517
+ createVarcharAttribute(paramsOrFirst, ...rest) {
6184
6518
  let params;
6185
6519
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6186
6520
  params = (paramsOrFirst || {});
@@ -6189,43 +6523,51 @@ class Databases {
6189
6523
  params = {
6190
6524
  databaseId: paramsOrFirst,
6191
6525
  collectionId: rest[0],
6192
- documentId: rest[1],
6193
- data: rest[2],
6194
- permissions: rest[3],
6195
- transactionId: rest[4]
6526
+ key: rest[1],
6527
+ size: rest[2],
6528
+ required: rest[3],
6529
+ xdefault: rest[4],
6530
+ array: rest[5]
6196
6531
  };
6197
6532
  }
6198
6533
  const databaseId = params.databaseId;
6199
6534
  const collectionId = params.collectionId;
6200
- const documentId = params.documentId;
6201
- const data = params.data;
6202
- const permissions = params.permissions;
6203
- const transactionId = params.transactionId;
6535
+ const key = params.key;
6536
+ const size = params.size;
6537
+ const required = params.required;
6538
+ const xdefault = params.xdefault;
6539
+ const array = params.array;
6204
6540
  if (typeof databaseId === 'undefined') {
6205
6541
  throw new AppwriteException('Missing required parameter: "databaseId"');
6206
6542
  }
6207
6543
  if (typeof collectionId === 'undefined') {
6208
6544
  throw new AppwriteException('Missing required parameter: "collectionId"');
6209
6545
  }
6210
- if (typeof documentId === 'undefined') {
6211
- throw new AppwriteException('Missing required parameter: "documentId"');
6546
+ if (typeof key === 'undefined') {
6547
+ throw new AppwriteException('Missing required parameter: "key"');
6212
6548
  }
6213
- if (typeof data === 'undefined') {
6214
- throw new AppwriteException('Missing required parameter: "data"');
6549
+ if (typeof size === 'undefined') {
6550
+ throw new AppwriteException('Missing required parameter: "size"');
6215
6551
  }
6216
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6552
+ if (typeof required === 'undefined') {
6553
+ throw new AppwriteException('Missing required parameter: "required"');
6554
+ }
6555
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6217
6556
  const payload = {};
6218
- if (typeof documentId !== 'undefined') {
6219
- payload['documentId'] = documentId;
6557
+ if (typeof key !== 'undefined') {
6558
+ payload['key'] = key;
6220
6559
  }
6221
- if (typeof data !== 'undefined') {
6222
- payload['data'] = data;
6560
+ if (typeof size !== 'undefined') {
6561
+ payload['size'] = size;
6223
6562
  }
6224
- if (typeof permissions !== 'undefined') {
6225
- payload['permissions'] = permissions;
6563
+ if (typeof required !== 'undefined') {
6564
+ payload['required'] = required;
6226
6565
  }
6227
- if (typeof transactionId !== 'undefined') {
6228
- payload['transactionId'] = transactionId;
6566
+ if (typeof xdefault !== 'undefined') {
6567
+ payload['default'] = xdefault;
6568
+ }
6569
+ if (typeof array !== 'undefined') {
6570
+ payload['array'] = array;
6229
6571
  }
6230
6572
  const uri = new URL(this.client.config.endpoint + apiPath);
6231
6573
  const apiHeaders = {
@@ -6233,7 +6575,7 @@ class Databases {
6233
6575
  };
6234
6576
  return this.client.call('post', uri, apiHeaders, payload);
6235
6577
  }
6236
- createDocuments(paramsOrFirst, ...rest) {
6578
+ updateVarcharAttribute(paramsOrFirst, ...rest) {
6237
6579
  let params;
6238
6580
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6239
6581
  params = (paramsOrFirst || {});
@@ -6242,38 +6584,56 @@ class Databases {
6242
6584
  params = {
6243
6585
  databaseId: paramsOrFirst,
6244
6586
  collectionId: rest[0],
6245
- documents: rest[1],
6246
- transactionId: rest[2]
6587
+ key: rest[1],
6588
+ required: rest[2],
6589
+ xdefault: rest[3],
6590
+ size: rest[4],
6591
+ newKey: rest[5]
6247
6592
  };
6248
6593
  }
6249
6594
  const databaseId = params.databaseId;
6250
6595
  const collectionId = params.collectionId;
6251
- const documents = params.documents;
6252
- const transactionId = params.transactionId;
6596
+ const key = params.key;
6597
+ const required = params.required;
6598
+ const xdefault = params.xdefault;
6599
+ const size = params.size;
6600
+ const newKey = params.newKey;
6253
6601
  if (typeof databaseId === 'undefined') {
6254
6602
  throw new AppwriteException('Missing required parameter: "databaseId"');
6255
6603
  }
6256
6604
  if (typeof collectionId === 'undefined') {
6257
6605
  throw new AppwriteException('Missing required parameter: "collectionId"');
6258
6606
  }
6259
- if (typeof documents === 'undefined') {
6260
- throw new AppwriteException('Missing required parameter: "documents"');
6607
+ if (typeof key === 'undefined') {
6608
+ throw new AppwriteException('Missing required parameter: "key"');
6261
6609
  }
6262
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6610
+ if (typeof required === 'undefined') {
6611
+ throw new AppwriteException('Missing required parameter: "required"');
6612
+ }
6613
+ if (typeof xdefault === 'undefined') {
6614
+ throw new AppwriteException('Missing required parameter: "xdefault"');
6615
+ }
6616
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6263
6617
  const payload = {};
6264
- if (typeof documents !== 'undefined') {
6265
- payload['documents'] = documents;
6618
+ if (typeof required !== 'undefined') {
6619
+ payload['required'] = required;
6266
6620
  }
6267
- if (typeof transactionId !== 'undefined') {
6268
- payload['transactionId'] = transactionId;
6621
+ if (typeof xdefault !== 'undefined') {
6622
+ payload['default'] = xdefault;
6623
+ }
6624
+ if (typeof size !== 'undefined') {
6625
+ payload['size'] = size;
6626
+ }
6627
+ if (typeof newKey !== 'undefined') {
6628
+ payload['newKey'] = newKey;
6269
6629
  }
6270
6630
  const uri = new URL(this.client.config.endpoint + apiPath);
6271
6631
  const apiHeaders = {
6272
6632
  'content-type': 'application/json',
6273
6633
  };
6274
- return this.client.call('post', uri, apiHeaders, payload);
6634
+ return this.client.call('patch', uri, apiHeaders, payload);
6275
6635
  }
6276
- upsertDocuments(paramsOrFirst, ...rest) {
6636
+ getAttribute(paramsOrFirst, ...rest) {
6277
6637
  let params;
6278
6638
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6279
6639
  params = (paramsOrFirst || {});
@@ -6282,38 +6642,28 @@ class Databases {
6282
6642
  params = {
6283
6643
  databaseId: paramsOrFirst,
6284
6644
  collectionId: rest[0],
6285
- documents: rest[1],
6286
- transactionId: rest[2]
6645
+ key: rest[1]
6287
6646
  };
6288
6647
  }
6289
6648
  const databaseId = params.databaseId;
6290
6649
  const collectionId = params.collectionId;
6291
- const documents = params.documents;
6292
- const transactionId = params.transactionId;
6650
+ const key = params.key;
6293
6651
  if (typeof databaseId === 'undefined') {
6294
6652
  throw new AppwriteException('Missing required parameter: "databaseId"');
6295
6653
  }
6296
6654
  if (typeof collectionId === 'undefined') {
6297
6655
  throw new AppwriteException('Missing required parameter: "collectionId"');
6298
6656
  }
6299
- if (typeof documents === 'undefined') {
6300
- throw new AppwriteException('Missing required parameter: "documents"');
6657
+ if (typeof key === 'undefined') {
6658
+ throw new AppwriteException('Missing required parameter: "key"');
6301
6659
  }
6302
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6660
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6303
6661
  const payload = {};
6304
- if (typeof documents !== 'undefined') {
6305
- payload['documents'] = documents;
6306
- }
6307
- if (typeof transactionId !== 'undefined') {
6308
- payload['transactionId'] = transactionId;
6309
- }
6310
6662
  const uri = new URL(this.client.config.endpoint + apiPath);
6311
- const apiHeaders = {
6312
- 'content-type': 'application/json',
6313
- };
6314
- return this.client.call('put', uri, apiHeaders, payload);
6663
+ const apiHeaders = {};
6664
+ return this.client.call('get', uri, apiHeaders, payload);
6315
6665
  }
6316
- updateDocuments(paramsOrFirst, ...rest) {
6666
+ deleteAttribute(paramsOrFirst, ...rest) {
6317
6667
  let params;
6318
6668
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6319
6669
  params = (paramsOrFirst || {});
@@ -6322,40 +6672,30 @@ class Databases {
6322
6672
  params = {
6323
6673
  databaseId: paramsOrFirst,
6324
6674
  collectionId: rest[0],
6325
- data: rest[1],
6326
- queries: rest[2],
6327
- transactionId: rest[3]
6675
+ key: rest[1]
6328
6676
  };
6329
6677
  }
6330
6678
  const databaseId = params.databaseId;
6331
6679
  const collectionId = params.collectionId;
6332
- const data = params.data;
6333
- const queries = params.queries;
6334
- const transactionId = params.transactionId;
6680
+ const key = params.key;
6335
6681
  if (typeof databaseId === 'undefined') {
6336
6682
  throw new AppwriteException('Missing required parameter: "databaseId"');
6337
6683
  }
6338
6684
  if (typeof collectionId === 'undefined') {
6339
6685
  throw new AppwriteException('Missing required parameter: "collectionId"');
6340
6686
  }
6341
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6342
- const payload = {};
6343
- if (typeof data !== 'undefined') {
6344
- payload['data'] = data;
6345
- }
6346
- if (typeof queries !== 'undefined') {
6347
- payload['queries'] = queries;
6348
- }
6349
- if (typeof transactionId !== 'undefined') {
6350
- payload['transactionId'] = transactionId;
6687
+ if (typeof key === 'undefined') {
6688
+ throw new AppwriteException('Missing required parameter: "key"');
6351
6689
  }
6690
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6691
+ const payload = {};
6352
6692
  const uri = new URL(this.client.config.endpoint + apiPath);
6353
6693
  const apiHeaders = {
6354
6694
  'content-type': 'application/json',
6355
6695
  };
6356
- return this.client.call('patch', uri, apiHeaders, payload);
6696
+ return this.client.call('delete', uri, apiHeaders, payload);
6357
6697
  }
6358
- deleteDocuments(paramsOrFirst, ...rest) {
6698
+ updateRelationshipAttribute(paramsOrFirst, ...rest) {
6359
6699
  let params;
6360
6700
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6361
6701
  params = (paramsOrFirst || {});
@@ -6364,35 +6704,40 @@ class Databases {
6364
6704
  params = {
6365
6705
  databaseId: paramsOrFirst,
6366
6706
  collectionId: rest[0],
6367
- queries: rest[1],
6368
- transactionId: rest[2]
6707
+ key: rest[1],
6708
+ onDelete: rest[2],
6709
+ newKey: rest[3]
6369
6710
  };
6370
6711
  }
6371
6712
  const databaseId = params.databaseId;
6372
6713
  const collectionId = params.collectionId;
6373
- const queries = params.queries;
6374
- const transactionId = params.transactionId;
6714
+ const key = params.key;
6715
+ const onDelete = params.onDelete;
6716
+ const newKey = params.newKey;
6375
6717
  if (typeof databaseId === 'undefined') {
6376
6718
  throw new AppwriteException('Missing required parameter: "databaseId"');
6377
6719
  }
6378
6720
  if (typeof collectionId === 'undefined') {
6379
6721
  throw new AppwriteException('Missing required parameter: "collectionId"');
6380
6722
  }
6381
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6723
+ if (typeof key === 'undefined') {
6724
+ throw new AppwriteException('Missing required parameter: "key"');
6725
+ }
6726
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6382
6727
  const payload = {};
6383
- if (typeof queries !== 'undefined') {
6384
- payload['queries'] = queries;
6728
+ if (typeof onDelete !== 'undefined') {
6729
+ payload['onDelete'] = onDelete;
6385
6730
  }
6386
- if (typeof transactionId !== 'undefined') {
6387
- payload['transactionId'] = transactionId;
6731
+ if (typeof newKey !== 'undefined') {
6732
+ payload['newKey'] = newKey;
6388
6733
  }
6389
6734
  const uri = new URL(this.client.config.endpoint + apiPath);
6390
6735
  const apiHeaders = {
6391
6736
  'content-type': 'application/json',
6392
6737
  };
6393
- return this.client.call('delete', uri, apiHeaders, payload);
6738
+ return this.client.call('patch', uri, apiHeaders, payload);
6394
6739
  }
6395
- getDocument(paramsOrFirst, ...rest) {
6740
+ listDocuments(paramsOrFirst, ...rest) {
6396
6741
  let params;
6397
6742
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6398
6743
  params = (paramsOrFirst || {});
@@ -6401,26 +6746,23 @@ class Databases {
6401
6746
  params = {
6402
6747
  databaseId: paramsOrFirst,
6403
6748
  collectionId: rest[0],
6404
- documentId: rest[1],
6405
- queries: rest[2],
6406
- transactionId: rest[3]
6749
+ queries: rest[1],
6750
+ transactionId: rest[2],
6751
+ total: rest[3]
6407
6752
  };
6408
6753
  }
6409
6754
  const databaseId = params.databaseId;
6410
6755
  const collectionId = params.collectionId;
6411
- const documentId = params.documentId;
6412
6756
  const queries = params.queries;
6413
6757
  const transactionId = params.transactionId;
6758
+ const total = params.total;
6414
6759
  if (typeof databaseId === 'undefined') {
6415
6760
  throw new AppwriteException('Missing required parameter: "databaseId"');
6416
6761
  }
6417
6762
  if (typeof collectionId === 'undefined') {
6418
6763
  throw new AppwriteException('Missing required parameter: "collectionId"');
6419
6764
  }
6420
- if (typeof documentId === 'undefined') {
6421
- throw new AppwriteException('Missing required parameter: "documentId"');
6422
- }
6423
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
6765
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6424
6766
  const payload = {};
6425
6767
  if (typeof queries !== 'undefined') {
6426
6768
  payload['queries'] = queries;
@@ -6428,11 +6770,266 @@ class Databases {
6428
6770
  if (typeof transactionId !== 'undefined') {
6429
6771
  payload['transactionId'] = transactionId;
6430
6772
  }
6773
+ if (typeof total !== 'undefined') {
6774
+ payload['total'] = total;
6775
+ }
6431
6776
  const uri = new URL(this.client.config.endpoint + apiPath);
6432
6777
  const apiHeaders = {};
6433
6778
  return this.client.call('get', uri, apiHeaders, payload);
6434
6779
  }
6435
- upsertDocument(paramsOrFirst, ...rest) {
6780
+ createDocument(paramsOrFirst, ...rest) {
6781
+ let params;
6782
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6783
+ params = (paramsOrFirst || {});
6784
+ }
6785
+ else {
6786
+ params = {
6787
+ databaseId: paramsOrFirst,
6788
+ collectionId: rest[0],
6789
+ documentId: rest[1],
6790
+ data: rest[2],
6791
+ permissions: rest[3],
6792
+ transactionId: rest[4]
6793
+ };
6794
+ }
6795
+ const databaseId = params.databaseId;
6796
+ const collectionId = params.collectionId;
6797
+ const documentId = params.documentId;
6798
+ const data = params.data;
6799
+ const permissions = params.permissions;
6800
+ const transactionId = params.transactionId;
6801
+ if (typeof databaseId === 'undefined') {
6802
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6803
+ }
6804
+ if (typeof collectionId === 'undefined') {
6805
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6806
+ }
6807
+ if (typeof documentId === 'undefined') {
6808
+ throw new AppwriteException('Missing required parameter: "documentId"');
6809
+ }
6810
+ if (typeof data === 'undefined') {
6811
+ throw new AppwriteException('Missing required parameter: "data"');
6812
+ }
6813
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6814
+ const payload = {};
6815
+ if (typeof documentId !== 'undefined') {
6816
+ payload['documentId'] = documentId;
6817
+ }
6818
+ if (typeof data !== 'undefined') {
6819
+ payload['data'] = data;
6820
+ }
6821
+ if (typeof permissions !== 'undefined') {
6822
+ payload['permissions'] = permissions;
6823
+ }
6824
+ if (typeof transactionId !== 'undefined') {
6825
+ payload['transactionId'] = transactionId;
6826
+ }
6827
+ const uri = new URL(this.client.config.endpoint + apiPath);
6828
+ const apiHeaders = {
6829
+ 'content-type': 'application/json',
6830
+ };
6831
+ return this.client.call('post', uri, apiHeaders, payload);
6832
+ }
6833
+ createDocuments(paramsOrFirst, ...rest) {
6834
+ let params;
6835
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6836
+ params = (paramsOrFirst || {});
6837
+ }
6838
+ else {
6839
+ params = {
6840
+ databaseId: paramsOrFirst,
6841
+ collectionId: rest[0],
6842
+ documents: rest[1],
6843
+ transactionId: rest[2]
6844
+ };
6845
+ }
6846
+ const databaseId = params.databaseId;
6847
+ const collectionId = params.collectionId;
6848
+ const documents = params.documents;
6849
+ const transactionId = params.transactionId;
6850
+ if (typeof databaseId === 'undefined') {
6851
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6852
+ }
6853
+ if (typeof collectionId === 'undefined') {
6854
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6855
+ }
6856
+ if (typeof documents === 'undefined') {
6857
+ throw new AppwriteException('Missing required parameter: "documents"');
6858
+ }
6859
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6860
+ const payload = {};
6861
+ if (typeof documents !== 'undefined') {
6862
+ payload['documents'] = documents;
6863
+ }
6864
+ if (typeof transactionId !== 'undefined') {
6865
+ payload['transactionId'] = transactionId;
6866
+ }
6867
+ const uri = new URL(this.client.config.endpoint + apiPath);
6868
+ const apiHeaders = {
6869
+ 'content-type': 'application/json',
6870
+ };
6871
+ return this.client.call('post', uri, apiHeaders, payload);
6872
+ }
6873
+ upsertDocuments(paramsOrFirst, ...rest) {
6874
+ let params;
6875
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6876
+ params = (paramsOrFirst || {});
6877
+ }
6878
+ else {
6879
+ params = {
6880
+ databaseId: paramsOrFirst,
6881
+ collectionId: rest[0],
6882
+ documents: rest[1],
6883
+ transactionId: rest[2]
6884
+ };
6885
+ }
6886
+ const databaseId = params.databaseId;
6887
+ const collectionId = params.collectionId;
6888
+ const documents = params.documents;
6889
+ const transactionId = params.transactionId;
6890
+ if (typeof databaseId === 'undefined') {
6891
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6892
+ }
6893
+ if (typeof collectionId === 'undefined') {
6894
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6895
+ }
6896
+ if (typeof documents === 'undefined') {
6897
+ throw new AppwriteException('Missing required parameter: "documents"');
6898
+ }
6899
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6900
+ const payload = {};
6901
+ if (typeof documents !== 'undefined') {
6902
+ payload['documents'] = documents;
6903
+ }
6904
+ if (typeof transactionId !== 'undefined') {
6905
+ payload['transactionId'] = transactionId;
6906
+ }
6907
+ const uri = new URL(this.client.config.endpoint + apiPath);
6908
+ const apiHeaders = {
6909
+ 'content-type': 'application/json',
6910
+ };
6911
+ return this.client.call('put', uri, apiHeaders, payload);
6912
+ }
6913
+ updateDocuments(paramsOrFirst, ...rest) {
6914
+ let params;
6915
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6916
+ params = (paramsOrFirst || {});
6917
+ }
6918
+ else {
6919
+ params = {
6920
+ databaseId: paramsOrFirst,
6921
+ collectionId: rest[0],
6922
+ data: rest[1],
6923
+ queries: rest[2],
6924
+ transactionId: rest[3]
6925
+ };
6926
+ }
6927
+ const databaseId = params.databaseId;
6928
+ const collectionId = params.collectionId;
6929
+ const data = params.data;
6930
+ const queries = params.queries;
6931
+ const transactionId = params.transactionId;
6932
+ if (typeof databaseId === 'undefined') {
6933
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6934
+ }
6935
+ if (typeof collectionId === 'undefined') {
6936
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6937
+ }
6938
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6939
+ const payload = {};
6940
+ if (typeof data !== 'undefined') {
6941
+ payload['data'] = data;
6942
+ }
6943
+ if (typeof queries !== 'undefined') {
6944
+ payload['queries'] = queries;
6945
+ }
6946
+ if (typeof transactionId !== 'undefined') {
6947
+ payload['transactionId'] = transactionId;
6948
+ }
6949
+ const uri = new URL(this.client.config.endpoint + apiPath);
6950
+ const apiHeaders = {
6951
+ 'content-type': 'application/json',
6952
+ };
6953
+ return this.client.call('patch', uri, apiHeaders, payload);
6954
+ }
6955
+ deleteDocuments(paramsOrFirst, ...rest) {
6956
+ let params;
6957
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6958
+ params = (paramsOrFirst || {});
6959
+ }
6960
+ else {
6961
+ params = {
6962
+ databaseId: paramsOrFirst,
6963
+ collectionId: rest[0],
6964
+ queries: rest[1],
6965
+ transactionId: rest[2]
6966
+ };
6967
+ }
6968
+ const databaseId = params.databaseId;
6969
+ const collectionId = params.collectionId;
6970
+ const queries = params.queries;
6971
+ const transactionId = params.transactionId;
6972
+ if (typeof databaseId === 'undefined') {
6973
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6974
+ }
6975
+ if (typeof collectionId === 'undefined') {
6976
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6977
+ }
6978
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6979
+ const payload = {};
6980
+ if (typeof queries !== 'undefined') {
6981
+ payload['queries'] = queries;
6982
+ }
6983
+ if (typeof transactionId !== 'undefined') {
6984
+ payload['transactionId'] = transactionId;
6985
+ }
6986
+ const uri = new URL(this.client.config.endpoint + apiPath);
6987
+ const apiHeaders = {
6988
+ 'content-type': 'application/json',
6989
+ };
6990
+ return this.client.call('delete', uri, apiHeaders, payload);
6991
+ }
6992
+ getDocument(paramsOrFirst, ...rest) {
6993
+ let params;
6994
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6995
+ params = (paramsOrFirst || {});
6996
+ }
6997
+ else {
6998
+ params = {
6999
+ databaseId: paramsOrFirst,
7000
+ collectionId: rest[0],
7001
+ documentId: rest[1],
7002
+ queries: rest[2],
7003
+ transactionId: rest[3]
7004
+ };
7005
+ }
7006
+ const databaseId = params.databaseId;
7007
+ const collectionId = params.collectionId;
7008
+ const documentId = params.documentId;
7009
+ const queries = params.queries;
7010
+ const transactionId = params.transactionId;
7011
+ if (typeof databaseId === 'undefined') {
7012
+ throw new AppwriteException('Missing required parameter: "databaseId"');
7013
+ }
7014
+ if (typeof collectionId === 'undefined') {
7015
+ throw new AppwriteException('Missing required parameter: "collectionId"');
7016
+ }
7017
+ if (typeof documentId === 'undefined') {
7018
+ throw new AppwriteException('Missing required parameter: "documentId"');
7019
+ }
7020
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
7021
+ const payload = {};
7022
+ if (typeof queries !== 'undefined') {
7023
+ payload['queries'] = queries;
7024
+ }
7025
+ if (typeof transactionId !== 'undefined') {
7026
+ payload['transactionId'] = transactionId;
7027
+ }
7028
+ const uri = new URL(this.client.config.endpoint + apiPath);
7029
+ const apiHeaders = {};
7030
+ return this.client.call('get', uri, apiHeaders, payload);
7031
+ }
7032
+ upsertDocument(paramsOrFirst, ...rest) {
6436
7033
  let params;
6437
7034
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6438
7035
  params = (paramsOrFirst || {});
@@ -7034,16 +7631,49 @@ class Domains {
7034
7631
  };
7035
7632
  return this.client.call('post', uri, apiHeaders, payload);
7036
7633
  }
7037
- listSuggestions(paramsOrFirst, ...rest) {
7634
+ getPrice(paramsOrFirst, ...rest) {
7038
7635
  let params;
7039
7636
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
7040
7637
  params = (paramsOrFirst || {});
7041
7638
  }
7042
7639
  else {
7043
7640
  params = {
7044
- query: paramsOrFirst,
7045
- tlds: rest[0],
7046
- limit: rest[1],
7641
+ domain: paramsOrFirst,
7642
+ periodYears: rest[0],
7643
+ registrationType: rest[1]
7644
+ };
7645
+ }
7646
+ const domain = params.domain;
7647
+ const periodYears = params.periodYears;
7648
+ const registrationType = params.registrationType;
7649
+ if (typeof domain === 'undefined') {
7650
+ throw new AppwriteException('Missing required parameter: "domain"');
7651
+ }
7652
+ const apiPath = '/domains/price';
7653
+ const payload = {};
7654
+ if (typeof domain !== 'undefined') {
7655
+ payload['domain'] = domain;
7656
+ }
7657
+ if (typeof periodYears !== 'undefined') {
7658
+ payload['periodYears'] = periodYears;
7659
+ }
7660
+ if (typeof registrationType !== 'undefined') {
7661
+ payload['registrationType'] = registrationType;
7662
+ }
7663
+ const uri = new URL(this.client.config.endpoint + apiPath);
7664
+ const apiHeaders = {};
7665
+ return this.client.call('get', uri, apiHeaders, payload);
7666
+ }
7667
+ listSuggestions(paramsOrFirst, ...rest) {
7668
+ let params;
7669
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
7670
+ params = (paramsOrFirst || {});
7671
+ }
7672
+ else {
7673
+ params = {
7674
+ query: paramsOrFirst,
7675
+ tlds: rest[0],
7676
+ limit: rest[1],
7047
7677
  filterType: rest[2],
7048
7678
  priceMax: rest[3],
7049
7679
  priceMin: rest[4]
@@ -8866,7 +9496,7 @@ class Functions {
8866
9496
  }
8867
9497
  listTemplates(paramsOrFirst, ...rest) {
8868
9498
  let params;
8869
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9499
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('runtimes' in paramsOrFirst || 'useCases' in paramsOrFirst || 'limit' in paramsOrFirst || 'offset' in paramsOrFirst || 'total' in paramsOrFirst))) {
8870
9500
  params = (paramsOrFirst || {});
8871
9501
  }
8872
9502
  else {
@@ -8926,7 +9556,7 @@ class Functions {
8926
9556
  }
8927
9557
  listUsage(paramsOrFirst) {
8928
9558
  let params;
8929
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
9559
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
8930
9560
  params = (paramsOrFirst || {});
8931
9561
  }
8932
9562
  else {
@@ -9796,7 +10426,7 @@ class Graphql {
9796
10426
  }
9797
10427
  query(paramsOrFirst) {
9798
10428
  let params;
9799
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {
10429
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('query' in paramsOrFirst))) {
9800
10430
  params = (paramsOrFirst || {});
9801
10431
  }
9802
10432
  else {
@@ -9822,7 +10452,7 @@ class Graphql {
9822
10452
  }
9823
10453
  mutation(paramsOrFirst) {
9824
10454
  let params;
9825
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {
10455
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('query' in paramsOrFirst))) {
9826
10456
  params = (paramsOrFirst || {});
9827
10457
  }
9828
10458
  else {
@@ -10104,7 +10734,7 @@ class Health {
10104
10734
  }
10105
10735
  getFailedJobs(paramsOrFirst, ...rest) {
10106
10736
  let params;
10107
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'name' in paramsOrFirst)) {
10737
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('name' in paramsOrFirst || 'threshold' in paramsOrFirst))) {
10108
10738
  params = (paramsOrFirst || {});
10109
10739
  }
10110
10740
  else {
@@ -13339,7 +13969,7 @@ class Migrations {
13339
13969
  }
13340
13970
  createAppwriteMigration(paramsOrFirst, ...rest) {
13341
13971
  let params;
13342
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
13972
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'endpoint' in paramsOrFirst || 'projectId' in paramsOrFirst || 'apiKey' in paramsOrFirst))) {
13343
13973
  params = (paramsOrFirst || {});
13344
13974
  }
13345
13975
  else {
@@ -13388,7 +14018,7 @@ class Migrations {
13388
14018
  }
13389
14019
  getAppwriteReport(paramsOrFirst, ...rest) {
13390
14020
  let params;
13391
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14021
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'endpoint' in paramsOrFirst || 'projectID' in paramsOrFirst || 'key' in paramsOrFirst))) {
13392
14022
  params = (paramsOrFirst || {});
13393
14023
  }
13394
14024
  else {
@@ -13549,7 +14179,7 @@ class Migrations {
13549
14179
  }
13550
14180
  createFirebaseMigration(paramsOrFirst, ...rest) {
13551
14181
  let params;
13552
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14182
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'serviceAccount' in paramsOrFirst))) {
13553
14183
  params = (paramsOrFirst || {});
13554
14184
  }
13555
14185
  else {
@@ -13582,7 +14212,7 @@ class Migrations {
13582
14212
  }
13583
14213
  getFirebaseReport(paramsOrFirst, ...rest) {
13584
14214
  let params;
13585
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14215
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'serviceAccount' in paramsOrFirst))) {
13586
14216
  params = (paramsOrFirst || {});
13587
14217
  }
13588
14218
  else {
@@ -13613,7 +14243,7 @@ class Migrations {
13613
14243
  }
13614
14244
  createNHostMigration(paramsOrFirst, ...rest) {
13615
14245
  let params;
13616
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14246
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'subdomain' in paramsOrFirst || 'region' in paramsOrFirst || 'adminSecret' in paramsOrFirst || 'database' in paramsOrFirst || 'username' in paramsOrFirst || 'password' in paramsOrFirst || 'port' in paramsOrFirst))) {
13617
14247
  params = (paramsOrFirst || {});
13618
14248
  }
13619
14249
  else {
@@ -13691,7 +14321,7 @@ class Migrations {
13691
14321
  }
13692
14322
  getNHostReport(paramsOrFirst, ...rest) {
13693
14323
  let params;
13694
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14324
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'subdomain' in paramsOrFirst || 'region' in paramsOrFirst || 'adminSecret' in paramsOrFirst || 'database' in paramsOrFirst || 'username' in paramsOrFirst || 'password' in paramsOrFirst || 'port' in paramsOrFirst))) {
13695
14325
  params = (paramsOrFirst || {});
13696
14326
  }
13697
14327
  else {
@@ -13767,7 +14397,7 @@ class Migrations {
13767
14397
  }
13768
14398
  createSupabaseMigration(paramsOrFirst, ...rest) {
13769
14399
  let params;
13770
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14400
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'endpoint' in paramsOrFirst || 'apiKey' in paramsOrFirst || 'databaseHost' in paramsOrFirst || 'username' in paramsOrFirst || 'password' in paramsOrFirst || 'port' in paramsOrFirst))) {
13771
14401
  params = (paramsOrFirst || {});
13772
14402
  }
13773
14403
  else {
@@ -13837,7 +14467,7 @@ class Migrations {
13837
14467
  }
13838
14468
  getSupabaseReport(paramsOrFirst, ...rest) {
13839
14469
  let params;
13840
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14470
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'endpoint' in paramsOrFirst || 'apiKey' in paramsOrFirst || 'databaseHost' in paramsOrFirst || 'username' in paramsOrFirst || 'password' in paramsOrFirst || 'port' in paramsOrFirst))) {
13841
14471
  params = (paramsOrFirst || {});
13842
14472
  }
13843
14473
  else {
@@ -14076,7 +14706,7 @@ class Organizations {
14076
14706
  }
14077
14707
  estimationCreateOrganization(paramsOrFirst, ...rest) {
14078
14708
  let params;
14079
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'billingPlan' in paramsOrFirst)) {
14709
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14080
14710
  params = (paramsOrFirst || {});
14081
14711
  }
14082
14712
  else {
@@ -14721,6 +15351,174 @@ class Organizations {
14721
15351
  const apiHeaders = {};
14722
15352
  return this.client.call('get', uri, apiHeaders, payload);
14723
15353
  }
15354
+ listKeys(paramsOrFirst, ...rest) {
15355
+ let params;
15356
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15357
+ params = (paramsOrFirst || {});
15358
+ }
15359
+ else {
15360
+ params = {
15361
+ organizationId: paramsOrFirst,
15362
+ total: rest[0]
15363
+ };
15364
+ }
15365
+ const organizationId = params.organizationId;
15366
+ const total = params.total;
15367
+ if (typeof organizationId === 'undefined') {
15368
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15369
+ }
15370
+ const apiPath = '/organizations/{organizationId}/keys'.replace('{organizationId}', organizationId);
15371
+ const payload = {};
15372
+ if (typeof total !== 'undefined') {
15373
+ payload['total'] = total;
15374
+ }
15375
+ const uri = new URL(this.client.config.endpoint + apiPath);
15376
+ const apiHeaders = {};
15377
+ return this.client.call('get', uri, apiHeaders, payload);
15378
+ }
15379
+ createKey(paramsOrFirst, ...rest) {
15380
+ let params;
15381
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15382
+ params = (paramsOrFirst || {});
15383
+ }
15384
+ else {
15385
+ params = {
15386
+ organizationId: paramsOrFirst,
15387
+ name: rest[0],
15388
+ scopes: rest[1],
15389
+ expire: rest[2]
15390
+ };
15391
+ }
15392
+ const organizationId = params.organizationId;
15393
+ const name = params.name;
15394
+ const scopes = params.scopes;
15395
+ const expire = params.expire;
15396
+ if (typeof organizationId === 'undefined') {
15397
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15398
+ }
15399
+ if (typeof name === 'undefined') {
15400
+ throw new AppwriteException('Missing required parameter: "name"');
15401
+ }
15402
+ if (typeof scopes === 'undefined') {
15403
+ throw new AppwriteException('Missing required parameter: "scopes"');
15404
+ }
15405
+ const apiPath = '/organizations/{organizationId}/keys'.replace('{organizationId}', organizationId);
15406
+ const payload = {};
15407
+ if (typeof name !== 'undefined') {
15408
+ payload['name'] = name;
15409
+ }
15410
+ if (typeof scopes !== 'undefined') {
15411
+ payload['scopes'] = scopes;
15412
+ }
15413
+ if (typeof expire !== 'undefined') {
15414
+ payload['expire'] = expire;
15415
+ }
15416
+ const uri = new URL(this.client.config.endpoint + apiPath);
15417
+ const apiHeaders = {
15418
+ 'content-type': 'application/json',
15419
+ };
15420
+ return this.client.call('post', uri, apiHeaders, payload);
15421
+ }
15422
+ getKey(paramsOrFirst, ...rest) {
15423
+ let params;
15424
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15425
+ params = (paramsOrFirst || {});
15426
+ }
15427
+ else {
15428
+ params = {
15429
+ organizationId: paramsOrFirst,
15430
+ keyId: rest[0]
15431
+ };
15432
+ }
15433
+ const organizationId = params.organizationId;
15434
+ const keyId = params.keyId;
15435
+ if (typeof organizationId === 'undefined') {
15436
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15437
+ }
15438
+ if (typeof keyId === 'undefined') {
15439
+ throw new AppwriteException('Missing required parameter: "keyId"');
15440
+ }
15441
+ const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
15442
+ const payload = {};
15443
+ const uri = new URL(this.client.config.endpoint + apiPath);
15444
+ const apiHeaders = {};
15445
+ return this.client.call('get', uri, apiHeaders, payload);
15446
+ }
15447
+ updateKey(paramsOrFirst, ...rest) {
15448
+ let params;
15449
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15450
+ params = (paramsOrFirst || {});
15451
+ }
15452
+ else {
15453
+ params = {
15454
+ organizationId: paramsOrFirst,
15455
+ keyId: rest[0],
15456
+ name: rest[1],
15457
+ scopes: rest[2],
15458
+ expire: rest[3]
15459
+ };
15460
+ }
15461
+ const organizationId = params.organizationId;
15462
+ const keyId = params.keyId;
15463
+ const name = params.name;
15464
+ const scopes = params.scopes;
15465
+ const expire = params.expire;
15466
+ if (typeof organizationId === 'undefined') {
15467
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15468
+ }
15469
+ if (typeof keyId === 'undefined') {
15470
+ throw new AppwriteException('Missing required parameter: "keyId"');
15471
+ }
15472
+ if (typeof name === 'undefined') {
15473
+ throw new AppwriteException('Missing required parameter: "name"');
15474
+ }
15475
+ if (typeof scopes === 'undefined') {
15476
+ throw new AppwriteException('Missing required parameter: "scopes"');
15477
+ }
15478
+ const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
15479
+ const payload = {};
15480
+ if (typeof name !== 'undefined') {
15481
+ payload['name'] = name;
15482
+ }
15483
+ if (typeof scopes !== 'undefined') {
15484
+ payload['scopes'] = scopes;
15485
+ }
15486
+ if (typeof expire !== 'undefined') {
15487
+ payload['expire'] = expire;
15488
+ }
15489
+ const uri = new URL(this.client.config.endpoint + apiPath);
15490
+ const apiHeaders = {
15491
+ 'content-type': 'application/json',
15492
+ };
15493
+ return this.client.call('put', uri, apiHeaders, payload);
15494
+ }
15495
+ deleteKey(paramsOrFirst, ...rest) {
15496
+ let params;
15497
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15498
+ params = (paramsOrFirst || {});
15499
+ }
15500
+ else {
15501
+ params = {
15502
+ organizationId: paramsOrFirst,
15503
+ keyId: rest[0]
15504
+ };
15505
+ }
15506
+ const organizationId = params.organizationId;
15507
+ const keyId = params.keyId;
15508
+ if (typeof organizationId === 'undefined') {
15509
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15510
+ }
15511
+ if (typeof keyId === 'undefined') {
15512
+ throw new AppwriteException('Missing required parameter: "keyId"');
15513
+ }
15514
+ const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
15515
+ const payload = {};
15516
+ const uri = new URL(this.client.config.endpoint + apiPath);
15517
+ const apiHeaders = {
15518
+ 'content-type': 'application/json',
15519
+ };
15520
+ return this.client.call('delete', uri, apiHeaders, payload);
15521
+ }
14724
15522
  setDefaultPaymentMethod(paramsOrFirst, ...rest) {
14725
15523
  let params;
14726
15524
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -14952,32 +15750,25 @@ class Organizations {
14952
15750
  };
14953
15751
  return this.client.call('patch', uri, apiHeaders, payload);
14954
15752
  }
14955
- updateProjects(paramsOrFirst, ...rest) {
15753
+ listRegions(paramsOrFirst) {
14956
15754
  let params;
14957
15755
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14958
15756
  params = (paramsOrFirst || {});
14959
15757
  }
14960
15758
  else {
14961
15759
  params = {
14962
- organizationId: paramsOrFirst,
14963
- projects: rest[0]
15760
+ organizationId: paramsOrFirst
14964
15761
  };
14965
15762
  }
14966
15763
  const organizationId = params.organizationId;
14967
- const projects = params.projects;
14968
15764
  if (typeof organizationId === 'undefined') {
14969
15765
  throw new AppwriteException('Missing required parameter: "organizationId"');
14970
15766
  }
14971
- const apiPath = '/organizations/{organizationId}/projects'.replace('{organizationId}', organizationId);
15767
+ const apiPath = '/organizations/{organizationId}/regions'.replace('{organizationId}', organizationId);
14972
15768
  const payload = {};
14973
- if (typeof projects !== 'undefined') {
14974
- payload['projects'] = projects;
14975
- }
14976
15769
  const uri = new URL(this.client.config.endpoint + apiPath);
14977
- const apiHeaders = {
14978
- 'content-type': 'application/json',
14979
- };
14980
- return this.client.call('patch', uri, apiHeaders, payload);
15770
+ const apiHeaders = {};
15771
+ return this.client.call('get', uri, apiHeaders, payload);
14981
15772
  }
14982
15773
  getScopes(paramsOrFirst) {
14983
15774
  let params;
@@ -16193,16 +16984,21 @@ class Projects {
16193
16984
  else {
16194
16985
  params = {
16195
16986
  projectId: paramsOrFirst,
16196
- total: rest[0]
16987
+ queries: rest[0],
16988
+ total: rest[1]
16197
16989
  };
16198
16990
  }
16199
16991
  const projectId = params.projectId;
16992
+ const queries = params.queries;
16200
16993
  const total = params.total;
16201
16994
  if (typeof projectId === 'undefined') {
16202
16995
  throw new AppwriteException('Missing required parameter: "projectId"');
16203
16996
  }
16204
16997
  const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
16205
16998
  const payload = {};
16999
+ if (typeof queries !== 'undefined') {
17000
+ payload['queries'] = queries;
17001
+ }
16206
17002
  if (typeof total !== 'undefined') {
16207
17003
  payload['total'] = total;
16208
17004
  }
@@ -16220,12 +17016,14 @@ class Projects {
16220
17016
  projectId: paramsOrFirst,
16221
17017
  name: rest[0],
16222
17018
  scopes: rest[1],
16223
- expire: rest[2]
17019
+ keyId: rest[2],
17020
+ expire: rest[3]
16224
17021
  };
16225
17022
  }
16226
17023
  const projectId = params.projectId;
16227
17024
  const name = params.name;
16228
17025
  const scopes = params.scopes;
17026
+ const keyId = params.keyId;
16229
17027
  const expire = params.expire;
16230
17028
  if (typeof projectId === 'undefined') {
16231
17029
  throw new AppwriteException('Missing required parameter: "projectId"');
@@ -16238,6 +17036,9 @@ class Projects {
16238
17036
  }
16239
17037
  const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
16240
17038
  const payload = {};
17039
+ if (typeof keyId !== 'undefined') {
17040
+ payload['keyId'] = keyId;
17041
+ }
16241
17042
  if (typeof name !== 'undefined') {
16242
17043
  payload['name'] = name;
16243
17044
  }
@@ -16974,36 +17775,6 @@ class Projects {
16974
17775
  };
16975
17776
  return this.client.call('post', uri, apiHeaders, payload);
16976
17777
  }
16977
- updateStatus(paramsOrFirst, ...rest) {
16978
- let params;
16979
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16980
- params = (paramsOrFirst || {});
16981
- }
16982
- else {
16983
- params = {
16984
- projectId: paramsOrFirst,
16985
- status: rest[0]
16986
- };
16987
- }
16988
- const projectId = params.projectId;
16989
- const status = params.status;
16990
- if (typeof projectId === 'undefined') {
16991
- throw new AppwriteException('Missing required parameter: "projectId"');
16992
- }
16993
- if (typeof status === 'undefined') {
16994
- throw new AppwriteException('Missing required parameter: "status"');
16995
- }
16996
- const apiPath = '/projects/{projectId}/status'.replace('{projectId}', projectId);
16997
- const payload = {};
16998
- if (typeof status !== 'undefined') {
16999
- payload['status'] = status;
17000
- }
17001
- const uri = new URL(this.client.config.endpoint + apiPath);
17002
- const apiHeaders = {
17003
- 'content-type': 'application/json',
17004
- };
17005
- return this.client.call('patch', uri, apiHeaders, payload);
17006
- }
17007
17778
  updateTeam(paramsOrFirst, ...rest) {
17008
17779
  let params;
17009
17780
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -18051,7 +18822,7 @@ class Sites {
18051
18822
  }
18052
18823
  listTemplates(paramsOrFirst, ...rest) {
18053
18824
  let params;
18054
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18825
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('frameworks' in paramsOrFirst || 'useCases' in paramsOrFirst || 'limit' in paramsOrFirst || 'offset' in paramsOrFirst))) {
18055
18826
  params = (paramsOrFirst || {});
18056
18827
  }
18057
18828
  else {
@@ -18106,7 +18877,7 @@ class Sites {
18106
18877
  }
18107
18878
  listUsage(paramsOrFirst) {
18108
18879
  let params;
18109
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
18880
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
18110
18881
  params = (paramsOrFirst || {});
18111
18882
  }
18112
18883
  else {
@@ -19476,7 +20247,7 @@ class Storage {
19476
20247
  }
19477
20248
  getUsage(paramsOrFirst) {
19478
20249
  let params;
19479
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
20250
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
19480
20251
  params = (paramsOrFirst || {});
19481
20252
  }
19482
20253
  else {
@@ -19738,7 +20509,7 @@ class TablesDB {
19738
20509
  }
19739
20510
  listUsage(paramsOrFirst) {
19740
20511
  let params;
19741
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
20512
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
19742
20513
  params = (paramsOrFirst || {});
19743
20514
  }
19744
20515
  else {
@@ -19794,9 +20565,6 @@ class TablesDB {
19794
20565
  if (typeof databaseId === 'undefined') {
19795
20566
  throw new AppwriteException('Missing required parameter: "databaseId"');
19796
20567
  }
19797
- if (typeof name === 'undefined') {
19798
- throw new AppwriteException('Missing required parameter: "name"');
19799
- }
19800
20568
  const apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', databaseId);
19801
20569
  const payload = {};
19802
20570
  if (typeof name !== 'undefined') {
@@ -19983,9 +20751,6 @@ class TablesDB {
19983
20751
  if (typeof tableId === 'undefined') {
19984
20752
  throw new AppwriteException('Missing required parameter: "tableId"');
19985
20753
  }
19986
- if (typeof name === 'undefined') {
19987
- throw new AppwriteException('Missing required parameter: "name"');
19988
- }
19989
20754
  const apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
19990
20755
  const payload = {};
19991
20756
  if (typeof name !== 'undefined') {
@@ -20068,7 +20833,447 @@ class TablesDB {
20068
20833
  const apiHeaders = {};
20069
20834
  return this.client.call('get', uri, apiHeaders, payload);
20070
20835
  }
20071
- createBooleanColumn(paramsOrFirst, ...rest) {
20836
+ createBooleanColumn(paramsOrFirst, ...rest) {
20837
+ let params;
20838
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20839
+ params = (paramsOrFirst || {});
20840
+ }
20841
+ else {
20842
+ params = {
20843
+ databaseId: paramsOrFirst,
20844
+ tableId: rest[0],
20845
+ key: rest[1],
20846
+ required: rest[2],
20847
+ xdefault: rest[3],
20848
+ array: rest[4]
20849
+ };
20850
+ }
20851
+ const databaseId = params.databaseId;
20852
+ const tableId = params.tableId;
20853
+ const key = params.key;
20854
+ const required = params.required;
20855
+ const xdefault = params.xdefault;
20856
+ const array = params.array;
20857
+ if (typeof databaseId === 'undefined') {
20858
+ throw new AppwriteException('Missing required parameter: "databaseId"');
20859
+ }
20860
+ if (typeof tableId === 'undefined') {
20861
+ throw new AppwriteException('Missing required parameter: "tableId"');
20862
+ }
20863
+ if (typeof key === 'undefined') {
20864
+ throw new AppwriteException('Missing required parameter: "key"');
20865
+ }
20866
+ if (typeof required === 'undefined') {
20867
+ throw new AppwriteException('Missing required parameter: "required"');
20868
+ }
20869
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20870
+ const payload = {};
20871
+ if (typeof key !== 'undefined') {
20872
+ payload['key'] = key;
20873
+ }
20874
+ if (typeof required !== 'undefined') {
20875
+ payload['required'] = required;
20876
+ }
20877
+ if (typeof xdefault !== 'undefined') {
20878
+ payload['default'] = xdefault;
20879
+ }
20880
+ if (typeof array !== 'undefined') {
20881
+ payload['array'] = array;
20882
+ }
20883
+ const uri = new URL(this.client.config.endpoint + apiPath);
20884
+ const apiHeaders = {
20885
+ 'content-type': 'application/json',
20886
+ };
20887
+ return this.client.call('post', uri, apiHeaders, payload);
20888
+ }
20889
+ updateBooleanColumn(paramsOrFirst, ...rest) {
20890
+ let params;
20891
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20892
+ params = (paramsOrFirst || {});
20893
+ }
20894
+ else {
20895
+ params = {
20896
+ databaseId: paramsOrFirst,
20897
+ tableId: rest[0],
20898
+ key: rest[1],
20899
+ required: rest[2],
20900
+ xdefault: rest[3],
20901
+ newKey: rest[4]
20902
+ };
20903
+ }
20904
+ const databaseId = params.databaseId;
20905
+ const tableId = params.tableId;
20906
+ const key = params.key;
20907
+ const required = params.required;
20908
+ const xdefault = params.xdefault;
20909
+ const newKey = params.newKey;
20910
+ if (typeof databaseId === 'undefined') {
20911
+ throw new AppwriteException('Missing required parameter: "databaseId"');
20912
+ }
20913
+ if (typeof tableId === 'undefined') {
20914
+ throw new AppwriteException('Missing required parameter: "tableId"');
20915
+ }
20916
+ if (typeof key === 'undefined') {
20917
+ throw new AppwriteException('Missing required parameter: "key"');
20918
+ }
20919
+ if (typeof required === 'undefined') {
20920
+ throw new AppwriteException('Missing required parameter: "required"');
20921
+ }
20922
+ if (typeof xdefault === 'undefined') {
20923
+ throw new AppwriteException('Missing required parameter: "xdefault"');
20924
+ }
20925
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20926
+ const payload = {};
20927
+ if (typeof required !== 'undefined') {
20928
+ payload['required'] = required;
20929
+ }
20930
+ if (typeof xdefault !== 'undefined') {
20931
+ payload['default'] = xdefault;
20932
+ }
20933
+ if (typeof newKey !== 'undefined') {
20934
+ payload['newKey'] = newKey;
20935
+ }
20936
+ const uri = new URL(this.client.config.endpoint + apiPath);
20937
+ const apiHeaders = {
20938
+ 'content-type': 'application/json',
20939
+ };
20940
+ return this.client.call('patch', uri, apiHeaders, payload);
20941
+ }
20942
+ createDatetimeColumn(paramsOrFirst, ...rest) {
20943
+ let params;
20944
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20945
+ params = (paramsOrFirst || {});
20946
+ }
20947
+ else {
20948
+ params = {
20949
+ databaseId: paramsOrFirst,
20950
+ tableId: rest[0],
20951
+ key: rest[1],
20952
+ required: rest[2],
20953
+ xdefault: rest[3],
20954
+ array: rest[4]
20955
+ };
20956
+ }
20957
+ const databaseId = params.databaseId;
20958
+ const tableId = params.tableId;
20959
+ const key = params.key;
20960
+ const required = params.required;
20961
+ const xdefault = params.xdefault;
20962
+ const array = params.array;
20963
+ if (typeof databaseId === 'undefined') {
20964
+ throw new AppwriteException('Missing required parameter: "databaseId"');
20965
+ }
20966
+ if (typeof tableId === 'undefined') {
20967
+ throw new AppwriteException('Missing required parameter: "tableId"');
20968
+ }
20969
+ if (typeof key === 'undefined') {
20970
+ throw new AppwriteException('Missing required parameter: "key"');
20971
+ }
20972
+ if (typeof required === 'undefined') {
20973
+ throw new AppwriteException('Missing required parameter: "required"');
20974
+ }
20975
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20976
+ const payload = {};
20977
+ if (typeof key !== 'undefined') {
20978
+ payload['key'] = key;
20979
+ }
20980
+ if (typeof required !== 'undefined') {
20981
+ payload['required'] = required;
20982
+ }
20983
+ if (typeof xdefault !== 'undefined') {
20984
+ payload['default'] = xdefault;
20985
+ }
20986
+ if (typeof array !== 'undefined') {
20987
+ payload['array'] = array;
20988
+ }
20989
+ const uri = new URL(this.client.config.endpoint + apiPath);
20990
+ const apiHeaders = {
20991
+ 'content-type': 'application/json',
20992
+ };
20993
+ return this.client.call('post', uri, apiHeaders, payload);
20994
+ }
20995
+ updateDatetimeColumn(paramsOrFirst, ...rest) {
20996
+ let params;
20997
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20998
+ params = (paramsOrFirst || {});
20999
+ }
21000
+ else {
21001
+ params = {
21002
+ databaseId: paramsOrFirst,
21003
+ tableId: rest[0],
21004
+ key: rest[1],
21005
+ required: rest[2],
21006
+ xdefault: rest[3],
21007
+ newKey: rest[4]
21008
+ };
21009
+ }
21010
+ const databaseId = params.databaseId;
21011
+ const tableId = params.tableId;
21012
+ const key = params.key;
21013
+ const required = params.required;
21014
+ const xdefault = params.xdefault;
21015
+ const newKey = params.newKey;
21016
+ if (typeof databaseId === 'undefined') {
21017
+ throw new AppwriteException('Missing required parameter: "databaseId"');
21018
+ }
21019
+ if (typeof tableId === 'undefined') {
21020
+ throw new AppwriteException('Missing required parameter: "tableId"');
21021
+ }
21022
+ if (typeof key === 'undefined') {
21023
+ throw new AppwriteException('Missing required parameter: "key"');
21024
+ }
21025
+ if (typeof required === 'undefined') {
21026
+ throw new AppwriteException('Missing required parameter: "required"');
21027
+ }
21028
+ if (typeof xdefault === 'undefined') {
21029
+ throw new AppwriteException('Missing required parameter: "xdefault"');
21030
+ }
21031
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21032
+ const payload = {};
21033
+ if (typeof required !== 'undefined') {
21034
+ payload['required'] = required;
21035
+ }
21036
+ if (typeof xdefault !== 'undefined') {
21037
+ payload['default'] = xdefault;
21038
+ }
21039
+ if (typeof newKey !== 'undefined') {
21040
+ payload['newKey'] = newKey;
21041
+ }
21042
+ const uri = new URL(this.client.config.endpoint + apiPath);
21043
+ const apiHeaders = {
21044
+ 'content-type': 'application/json',
21045
+ };
21046
+ return this.client.call('patch', uri, apiHeaders, payload);
21047
+ }
21048
+ createEmailColumn(paramsOrFirst, ...rest) {
21049
+ let params;
21050
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21051
+ params = (paramsOrFirst || {});
21052
+ }
21053
+ else {
21054
+ params = {
21055
+ databaseId: paramsOrFirst,
21056
+ tableId: rest[0],
21057
+ key: rest[1],
21058
+ required: rest[2],
21059
+ xdefault: rest[3],
21060
+ array: rest[4]
21061
+ };
21062
+ }
21063
+ const databaseId = params.databaseId;
21064
+ const tableId = params.tableId;
21065
+ const key = params.key;
21066
+ const required = params.required;
21067
+ const xdefault = params.xdefault;
21068
+ const array = params.array;
21069
+ if (typeof databaseId === 'undefined') {
21070
+ throw new AppwriteException('Missing required parameter: "databaseId"');
21071
+ }
21072
+ if (typeof tableId === 'undefined') {
21073
+ throw new AppwriteException('Missing required parameter: "tableId"');
21074
+ }
21075
+ if (typeof key === 'undefined') {
21076
+ throw new AppwriteException('Missing required parameter: "key"');
21077
+ }
21078
+ if (typeof required === 'undefined') {
21079
+ throw new AppwriteException('Missing required parameter: "required"');
21080
+ }
21081
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21082
+ const payload = {};
21083
+ if (typeof key !== 'undefined') {
21084
+ payload['key'] = key;
21085
+ }
21086
+ if (typeof required !== 'undefined') {
21087
+ payload['required'] = required;
21088
+ }
21089
+ if (typeof xdefault !== 'undefined') {
21090
+ payload['default'] = xdefault;
21091
+ }
21092
+ if (typeof array !== 'undefined') {
21093
+ payload['array'] = array;
21094
+ }
21095
+ const uri = new URL(this.client.config.endpoint + apiPath);
21096
+ const apiHeaders = {
21097
+ 'content-type': 'application/json',
21098
+ };
21099
+ return this.client.call('post', uri, apiHeaders, payload);
21100
+ }
21101
+ updateEmailColumn(paramsOrFirst, ...rest) {
21102
+ let params;
21103
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21104
+ params = (paramsOrFirst || {});
21105
+ }
21106
+ else {
21107
+ params = {
21108
+ databaseId: paramsOrFirst,
21109
+ tableId: rest[0],
21110
+ key: rest[1],
21111
+ required: rest[2],
21112
+ xdefault: rest[3],
21113
+ newKey: rest[4]
21114
+ };
21115
+ }
21116
+ const databaseId = params.databaseId;
21117
+ const tableId = params.tableId;
21118
+ const key = params.key;
21119
+ const required = params.required;
21120
+ const xdefault = params.xdefault;
21121
+ const newKey = params.newKey;
21122
+ if (typeof databaseId === 'undefined') {
21123
+ throw new AppwriteException('Missing required parameter: "databaseId"');
21124
+ }
21125
+ if (typeof tableId === 'undefined') {
21126
+ throw new AppwriteException('Missing required parameter: "tableId"');
21127
+ }
21128
+ if (typeof key === 'undefined') {
21129
+ throw new AppwriteException('Missing required parameter: "key"');
21130
+ }
21131
+ if (typeof required === 'undefined') {
21132
+ throw new AppwriteException('Missing required parameter: "required"');
21133
+ }
21134
+ if (typeof xdefault === 'undefined') {
21135
+ throw new AppwriteException('Missing required parameter: "xdefault"');
21136
+ }
21137
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21138
+ const payload = {};
21139
+ if (typeof required !== 'undefined') {
21140
+ payload['required'] = required;
21141
+ }
21142
+ if (typeof xdefault !== 'undefined') {
21143
+ payload['default'] = xdefault;
21144
+ }
21145
+ if (typeof newKey !== 'undefined') {
21146
+ payload['newKey'] = newKey;
21147
+ }
21148
+ const uri = new URL(this.client.config.endpoint + apiPath);
21149
+ const apiHeaders = {
21150
+ 'content-type': 'application/json',
21151
+ };
21152
+ return this.client.call('patch', uri, apiHeaders, payload);
21153
+ }
21154
+ createEnumColumn(paramsOrFirst, ...rest) {
21155
+ let params;
21156
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21157
+ params = (paramsOrFirst || {});
21158
+ }
21159
+ else {
21160
+ params = {
21161
+ databaseId: paramsOrFirst,
21162
+ tableId: rest[0],
21163
+ key: rest[1],
21164
+ elements: rest[2],
21165
+ required: rest[3],
21166
+ xdefault: rest[4],
21167
+ array: rest[5]
21168
+ };
21169
+ }
21170
+ const databaseId = params.databaseId;
21171
+ const tableId = params.tableId;
21172
+ const key = params.key;
21173
+ const elements = params.elements;
21174
+ const required = params.required;
21175
+ const xdefault = params.xdefault;
21176
+ const array = params.array;
21177
+ if (typeof databaseId === 'undefined') {
21178
+ throw new AppwriteException('Missing required parameter: "databaseId"');
21179
+ }
21180
+ if (typeof tableId === 'undefined') {
21181
+ throw new AppwriteException('Missing required parameter: "tableId"');
21182
+ }
21183
+ if (typeof key === 'undefined') {
21184
+ throw new AppwriteException('Missing required parameter: "key"');
21185
+ }
21186
+ if (typeof elements === 'undefined') {
21187
+ throw new AppwriteException('Missing required parameter: "elements"');
21188
+ }
21189
+ if (typeof required === 'undefined') {
21190
+ throw new AppwriteException('Missing required parameter: "required"');
21191
+ }
21192
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21193
+ const payload = {};
21194
+ if (typeof key !== 'undefined') {
21195
+ payload['key'] = key;
21196
+ }
21197
+ if (typeof elements !== 'undefined') {
21198
+ payload['elements'] = elements;
21199
+ }
21200
+ if (typeof required !== 'undefined') {
21201
+ payload['required'] = required;
21202
+ }
21203
+ if (typeof xdefault !== 'undefined') {
21204
+ payload['default'] = xdefault;
21205
+ }
21206
+ if (typeof array !== 'undefined') {
21207
+ payload['array'] = array;
21208
+ }
21209
+ const uri = new URL(this.client.config.endpoint + apiPath);
21210
+ const apiHeaders = {
21211
+ 'content-type': 'application/json',
21212
+ };
21213
+ return this.client.call('post', uri, apiHeaders, payload);
21214
+ }
21215
+ updateEnumColumn(paramsOrFirst, ...rest) {
21216
+ let params;
21217
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21218
+ params = (paramsOrFirst || {});
21219
+ }
21220
+ else {
21221
+ params = {
21222
+ databaseId: paramsOrFirst,
21223
+ tableId: rest[0],
21224
+ key: rest[1],
21225
+ elements: rest[2],
21226
+ required: rest[3],
21227
+ xdefault: rest[4],
21228
+ newKey: rest[5]
21229
+ };
21230
+ }
21231
+ const databaseId = params.databaseId;
21232
+ const tableId = params.tableId;
21233
+ const key = params.key;
21234
+ const elements = params.elements;
21235
+ const required = params.required;
21236
+ const xdefault = params.xdefault;
21237
+ const newKey = params.newKey;
21238
+ if (typeof databaseId === 'undefined') {
21239
+ throw new AppwriteException('Missing required parameter: "databaseId"');
21240
+ }
21241
+ if (typeof tableId === 'undefined') {
21242
+ throw new AppwriteException('Missing required parameter: "tableId"');
21243
+ }
21244
+ if (typeof key === 'undefined') {
21245
+ throw new AppwriteException('Missing required parameter: "key"');
21246
+ }
21247
+ if (typeof elements === 'undefined') {
21248
+ throw new AppwriteException('Missing required parameter: "elements"');
21249
+ }
21250
+ if (typeof required === 'undefined') {
21251
+ throw new AppwriteException('Missing required parameter: "required"');
21252
+ }
21253
+ if (typeof xdefault === 'undefined') {
21254
+ throw new AppwriteException('Missing required parameter: "xdefault"');
21255
+ }
21256
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21257
+ const payload = {};
21258
+ if (typeof elements !== 'undefined') {
21259
+ payload['elements'] = elements;
21260
+ }
21261
+ if (typeof required !== 'undefined') {
21262
+ payload['required'] = required;
21263
+ }
21264
+ if (typeof xdefault !== 'undefined') {
21265
+ payload['default'] = xdefault;
21266
+ }
21267
+ if (typeof newKey !== 'undefined') {
21268
+ payload['newKey'] = newKey;
21269
+ }
21270
+ const uri = new URL(this.client.config.endpoint + apiPath);
21271
+ const apiHeaders = {
21272
+ 'content-type': 'application/json',
21273
+ };
21274
+ return this.client.call('patch', uri, apiHeaders, payload);
21275
+ }
21276
+ createFloatColumn(paramsOrFirst, ...rest) {
20072
21277
  let params;
20073
21278
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20074
21279
  params = (paramsOrFirst || {});
@@ -20079,14 +21284,18 @@ class TablesDB {
20079
21284
  tableId: rest[0],
20080
21285
  key: rest[1],
20081
21286
  required: rest[2],
20082
- xdefault: rest[3],
20083
- array: rest[4]
21287
+ min: rest[3],
21288
+ max: rest[4],
21289
+ xdefault: rest[5],
21290
+ array: rest[6]
20084
21291
  };
20085
21292
  }
20086
21293
  const databaseId = params.databaseId;
20087
21294
  const tableId = params.tableId;
20088
21295
  const key = params.key;
20089
21296
  const required = params.required;
21297
+ const min = params.min;
21298
+ const max = params.max;
20090
21299
  const xdefault = params.xdefault;
20091
21300
  const array = params.array;
20092
21301
  if (typeof databaseId === 'undefined') {
@@ -20101,7 +21310,7 @@ class TablesDB {
20101
21310
  if (typeof required === 'undefined') {
20102
21311
  throw new AppwriteException('Missing required parameter: "required"');
20103
21312
  }
20104
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21313
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20105
21314
  const payload = {};
20106
21315
  if (typeof key !== 'undefined') {
20107
21316
  payload['key'] = key;
@@ -20109,6 +21318,12 @@ class TablesDB {
20109
21318
  if (typeof required !== 'undefined') {
20110
21319
  payload['required'] = required;
20111
21320
  }
21321
+ if (typeof min !== 'undefined') {
21322
+ payload['min'] = min;
21323
+ }
21324
+ if (typeof max !== 'undefined') {
21325
+ payload['max'] = max;
21326
+ }
20112
21327
  if (typeof xdefault !== 'undefined') {
20113
21328
  payload['default'] = xdefault;
20114
21329
  }
@@ -20121,7 +21336,7 @@ class TablesDB {
20121
21336
  };
20122
21337
  return this.client.call('post', uri, apiHeaders, payload);
20123
21338
  }
20124
- updateBooleanColumn(paramsOrFirst, ...rest) {
21339
+ updateFloatColumn(paramsOrFirst, ...rest) {
20125
21340
  let params;
20126
21341
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20127
21342
  params = (paramsOrFirst || {});
@@ -20133,7 +21348,9 @@ class TablesDB {
20133
21348
  key: rest[1],
20134
21349
  required: rest[2],
20135
21350
  xdefault: rest[3],
20136
- newKey: rest[4]
21351
+ min: rest[4],
21352
+ max: rest[5],
21353
+ newKey: rest[6]
20137
21354
  };
20138
21355
  }
20139
21356
  const databaseId = params.databaseId;
@@ -20141,6 +21358,8 @@ class TablesDB {
20141
21358
  const key = params.key;
20142
21359
  const required = params.required;
20143
21360
  const xdefault = params.xdefault;
21361
+ const min = params.min;
21362
+ const max = params.max;
20144
21363
  const newKey = params.newKey;
20145
21364
  if (typeof databaseId === 'undefined') {
20146
21365
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -20157,11 +21376,17 @@ class TablesDB {
20157
21376
  if (typeof xdefault === 'undefined') {
20158
21377
  throw new AppwriteException('Missing required parameter: "xdefault"');
20159
21378
  }
20160
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21379
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20161
21380
  const payload = {};
20162
21381
  if (typeof required !== 'undefined') {
20163
21382
  payload['required'] = required;
20164
21383
  }
21384
+ if (typeof min !== 'undefined') {
21385
+ payload['min'] = min;
21386
+ }
21387
+ if (typeof max !== 'undefined') {
21388
+ payload['max'] = max;
21389
+ }
20165
21390
  if (typeof xdefault !== 'undefined') {
20166
21391
  payload['default'] = xdefault;
20167
21392
  }
@@ -20174,7 +21399,7 @@ class TablesDB {
20174
21399
  };
20175
21400
  return this.client.call('patch', uri, apiHeaders, payload);
20176
21401
  }
20177
- createDatetimeColumn(paramsOrFirst, ...rest) {
21402
+ createIntegerColumn(paramsOrFirst, ...rest) {
20178
21403
  let params;
20179
21404
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20180
21405
  params = (paramsOrFirst || {});
@@ -20185,14 +21410,18 @@ class TablesDB {
20185
21410
  tableId: rest[0],
20186
21411
  key: rest[1],
20187
21412
  required: rest[2],
20188
- xdefault: rest[3],
20189
- array: rest[4]
21413
+ min: rest[3],
21414
+ max: rest[4],
21415
+ xdefault: rest[5],
21416
+ array: rest[6]
20190
21417
  };
20191
21418
  }
20192
21419
  const databaseId = params.databaseId;
20193
21420
  const tableId = params.tableId;
20194
21421
  const key = params.key;
20195
21422
  const required = params.required;
21423
+ const min = params.min;
21424
+ const max = params.max;
20196
21425
  const xdefault = params.xdefault;
20197
21426
  const array = params.array;
20198
21427
  if (typeof databaseId === 'undefined') {
@@ -20207,7 +21436,7 @@ class TablesDB {
20207
21436
  if (typeof required === 'undefined') {
20208
21437
  throw new AppwriteException('Missing required parameter: "required"');
20209
21438
  }
20210
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21439
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20211
21440
  const payload = {};
20212
21441
  if (typeof key !== 'undefined') {
20213
21442
  payload['key'] = key;
@@ -20215,6 +21444,12 @@ class TablesDB {
20215
21444
  if (typeof required !== 'undefined') {
20216
21445
  payload['required'] = required;
20217
21446
  }
21447
+ if (typeof min !== 'undefined') {
21448
+ payload['min'] = min;
21449
+ }
21450
+ if (typeof max !== 'undefined') {
21451
+ payload['max'] = max;
21452
+ }
20218
21453
  if (typeof xdefault !== 'undefined') {
20219
21454
  payload['default'] = xdefault;
20220
21455
  }
@@ -20227,7 +21462,7 @@ class TablesDB {
20227
21462
  };
20228
21463
  return this.client.call('post', uri, apiHeaders, payload);
20229
21464
  }
20230
- updateDatetimeColumn(paramsOrFirst, ...rest) {
21465
+ updateIntegerColumn(paramsOrFirst, ...rest) {
20231
21466
  let params;
20232
21467
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20233
21468
  params = (paramsOrFirst || {});
@@ -20239,7 +21474,9 @@ class TablesDB {
20239
21474
  key: rest[1],
20240
21475
  required: rest[2],
20241
21476
  xdefault: rest[3],
20242
- newKey: rest[4]
21477
+ min: rest[4],
21478
+ max: rest[5],
21479
+ newKey: rest[6]
20243
21480
  };
20244
21481
  }
20245
21482
  const databaseId = params.databaseId;
@@ -20247,6 +21484,8 @@ class TablesDB {
20247
21484
  const key = params.key;
20248
21485
  const required = params.required;
20249
21486
  const xdefault = params.xdefault;
21487
+ const min = params.min;
21488
+ const max = params.max;
20250
21489
  const newKey = params.newKey;
20251
21490
  if (typeof databaseId === 'undefined') {
20252
21491
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -20263,11 +21502,17 @@ class TablesDB {
20263
21502
  if (typeof xdefault === 'undefined') {
20264
21503
  throw new AppwriteException('Missing required parameter: "xdefault"');
20265
21504
  }
20266
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21505
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20267
21506
  const payload = {};
20268
21507
  if (typeof required !== 'undefined') {
20269
21508
  payload['required'] = required;
20270
21509
  }
21510
+ if (typeof min !== 'undefined') {
21511
+ payload['min'] = min;
21512
+ }
21513
+ if (typeof max !== 'undefined') {
21514
+ payload['max'] = max;
21515
+ }
20271
21516
  if (typeof xdefault !== 'undefined') {
20272
21517
  payload['default'] = xdefault;
20273
21518
  }
@@ -20280,7 +21525,7 @@ class TablesDB {
20280
21525
  };
20281
21526
  return this.client.call('patch', uri, apiHeaders, payload);
20282
21527
  }
20283
- createEmailColumn(paramsOrFirst, ...rest) {
21528
+ createIpColumn(paramsOrFirst, ...rest) {
20284
21529
  let params;
20285
21530
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20286
21531
  params = (paramsOrFirst || {});
@@ -20313,7 +21558,7 @@ class TablesDB {
20313
21558
  if (typeof required === 'undefined') {
20314
21559
  throw new AppwriteException('Missing required parameter: "required"');
20315
21560
  }
20316
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21561
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20317
21562
  const payload = {};
20318
21563
  if (typeof key !== 'undefined') {
20319
21564
  payload['key'] = key;
@@ -20333,7 +21578,7 @@ class TablesDB {
20333
21578
  };
20334
21579
  return this.client.call('post', uri, apiHeaders, payload);
20335
21580
  }
20336
- updateEmailColumn(paramsOrFirst, ...rest) {
21581
+ updateIpColumn(paramsOrFirst, ...rest) {
20337
21582
  let params;
20338
21583
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20339
21584
  params = (paramsOrFirst || {});
@@ -20369,7 +21614,7 @@ class TablesDB {
20369
21614
  if (typeof xdefault === 'undefined') {
20370
21615
  throw new AppwriteException('Missing required parameter: "xdefault"');
20371
21616
  }
20372
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21617
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20373
21618
  const payload = {};
20374
21619
  if (typeof required !== 'undefined') {
20375
21620
  payload['required'] = required;
@@ -20386,7 +21631,7 @@ class TablesDB {
20386
21631
  };
20387
21632
  return this.client.call('patch', uri, apiHeaders, payload);
20388
21633
  }
20389
- createEnumColumn(paramsOrFirst, ...rest) {
21634
+ createLineColumn(paramsOrFirst, ...rest) {
20390
21635
  let params;
20391
21636
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20392
21637
  params = (paramsOrFirst || {});
@@ -20396,19 +21641,15 @@ class TablesDB {
20396
21641
  databaseId: paramsOrFirst,
20397
21642
  tableId: rest[0],
20398
21643
  key: rest[1],
20399
- elements: rest[2],
20400
- required: rest[3],
20401
- xdefault: rest[4],
20402
- array: rest[5]
21644
+ required: rest[2],
21645
+ xdefault: rest[3]
20403
21646
  };
20404
21647
  }
20405
21648
  const databaseId = params.databaseId;
20406
21649
  const tableId = params.tableId;
20407
21650
  const key = params.key;
20408
- const elements = params.elements;
20409
21651
  const required = params.required;
20410
21652
  const xdefault = params.xdefault;
20411
- const array = params.array;
20412
21653
  if (typeof databaseId === 'undefined') {
20413
21654
  throw new AppwriteException('Missing required parameter: "databaseId"');
20414
21655
  }
@@ -20418,36 +21659,27 @@ class TablesDB {
20418
21659
  if (typeof key === 'undefined') {
20419
21660
  throw new AppwriteException('Missing required parameter: "key"');
20420
21661
  }
20421
- if (typeof elements === 'undefined') {
20422
- throw new AppwriteException('Missing required parameter: "elements"');
20423
- }
20424
21662
  if (typeof required === 'undefined') {
20425
21663
  throw new AppwriteException('Missing required parameter: "required"');
20426
21664
  }
20427
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21665
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20428
21666
  const payload = {};
20429
21667
  if (typeof key !== 'undefined') {
20430
21668
  payload['key'] = key;
20431
21669
  }
20432
- if (typeof elements !== 'undefined') {
20433
- payload['elements'] = elements;
20434
- }
20435
21670
  if (typeof required !== 'undefined') {
20436
21671
  payload['required'] = required;
20437
21672
  }
20438
21673
  if (typeof xdefault !== 'undefined') {
20439
21674
  payload['default'] = xdefault;
20440
21675
  }
20441
- if (typeof array !== 'undefined') {
20442
- payload['array'] = array;
20443
- }
20444
21676
  const uri = new URL(this.client.config.endpoint + apiPath);
20445
21677
  const apiHeaders = {
20446
21678
  'content-type': 'application/json',
20447
21679
  };
20448
21680
  return this.client.call('post', uri, apiHeaders, payload);
20449
21681
  }
20450
- updateEnumColumn(paramsOrFirst, ...rest) {
21682
+ updateLineColumn(paramsOrFirst, ...rest) {
20451
21683
  let params;
20452
21684
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20453
21685
  params = (paramsOrFirst || {});
@@ -20457,16 +21689,14 @@ class TablesDB {
20457
21689
  databaseId: paramsOrFirst,
20458
21690
  tableId: rest[0],
20459
21691
  key: rest[1],
20460
- elements: rest[2],
20461
- required: rest[3],
20462
- xdefault: rest[4],
20463
- newKey: rest[5]
21692
+ required: rest[2],
21693
+ xdefault: rest[3],
21694
+ newKey: rest[4]
20464
21695
  };
20465
21696
  }
20466
21697
  const databaseId = params.databaseId;
20467
21698
  const tableId = params.tableId;
20468
21699
  const key = params.key;
20469
- const elements = params.elements;
20470
21700
  const required = params.required;
20471
21701
  const xdefault = params.xdefault;
20472
21702
  const newKey = params.newKey;
@@ -20479,20 +21709,11 @@ class TablesDB {
20479
21709
  if (typeof key === 'undefined') {
20480
21710
  throw new AppwriteException('Missing required parameter: "key"');
20481
21711
  }
20482
- if (typeof elements === 'undefined') {
20483
- throw new AppwriteException('Missing required parameter: "elements"');
20484
- }
20485
21712
  if (typeof required === 'undefined') {
20486
21713
  throw new AppwriteException('Missing required parameter: "required"');
20487
21714
  }
20488
- if (typeof xdefault === 'undefined') {
20489
- throw new AppwriteException('Missing required parameter: "xdefault"');
20490
- }
20491
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21715
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20492
21716
  const payload = {};
20493
- if (typeof elements !== 'undefined') {
20494
- payload['elements'] = elements;
20495
- }
20496
21717
  if (typeof required !== 'undefined') {
20497
21718
  payload['required'] = required;
20498
21719
  }
@@ -20508,7 +21729,7 @@ class TablesDB {
20508
21729
  };
20509
21730
  return this.client.call('patch', uri, apiHeaders, payload);
20510
21731
  }
20511
- createFloatColumn(paramsOrFirst, ...rest) {
21732
+ createLongtextColumn(paramsOrFirst, ...rest) {
20512
21733
  let params;
20513
21734
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20514
21735
  params = (paramsOrFirst || {});
@@ -20519,18 +21740,14 @@ class TablesDB {
20519
21740
  tableId: rest[0],
20520
21741
  key: rest[1],
20521
21742
  required: rest[2],
20522
- min: rest[3],
20523
- max: rest[4],
20524
- xdefault: rest[5],
20525
- array: rest[6]
21743
+ xdefault: rest[3],
21744
+ array: rest[4]
20526
21745
  };
20527
21746
  }
20528
21747
  const databaseId = params.databaseId;
20529
21748
  const tableId = params.tableId;
20530
21749
  const key = params.key;
20531
21750
  const required = params.required;
20532
- const min = params.min;
20533
- const max = params.max;
20534
21751
  const xdefault = params.xdefault;
20535
21752
  const array = params.array;
20536
21753
  if (typeof databaseId === 'undefined') {
@@ -20545,7 +21762,7 @@ class TablesDB {
20545
21762
  if (typeof required === 'undefined') {
20546
21763
  throw new AppwriteException('Missing required parameter: "required"');
20547
21764
  }
20548
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21765
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20549
21766
  const payload = {};
20550
21767
  if (typeof key !== 'undefined') {
20551
21768
  payload['key'] = key;
@@ -20553,12 +21770,6 @@ class TablesDB {
20553
21770
  if (typeof required !== 'undefined') {
20554
21771
  payload['required'] = required;
20555
21772
  }
20556
- if (typeof min !== 'undefined') {
20557
- payload['min'] = min;
20558
- }
20559
- if (typeof max !== 'undefined') {
20560
- payload['max'] = max;
20561
- }
20562
21773
  if (typeof xdefault !== 'undefined') {
20563
21774
  payload['default'] = xdefault;
20564
21775
  }
@@ -20571,7 +21782,7 @@ class TablesDB {
20571
21782
  };
20572
21783
  return this.client.call('post', uri, apiHeaders, payload);
20573
21784
  }
20574
- updateFloatColumn(paramsOrFirst, ...rest) {
21785
+ updateLongtextColumn(paramsOrFirst, ...rest) {
20575
21786
  let params;
20576
21787
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20577
21788
  params = (paramsOrFirst || {});
@@ -20583,9 +21794,7 @@ class TablesDB {
20583
21794
  key: rest[1],
20584
21795
  required: rest[2],
20585
21796
  xdefault: rest[3],
20586
- min: rest[4],
20587
- max: rest[5],
20588
- newKey: rest[6]
21797
+ newKey: rest[4]
20589
21798
  };
20590
21799
  }
20591
21800
  const databaseId = params.databaseId;
@@ -20593,8 +21802,6 @@ class TablesDB {
20593
21802
  const key = params.key;
20594
21803
  const required = params.required;
20595
21804
  const xdefault = params.xdefault;
20596
- const min = params.min;
20597
- const max = params.max;
20598
21805
  const newKey = params.newKey;
20599
21806
  if (typeof databaseId === 'undefined') {
20600
21807
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -20611,17 +21818,11 @@ class TablesDB {
20611
21818
  if (typeof xdefault === 'undefined') {
20612
21819
  throw new AppwriteException('Missing required parameter: "xdefault"');
20613
21820
  }
20614
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21821
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20615
21822
  const payload = {};
20616
21823
  if (typeof required !== 'undefined') {
20617
21824
  payload['required'] = required;
20618
21825
  }
20619
- if (typeof min !== 'undefined') {
20620
- payload['min'] = min;
20621
- }
20622
- if (typeof max !== 'undefined') {
20623
- payload['max'] = max;
20624
- }
20625
21826
  if (typeof xdefault !== 'undefined') {
20626
21827
  payload['default'] = xdefault;
20627
21828
  }
@@ -20634,7 +21835,7 @@ class TablesDB {
20634
21835
  };
20635
21836
  return this.client.call('patch', uri, apiHeaders, payload);
20636
21837
  }
20637
- createIntegerColumn(paramsOrFirst, ...rest) {
21838
+ createMediumtextColumn(paramsOrFirst, ...rest) {
20638
21839
  let params;
20639
21840
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20640
21841
  params = (paramsOrFirst || {});
@@ -20645,18 +21846,14 @@ class TablesDB {
20645
21846
  tableId: rest[0],
20646
21847
  key: rest[1],
20647
21848
  required: rest[2],
20648
- min: rest[3],
20649
- max: rest[4],
20650
- xdefault: rest[5],
20651
- array: rest[6]
21849
+ xdefault: rest[3],
21850
+ array: rest[4]
20652
21851
  };
20653
21852
  }
20654
21853
  const databaseId = params.databaseId;
20655
21854
  const tableId = params.tableId;
20656
21855
  const key = params.key;
20657
21856
  const required = params.required;
20658
- const min = params.min;
20659
- const max = params.max;
20660
21857
  const xdefault = params.xdefault;
20661
21858
  const array = params.array;
20662
21859
  if (typeof databaseId === 'undefined') {
@@ -20671,7 +21868,7 @@ class TablesDB {
20671
21868
  if (typeof required === 'undefined') {
20672
21869
  throw new AppwriteException('Missing required parameter: "required"');
20673
21870
  }
20674
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21871
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20675
21872
  const payload = {};
20676
21873
  if (typeof key !== 'undefined') {
20677
21874
  payload['key'] = key;
@@ -20679,12 +21876,6 @@ class TablesDB {
20679
21876
  if (typeof required !== 'undefined') {
20680
21877
  payload['required'] = required;
20681
21878
  }
20682
- if (typeof min !== 'undefined') {
20683
- payload['min'] = min;
20684
- }
20685
- if (typeof max !== 'undefined') {
20686
- payload['max'] = max;
20687
- }
20688
21879
  if (typeof xdefault !== 'undefined') {
20689
21880
  payload['default'] = xdefault;
20690
21881
  }
@@ -20697,7 +21888,7 @@ class TablesDB {
20697
21888
  };
20698
21889
  return this.client.call('post', uri, apiHeaders, payload);
20699
21890
  }
20700
- updateIntegerColumn(paramsOrFirst, ...rest) {
21891
+ updateMediumtextColumn(paramsOrFirst, ...rest) {
20701
21892
  let params;
20702
21893
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20703
21894
  params = (paramsOrFirst || {});
@@ -20709,9 +21900,7 @@ class TablesDB {
20709
21900
  key: rest[1],
20710
21901
  required: rest[2],
20711
21902
  xdefault: rest[3],
20712
- min: rest[4],
20713
- max: rest[5],
20714
- newKey: rest[6]
21903
+ newKey: rest[4]
20715
21904
  };
20716
21905
  }
20717
21906
  const databaseId = params.databaseId;
@@ -20719,8 +21908,6 @@ class TablesDB {
20719
21908
  const key = params.key;
20720
21909
  const required = params.required;
20721
21910
  const xdefault = params.xdefault;
20722
- const min = params.min;
20723
- const max = params.max;
20724
21911
  const newKey = params.newKey;
20725
21912
  if (typeof databaseId === 'undefined') {
20726
21913
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -20737,17 +21924,11 @@ class TablesDB {
20737
21924
  if (typeof xdefault === 'undefined') {
20738
21925
  throw new AppwriteException('Missing required parameter: "xdefault"');
20739
21926
  }
20740
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21927
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20741
21928
  const payload = {};
20742
21929
  if (typeof required !== 'undefined') {
20743
21930
  payload['required'] = required;
20744
21931
  }
20745
- if (typeof min !== 'undefined') {
20746
- payload['min'] = min;
20747
- }
20748
- if (typeof max !== 'undefined') {
20749
- payload['max'] = max;
20750
- }
20751
21932
  if (typeof xdefault !== 'undefined') {
20752
21933
  payload['default'] = xdefault;
20753
21934
  }
@@ -20760,7 +21941,7 @@ class TablesDB {
20760
21941
  };
20761
21942
  return this.client.call('patch', uri, apiHeaders, payload);
20762
21943
  }
20763
- createIpColumn(paramsOrFirst, ...rest) {
21944
+ createPointColumn(paramsOrFirst, ...rest) {
20764
21945
  let params;
20765
21946
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20766
21947
  params = (paramsOrFirst || {});
@@ -20771,8 +21952,7 @@ class TablesDB {
20771
21952
  tableId: rest[0],
20772
21953
  key: rest[1],
20773
21954
  required: rest[2],
20774
- xdefault: rest[3],
20775
- array: rest[4]
21955
+ xdefault: rest[3]
20776
21956
  };
20777
21957
  }
20778
21958
  const databaseId = params.databaseId;
@@ -20780,7 +21960,6 @@ class TablesDB {
20780
21960
  const key = params.key;
20781
21961
  const required = params.required;
20782
21962
  const xdefault = params.xdefault;
20783
- const array = params.array;
20784
21963
  if (typeof databaseId === 'undefined') {
20785
21964
  throw new AppwriteException('Missing required parameter: "databaseId"');
20786
21965
  }
@@ -20793,7 +21972,7 @@ class TablesDB {
20793
21972
  if (typeof required === 'undefined') {
20794
21973
  throw new AppwriteException('Missing required parameter: "required"');
20795
21974
  }
20796
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21975
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20797
21976
  const payload = {};
20798
21977
  if (typeof key !== 'undefined') {
20799
21978
  payload['key'] = key;
@@ -20804,16 +21983,13 @@ class TablesDB {
20804
21983
  if (typeof xdefault !== 'undefined') {
20805
21984
  payload['default'] = xdefault;
20806
21985
  }
20807
- if (typeof array !== 'undefined') {
20808
- payload['array'] = array;
20809
- }
20810
21986
  const uri = new URL(this.client.config.endpoint + apiPath);
20811
21987
  const apiHeaders = {
20812
21988
  'content-type': 'application/json',
20813
21989
  };
20814
21990
  return this.client.call('post', uri, apiHeaders, payload);
20815
21991
  }
20816
- updateIpColumn(paramsOrFirst, ...rest) {
21992
+ updatePointColumn(paramsOrFirst, ...rest) {
20817
21993
  let params;
20818
21994
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20819
21995
  params = (paramsOrFirst || {});
@@ -20846,10 +22022,7 @@ class TablesDB {
20846
22022
  if (typeof required === 'undefined') {
20847
22023
  throw new AppwriteException('Missing required parameter: "required"');
20848
22024
  }
20849
- if (typeof xdefault === 'undefined') {
20850
- throw new AppwriteException('Missing required parameter: "xdefault"');
20851
- }
20852
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22025
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20853
22026
  const payload = {};
20854
22027
  if (typeof required !== 'undefined') {
20855
22028
  payload['required'] = required;
@@ -20866,7 +22039,7 @@ class TablesDB {
20866
22039
  };
20867
22040
  return this.client.call('patch', uri, apiHeaders, payload);
20868
22041
  }
20869
- createLineColumn(paramsOrFirst, ...rest) {
22042
+ createPolygonColumn(paramsOrFirst, ...rest) {
20870
22043
  let params;
20871
22044
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20872
22045
  params = (paramsOrFirst || {});
@@ -20897,7 +22070,7 @@ class TablesDB {
20897
22070
  if (typeof required === 'undefined') {
20898
22071
  throw new AppwriteException('Missing required parameter: "required"');
20899
22072
  }
20900
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
22073
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20901
22074
  const payload = {};
20902
22075
  if (typeof key !== 'undefined') {
20903
22076
  payload['key'] = key;
@@ -20914,7 +22087,7 @@ class TablesDB {
20914
22087
  };
20915
22088
  return this.client.call('post', uri, apiHeaders, payload);
20916
22089
  }
20917
- updateLineColumn(paramsOrFirst, ...rest) {
22090
+ updatePolygonColumn(paramsOrFirst, ...rest) {
20918
22091
  let params;
20919
22092
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20920
22093
  params = (paramsOrFirst || {});
@@ -20941,30 +22114,93 @@ class TablesDB {
20941
22114
  if (typeof tableId === 'undefined') {
20942
22115
  throw new AppwriteException('Missing required parameter: "tableId"');
20943
22116
  }
20944
- if (typeof key === 'undefined') {
20945
- throw new AppwriteException('Missing required parameter: "key"');
22117
+ if (typeof key === 'undefined') {
22118
+ throw new AppwriteException('Missing required parameter: "key"');
22119
+ }
22120
+ if (typeof required === 'undefined') {
22121
+ throw new AppwriteException('Missing required parameter: "required"');
22122
+ }
22123
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22124
+ const payload = {};
22125
+ if (typeof required !== 'undefined') {
22126
+ payload['required'] = required;
22127
+ }
22128
+ if (typeof xdefault !== 'undefined') {
22129
+ payload['default'] = xdefault;
22130
+ }
22131
+ if (typeof newKey !== 'undefined') {
22132
+ payload['newKey'] = newKey;
22133
+ }
22134
+ const uri = new URL(this.client.config.endpoint + apiPath);
22135
+ const apiHeaders = {
22136
+ 'content-type': 'application/json',
22137
+ };
22138
+ return this.client.call('patch', uri, apiHeaders, payload);
22139
+ }
22140
+ createRelationshipColumn(paramsOrFirst, ...rest) {
22141
+ let params;
22142
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
22143
+ params = (paramsOrFirst || {});
22144
+ }
22145
+ else {
22146
+ params = {
22147
+ databaseId: paramsOrFirst,
22148
+ tableId: rest[0],
22149
+ relatedTableId: rest[1],
22150
+ type: rest[2],
22151
+ twoWay: rest[3],
22152
+ key: rest[4],
22153
+ twoWayKey: rest[5],
22154
+ onDelete: rest[6]
22155
+ };
22156
+ }
22157
+ const databaseId = params.databaseId;
22158
+ const tableId = params.tableId;
22159
+ const relatedTableId = params.relatedTableId;
22160
+ const type = params.type;
22161
+ const twoWay = params.twoWay;
22162
+ const key = params.key;
22163
+ const twoWayKey = params.twoWayKey;
22164
+ const onDelete = params.onDelete;
22165
+ if (typeof databaseId === 'undefined') {
22166
+ throw new AppwriteException('Missing required parameter: "databaseId"');
22167
+ }
22168
+ if (typeof tableId === 'undefined') {
22169
+ throw new AppwriteException('Missing required parameter: "tableId"');
22170
+ }
22171
+ if (typeof relatedTableId === 'undefined') {
22172
+ throw new AppwriteException('Missing required parameter: "relatedTableId"');
20946
22173
  }
20947
- if (typeof required === 'undefined') {
20948
- throw new AppwriteException('Missing required parameter: "required"');
22174
+ if (typeof type === 'undefined') {
22175
+ throw new AppwriteException('Missing required parameter: "type"');
20949
22176
  }
20950
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22177
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20951
22178
  const payload = {};
20952
- if (typeof required !== 'undefined') {
20953
- payload['required'] = required;
22179
+ if (typeof relatedTableId !== 'undefined') {
22180
+ payload['relatedTableId'] = relatedTableId;
20954
22181
  }
20955
- if (typeof xdefault !== 'undefined') {
20956
- payload['default'] = xdefault;
22182
+ if (typeof type !== 'undefined') {
22183
+ payload['type'] = type;
20957
22184
  }
20958
- if (typeof newKey !== 'undefined') {
20959
- payload['newKey'] = newKey;
22185
+ if (typeof twoWay !== 'undefined') {
22186
+ payload['twoWay'] = twoWay;
22187
+ }
22188
+ if (typeof key !== 'undefined') {
22189
+ payload['key'] = key;
22190
+ }
22191
+ if (typeof twoWayKey !== 'undefined') {
22192
+ payload['twoWayKey'] = twoWayKey;
22193
+ }
22194
+ if (typeof onDelete !== 'undefined') {
22195
+ payload['onDelete'] = onDelete;
20960
22196
  }
20961
22197
  const uri = new URL(this.client.config.endpoint + apiPath);
20962
22198
  const apiHeaders = {
20963
22199
  'content-type': 'application/json',
20964
22200
  };
20965
- return this.client.call('patch', uri, apiHeaders, payload);
22201
+ return this.client.call('post', uri, apiHeaders, payload);
20966
22202
  }
20967
- createPointColumn(paramsOrFirst, ...rest) {
22203
+ createStringColumn(paramsOrFirst, ...rest) {
20968
22204
  let params;
20969
22205
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20970
22206
  params = (paramsOrFirst || {});
@@ -20974,15 +22210,21 @@ class TablesDB {
20974
22210
  databaseId: paramsOrFirst,
20975
22211
  tableId: rest[0],
20976
22212
  key: rest[1],
20977
- required: rest[2],
20978
- xdefault: rest[3]
22213
+ size: rest[2],
22214
+ required: rest[3],
22215
+ xdefault: rest[4],
22216
+ array: rest[5],
22217
+ encrypt: rest[6]
20979
22218
  };
20980
22219
  }
20981
22220
  const databaseId = params.databaseId;
20982
22221
  const tableId = params.tableId;
20983
22222
  const key = params.key;
22223
+ const size = params.size;
20984
22224
  const required = params.required;
20985
22225
  const xdefault = params.xdefault;
22226
+ const array = params.array;
22227
+ const encrypt = params.encrypt;
20986
22228
  if (typeof databaseId === 'undefined') {
20987
22229
  throw new AppwriteException('Missing required parameter: "databaseId"');
20988
22230
  }
@@ -20992,27 +22234,39 @@ class TablesDB {
20992
22234
  if (typeof key === 'undefined') {
20993
22235
  throw new AppwriteException('Missing required parameter: "key"');
20994
22236
  }
22237
+ if (typeof size === 'undefined') {
22238
+ throw new AppwriteException('Missing required parameter: "size"');
22239
+ }
20995
22240
  if (typeof required === 'undefined') {
20996
22241
  throw new AppwriteException('Missing required parameter: "required"');
20997
22242
  }
20998
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
22243
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20999
22244
  const payload = {};
21000
22245
  if (typeof key !== 'undefined') {
21001
22246
  payload['key'] = key;
21002
22247
  }
22248
+ if (typeof size !== 'undefined') {
22249
+ payload['size'] = size;
22250
+ }
21003
22251
  if (typeof required !== 'undefined') {
21004
22252
  payload['required'] = required;
21005
22253
  }
21006
22254
  if (typeof xdefault !== 'undefined') {
21007
22255
  payload['default'] = xdefault;
21008
22256
  }
22257
+ if (typeof array !== 'undefined') {
22258
+ payload['array'] = array;
22259
+ }
22260
+ if (typeof encrypt !== 'undefined') {
22261
+ payload['encrypt'] = encrypt;
22262
+ }
21009
22263
  const uri = new URL(this.client.config.endpoint + apiPath);
21010
22264
  const apiHeaders = {
21011
22265
  'content-type': 'application/json',
21012
22266
  };
21013
22267
  return this.client.call('post', uri, apiHeaders, payload);
21014
22268
  }
21015
- updatePointColumn(paramsOrFirst, ...rest) {
22269
+ updateStringColumn(paramsOrFirst, ...rest) {
21016
22270
  let params;
21017
22271
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21018
22272
  params = (paramsOrFirst || {});
@@ -21024,7 +22278,8 @@ class TablesDB {
21024
22278
  key: rest[1],
21025
22279
  required: rest[2],
21026
22280
  xdefault: rest[3],
21027
- newKey: rest[4]
22281
+ size: rest[4],
22282
+ newKey: rest[5]
21028
22283
  };
21029
22284
  }
21030
22285
  const databaseId = params.databaseId;
@@ -21032,6 +22287,7 @@ class TablesDB {
21032
22287
  const key = params.key;
21033
22288
  const required = params.required;
21034
22289
  const xdefault = params.xdefault;
22290
+ const size = params.size;
21035
22291
  const newKey = params.newKey;
21036
22292
  if (typeof databaseId === 'undefined') {
21037
22293
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -21045,7 +22301,10 @@ class TablesDB {
21045
22301
  if (typeof required === 'undefined') {
21046
22302
  throw new AppwriteException('Missing required parameter: "required"');
21047
22303
  }
21048
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22304
+ if (typeof xdefault === 'undefined') {
22305
+ throw new AppwriteException('Missing required parameter: "xdefault"');
22306
+ }
22307
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21049
22308
  const payload = {};
21050
22309
  if (typeof required !== 'undefined') {
21051
22310
  payload['required'] = required;
@@ -21053,6 +22312,9 @@ class TablesDB {
21053
22312
  if (typeof xdefault !== 'undefined') {
21054
22313
  payload['default'] = xdefault;
21055
22314
  }
22315
+ if (typeof size !== 'undefined') {
22316
+ payload['size'] = size;
22317
+ }
21056
22318
  if (typeof newKey !== 'undefined') {
21057
22319
  payload['newKey'] = newKey;
21058
22320
  }
@@ -21062,7 +22324,7 @@ class TablesDB {
21062
22324
  };
21063
22325
  return this.client.call('patch', uri, apiHeaders, payload);
21064
22326
  }
21065
- createPolygonColumn(paramsOrFirst, ...rest) {
22327
+ createTextColumn(paramsOrFirst, ...rest) {
21066
22328
  let params;
21067
22329
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21068
22330
  params = (paramsOrFirst || {});
@@ -21073,7 +22335,8 @@ class TablesDB {
21073
22335
  tableId: rest[0],
21074
22336
  key: rest[1],
21075
22337
  required: rest[2],
21076
- xdefault: rest[3]
22338
+ xdefault: rest[3],
22339
+ array: rest[4]
21077
22340
  };
21078
22341
  }
21079
22342
  const databaseId = params.databaseId;
@@ -21081,6 +22344,7 @@ class TablesDB {
21081
22344
  const key = params.key;
21082
22345
  const required = params.required;
21083
22346
  const xdefault = params.xdefault;
22347
+ const array = params.array;
21084
22348
  if (typeof databaseId === 'undefined') {
21085
22349
  throw new AppwriteException('Missing required parameter: "databaseId"');
21086
22350
  }
@@ -21093,7 +22357,7 @@ class TablesDB {
21093
22357
  if (typeof required === 'undefined') {
21094
22358
  throw new AppwriteException('Missing required parameter: "required"');
21095
22359
  }
21096
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
22360
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21097
22361
  const payload = {};
21098
22362
  if (typeof key !== 'undefined') {
21099
22363
  payload['key'] = key;
@@ -21104,13 +22368,16 @@ class TablesDB {
21104
22368
  if (typeof xdefault !== 'undefined') {
21105
22369
  payload['default'] = xdefault;
21106
22370
  }
22371
+ if (typeof array !== 'undefined') {
22372
+ payload['array'] = array;
22373
+ }
21107
22374
  const uri = new URL(this.client.config.endpoint + apiPath);
21108
22375
  const apiHeaders = {
21109
22376
  'content-type': 'application/json',
21110
22377
  };
21111
22378
  return this.client.call('post', uri, apiHeaders, payload);
21112
22379
  }
21113
- updatePolygonColumn(paramsOrFirst, ...rest) {
22380
+ updateTextColumn(paramsOrFirst, ...rest) {
21114
22381
  let params;
21115
22382
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21116
22383
  params = (paramsOrFirst || {});
@@ -21143,7 +22410,10 @@ class TablesDB {
21143
22410
  if (typeof required === 'undefined') {
21144
22411
  throw new AppwriteException('Missing required parameter: "required"');
21145
22412
  }
21146
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22413
+ if (typeof xdefault === 'undefined') {
22414
+ throw new AppwriteException('Missing required parameter: "xdefault"');
22415
+ }
22416
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21147
22417
  const payload = {};
21148
22418
  if (typeof required !== 'undefined') {
21149
22419
  payload['required'] = required;
@@ -21160,70 +22430,7 @@ class TablesDB {
21160
22430
  };
21161
22431
  return this.client.call('patch', uri, apiHeaders, payload);
21162
22432
  }
21163
- createRelationshipColumn(paramsOrFirst, ...rest) {
21164
- let params;
21165
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21166
- params = (paramsOrFirst || {});
21167
- }
21168
- else {
21169
- params = {
21170
- databaseId: paramsOrFirst,
21171
- tableId: rest[0],
21172
- relatedTableId: rest[1],
21173
- type: rest[2],
21174
- twoWay: rest[3],
21175
- key: rest[4],
21176
- twoWayKey: rest[5],
21177
- onDelete: rest[6]
21178
- };
21179
- }
21180
- const databaseId = params.databaseId;
21181
- const tableId = params.tableId;
21182
- const relatedTableId = params.relatedTableId;
21183
- const type = params.type;
21184
- const twoWay = params.twoWay;
21185
- const key = params.key;
21186
- const twoWayKey = params.twoWayKey;
21187
- const onDelete = params.onDelete;
21188
- if (typeof databaseId === 'undefined') {
21189
- throw new AppwriteException('Missing required parameter: "databaseId"');
21190
- }
21191
- if (typeof tableId === 'undefined') {
21192
- throw new AppwriteException('Missing required parameter: "tableId"');
21193
- }
21194
- if (typeof relatedTableId === 'undefined') {
21195
- throw new AppwriteException('Missing required parameter: "relatedTableId"');
21196
- }
21197
- if (typeof type === 'undefined') {
21198
- throw new AppwriteException('Missing required parameter: "type"');
21199
- }
21200
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21201
- const payload = {};
21202
- if (typeof relatedTableId !== 'undefined') {
21203
- payload['relatedTableId'] = relatedTableId;
21204
- }
21205
- if (typeof type !== 'undefined') {
21206
- payload['type'] = type;
21207
- }
21208
- if (typeof twoWay !== 'undefined') {
21209
- payload['twoWay'] = twoWay;
21210
- }
21211
- if (typeof key !== 'undefined') {
21212
- payload['key'] = key;
21213
- }
21214
- if (typeof twoWayKey !== 'undefined') {
21215
- payload['twoWayKey'] = twoWayKey;
21216
- }
21217
- if (typeof onDelete !== 'undefined') {
21218
- payload['onDelete'] = onDelete;
21219
- }
21220
- const uri = new URL(this.client.config.endpoint + apiPath);
21221
- const apiHeaders = {
21222
- 'content-type': 'application/json',
21223
- };
21224
- return this.client.call('post', uri, apiHeaders, payload);
21225
- }
21226
- createStringColumn(paramsOrFirst, ...rest) {
22433
+ createUrlColumn(paramsOrFirst, ...rest) {
21227
22434
  let params;
21228
22435
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21229
22436
  params = (paramsOrFirst || {});
@@ -21233,21 +22440,17 @@ class TablesDB {
21233
22440
  databaseId: paramsOrFirst,
21234
22441
  tableId: rest[0],
21235
22442
  key: rest[1],
21236
- size: rest[2],
21237
- required: rest[3],
21238
- xdefault: rest[4],
21239
- array: rest[5],
21240
- encrypt: rest[6]
22443
+ required: rest[2],
22444
+ xdefault: rest[3],
22445
+ array: rest[4]
21241
22446
  };
21242
22447
  }
21243
22448
  const databaseId = params.databaseId;
21244
22449
  const tableId = params.tableId;
21245
22450
  const key = params.key;
21246
- const size = params.size;
21247
22451
  const required = params.required;
21248
22452
  const xdefault = params.xdefault;
21249
22453
  const array = params.array;
21250
- const encrypt = params.encrypt;
21251
22454
  if (typeof databaseId === 'undefined') {
21252
22455
  throw new AppwriteException('Missing required parameter: "databaseId"');
21253
22456
  }
@@ -21257,20 +22460,14 @@ class TablesDB {
21257
22460
  if (typeof key === 'undefined') {
21258
22461
  throw new AppwriteException('Missing required parameter: "key"');
21259
22462
  }
21260
- if (typeof size === 'undefined') {
21261
- throw new AppwriteException('Missing required parameter: "size"');
21262
- }
21263
22463
  if (typeof required === 'undefined') {
21264
22464
  throw new AppwriteException('Missing required parameter: "required"');
21265
22465
  }
21266
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
22466
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21267
22467
  const payload = {};
21268
22468
  if (typeof key !== 'undefined') {
21269
22469
  payload['key'] = key;
21270
22470
  }
21271
- if (typeof size !== 'undefined') {
21272
- payload['size'] = size;
21273
- }
21274
22471
  if (typeof required !== 'undefined') {
21275
22472
  payload['required'] = required;
21276
22473
  }
@@ -21280,16 +22477,13 @@ class TablesDB {
21280
22477
  if (typeof array !== 'undefined') {
21281
22478
  payload['array'] = array;
21282
22479
  }
21283
- if (typeof encrypt !== 'undefined') {
21284
- payload['encrypt'] = encrypt;
21285
- }
21286
22480
  const uri = new URL(this.client.config.endpoint + apiPath);
21287
22481
  const apiHeaders = {
21288
22482
  'content-type': 'application/json',
21289
22483
  };
21290
22484
  return this.client.call('post', uri, apiHeaders, payload);
21291
22485
  }
21292
- updateStringColumn(paramsOrFirst, ...rest) {
22486
+ updateUrlColumn(paramsOrFirst, ...rest) {
21293
22487
  let params;
21294
22488
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21295
22489
  params = (paramsOrFirst || {});
@@ -21301,8 +22495,7 @@ class TablesDB {
21301
22495
  key: rest[1],
21302
22496
  required: rest[2],
21303
22497
  xdefault: rest[3],
21304
- size: rest[4],
21305
- newKey: rest[5]
22498
+ newKey: rest[4]
21306
22499
  };
21307
22500
  }
21308
22501
  const databaseId = params.databaseId;
@@ -21310,7 +22503,6 @@ class TablesDB {
21310
22503
  const key = params.key;
21311
22504
  const required = params.required;
21312
22505
  const xdefault = params.xdefault;
21313
- const size = params.size;
21314
22506
  const newKey = params.newKey;
21315
22507
  if (typeof databaseId === 'undefined') {
21316
22508
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -21327,7 +22519,7 @@ class TablesDB {
21327
22519
  if (typeof xdefault === 'undefined') {
21328
22520
  throw new AppwriteException('Missing required parameter: "xdefault"');
21329
22521
  }
21330
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22522
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21331
22523
  const payload = {};
21332
22524
  if (typeof required !== 'undefined') {
21333
22525
  payload['required'] = required;
@@ -21335,9 +22527,6 @@ class TablesDB {
21335
22527
  if (typeof xdefault !== 'undefined') {
21336
22528
  payload['default'] = xdefault;
21337
22529
  }
21338
- if (typeof size !== 'undefined') {
21339
- payload['size'] = size;
21340
- }
21341
22530
  if (typeof newKey !== 'undefined') {
21342
22531
  payload['newKey'] = newKey;
21343
22532
  }
@@ -21347,7 +22536,7 @@ class TablesDB {
21347
22536
  };
21348
22537
  return this.client.call('patch', uri, apiHeaders, payload);
21349
22538
  }
21350
- createUrlColumn(paramsOrFirst, ...rest) {
22539
+ createVarcharColumn(paramsOrFirst, ...rest) {
21351
22540
  let params;
21352
22541
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21353
22542
  params = (paramsOrFirst || {});
@@ -21357,14 +22546,16 @@ class TablesDB {
21357
22546
  databaseId: paramsOrFirst,
21358
22547
  tableId: rest[0],
21359
22548
  key: rest[1],
21360
- required: rest[2],
21361
- xdefault: rest[3],
21362
- array: rest[4]
22549
+ size: rest[2],
22550
+ required: rest[3],
22551
+ xdefault: rest[4],
22552
+ array: rest[5]
21363
22553
  };
21364
22554
  }
21365
22555
  const databaseId = params.databaseId;
21366
22556
  const tableId = params.tableId;
21367
22557
  const key = params.key;
22558
+ const size = params.size;
21368
22559
  const required = params.required;
21369
22560
  const xdefault = params.xdefault;
21370
22561
  const array = params.array;
@@ -21377,14 +22568,20 @@ class TablesDB {
21377
22568
  if (typeof key === 'undefined') {
21378
22569
  throw new AppwriteException('Missing required parameter: "key"');
21379
22570
  }
22571
+ if (typeof size === 'undefined') {
22572
+ throw new AppwriteException('Missing required parameter: "size"');
22573
+ }
21380
22574
  if (typeof required === 'undefined') {
21381
22575
  throw new AppwriteException('Missing required parameter: "required"');
21382
22576
  }
21383
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
22577
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21384
22578
  const payload = {};
21385
22579
  if (typeof key !== 'undefined') {
21386
22580
  payload['key'] = key;
21387
22581
  }
22582
+ if (typeof size !== 'undefined') {
22583
+ payload['size'] = size;
22584
+ }
21388
22585
  if (typeof required !== 'undefined') {
21389
22586
  payload['required'] = required;
21390
22587
  }
@@ -21400,7 +22597,7 @@ class TablesDB {
21400
22597
  };
21401
22598
  return this.client.call('post', uri, apiHeaders, payload);
21402
22599
  }
21403
- updateUrlColumn(paramsOrFirst, ...rest) {
22600
+ updateVarcharColumn(paramsOrFirst, ...rest) {
21404
22601
  let params;
21405
22602
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21406
22603
  params = (paramsOrFirst || {});
@@ -21412,7 +22609,8 @@ class TablesDB {
21412
22609
  key: rest[1],
21413
22610
  required: rest[2],
21414
22611
  xdefault: rest[3],
21415
- newKey: rest[4]
22612
+ size: rest[4],
22613
+ newKey: rest[5]
21416
22614
  };
21417
22615
  }
21418
22616
  const databaseId = params.databaseId;
@@ -21420,6 +22618,7 @@ class TablesDB {
21420
22618
  const key = params.key;
21421
22619
  const required = params.required;
21422
22620
  const xdefault = params.xdefault;
22621
+ const size = params.size;
21423
22622
  const newKey = params.newKey;
21424
22623
  if (typeof databaseId === 'undefined') {
21425
22624
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -21436,7 +22635,7 @@ class TablesDB {
21436
22635
  if (typeof xdefault === 'undefined') {
21437
22636
  throw new AppwriteException('Missing required parameter: "xdefault"');
21438
22637
  }
21439
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22638
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21440
22639
  const payload = {};
21441
22640
  if (typeof required !== 'undefined') {
21442
22641
  payload['required'] = required;
@@ -21444,6 +22643,9 @@ class TablesDB {
21444
22643
  if (typeof xdefault !== 'undefined') {
21445
22644
  payload['default'] = xdefault;
21446
22645
  }
22646
+ if (typeof size !== 'undefined') {
22647
+ payload['size'] = size;
22648
+ }
21447
22649
  if (typeof newKey !== 'undefined') {
21448
22650
  payload['newKey'] = newKey;
21449
22651
  }
@@ -23476,7 +24678,7 @@ class Users {
23476
24678
  }
23477
24679
  getUsage(paramsOrFirst) {
23478
24680
  let params;
23479
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
24681
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('range' in paramsOrFirst))) {
23480
24682
  params = (paramsOrFirst || {});
23481
24683
  }
23482
24684
  else {
@@ -24846,11 +26048,16 @@ class Realtime {
24846
26048
  this.TYPE_CONNECTED = 'connected';
24847
26049
  this.DEBOUNCE_MS = 1;
24848
26050
  this.HEARTBEAT_INTERVAL = 20000; // 20 seconds in milliseconds
24849
- this.activeChannels = new Set();
26051
+ // Slot-centric state: Map<slot, { channels: Set<string>, queries: string[], callback: Function }>
24850
26052
  this.activeSubscriptions = new Map();
26053
+ // Map slot index -> subscriptionId (from backend)
26054
+ this.slotToSubscriptionId = new Map();
26055
+ // Inverse map: subscriptionId -> slot index (for O(1) lookup)
26056
+ this.subscriptionIdToSlot = new Map();
24851
26057
  this.subCallDepth = 0;
24852
26058
  this.reconnectAttempts = 0;
24853
26059
  this.subscriptionsCounter = 0;
26060
+ this.connectionId = 0;
24854
26061
  this.reconnect = true;
24855
26062
  this.onErrorCallbacks = [];
24856
26063
  this.onCloseCallbacks = [];
@@ -24900,7 +26107,7 @@ class Realtime {
24900
26107
  }
24901
26108
  createSocket() {
24902
26109
  return __awaiter(this, void 0, void 0, function* () {
24903
- if (this.activeChannels.size === 0) {
26110
+ if (this.activeSubscriptions.size === 0) {
24904
26111
  this.reconnect = false;
24905
26112
  yield this.closeSocket();
24906
26113
  return;
@@ -24909,10 +26116,36 @@ class Realtime {
24909
26116
  if (!projectId) {
24910
26117
  throw new AppwriteException('Missing project ID');
24911
26118
  }
26119
+ // Collect all unique channels from all slots
26120
+ const allChannels = new Set();
26121
+ for (const subscription of this.activeSubscriptions.values()) {
26122
+ for (const channel of subscription.channels) {
26123
+ allChannels.add(channel);
26124
+ }
26125
+ }
24912
26126
  let queryParams = `project=${projectId}`;
24913
- for (const channel of this.activeChannels) {
26127
+ for (const channel of allChannels) {
24914
26128
  queryParams += `&channels[]=${encodeURIComponent(channel)}`;
24915
26129
  }
26130
+ // Build query string from slots → channels → queries
26131
+ // Format: channel[slot][]=query
26132
+ // For each slot, repeat its queries under each channel it subscribes to
26133
+ // Example: slot 1 → channels [tests, prod], queries [q1, q2]
26134
+ // Produces: tests[1][]=q1&tests[1][]=q2&prod[1][]=q1&prod[1][]=q2
26135
+ const selectAllQuery = Query.select(['*']).toString();
26136
+ for (const [slot, subscription] of this.activeSubscriptions) {
26137
+ // queries is string[] - iterate over each query string
26138
+ const queries = subscription.queries.length === 0
26139
+ ? [selectAllQuery]
26140
+ : subscription.queries;
26141
+ // Repeat this slot's queries under each channel it subscribes to
26142
+ // Each query is sent as a separate parameter: channel[slot][]=q1&channel[slot][]=q2
26143
+ for (const channel of subscription.channels) {
26144
+ for (const query of queries) {
26145
+ queryParams += `&${encodeURIComponent(channel)}[${slot}][]=${encodeURIComponent(query)}`;
26146
+ }
26147
+ }
26148
+ }
24916
26149
  const endpoint = this.client.config.endpointRealtime !== ''
24917
26150
  ? this.client.config.endpointRealtime
24918
26151
  : this.client.config.endpoint || '';
@@ -24922,18 +26155,29 @@ class Realtime {
24922
26155
  const url = `${realtimeEndpoint}/realtime?${queryParams}`;
24923
26156
  if (this.socket) {
24924
26157
  this.reconnect = false;
24925
- yield this.closeSocket();
26158
+ if (this.socket.readyState < WebSocket.CLOSING) {
26159
+ yield this.closeSocket();
26160
+ }
26161
+ // Ensure reconnect isn't stuck false if close event was missed.
26162
+ this.reconnect = true;
24926
26163
  }
24927
26164
  return new Promise((resolve, reject) => {
24928
26165
  try {
24929
- this.socket = new WebSocket(url);
24930
- this.socket.addEventListener('open', () => {
26166
+ const connectionId = ++this.connectionId;
26167
+ const socket = (this.socket = new WebSocket(url));
26168
+ socket.addEventListener('open', () => {
26169
+ if (connectionId !== this.connectionId) {
26170
+ return;
26171
+ }
24931
26172
  this.reconnectAttempts = 0;
24932
26173
  this.onOpenCallbacks.forEach(callback => callback());
24933
26174
  this.startHeartbeat();
24934
26175
  resolve();
24935
26176
  });
24936
- this.socket.addEventListener('message', (event) => {
26177
+ socket.addEventListener('message', (event) => {
26178
+ if (connectionId !== this.connectionId) {
26179
+ return;
26180
+ }
24937
26181
  try {
24938
26182
  const message = JSON.parse(event.data);
24939
26183
  this.handleMessage(message);
@@ -24942,7 +26186,10 @@ class Realtime {
24942
26186
  console.error('Failed to parse message:', error);
24943
26187
  }
24944
26188
  });
24945
- this.socket.addEventListener('close', (event) => __awaiter(this, void 0, void 0, function* () {
26189
+ socket.addEventListener('close', (event) => __awaiter(this, void 0, void 0, function* () {
26190
+ if (connectionId !== this.connectionId || socket !== this.socket) {
26191
+ return;
26192
+ }
24946
26193
  this.stopHeartbeat();
24947
26194
  this.onCloseCallbacks.forEach(callback => callback());
24948
26195
  if (!this.reconnect || event.code === RealtimeCode.POLICY_VIOLATION) {
@@ -24960,7 +26207,10 @@ class Realtime {
24960
26207
  console.error('Failed to reconnect:', error);
24961
26208
  }
24962
26209
  }));
24963
- this.socket.addEventListener('error', (event) => {
26210
+ socket.addEventListener('error', (event) => {
26211
+ if (connectionId !== this.connectionId || socket !== this.socket) {
26212
+ return;
26213
+ }
24964
26214
  this.stopHeartbeat();
24965
26215
  const error = new Error('WebSocket error');
24966
26216
  console.error('WebSocket error:', error.message);
@@ -25031,7 +26281,7 @@ class Realtime {
25031
26281
  }
25032
26282
  return String(channel);
25033
26283
  }
25034
- subscribe(channelsOrChannel, callback) {
26284
+ subscribe(channelsOrChannel, callback, queries = []) {
25035
26285
  return __awaiter(this, void 0, void 0, function* () {
25036
26286
  const channelArray = Array.isArray(channelsOrChannel)
25037
26287
  ? channelsOrChannel
@@ -25039,13 +26289,29 @@ class Realtime {
25039
26289
  // Convert all channels to strings
25040
26290
  const channelStrings = channelArray.map(ch => this.channelToString(ch));
25041
26291
  const channels = new Set(channelStrings);
25042
- this.subscriptionsCounter++;
25043
- const count = this.subscriptionsCounter;
25044
- for (const channel of channels) {
25045
- this.activeChannels.add(channel);
26292
+ // Convert queries to array of strings
26293
+ // Ensure each query is a separate string in the array
26294
+ const queryStrings = [];
26295
+ for (const q of (queries !== null && queries !== void 0 ? queries : [])) {
26296
+ if (Array.isArray(q)) {
26297
+ // Handle nested arrays: [[q1, q2]] -> [q1, q2]
26298
+ for (const inner of q) {
26299
+ queryStrings.push(typeof inner === 'string' ? inner : inner.toString());
26300
+ }
26301
+ }
26302
+ else {
26303
+ queryStrings.push(typeof q === 'string' ? q : q.toString());
26304
+ }
25046
26305
  }
25047
- this.activeSubscriptions.set(count, {
26306
+ // Allocate a new slot index
26307
+ this.subscriptionsCounter++;
26308
+ const slot = this.subscriptionsCounter;
26309
+ // Store slot-centric data: channels, queries, and callback belong to the slot
26310
+ // queries is stored as string[] (array of query strings)
26311
+ // No channel mutation occurs here - channels are derived from slots in createSocket()
26312
+ this.activeSubscriptions.set(slot, {
25048
26313
  channels,
26314
+ queries: queryStrings,
25049
26315
  callback
25050
26316
  });
25051
26317
  this.subCallDepth++;
@@ -25056,23 +26322,19 @@ class Realtime {
25056
26322
  this.subCallDepth--;
25057
26323
  return {
25058
26324
  close: () => __awaiter(this, void 0, void 0, function* () {
25059
- this.activeSubscriptions.delete(count);
25060
- this.cleanUp(channels);
26325
+ const subscriptionId = this.slotToSubscriptionId.get(slot);
26326
+ this.activeSubscriptions.delete(slot);
26327
+ this.slotToSubscriptionId.delete(slot);
26328
+ if (subscriptionId) {
26329
+ this.subscriptionIdToSlot.delete(subscriptionId);
26330
+ }
25061
26331
  yield this.createSocket();
25062
26332
  })
25063
26333
  };
25064
26334
  });
25065
26335
  }
25066
- cleanUp(channels) {
25067
- this.activeChannels = new Set(Array.from(this.activeChannels).filter(channel => {
25068
- if (!channels.has(channel)) {
25069
- return true;
25070
- }
25071
- const subsWithChannel = Array.from(this.activeSubscriptions.values())
25072
- .filter(sub => sub.channels.has(channel));
25073
- return subsWithChannel.length > 0;
25074
- }));
25075
- }
26336
+ // cleanUp is no longer needed - slots are removed directly in subscribe().close()
26337
+ // Channels are automatically rebuilt from remaining slots in createSocket()
25076
26338
  handleMessage(message) {
25077
26339
  if (!message.type) {
25078
26340
  return;
@@ -25098,6 +26360,19 @@ class Realtime {
25098
26360
  return;
25099
26361
  }
25100
26362
  const messageData = message.data;
26363
+ // Store subscription ID mappings from backend
26364
+ // Format: { "0": "sub_a1f9", "1": "sub_b83c", ... }
26365
+ if (messageData.subscriptions) {
26366
+ this.slotToSubscriptionId.clear();
26367
+ this.subscriptionIdToSlot.clear();
26368
+ for (const [slotStr, subscriptionId] of Object.entries(messageData.subscriptions)) {
26369
+ const slot = Number(slotStr);
26370
+ if (!isNaN(slot)) {
26371
+ this.slotToSubscriptionId.set(slot, subscriptionId);
26372
+ this.subscriptionIdToSlot.set(subscriptionId, slot);
26373
+ }
26374
+ }
26375
+ }
25101
26376
  let session = this.client.config.session;
25102
26377
  if (!session) {
25103
26378
  try {
@@ -25132,23 +26407,26 @@ class Realtime {
25132
26407
  const events = data.events;
25133
26408
  const payload = data.payload;
25134
26409
  const timestamp = data.timestamp;
25135
- if (!channels || !events || !payload) {
25136
- return;
25137
- }
25138
- const hasActiveChannel = channels.some(channel => this.activeChannels.has(channel));
25139
- if (!hasActiveChannel) {
26410
+ const subscriptions = data.subscriptions;
26411
+ if (!channels || !events || !payload || !subscriptions || subscriptions.length === 0) {
25140
26412
  return;
25141
26413
  }
25142
- for (const [_, subscription] of this.activeSubscriptions) {
25143
- const hasSubscribedChannel = channels.some(channel => subscription.channels.has(channel));
25144
- if (hasSubscribedChannel) {
25145
- const response = {
25146
- events,
25147
- channels,
25148
- timestamp,
25149
- payload
25150
- };
25151
- subscription.callback(response);
26414
+ // Iterate over all matching subscriptionIds and call callback for each
26415
+ for (const subscriptionId of subscriptions) {
26416
+ // O(1) lookup using subscriptionId
26417
+ const slot = this.subscriptionIdToSlot.get(subscriptionId);
26418
+ if (slot !== undefined) {
26419
+ const subscription = this.activeSubscriptions.get(slot);
26420
+ if (subscription) {
26421
+ const response = {
26422
+ events,
26423
+ channels,
26424
+ timestamp,
26425
+ payload,
26426
+ subscriptions
26427
+ };
26428
+ subscription.callback(response);
26429
+ }
25152
26430
  }
25153
26431
  }
25154
26432
  }
@@ -25350,8 +26628,11 @@ class Channel {
25350
26628
  constructor(segments) {
25351
26629
  this.segments = segments;
25352
26630
  }
25353
- next(segment, id = "*") {
25354
- return new Channel([...this.segments, segment, normalize(id)]);
26631
+ next(segment, id) {
26632
+ const segments = id === undefined
26633
+ ? [...this.segments, segment]
26634
+ : [...this.segments, segment, normalize(id)];
26635
+ return new Channel(segments);
25355
26636
  }
25356
26637
  resolve(action) {
25357
26638
  return new Channel([...this.segments, action]);
@@ -25361,28 +26642,29 @@ class Channel {
25361
26642
  }
25362
26643
  // --- DATABASE ROUTE ---
25363
26644
  // Only available on Channel<Database>
25364
- collection(id = "*") {
25365
- return this.next("collections", id);
26645
+ collection(id) {
26646
+ // Default: wildcard collection ID
26647
+ return this.next("collections", id !== null && id !== void 0 ? id : "*");
25366
26648
  }
25367
26649
  // Only available on Channel<Collection>
25368
- document(id = "*") {
26650
+ document(id) {
26651
+ // Default: no document ID segment
25369
26652
  return this.next("documents", id);
25370
26653
  }
25371
26654
  // --- TABLESDB ROUTE ---
25372
- table(id = "*") {
25373
- return this.next("tables", id);
26655
+ table(id) {
26656
+ // Default: wildcard table ID
26657
+ return this.next("tables", id !== null && id !== void 0 ? id : "*");
25374
26658
  }
25375
- row(id = "*") {
26659
+ row(id) {
26660
+ // Default: no row ID segment
25376
26661
  return this.next("rows", id);
25377
26662
  }
25378
26663
  // --- BUCKET ROUTE ---
25379
- file(id = "*") {
26664
+ file(id) {
26665
+ // Default: no file ID segment
25380
26666
  return this.next("files", id);
25381
26667
  }
25382
- // --- FUNCTION ROUTE ---
25383
- execution(id = "*") {
25384
- return this.next("executions", id);
25385
- }
25386
26668
  // --- TERMINAL ACTIONS ---
25387
26669
  // Restricted to the Actionable union
25388
26670
  create() {
@@ -25398,6 +26680,9 @@ class Channel {
25398
26680
  static database(id = "*") {
25399
26681
  return new Channel(["databases", normalize(id)]);
25400
26682
  }
26683
+ static execution(id = "*") {
26684
+ return new Channel(["executions", normalize(id)]);
26685
+ }
25401
26686
  static tablesdb(id = "*") {
25402
26687
  return new Channel(["tablesdb", normalize(id)]);
25403
26688
  }
@@ -25413,23 +26698,28 @@ class Channel {
25413
26698
  static membership(id = "*") {
25414
26699
  return new Channel(["memberships", normalize(id)]);
25415
26700
  }
25416
- static account(userId = "") {
25417
- const id = normalize(userId);
25418
- return id === "*" ? "account" : `account.${id}`;
26701
+ static account() {
26702
+ return "account";
25419
26703
  }
25420
26704
  // Global events
25421
- static get documents() {
26705
+ static documents() {
25422
26706
  return "documents";
25423
26707
  }
25424
- static get rows() {
26708
+ static rows() {
25425
26709
  return "rows";
25426
26710
  }
25427
- static get files() {
26711
+ static files() {
25428
26712
  return "files";
25429
26713
  }
25430
- static get executions() {
26714
+ static executions() {
25431
26715
  return "executions";
25432
26716
  }
26717
+ static teams() {
26718
+ return "teams";
26719
+ }
26720
+ static memberships() {
26721
+ return "memberships";
26722
+ }
25433
26723
  }
25434
26724
 
25435
26725
  exports.Condition = void 0;
@@ -25697,6 +26987,74 @@ Operator.dateSubDays = (days) => new Operator("dateSubDays", [days]).toString();
25697
26987
  */
25698
26988
  Operator.dateSetNow = () => new Operator("dateSetNow", []).toString();
25699
26989
 
26990
+ exports.Scopes = void 0;
26991
+ (function (Scopes) {
26992
+ Scopes["SessionsWrite"] = "sessions.write";
26993
+ Scopes["UsersRead"] = "users.read";
26994
+ Scopes["UsersWrite"] = "users.write";
26995
+ Scopes["TeamsRead"] = "teams.read";
26996
+ Scopes["TeamsWrite"] = "teams.write";
26997
+ Scopes["DatabasesRead"] = "databases.read";
26998
+ Scopes["DatabasesWrite"] = "databases.write";
26999
+ Scopes["CollectionsRead"] = "collections.read";
27000
+ Scopes["CollectionsWrite"] = "collections.write";
27001
+ Scopes["TablesRead"] = "tables.read";
27002
+ Scopes["TablesWrite"] = "tables.write";
27003
+ Scopes["AttributesRead"] = "attributes.read";
27004
+ Scopes["AttributesWrite"] = "attributes.write";
27005
+ Scopes["ColumnsRead"] = "columns.read";
27006
+ Scopes["ColumnsWrite"] = "columns.write";
27007
+ Scopes["IndexesRead"] = "indexes.read";
27008
+ Scopes["IndexesWrite"] = "indexes.write";
27009
+ Scopes["DocumentsRead"] = "documents.read";
27010
+ Scopes["DocumentsWrite"] = "documents.write";
27011
+ Scopes["RowsRead"] = "rows.read";
27012
+ Scopes["RowsWrite"] = "rows.write";
27013
+ Scopes["FilesRead"] = "files.read";
27014
+ Scopes["FilesWrite"] = "files.write";
27015
+ Scopes["BucketsRead"] = "buckets.read";
27016
+ Scopes["BucketsWrite"] = "buckets.write";
27017
+ Scopes["FunctionsRead"] = "functions.read";
27018
+ Scopes["FunctionsWrite"] = "functions.write";
27019
+ Scopes["SitesRead"] = "sites.read";
27020
+ Scopes["SitesWrite"] = "sites.write";
27021
+ Scopes["LogRead"] = "log.read";
27022
+ Scopes["LogWrite"] = "log.write";
27023
+ Scopes["ExecutionRead"] = "execution.read";
27024
+ Scopes["ExecutionWrite"] = "execution.write";
27025
+ Scopes["LocaleRead"] = "locale.read";
27026
+ Scopes["AvatarsRead"] = "avatars.read";
27027
+ Scopes["HealthRead"] = "health.read";
27028
+ Scopes["ProvidersRead"] = "providers.read";
27029
+ Scopes["ProvidersWrite"] = "providers.write";
27030
+ Scopes["MessagesRead"] = "messages.read";
27031
+ Scopes["MessagesWrite"] = "messages.write";
27032
+ Scopes["TopicsRead"] = "topics.read";
27033
+ Scopes["TopicsWrite"] = "topics.write";
27034
+ Scopes["SubscribersRead"] = "subscribers.read";
27035
+ Scopes["SubscribersWrite"] = "subscribers.write";
27036
+ Scopes["TargetsRead"] = "targets.read";
27037
+ Scopes["TargetsWrite"] = "targets.write";
27038
+ Scopes["RulesRead"] = "rules.read";
27039
+ Scopes["RulesWrite"] = "rules.write";
27040
+ Scopes["MigrationsRead"] = "migrations.read";
27041
+ Scopes["MigrationsWrite"] = "migrations.write";
27042
+ Scopes["VcsRead"] = "vcs.read";
27043
+ Scopes["VcsWrite"] = "vcs.write";
27044
+ Scopes["AssistantRead"] = "assistant.read";
27045
+ Scopes["TokensRead"] = "tokens.read";
27046
+ Scopes["TokensWrite"] = "tokens.write";
27047
+ Scopes["PoliciesWrite"] = "policies.write";
27048
+ Scopes["PoliciesRead"] = "policies.read";
27049
+ Scopes["ArchivesRead"] = "archives.read";
27050
+ Scopes["ArchivesWrite"] = "archives.write";
27051
+ Scopes["RestorationsRead"] = "restorations.read";
27052
+ Scopes["RestorationsWrite"] = "restorations.write";
27053
+ Scopes["DomainsRead"] = "domains.read";
27054
+ Scopes["DomainsWrite"] = "domains.write";
27055
+ Scopes["EventsRead"] = "events.read";
27056
+ })(exports.Scopes || (exports.Scopes = {}));
27057
+
25700
27058
  exports.AuthenticatorType = void 0;
25701
27059
  (function (AuthenticatorType) {
25702
27060
  AuthenticatorType["Totp"] = "totp";
@@ -26422,6 +27780,30 @@ exports.Timezone = void 0;
26422
27780
  Timezone["Utc"] = "utc";
26423
27781
  })(exports.Timezone || (exports.Timezone = {}));
26424
27782
 
27783
+ exports.BrowserPermission = void 0;
27784
+ (function (BrowserPermission) {
27785
+ BrowserPermission["Geolocation"] = "geolocation";
27786
+ BrowserPermission["Camera"] = "camera";
27787
+ BrowserPermission["Microphone"] = "microphone";
27788
+ BrowserPermission["Notifications"] = "notifications";
27789
+ BrowserPermission["Midi"] = "midi";
27790
+ BrowserPermission["Push"] = "push";
27791
+ BrowserPermission["Clipboardread"] = "clipboard-read";
27792
+ BrowserPermission["Clipboardwrite"] = "clipboard-write";
27793
+ BrowserPermission["Paymenthandler"] = "payment-handler";
27794
+ BrowserPermission["Usb"] = "usb";
27795
+ BrowserPermission["Bluetooth"] = "bluetooth";
27796
+ BrowserPermission["Accelerometer"] = "accelerometer";
27797
+ BrowserPermission["Gyroscope"] = "gyroscope";
27798
+ BrowserPermission["Magnetometer"] = "magnetometer";
27799
+ BrowserPermission["Ambientlightsensor"] = "ambient-light-sensor";
27800
+ BrowserPermission["Backgroundsync"] = "background-sync";
27801
+ BrowserPermission["Persistentstorage"] = "persistent-storage";
27802
+ BrowserPermission["Screenwakelock"] = "screen-wake-lock";
27803
+ BrowserPermission["Webshare"] = "web-share";
27804
+ BrowserPermission["Xrspatialtracking"] = "xr-spatial-tracking";
27805
+ })(exports.BrowserPermission || (exports.BrowserPermission = {}));
27806
+
26425
27807
  exports.ImageFormat = void 0;
26426
27808
  (function (ImageFormat) {
26427
27809
  ImageFormat["Jpg"] = "jpg";
@@ -26433,6 +27815,13 @@ exports.ImageFormat = void 0;
26433
27815
  ImageFormat["Gif"] = "gif";
26434
27816
  })(exports.ImageFormat || (exports.ImageFormat = {}));
26435
27817
 
27818
+ exports.BackupServices = void 0;
27819
+ (function (BackupServices) {
27820
+ BackupServices["Databases"] = "databases";
27821
+ BackupServices["Functions"] = "functions";
27822
+ BackupServices["Storage"] = "storage";
27823
+ })(exports.BackupServices || (exports.BackupServices = {}));
27824
+
26436
27825
  exports.Platform = void 0;
26437
27826
  (function (Platform) {
26438
27827
  Platform["Appwrite"] = "appwrite";
@@ -26474,6 +27863,20 @@ exports.IndexType = void 0;
26474
27863
  IndexType["Spatial"] = "spatial";
26475
27864
  })(exports.IndexType || (exports.IndexType = {}));
26476
27865
 
27866
+ exports.OrderBy = void 0;
27867
+ (function (OrderBy) {
27868
+ OrderBy["Asc"] = "asc";
27869
+ OrderBy["Desc"] = "desc";
27870
+ })(exports.OrderBy || (exports.OrderBy = {}));
27871
+
27872
+ exports.RegistrationType = void 0;
27873
+ (function (RegistrationType) {
27874
+ RegistrationType["New"] = "new";
27875
+ RegistrationType["Transfer"] = "transfer";
27876
+ RegistrationType["Renewal"] = "renewal";
27877
+ RegistrationType["Trade"] = "trade";
27878
+ })(exports.RegistrationType || (exports.RegistrationType = {}));
27879
+
26477
27880
  exports.FilterType = void 0;
26478
27881
  (function (FilterType) {
26479
27882
  FilterType["Premium"] = "premium";
@@ -26504,6 +27907,9 @@ exports.Runtime = void 0;
26504
27907
  Runtime["Python312"] = "python-3.12";
26505
27908
  Runtime["Pythonml311"] = "python-ml-3.11";
26506
27909
  Runtime["Pythonml312"] = "python-ml-3.12";
27910
+ Runtime["Deno121"] = "deno-1.21";
27911
+ Runtime["Deno124"] = "deno-1.24";
27912
+ Runtime["Deno135"] = "deno-1.35";
26507
27913
  Runtime["Deno140"] = "deno-1.40";
26508
27914
  Runtime["Deno146"] = "deno-1.46";
26509
27915
  Runtime["Deno20"] = "deno-2.0";
@@ -26518,6 +27924,7 @@ exports.Runtime = void 0;
26518
27924
  Runtime["Dart35"] = "dart-3.5";
26519
27925
  Runtime["Dart38"] = "dart-3.8";
26520
27926
  Runtime["Dart39"] = "dart-3.9";
27927
+ Runtime["Dart310"] = "dart-3.10";
26521
27928
  Runtime["Dotnet60"] = "dotnet-6.0";
26522
27929
  Runtime["Dotnet70"] = "dotnet-7.0";
26523
27930
  Runtime["Dotnet80"] = "dotnet-8.0";
@@ -26546,8 +27953,95 @@ exports.Runtime = void 0;
26546
27953
  Runtime["Flutter329"] = "flutter-3.29";
26547
27954
  Runtime["Flutter332"] = "flutter-3.32";
26548
27955
  Runtime["Flutter335"] = "flutter-3.35";
27956
+ Runtime["Flutter338"] = "flutter-3.38";
26549
27957
  })(exports.Runtime || (exports.Runtime = {}));
26550
27958
 
27959
+ exports.Runtimes = void 0;
27960
+ (function (Runtimes) {
27961
+ Runtimes["Node145"] = "node-14.5";
27962
+ Runtimes["Node160"] = "node-16.0";
27963
+ Runtimes["Node180"] = "node-18.0";
27964
+ Runtimes["Node190"] = "node-19.0";
27965
+ Runtimes["Node200"] = "node-20.0";
27966
+ Runtimes["Node210"] = "node-21.0";
27967
+ Runtimes["Node22"] = "node-22";
27968
+ Runtimes["Php80"] = "php-8.0";
27969
+ Runtimes["Php81"] = "php-8.1";
27970
+ Runtimes["Php82"] = "php-8.2";
27971
+ Runtimes["Php83"] = "php-8.3";
27972
+ Runtimes["Ruby30"] = "ruby-3.0";
27973
+ Runtimes["Ruby31"] = "ruby-3.1";
27974
+ Runtimes["Ruby32"] = "ruby-3.2";
27975
+ Runtimes["Ruby33"] = "ruby-3.3";
27976
+ Runtimes["Python38"] = "python-3.8";
27977
+ Runtimes["Python39"] = "python-3.9";
27978
+ Runtimes["Python310"] = "python-3.10";
27979
+ Runtimes["Python311"] = "python-3.11";
27980
+ Runtimes["Python312"] = "python-3.12";
27981
+ Runtimes["Pythonml311"] = "python-ml-3.11";
27982
+ Runtimes["Pythonml312"] = "python-ml-3.12";
27983
+ Runtimes["Deno121"] = "deno-1.21";
27984
+ Runtimes["Deno124"] = "deno-1.24";
27985
+ Runtimes["Deno135"] = "deno-1.35";
27986
+ Runtimes["Deno140"] = "deno-1.40";
27987
+ Runtimes["Deno146"] = "deno-1.46";
27988
+ Runtimes["Deno20"] = "deno-2.0";
27989
+ Runtimes["Dart215"] = "dart-2.15";
27990
+ Runtimes["Dart216"] = "dart-2.16";
27991
+ Runtimes["Dart217"] = "dart-2.17";
27992
+ Runtimes["Dart218"] = "dart-2.18";
27993
+ Runtimes["Dart219"] = "dart-2.19";
27994
+ Runtimes["Dart30"] = "dart-3.0";
27995
+ Runtimes["Dart31"] = "dart-3.1";
27996
+ Runtimes["Dart33"] = "dart-3.3";
27997
+ Runtimes["Dart35"] = "dart-3.5";
27998
+ Runtimes["Dart38"] = "dart-3.8";
27999
+ Runtimes["Dart39"] = "dart-3.9";
28000
+ Runtimes["Dart310"] = "dart-3.10";
28001
+ Runtimes["Dotnet60"] = "dotnet-6.0";
28002
+ Runtimes["Dotnet70"] = "dotnet-7.0";
28003
+ Runtimes["Dotnet80"] = "dotnet-8.0";
28004
+ Runtimes["Java80"] = "java-8.0";
28005
+ Runtimes["Java110"] = "java-11.0";
28006
+ Runtimes["Java170"] = "java-17.0";
28007
+ Runtimes["Java180"] = "java-18.0";
28008
+ Runtimes["Java210"] = "java-21.0";
28009
+ Runtimes["Java22"] = "java-22";
28010
+ Runtimes["Swift55"] = "swift-5.5";
28011
+ Runtimes["Swift58"] = "swift-5.8";
28012
+ Runtimes["Swift59"] = "swift-5.9";
28013
+ Runtimes["Swift510"] = "swift-5.10";
28014
+ Runtimes["Kotlin16"] = "kotlin-1.6";
28015
+ Runtimes["Kotlin18"] = "kotlin-1.8";
28016
+ Runtimes["Kotlin19"] = "kotlin-1.9";
28017
+ Runtimes["Kotlin20"] = "kotlin-2.0";
28018
+ Runtimes["Cpp17"] = "cpp-17";
28019
+ Runtimes["Cpp20"] = "cpp-20";
28020
+ Runtimes["Bun10"] = "bun-1.0";
28021
+ Runtimes["Bun11"] = "bun-1.1";
28022
+ Runtimes["Go123"] = "go-1.23";
28023
+ Runtimes["Static1"] = "static-1";
28024
+ Runtimes["Flutter324"] = "flutter-3.24";
28025
+ Runtimes["Flutter327"] = "flutter-3.27";
28026
+ Runtimes["Flutter329"] = "flutter-3.29";
28027
+ Runtimes["Flutter332"] = "flutter-3.32";
28028
+ Runtimes["Flutter335"] = "flutter-3.35";
28029
+ Runtimes["Flutter338"] = "flutter-3.38";
28030
+ })(exports.Runtimes || (exports.Runtimes = {}));
28031
+
28032
+ exports.UseCases = void 0;
28033
+ (function (UseCases) {
28034
+ UseCases["Portfolio"] = "portfolio";
28035
+ UseCases["Starter"] = "starter";
28036
+ UseCases["Events"] = "events";
28037
+ UseCases["Ecommerce"] = "ecommerce";
28038
+ UseCases["Documentation"] = "documentation";
28039
+ UseCases["Blog"] = "blog";
28040
+ UseCases["Ai"] = "ai";
28041
+ UseCases["Forms"] = "forms";
28042
+ UseCases["Dashboard"] = "dashboard";
28043
+ })(exports.UseCases || (exports.UseCases = {}));
28044
+
26551
28045
  exports.TemplateReferenceType = void 0;
26552
28046
  (function (TemplateReferenceType) {
26553
28047
  TemplateReferenceType["Branch"] = "branch";
@@ -26609,24 +28103,20 @@ exports.SmtpEncryption = void 0;
26609
28103
  SmtpEncryption["Tls"] = "tls";
26610
28104
  })(exports.SmtpEncryption || (exports.SmtpEncryption = {}));
26611
28105
 
26612
- exports.BillingPlan = void 0;
26613
- (function (BillingPlan) {
26614
- BillingPlan["Tier0"] = "tier-0";
26615
- BillingPlan["Tier1"] = "tier-1";
26616
- BillingPlan["Tier2"] = "tier-2";
26617
- BillingPlan["Imaginetier0"] = "imagine-tier-0";
26618
- BillingPlan["Imaginetier1"] = "imagine-tier-1";
26619
- BillingPlan["Imaginetier150"] = "imagine-tier-1-50";
26620
- BillingPlan["Imaginetier1100"] = "imagine-tier-1-100";
26621
- BillingPlan["Imaginetier1200"] = "imagine-tier-1-200";
26622
- BillingPlan["Imaginetier1290"] = "imagine-tier-1-290";
26623
- BillingPlan["Imaginetier1480"] = "imagine-tier-1-480";
26624
- BillingPlan["Imaginetier1700"] = "imagine-tier-1-700";
26625
- BillingPlan["Imaginetier1900"] = "imagine-tier-1-900";
26626
- BillingPlan["Imaginetier11100"] = "imagine-tier-1-1100";
26627
- BillingPlan["Imaginetier11650"] = "imagine-tier-1-1650";
26628
- BillingPlan["Imaginetier12200"] = "imagine-tier-1-2200";
26629
- })(exports.BillingPlan || (exports.BillingPlan = {}));
28106
+ exports.Resources = void 0;
28107
+ (function (Resources) {
28108
+ Resources["User"] = "user";
28109
+ Resources["Database"] = "database";
28110
+ Resources["Table"] = "table";
28111
+ Resources["Column"] = "column";
28112
+ Resources["Index"] = "index";
28113
+ Resources["Row"] = "row";
28114
+ Resources["Document"] = "document";
28115
+ Resources["Attribute"] = "attribute";
28116
+ Resources["Collection"] = "collection";
28117
+ Resources["Bucket"] = "bucket";
28118
+ Resources["File"] = "file";
28119
+ })(exports.Resources || (exports.Resources = {}));
26630
28120
 
26631
28121
  exports.ProjectUsageRange = void 0;
26632
28122
  (function (ProjectUsageRange) {
@@ -26704,12 +28194,6 @@ exports.SMTPSecure = void 0;
26704
28194
  SMTPSecure["Ssl"] = "ssl";
26705
28195
  })(exports.SMTPSecure || (exports.SMTPSecure = {}));
26706
28196
 
26707
- exports.Status = void 0;
26708
- (function (Status) {
26709
- Status["Active"] = "active";
26710
- Status["Archived"] = "archived";
26711
- })(exports.Status || (exports.Status = {}));
26712
-
26713
28197
  exports.EmailTemplateType = void 0;
26714
28198
  (function (EmailTemplateType) {
26715
28199
  EmailTemplateType["Verification"] = "verification";
@@ -27056,6 +28540,9 @@ exports.BuildRuntime = void 0;
27056
28540
  BuildRuntime["Python312"] = "python-3.12";
27057
28541
  BuildRuntime["Pythonml311"] = "python-ml-3.11";
27058
28542
  BuildRuntime["Pythonml312"] = "python-ml-3.12";
28543
+ BuildRuntime["Deno121"] = "deno-1.21";
28544
+ BuildRuntime["Deno124"] = "deno-1.24";
28545
+ BuildRuntime["Deno135"] = "deno-1.35";
27059
28546
  BuildRuntime["Deno140"] = "deno-1.40";
27060
28547
  BuildRuntime["Deno146"] = "deno-1.46";
27061
28548
  BuildRuntime["Deno20"] = "deno-2.0";
@@ -27070,6 +28557,7 @@ exports.BuildRuntime = void 0;
27070
28557
  BuildRuntime["Dart35"] = "dart-3.5";
27071
28558
  BuildRuntime["Dart38"] = "dart-3.8";
27072
28559
  BuildRuntime["Dart39"] = "dart-3.9";
28560
+ BuildRuntime["Dart310"] = "dart-3.10";
27073
28561
  BuildRuntime["Dotnet60"] = "dotnet-6.0";
27074
28562
  BuildRuntime["Dotnet70"] = "dotnet-7.0";
27075
28563
  BuildRuntime["Dotnet80"] = "dotnet-8.0";
@@ -27098,6 +28586,7 @@ exports.BuildRuntime = void 0;
27098
28586
  BuildRuntime["Flutter329"] = "flutter-3.29";
27099
28587
  BuildRuntime["Flutter332"] = "flutter-3.32";
27100
28588
  BuildRuntime["Flutter335"] = "flutter-3.35";
28589
+ BuildRuntime["Flutter338"] = "flutter-3.38";
27101
28590
  })(exports.BuildRuntime || (exports.BuildRuntime = {}));
27102
28591
 
27103
28592
  exports.Adapter = void 0;
@@ -27106,6 +28595,25 @@ exports.Adapter = void 0;
27106
28595
  Adapter["Ssr"] = "ssr";
27107
28596
  })(exports.Adapter || (exports.Adapter = {}));
27108
28597
 
28598
+ exports.Frameworks = void 0;
28599
+ (function (Frameworks) {
28600
+ Frameworks["Analog"] = "analog";
28601
+ Frameworks["Angular"] = "angular";
28602
+ Frameworks["Nextjs"] = "nextjs";
28603
+ Frameworks["React"] = "react";
28604
+ Frameworks["Nuxt"] = "nuxt";
28605
+ Frameworks["Vue"] = "vue";
28606
+ Frameworks["Sveltekit"] = "sveltekit";
28607
+ Frameworks["Astro"] = "astro";
28608
+ Frameworks["Tanstackstart"] = "tanstack-start";
28609
+ Frameworks["Remix"] = "remix";
28610
+ Frameworks["Lynx"] = "lynx";
28611
+ Frameworks["Flutter"] = "flutter";
28612
+ Frameworks["Reactnative"] = "react-native";
28613
+ Frameworks["Vite"] = "vite";
28614
+ Frameworks["Other"] = "other";
28615
+ })(exports.Frameworks || (exports.Frameworks = {}));
28616
+
27109
28617
  exports.Compression = void 0;
27110
28618
  (function (Compression) {
27111
28619
  Compression["None"] = "none";
@@ -27193,6 +28701,7 @@ exports.DeploymentStatus = void 0;
27193
28701
  DeploymentStatus["Processing"] = "processing";
27194
28702
  DeploymentStatus["Building"] = "building";
27195
28703
  DeploymentStatus["Ready"] = "ready";
28704
+ DeploymentStatus["Canceled"] = "canceled";
27196
28705
  DeploymentStatus["Failed"] = "failed";
27197
28706
  })(exports.DeploymentStatus || (exports.DeploymentStatus = {}));
27198
28707