appwrite-cli 13.1.0 → 13.2.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 (566) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/README.md +2 -2
  3. package/dist/bundle-win-arm64.mjs +2773 -1278
  4. package/dist/cli.cjs +2773 -1278
  5. package/dist/index.js +1574 -345
  6. package/dist/lib/commands/config-validations.d.ts +3 -1
  7. package/dist/lib/commands/config-validations.d.ts.map +1 -1
  8. package/dist/lib/commands/generators/typescript/databases.d.ts.map +1 -1
  9. package/dist/lib/commands/generic.d.ts.map +1 -1
  10. package/dist/lib/commands/init.d.ts.map +1 -1
  11. package/dist/lib/commands/pull.d.ts.map +1 -1
  12. package/dist/lib/commands/run.d.ts.map +1 -1
  13. package/dist/lib/commands/services/account.d.ts.map +1 -1
  14. package/dist/lib/commands/services/console.d.ts.map +1 -1
  15. package/dist/lib/commands/services/databases.d.ts.map +1 -1
  16. package/dist/lib/commands/services/functions.d.ts.map +1 -1
  17. package/dist/lib/commands/services/health.d.ts.map +1 -1
  18. package/dist/lib/commands/services/messaging.d.ts.map +1 -1
  19. package/dist/lib/commands/services/project.d.ts.map +1 -1
  20. package/dist/lib/commands/services/projects.d.ts.map +1 -1
  21. package/dist/lib/commands/services/proxy.d.ts.map +1 -1
  22. package/dist/lib/commands/services/sites.d.ts.map +1 -1
  23. package/dist/lib/commands/services/storage.d.ts.map +1 -1
  24. package/dist/lib/commands/services/tables-db.d.ts.map +1 -1
  25. package/dist/lib/commands/services/users.d.ts.map +1 -1
  26. package/dist/lib/commands/services/vcs.d.ts.map +1 -1
  27. package/dist/lib/constants.d.ts +1 -1
  28. package/dist/lib/emulation/utils.d.ts +2 -1
  29. package/dist/lib/emulation/utils.d.ts.map +1 -1
  30. package/dist/lib/utils.d.ts.map +1 -1
  31. package/docs/examples/account/create-anonymous-session.md +2 -0
  32. package/docs/examples/account/create-email-password-session.md +2 -0
  33. package/docs/examples/account/create-email-token.md +2 -0
  34. package/docs/examples/account/create-email-verification.md +2 -0
  35. package/docs/examples/account/create-jwt.md +2 -0
  36. package/docs/examples/account/create-magic-url-token.md +2 -0
  37. package/docs/examples/account/create-mfa-authenticator.md +2 -0
  38. package/docs/examples/account/create-mfa-challenge.md +2 -0
  39. package/docs/examples/account/create-mfa-recovery-codes.md +2 -0
  40. package/docs/examples/account/create-o-auth-2-session.md +2 -0
  41. package/docs/examples/account/create-o-auth-2-token.md +2 -0
  42. package/docs/examples/account/create-phone-token.md +2 -0
  43. package/docs/examples/account/create-phone-verification.md +2 -0
  44. package/docs/examples/account/create-push-target.md +2 -0
  45. package/docs/examples/account/create-recovery.md +2 -0
  46. package/docs/examples/account/create-session.md +2 -0
  47. package/docs/examples/account/create-verification.md +2 -0
  48. package/docs/examples/account/create.md +2 -0
  49. package/docs/examples/account/delete-identity.md +2 -0
  50. package/docs/examples/account/delete-mfa-authenticator.md +2 -0
  51. package/docs/examples/account/delete-push-target.md +2 -0
  52. package/docs/examples/account/delete-session.md +2 -0
  53. package/docs/examples/account/delete-sessions.md +2 -0
  54. package/docs/examples/account/delete.md +2 -0
  55. package/docs/examples/account/get-mfa-recovery-codes.md +2 -0
  56. package/docs/examples/account/get-prefs.md +2 -0
  57. package/docs/examples/account/get-session.md +2 -0
  58. package/docs/examples/account/get.md +2 -0
  59. package/docs/examples/account/list-identities.md +2 -0
  60. package/docs/examples/account/list-logs.md +2 -0
  61. package/docs/examples/account/list-mfa-factors.md +2 -0
  62. package/docs/examples/account/list-sessions.md +2 -0
  63. package/docs/examples/account/update-email-verification.md +2 -0
  64. package/docs/examples/account/update-email.md +2 -0
  65. package/docs/examples/account/update-magic-url-session.md +2 -0
  66. package/docs/examples/account/update-mfa-authenticator.md +2 -0
  67. package/docs/examples/account/update-mfa-challenge.md +2 -0
  68. package/docs/examples/account/update-mfa-recovery-codes.md +2 -0
  69. package/docs/examples/account/update-mfa.md +2 -0
  70. package/docs/examples/account/update-name.md +2 -0
  71. package/docs/examples/account/update-password.md +2 -0
  72. package/docs/examples/account/update-phone-session.md +2 -0
  73. package/docs/examples/account/update-phone-verification.md +2 -0
  74. package/docs/examples/account/update-phone.md +2 -0
  75. package/docs/examples/account/update-prefs.md +2 -0
  76. package/docs/examples/account/update-push-target.md +2 -0
  77. package/docs/examples/account/update-recovery.md +2 -0
  78. package/docs/examples/account/update-session.md +2 -0
  79. package/docs/examples/account/update-status.md +2 -0
  80. package/docs/examples/account/update-verification.md +2 -0
  81. package/docs/examples/console/get-resource.md +2 -0
  82. package/docs/examples/console/variables.md +2 -0
  83. package/docs/examples/databases/create-boolean-attribute.md +2 -0
  84. package/docs/examples/databases/create-collection.md +2 -0
  85. package/docs/examples/databases/create-datetime-attribute.md +2 -0
  86. package/docs/examples/databases/create-document.md +2 -0
  87. package/docs/examples/databases/create-documents.md +2 -0
  88. package/docs/examples/databases/create-email-attribute.md +2 -0
  89. package/docs/examples/databases/create-enum-attribute.md +2 -0
  90. package/docs/examples/databases/create-float-attribute.md +2 -0
  91. package/docs/examples/databases/create-index.md +2 -0
  92. package/docs/examples/databases/create-integer-attribute.md +2 -0
  93. package/docs/examples/databases/create-ip-attribute.md +2 -0
  94. package/docs/examples/databases/create-line-attribute.md +2 -0
  95. package/docs/examples/databases/create-longtext-attribute.md +7 -0
  96. package/docs/examples/databases/create-mediumtext-attribute.md +7 -0
  97. package/docs/examples/databases/create-operations.md +2 -0
  98. package/docs/examples/databases/create-point-attribute.md +2 -0
  99. package/docs/examples/databases/create-polygon-attribute.md +2 -0
  100. package/docs/examples/databases/create-relationship-attribute.md +2 -0
  101. package/docs/examples/databases/create-string-attribute.md +2 -0
  102. package/docs/examples/databases/create-text-attribute.md +7 -0
  103. package/docs/examples/databases/create-transaction.md +2 -0
  104. package/docs/examples/databases/create-url-attribute.md +2 -0
  105. package/docs/examples/databases/create-varchar-attribute.md +8 -0
  106. package/docs/examples/databases/create.md +2 -0
  107. package/docs/examples/databases/decrement-document-attribute.md +2 -0
  108. package/docs/examples/databases/delete-attribute.md +2 -0
  109. package/docs/examples/databases/delete-collection.md +2 -0
  110. package/docs/examples/databases/delete-document.md +2 -0
  111. package/docs/examples/databases/delete-documents.md +2 -0
  112. package/docs/examples/databases/delete-index.md +2 -0
  113. package/docs/examples/databases/delete-transaction.md +2 -0
  114. package/docs/examples/databases/delete.md +2 -0
  115. package/docs/examples/databases/get-attribute.md +2 -0
  116. package/docs/examples/databases/get-collection-usage.md +2 -0
  117. package/docs/examples/databases/get-collection.md +2 -0
  118. package/docs/examples/databases/get-document.md +2 -0
  119. package/docs/examples/databases/get-index.md +2 -0
  120. package/docs/examples/databases/get-transaction.md +2 -0
  121. package/docs/examples/databases/get-usage.md +2 -0
  122. package/docs/examples/databases/get.md +2 -0
  123. package/docs/examples/databases/increment-document-attribute.md +2 -0
  124. package/docs/examples/databases/list-attributes.md +2 -0
  125. package/docs/examples/databases/list-collection-logs.md +2 -0
  126. package/docs/examples/databases/list-collections.md +2 -0
  127. package/docs/examples/databases/list-document-logs.md +2 -0
  128. package/docs/examples/databases/list-documents.md +2 -0
  129. package/docs/examples/databases/list-indexes.md +2 -0
  130. package/docs/examples/databases/list-logs.md +2 -0
  131. package/docs/examples/databases/list-transactions.md +2 -0
  132. package/docs/examples/databases/list-usage.md +2 -0
  133. package/docs/examples/databases/list.md +2 -0
  134. package/docs/examples/databases/update-boolean-attribute.md +2 -0
  135. package/docs/examples/databases/update-collection.md +3 -2
  136. package/docs/examples/databases/update-datetime-attribute.md +2 -0
  137. package/docs/examples/databases/update-document.md +2 -0
  138. package/docs/examples/databases/update-documents.md +2 -0
  139. package/docs/examples/databases/update-email-attribute.md +2 -0
  140. package/docs/examples/databases/update-enum-attribute.md +2 -0
  141. package/docs/examples/databases/update-float-attribute.md +2 -0
  142. package/docs/examples/databases/update-integer-attribute.md +2 -0
  143. package/docs/examples/databases/update-ip-attribute.md +2 -0
  144. package/docs/examples/databases/update-line-attribute.md +2 -0
  145. package/docs/examples/databases/update-longtext-attribute.md +8 -0
  146. package/docs/examples/databases/update-mediumtext-attribute.md +8 -0
  147. package/docs/examples/databases/update-point-attribute.md +2 -0
  148. package/docs/examples/databases/update-polygon-attribute.md +2 -0
  149. package/docs/examples/databases/update-relationship-attribute.md +2 -0
  150. package/docs/examples/databases/update-string-attribute.md +2 -0
  151. package/docs/examples/databases/update-text-attribute.md +8 -0
  152. package/docs/examples/databases/update-transaction.md +2 -0
  153. package/docs/examples/databases/update-url-attribute.md +2 -0
  154. package/docs/examples/databases/update-varchar-attribute.md +8 -0
  155. package/docs/examples/databases/update.md +3 -2
  156. package/docs/examples/databases/upsert-document.md +2 -0
  157. package/docs/examples/databases/upsert-documents.md +2 -0
  158. package/docs/examples/functions/create-deployment.md +2 -0
  159. package/docs/examples/functions/create-duplicate-deployment.md +2 -0
  160. package/docs/examples/functions/create-execution.md +2 -0
  161. package/docs/examples/functions/create-template-deployment.md +2 -0
  162. package/docs/examples/functions/create-variable.md +2 -0
  163. package/docs/examples/functions/create-vcs-deployment.md +2 -0
  164. package/docs/examples/functions/create.md +2 -0
  165. package/docs/examples/functions/delete-deployment.md +2 -0
  166. package/docs/examples/functions/delete-execution.md +2 -0
  167. package/docs/examples/functions/delete-variable.md +2 -0
  168. package/docs/examples/functions/delete.md +2 -0
  169. package/docs/examples/functions/get-deployment-download.md +2 -0
  170. package/docs/examples/functions/get-deployment.md +2 -0
  171. package/docs/examples/functions/get-execution.md +2 -0
  172. package/docs/examples/functions/get-template.md +2 -0
  173. package/docs/examples/functions/get-usage.md +2 -0
  174. package/docs/examples/functions/get-variable.md +2 -0
  175. package/docs/examples/functions/get.md +2 -0
  176. package/docs/examples/functions/list-deployments.md +2 -0
  177. package/docs/examples/functions/list-executions.md +2 -0
  178. package/docs/examples/functions/list-runtimes.md +2 -0
  179. package/docs/examples/functions/list-specifications.md +2 -0
  180. package/docs/examples/functions/list-templates.md +2 -0
  181. package/docs/examples/functions/list-usage.md +2 -0
  182. package/docs/examples/functions/list-variables.md +2 -0
  183. package/docs/examples/functions/list.md +2 -0
  184. package/docs/examples/functions/update-deployment-status.md +2 -0
  185. package/docs/examples/functions/update-function-deployment.md +2 -0
  186. package/docs/examples/functions/update-variable.md +2 -0
  187. package/docs/examples/functions/update.md +2 -0
  188. package/docs/examples/graphql/mutation.md +2 -0
  189. package/docs/examples/graphql/query.md +2 -0
  190. package/docs/examples/health/get-antivirus.md +2 -0
  191. package/docs/examples/health/get-cache.md +2 -0
  192. package/docs/examples/health/get-certificate.md +2 -0
  193. package/docs/examples/health/get-db.md +2 -0
  194. package/docs/examples/health/get-failed-jobs.md +2 -0
  195. package/docs/examples/health/get-pub-sub.md +2 -0
  196. package/docs/examples/health/get-queue-audits.md +2 -0
  197. package/docs/examples/health/get-queue-builds.md +2 -0
  198. package/docs/examples/health/get-queue-certificates.md +2 -0
  199. package/docs/examples/health/get-queue-databases.md +2 -0
  200. package/docs/examples/health/get-queue-deletes.md +2 -0
  201. package/docs/examples/health/get-queue-functions.md +2 -0
  202. package/docs/examples/health/get-queue-logs.md +2 -0
  203. package/docs/examples/health/get-queue-mails.md +2 -0
  204. package/docs/examples/health/get-queue-messaging.md +2 -0
  205. package/docs/examples/health/get-queue-migrations.md +2 -0
  206. package/docs/examples/health/get-queue-stats-resources.md +2 -0
  207. package/docs/examples/health/get-queue-usage.md +2 -0
  208. package/docs/examples/health/get-queue-webhooks.md +2 -0
  209. package/docs/examples/health/get-storage-local.md +2 -0
  210. package/docs/examples/health/get-storage.md +2 -0
  211. package/docs/examples/health/get-time.md +2 -0
  212. package/docs/examples/health/get.md +2 -0
  213. package/docs/examples/locale/get.md +2 -0
  214. package/docs/examples/locale/list-codes.md +2 -0
  215. package/docs/examples/locale/list-continents.md +2 -0
  216. package/docs/examples/locale/list-countries-eu.md +2 -0
  217. package/docs/examples/locale/list-countries-phones.md +2 -0
  218. package/docs/examples/locale/list-countries.md +2 -0
  219. package/docs/examples/locale/list-currencies.md +2 -0
  220. package/docs/examples/locale/list-languages.md +2 -0
  221. package/docs/examples/messaging/create-apns-provider.md +2 -0
  222. package/docs/examples/messaging/create-email.md +2 -0
  223. package/docs/examples/messaging/create-fcm-provider.md +2 -0
  224. package/docs/examples/messaging/create-mailgun-provider.md +2 -0
  225. package/docs/examples/messaging/create-msg-91-provider.md +2 -0
  226. package/docs/examples/messaging/create-push.md +2 -0
  227. package/docs/examples/messaging/create-resend-provider.md +2 -0
  228. package/docs/examples/messaging/create-sendgrid-provider.md +2 -0
  229. package/docs/examples/messaging/create-sms.md +2 -0
  230. package/docs/examples/messaging/create-smtp-provider.md +2 -0
  231. package/docs/examples/messaging/create-subscriber.md +2 -0
  232. package/docs/examples/messaging/create-telesign-provider.md +2 -0
  233. package/docs/examples/messaging/create-textmagic-provider.md +2 -0
  234. package/docs/examples/messaging/create-topic.md +2 -0
  235. package/docs/examples/messaging/create-twilio-provider.md +2 -0
  236. package/docs/examples/messaging/create-vonage-provider.md +2 -0
  237. package/docs/examples/messaging/delete-provider.md +2 -0
  238. package/docs/examples/messaging/delete-subscriber.md +2 -0
  239. package/docs/examples/messaging/delete-topic.md +2 -0
  240. package/docs/examples/messaging/delete.md +2 -0
  241. package/docs/examples/messaging/get-message.md +2 -0
  242. package/docs/examples/messaging/get-provider.md +2 -0
  243. package/docs/examples/messaging/get-subscriber.md +2 -0
  244. package/docs/examples/messaging/get-topic.md +2 -0
  245. package/docs/examples/messaging/list-message-logs.md +2 -0
  246. package/docs/examples/messaging/list-messages.md +2 -0
  247. package/docs/examples/messaging/list-provider-logs.md +2 -0
  248. package/docs/examples/messaging/list-providers.md +2 -0
  249. package/docs/examples/messaging/list-subscriber-logs.md +2 -0
  250. package/docs/examples/messaging/list-subscribers.md +2 -0
  251. package/docs/examples/messaging/list-targets.md +2 -0
  252. package/docs/examples/messaging/list-topic-logs.md +2 -0
  253. package/docs/examples/messaging/list-topics.md +2 -0
  254. package/docs/examples/messaging/update-apns-provider.md +2 -0
  255. package/docs/examples/messaging/update-email.md +2 -0
  256. package/docs/examples/messaging/update-fcm-provider.md +2 -0
  257. package/docs/examples/messaging/update-mailgun-provider.md +2 -0
  258. package/docs/examples/messaging/update-msg-91-provider.md +2 -0
  259. package/docs/examples/messaging/update-push.md +2 -0
  260. package/docs/examples/messaging/update-resend-provider.md +2 -0
  261. package/docs/examples/messaging/update-sendgrid-provider.md +2 -0
  262. package/docs/examples/messaging/update-sms.md +2 -0
  263. package/docs/examples/messaging/update-smtp-provider.md +2 -0
  264. package/docs/examples/messaging/update-telesign-provider.md +2 -0
  265. package/docs/examples/messaging/update-textmagic-provider.md +2 -0
  266. package/docs/examples/messaging/update-topic.md +2 -0
  267. package/docs/examples/messaging/update-twilio-provider.md +2 -0
  268. package/docs/examples/messaging/update-vonage-provider.md +2 -0
  269. package/docs/examples/migrations/create-appwrite-migration.md +2 -0
  270. package/docs/examples/migrations/create-csv-export.md +2 -0
  271. package/docs/examples/migrations/create-csv-import.md +2 -0
  272. package/docs/examples/migrations/create-firebase-migration.md +2 -0
  273. package/docs/examples/migrations/create-n-host-migration.md +2 -0
  274. package/docs/examples/migrations/create-supabase-migration.md +2 -0
  275. package/docs/examples/migrations/delete.md +2 -0
  276. package/docs/examples/migrations/get-appwrite-report.md +2 -0
  277. package/docs/examples/migrations/get-firebase-report.md +2 -0
  278. package/docs/examples/migrations/get-n-host-report.md +2 -0
  279. package/docs/examples/migrations/get-supabase-report.md +2 -0
  280. package/docs/examples/migrations/get.md +2 -0
  281. package/docs/examples/migrations/list.md +2 -0
  282. package/docs/examples/migrations/retry.md +2 -0
  283. package/docs/examples/project/create-variable.md +2 -0
  284. package/docs/examples/project/delete-variable.md +2 -0
  285. package/docs/examples/project/get-usage.md +2 -0
  286. package/docs/examples/project/get-variable.md +2 -0
  287. package/docs/examples/project/list-variables.md +2 -0
  288. package/docs/examples/project/update-variable.md +2 -0
  289. package/docs/examples/projects/create-dev-key.md +2 -0
  290. package/docs/examples/projects/create-jwt.md +2 -0
  291. package/docs/examples/projects/create-key.md +2 -0
  292. package/docs/examples/projects/create-platform.md +2 -0
  293. package/docs/examples/projects/create-smtp-test.md +2 -0
  294. package/docs/examples/projects/create-webhook.md +2 -0
  295. package/docs/examples/projects/create.md +2 -0
  296. package/docs/examples/projects/delete-dev-key.md +2 -0
  297. package/docs/examples/projects/delete-email-template.md +2 -0
  298. package/docs/examples/projects/delete-key.md +2 -0
  299. package/docs/examples/projects/delete-platform.md +2 -0
  300. package/docs/examples/projects/delete-sms-template.md +2 -0
  301. package/docs/examples/projects/delete-webhook.md +2 -0
  302. package/docs/examples/projects/delete.md +2 -0
  303. package/docs/examples/projects/get-dev-key.md +2 -0
  304. package/docs/examples/projects/get-email-template.md +2 -0
  305. package/docs/examples/projects/get-key.md +2 -0
  306. package/docs/examples/projects/get-platform.md +2 -0
  307. package/docs/examples/projects/get-sms-template.md +2 -0
  308. package/docs/examples/projects/get-webhook.md +2 -0
  309. package/docs/examples/projects/get.md +2 -0
  310. package/docs/examples/projects/list-dev-keys.md +2 -0
  311. package/docs/examples/projects/list-keys.md +2 -0
  312. package/docs/examples/projects/list-platforms.md +2 -0
  313. package/docs/examples/projects/list-webhooks.md +2 -0
  314. package/docs/examples/projects/list.md +2 -0
  315. package/docs/examples/projects/update-api-status-all.md +2 -0
  316. package/docs/examples/projects/update-api-status.md +2 -0
  317. package/docs/examples/projects/update-auth-duration.md +2 -0
  318. package/docs/examples/projects/update-auth-limit.md +2 -0
  319. package/docs/examples/projects/update-auth-password-dictionary.md +2 -0
  320. package/docs/examples/projects/update-auth-password-history.md +2 -0
  321. package/docs/examples/projects/update-auth-sessions-limit.md +2 -0
  322. package/docs/examples/projects/update-auth-status.md +2 -0
  323. package/docs/examples/projects/update-dev-key.md +2 -0
  324. package/docs/examples/projects/update-email-template.md +2 -0
  325. package/docs/examples/projects/update-key.md +2 -0
  326. package/docs/examples/projects/update-labels.md +2 -0
  327. package/docs/examples/projects/update-memberships-privacy.md +2 -0
  328. package/docs/examples/projects/update-mock-numbers.md +2 -0
  329. package/docs/examples/projects/update-o-auth-2.md +2 -0
  330. package/docs/examples/projects/update-personal-data-check.md +2 -0
  331. package/docs/examples/projects/update-platform.md +2 -0
  332. package/docs/examples/projects/update-service-status-all.md +2 -0
  333. package/docs/examples/projects/update-service-status.md +2 -0
  334. package/docs/examples/projects/update-session-alerts.md +2 -0
  335. package/docs/examples/projects/update-session-invalidation.md +2 -0
  336. package/docs/examples/projects/update-sms-template.md +2 -0
  337. package/docs/examples/projects/update-smtp.md +2 -0
  338. package/docs/examples/projects/update-team.md +2 -0
  339. package/docs/examples/projects/update-webhook-signature.md +2 -0
  340. package/docs/examples/projects/update-webhook.md +2 -0
  341. package/docs/examples/projects/update.md +2 -0
  342. package/docs/examples/proxy/create-api-rule.md +2 -0
  343. package/docs/examples/proxy/create-function-rule.md +2 -0
  344. package/docs/examples/proxy/create-redirect-rule.md +2 -0
  345. package/docs/examples/proxy/create-site-rule.md +2 -0
  346. package/docs/examples/proxy/delete-rule.md +2 -0
  347. package/docs/examples/proxy/get-rule.md +2 -0
  348. package/docs/examples/proxy/list-rules.md +2 -0
  349. package/docs/examples/proxy/update-rule-verification.md +2 -0
  350. package/docs/examples/sites/create-deployment.md +2 -0
  351. package/docs/examples/sites/create-duplicate-deployment.md +2 -0
  352. package/docs/examples/sites/create-template-deployment.md +2 -0
  353. package/docs/examples/sites/create-variable.md +2 -0
  354. package/docs/examples/sites/create-vcs-deployment.md +2 -0
  355. package/docs/examples/sites/create.md +2 -0
  356. package/docs/examples/sites/delete-deployment.md +2 -0
  357. package/docs/examples/sites/delete-log.md +2 -0
  358. package/docs/examples/sites/delete-variable.md +2 -0
  359. package/docs/examples/sites/delete.md +2 -0
  360. package/docs/examples/sites/get-deployment-download.md +2 -0
  361. package/docs/examples/sites/get-deployment.md +2 -0
  362. package/docs/examples/sites/get-log.md +2 -0
  363. package/docs/examples/sites/get-template.md +2 -0
  364. package/docs/examples/sites/get-usage.md +2 -0
  365. package/docs/examples/sites/get-variable.md +2 -0
  366. package/docs/examples/sites/get.md +2 -0
  367. package/docs/examples/sites/list-deployments.md +2 -0
  368. package/docs/examples/sites/list-frameworks.md +2 -0
  369. package/docs/examples/sites/list-logs.md +2 -0
  370. package/docs/examples/sites/list-specifications.md +2 -0
  371. package/docs/examples/sites/list-templates.md +2 -0
  372. package/docs/examples/sites/list-usage.md +2 -0
  373. package/docs/examples/sites/list-variables.md +2 -0
  374. package/docs/examples/sites/list.md +2 -0
  375. package/docs/examples/sites/update-deployment-status.md +2 -0
  376. package/docs/examples/sites/update-site-deployment.md +2 -0
  377. package/docs/examples/sites/update-variable.md +2 -0
  378. package/docs/examples/sites/update.md +2 -0
  379. package/docs/examples/storage/create-bucket.md +2 -0
  380. package/docs/examples/storage/create-file.md +2 -0
  381. package/docs/examples/storage/delete-bucket.md +2 -0
  382. package/docs/examples/storage/delete-file.md +2 -0
  383. package/docs/examples/storage/get-bucket-usage.md +2 -0
  384. package/docs/examples/storage/get-bucket.md +2 -0
  385. package/docs/examples/storage/get-file-download.md +2 -0
  386. package/docs/examples/storage/get-file-preview.md +2 -0
  387. package/docs/examples/storage/get-file-view.md +2 -0
  388. package/docs/examples/storage/get-file.md +2 -0
  389. package/docs/examples/storage/get-usage.md +2 -0
  390. package/docs/examples/storage/list-buckets.md +2 -0
  391. package/docs/examples/storage/list-files.md +2 -0
  392. package/docs/examples/storage/update-bucket.md +2 -0
  393. package/docs/examples/storage/update-file.md +2 -0
  394. package/docs/examples/tablesdb/create-boolean-column.md +2 -0
  395. package/docs/examples/tablesdb/create-datetime-column.md +2 -0
  396. package/docs/examples/tablesdb/create-email-column.md +2 -0
  397. package/docs/examples/tablesdb/create-enum-column.md +2 -0
  398. package/docs/examples/tablesdb/create-float-column.md +2 -0
  399. package/docs/examples/tablesdb/create-index.md +2 -0
  400. package/docs/examples/tablesdb/create-integer-column.md +2 -0
  401. package/docs/examples/tablesdb/create-ip-column.md +2 -0
  402. package/docs/examples/tablesdb/create-line-column.md +2 -0
  403. package/docs/examples/tablesdb/create-longtext-column.md +7 -0
  404. package/docs/examples/tablesdb/create-mediumtext-column.md +7 -0
  405. package/docs/examples/tablesdb/create-operations.md +2 -0
  406. package/docs/examples/tablesdb/create-point-column.md +2 -0
  407. package/docs/examples/tablesdb/create-polygon-column.md +2 -0
  408. package/docs/examples/tablesdb/create-relationship-column.md +2 -0
  409. package/docs/examples/tablesdb/create-row.md +2 -0
  410. package/docs/examples/tablesdb/create-rows.md +2 -0
  411. package/docs/examples/tablesdb/create-string-column.md +2 -0
  412. package/docs/examples/tablesdb/create-table.md +2 -0
  413. package/docs/examples/tablesdb/create-text-column.md +7 -0
  414. package/docs/examples/tablesdb/create-transaction.md +2 -0
  415. package/docs/examples/tablesdb/create-url-column.md +2 -0
  416. package/docs/examples/tablesdb/create-varchar-column.md +8 -0
  417. package/docs/examples/tablesdb/create.md +2 -0
  418. package/docs/examples/tablesdb/decrement-row-column.md +2 -0
  419. package/docs/examples/tablesdb/delete-column.md +2 -0
  420. package/docs/examples/tablesdb/delete-index.md +2 -0
  421. package/docs/examples/tablesdb/delete-row.md +2 -0
  422. package/docs/examples/tablesdb/delete-rows.md +2 -0
  423. package/docs/examples/tablesdb/delete-table.md +2 -0
  424. package/docs/examples/tablesdb/delete-transaction.md +2 -0
  425. package/docs/examples/tablesdb/delete.md +2 -0
  426. package/docs/examples/tablesdb/get-column.md +2 -0
  427. package/docs/examples/tablesdb/get-index.md +2 -0
  428. package/docs/examples/tablesdb/get-row.md +2 -0
  429. package/docs/examples/tablesdb/get-table-usage.md +2 -0
  430. package/docs/examples/tablesdb/get-table.md +2 -0
  431. package/docs/examples/tablesdb/get-transaction.md +2 -0
  432. package/docs/examples/tablesdb/get-usage.md +2 -0
  433. package/docs/examples/tablesdb/get.md +2 -0
  434. package/docs/examples/tablesdb/increment-row-column.md +2 -0
  435. package/docs/examples/tablesdb/list-columns.md +2 -0
  436. package/docs/examples/tablesdb/list-indexes.md +2 -0
  437. package/docs/examples/tablesdb/list-row-logs.md +2 -0
  438. package/docs/examples/tablesdb/list-rows.md +2 -0
  439. package/docs/examples/tablesdb/list-table-logs.md +2 -0
  440. package/docs/examples/tablesdb/list-tables.md +2 -0
  441. package/docs/examples/tablesdb/list-transactions.md +2 -0
  442. package/docs/examples/tablesdb/list-usage.md +2 -0
  443. package/docs/examples/tablesdb/list.md +2 -0
  444. package/docs/examples/tablesdb/update-boolean-column.md +2 -0
  445. package/docs/examples/tablesdb/update-datetime-column.md +2 -0
  446. package/docs/examples/tablesdb/update-email-column.md +2 -0
  447. package/docs/examples/tablesdb/update-enum-column.md +2 -0
  448. package/docs/examples/tablesdb/update-float-column.md +2 -0
  449. package/docs/examples/tablesdb/update-integer-column.md +2 -0
  450. package/docs/examples/tablesdb/update-ip-column.md +2 -0
  451. package/docs/examples/tablesdb/update-line-column.md +2 -0
  452. package/docs/examples/tablesdb/update-longtext-column.md +8 -0
  453. package/docs/examples/tablesdb/update-mediumtext-column.md +8 -0
  454. package/docs/examples/tablesdb/update-point-column.md +2 -0
  455. package/docs/examples/tablesdb/update-polygon-column.md +2 -0
  456. package/docs/examples/tablesdb/update-relationship-column.md +2 -0
  457. package/docs/examples/tablesdb/update-row.md +2 -0
  458. package/docs/examples/tablesdb/update-rows.md +2 -0
  459. package/docs/examples/tablesdb/update-string-column.md +2 -0
  460. package/docs/examples/tablesdb/update-table.md +3 -2
  461. package/docs/examples/tablesdb/update-text-column.md +8 -0
  462. package/docs/examples/tablesdb/update-transaction.md +2 -0
  463. package/docs/examples/tablesdb/update-url-column.md +2 -0
  464. package/docs/examples/tablesdb/update-varchar-column.md +8 -0
  465. package/docs/examples/tablesdb/update.md +3 -2
  466. package/docs/examples/tablesdb/upsert-row.md +2 -0
  467. package/docs/examples/tablesdb/upsert-rows.md +2 -0
  468. package/docs/examples/teams/create-membership.md +2 -0
  469. package/docs/examples/teams/create.md +2 -0
  470. package/docs/examples/teams/delete-membership.md +2 -0
  471. package/docs/examples/teams/delete.md +2 -0
  472. package/docs/examples/teams/get-membership.md +2 -0
  473. package/docs/examples/teams/get-prefs.md +2 -0
  474. package/docs/examples/teams/get.md +2 -0
  475. package/docs/examples/teams/list-logs.md +2 -0
  476. package/docs/examples/teams/list-memberships.md +2 -0
  477. package/docs/examples/teams/list.md +2 -0
  478. package/docs/examples/teams/update-membership-status.md +2 -0
  479. package/docs/examples/teams/update-membership.md +2 -0
  480. package/docs/examples/teams/update-name.md +2 -0
  481. package/docs/examples/teams/update-prefs.md +2 -0
  482. package/docs/examples/tokens/create-file-token.md +2 -0
  483. package/docs/examples/tokens/delete.md +2 -0
  484. package/docs/examples/tokens/get.md +2 -0
  485. package/docs/examples/tokens/list.md +2 -0
  486. package/docs/examples/tokens/update.md +2 -0
  487. package/docs/examples/users/create-argon-2-user.md +2 -0
  488. package/docs/examples/users/create-bcrypt-user.md +2 -0
  489. package/docs/examples/users/create-jwt.md +2 -0
  490. package/docs/examples/users/create-md-5-user.md +2 -0
  491. package/docs/examples/users/create-mfa-recovery-codes.md +2 -0
  492. package/docs/examples/users/create-ph-pass-user.md +2 -0
  493. package/docs/examples/users/create-scrypt-modified-user.md +2 -0
  494. package/docs/examples/users/create-scrypt-user.md +2 -0
  495. package/docs/examples/users/create-session.md +2 -0
  496. package/docs/examples/users/create-sha-user.md +2 -0
  497. package/docs/examples/users/create-target.md +2 -0
  498. package/docs/examples/users/create-token.md +2 -0
  499. package/docs/examples/users/create.md +2 -0
  500. package/docs/examples/users/delete-identity.md +2 -0
  501. package/docs/examples/users/delete-mfa-authenticator.md +2 -0
  502. package/docs/examples/users/delete-session.md +2 -0
  503. package/docs/examples/users/delete-sessions.md +2 -0
  504. package/docs/examples/users/delete-target.md +2 -0
  505. package/docs/examples/users/delete.md +2 -0
  506. package/docs/examples/users/get-mfa-recovery-codes.md +2 -0
  507. package/docs/examples/users/get-prefs.md +2 -0
  508. package/docs/examples/users/get-target.md +2 -0
  509. package/docs/examples/users/get-usage.md +2 -0
  510. package/docs/examples/users/get.md +2 -0
  511. package/docs/examples/users/list-identities.md +2 -0
  512. package/docs/examples/users/list-logs.md +2 -0
  513. package/docs/examples/users/list-memberships.md +2 -0
  514. package/docs/examples/users/list-mfa-factors.md +2 -0
  515. package/docs/examples/users/list-sessions.md +2 -0
  516. package/docs/examples/users/list-targets.md +2 -0
  517. package/docs/examples/users/list.md +2 -0
  518. package/docs/examples/users/update-email-verification.md +2 -0
  519. package/docs/examples/users/update-email.md +2 -0
  520. package/docs/examples/users/update-labels.md +2 -0
  521. package/docs/examples/users/update-mfa-recovery-codes.md +2 -0
  522. package/docs/examples/users/update-mfa.md +2 -0
  523. package/docs/examples/users/update-name.md +2 -0
  524. package/docs/examples/users/update-password.md +2 -0
  525. package/docs/examples/users/update-phone-verification.md +2 -0
  526. package/docs/examples/users/update-phone.md +2 -0
  527. package/docs/examples/users/update-prefs.md +2 -0
  528. package/docs/examples/users/update-status.md +2 -0
  529. package/docs/examples/users/update-target.md +2 -0
  530. package/docs/examples/vcs/create-repository-detection.md +2 -0
  531. package/docs/examples/vcs/create-repository.md +2 -0
  532. package/docs/examples/vcs/delete-installation.md +2 -0
  533. package/docs/examples/vcs/get-installation.md +2 -0
  534. package/docs/examples/vcs/get-repository-contents.md +2 -0
  535. package/docs/examples/vcs/get-repository.md +2 -0
  536. package/docs/examples/vcs/list-installations.md +2 -0
  537. package/docs/examples/vcs/list-repositories.md +2 -0
  538. package/docs/examples/vcs/list-repository-branches.md +2 -0
  539. package/docs/examples/vcs/update-external-deployments.md +2 -0
  540. package/install.ps1 +2 -2
  541. package/install.sh +1 -1
  542. package/lib/commands/config-validations.ts +16 -5
  543. package/lib/commands/generators/typescript/databases.ts +24 -6
  544. package/lib/commands/generic.ts +1 -2
  545. package/lib/commands/init.ts +10 -8
  546. package/lib/commands/pull.ts +7 -0
  547. package/lib/commands/run.ts +2 -1
  548. package/lib/commands/services/account.ts +7 -12
  549. package/lib/commands/services/console.ts +2 -5
  550. package/lib/commands/services/databases.ts +167 -15
  551. package/lib/commands/services/functions.ts +9 -17
  552. package/lib/commands/services/health.ts +2 -5
  553. package/lib/commands/services/messaging.ts +5 -9
  554. package/lib/commands/services/project.ts +2 -5
  555. package/lib/commands/services/projects.ts +15 -28
  556. package/lib/commands/services/proxy.ts +2 -6
  557. package/lib/commands/services/sites.ts +8 -17
  558. package/lib/commands/services/storage.ts +6 -12
  559. package/lib/commands/services/tables-db.ts +167 -15
  560. package/lib/commands/services/users.ts +5 -11
  561. package/lib/commands/services/vcs.ts +3 -6
  562. package/lib/constants.ts +1 -1
  563. package/lib/emulation/utils.ts +2 -2
  564. package/lib/utils.ts +1 -2
  565. package/package.json +2 -2
  566. package/scoop/appwrite.config.json +3 -3
package/dist/index.js CHANGED
@@ -54322,7 +54322,7 @@ var require_parse2 = __commonJS({
54322
54322
  return ch >= "0" && ch <= "9" ? number4() : word();
54323
54323
  }
54324
54324
  };
54325
- return function(source, reviver2) {
54325
+ return function(source, reviver3) {
54326
54326
  var result;
54327
54327
  text = source + "";
54328
54328
  at = 0;
@@ -54332,7 +54332,7 @@ var require_parse2 = __commonJS({
54332
54332
  if (ch) {
54333
54333
  error49("Syntax error");
54334
54334
  }
54335
- return typeof reviver2 === "function" ? (function walk(holder, key) {
54335
+ return typeof reviver3 === "function" ? (function walk(holder, key) {
54336
54336
  var k, v, value2 = holder[key];
54337
54337
  if (value2 && typeof value2 === "object") {
54338
54338
  Object.keys(value2).forEach(function(k2) {
@@ -54344,7 +54344,7 @@ var require_parse2 = __commonJS({
54344
54344
  }
54345
54345
  });
54346
54346
  }
54347
- return reviver2.call(holder, key, value2);
54347
+ return reviver3.call(holder, key, value2);
54348
54348
  })({ "": result }, "") : result;
54349
54349
  };
54350
54350
  };
@@ -70688,7 +70688,7 @@ var id_default = ID;
70688
70688
  // lib/constants.ts
70689
70689
  var SDK_TITLE = "Appwrite";
70690
70690
  var SDK_TITLE_LOWER = "appwrite";
70691
- var SDK_VERSION = "13.1.0";
70691
+ var SDK_VERSION = "13.2.0";
70692
70692
  var SDK_LOGO = "\n _ _ _ ___ __ _____\n /_\\ _ __ _ ____ ___ __(_) |_ ___ / __\\ / / \\_ \\\n //_\\\\| '_ \\| '_ \\ \\ /\\ / / '__| | __/ _ \\ / / / / / /\\/\n / _ \\ |_) | |_) \\ V V /| | | | || __/ / /___/ /___/\\/ /_\n \\_/ \\_/ .__/| .__/ \\_/\\_/ |_| |_|\\__\\___| \\____/\\____/\\____/\n |_| |_|\n\n";
70693
70693
  var EXECUTABLE_NAME = "appwrite";
70694
70694
  var NPM_PACKAGE_NAME = "appwrite-cli";
@@ -84479,7 +84479,13 @@ var validateRequiredDefault = (data) => {
84479
84479
  return true;
84480
84480
  };
84481
84481
  var validateStringSize = (data) => {
84482
- if (data.type === "string" && (data.size === void 0 || data.size === null)) {
84482
+ if (data.type !== "string") {
84483
+ return true;
84484
+ }
84485
+ if (data.format && data.format !== "") {
84486
+ return true;
84487
+ }
84488
+ if (data.size === void 0 || data.size === null) {
84483
84489
  return false;
84484
84490
  }
84485
84491
  return true;
@@ -84905,8 +84911,8 @@ var createSettingsObject = (project) => {
84905
84911
  }
84906
84912
  };
84907
84913
  };
84908
- var checkDeployConditions = (localConfig3) => {
84909
- if (Object.keys(localConfig3.data).length === 0) {
84914
+ var checkDeployConditions = (localConfig2) => {
84915
+ if (Object.keys(localConfig2.data).length === 0) {
84910
84916
  throw new Error(
84911
84917
  "No appwrite.config.json file found in the current directory. Please run this command again in the folder containing your appwrite.config.json file, or run 'appwrite init project' to link current directory to an Appwrite project."
84912
84918
  );
@@ -86949,7 +86955,7 @@ var Global = class _Global extends Config {
86949
86955
  }
86950
86956
  }
86951
86957
  };
86952
- var localConfig2 = new Local();
86958
+ var localConfig = new Local();
86953
86959
  var globalConfig2 = new Global();
86954
86960
 
86955
86961
  // lib/commands/utils/error-formatter.ts
@@ -87517,12 +87523,7 @@ var JSONbigParser2 = (0, import_json_bigint2.default)({ storeAsString: false });
87517
87523
  var JSONbigSerializer2 = (0, import_json_bigint2.default)({ useNativeBigInt: true });
87518
87524
  var MAX_SAFE2 = BigInt(Number.MAX_SAFE_INTEGER);
87519
87525
  var MIN_SAFE2 = BigInt(Number.MIN_SAFE_INTEGER);
87520
- function convertBigNumbers(value) {
87521
- if (value === null || value === void 0)
87522
- return value;
87523
- if (Array.isArray(value)) {
87524
- return value.map(convertBigNumbers);
87525
- }
87526
+ function reviver2(_key, value) {
87526
87527
  if (import_bignumber2.default.isBigNumber(value)) {
87527
87528
  if (value.isInteger()) {
87528
87529
  const str = value.toFixed();
@@ -87534,17 +87535,10 @@ function convertBigNumbers(value) {
87534
87535
  }
87535
87536
  return value.toNumber();
87536
87537
  }
87537
- if (typeof value === "object") {
87538
- const result = {};
87539
- for (const [k, v] of Object.entries(value)) {
87540
- result[k] = convertBigNumbers(v);
87541
- }
87542
- return result;
87543
- }
87544
87538
  return value;
87545
87539
  }
87546
87540
  var JSONbig = {
87547
- parse: (text) => convertBigNumbers(JSONbigParser2.parse(text)),
87541
+ parse: (text) => JSONbigParser2.parse(text, reviver2),
87548
87542
  stringify: JSONbigSerializer2.stringify
87549
87543
  };
87550
87544
  var AppwriteException = class extends Error {
@@ -87584,7 +87578,7 @@ var Client = class _Client {
87584
87578
  "x-sdk-name": "Console",
87585
87579
  "x-sdk-platform": "console",
87586
87580
  "x-sdk-language": "web",
87587
- "x-sdk-version": "2.1.3",
87581
+ "x-sdk-version": "2.2.0",
87588
87582
  "X-Appwrite-Response-Format": "1.8.0"
87589
87583
  };
87590
87584
  this.realtime = {
@@ -88214,24 +88208,15 @@ var Console = class {
88214
88208
  };
88215
88209
  return this.client.call("post", uri, apiHeaders, payload);
88216
88210
  }
88217
- getRegions(paramsOrFirst) {
88218
- let params;
88219
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
88220
- params = paramsOrFirst || {};
88221
- } else {
88222
- params = {
88223
- organizationId: paramsOrFirst
88224
- };
88225
- }
88226
- const organizationId = params.organizationId;
88227
- if (typeof organizationId === "undefined") {
88228
- throw new AppwriteException('Missing required parameter: "organizationId"');
88229
- }
88211
+ /**
88212
+ * Get all available regions for the console.
88213
+ *
88214
+ * @throws {AppwriteException}
88215
+ * @returns {Promise<Models.ConsoleRegionList>}
88216
+ */
88217
+ listRegions() {
88230
88218
  const apiPath = "/console/regions";
88231
88219
  const payload = {};
88232
- if (typeof organizationId !== "undefined") {
88233
- payload["organizationId"] = organizationId;
88234
- }
88235
88220
  const uri = new URL(this.client.config.endpoint + apiPath);
88236
88221
  const apiHeaders = {};
88237
88222
  return this.client.call("get", uri, apiHeaders, payload);
@@ -88668,9 +88653,6 @@ var Databases = class {
88668
88653
  if (typeof databaseId === "undefined") {
88669
88654
  throw new AppwriteException('Missing required parameter: "databaseId"');
88670
88655
  }
88671
- if (typeof name === "undefined") {
88672
- throw new AppwriteException('Missing required parameter: "name"');
88673
- }
88674
88656
  const apiPath = "/databases/{databaseId}".replace("{databaseId}", databaseId);
88675
88657
  const payload = {};
88676
88658
  if (typeof name !== "undefined") {
@@ -88852,9 +88834,6 @@ var Databases = class {
88852
88834
  if (typeof collectionId === "undefined") {
88853
88835
  throw new AppwriteException('Missing required parameter: "collectionId"');
88854
88836
  }
88855
- if (typeof name === "undefined") {
88856
- throw new AppwriteException('Missing required parameter: "name"');
88857
- }
88858
88837
  const apiPath = "/databases/{databaseId}/collections/{collectionId}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
88859
88838
  const payload = {};
88860
88839
  if (typeof name !== "undefined") {
@@ -89815,6 +89794,214 @@ var Databases = class {
89815
89794
  };
89816
89795
  return this.client.call("patch", uri, apiHeaders, payload);
89817
89796
  }
89797
+ createLongtextAttribute(paramsOrFirst, ...rest) {
89798
+ let params;
89799
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
89800
+ params = paramsOrFirst || {};
89801
+ } else {
89802
+ params = {
89803
+ databaseId: paramsOrFirst,
89804
+ collectionId: rest[0],
89805
+ key: rest[1],
89806
+ required: rest[2],
89807
+ xdefault: rest[3],
89808
+ array: rest[4]
89809
+ };
89810
+ }
89811
+ const databaseId = params.databaseId;
89812
+ const collectionId = params.collectionId;
89813
+ const key = params.key;
89814
+ const required2 = params.required;
89815
+ const xdefault = params.xdefault;
89816
+ const array2 = params.array;
89817
+ if (typeof databaseId === "undefined") {
89818
+ throw new AppwriteException('Missing required parameter: "databaseId"');
89819
+ }
89820
+ if (typeof collectionId === "undefined") {
89821
+ throw new AppwriteException('Missing required parameter: "collectionId"');
89822
+ }
89823
+ if (typeof key === "undefined") {
89824
+ throw new AppwriteException('Missing required parameter: "key"');
89825
+ }
89826
+ if (typeof required2 === "undefined") {
89827
+ throw new AppwriteException('Missing required parameter: "required"');
89828
+ }
89829
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/longtext".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
89830
+ const payload = {};
89831
+ if (typeof key !== "undefined") {
89832
+ payload["key"] = key;
89833
+ }
89834
+ if (typeof required2 !== "undefined") {
89835
+ payload["required"] = required2;
89836
+ }
89837
+ if (typeof xdefault !== "undefined") {
89838
+ payload["default"] = xdefault;
89839
+ }
89840
+ if (typeof array2 !== "undefined") {
89841
+ payload["array"] = array2;
89842
+ }
89843
+ const uri = new URL(this.client.config.endpoint + apiPath);
89844
+ const apiHeaders = {
89845
+ "content-type": "application/json"
89846
+ };
89847
+ return this.client.call("post", uri, apiHeaders, payload);
89848
+ }
89849
+ updateLongtextAttribute(paramsOrFirst, ...rest) {
89850
+ let params;
89851
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
89852
+ params = paramsOrFirst || {};
89853
+ } else {
89854
+ params = {
89855
+ databaseId: paramsOrFirst,
89856
+ collectionId: rest[0],
89857
+ key: rest[1],
89858
+ required: rest[2],
89859
+ xdefault: rest[3],
89860
+ newKey: rest[4]
89861
+ };
89862
+ }
89863
+ const databaseId = params.databaseId;
89864
+ const collectionId = params.collectionId;
89865
+ const key = params.key;
89866
+ const required2 = params.required;
89867
+ const xdefault = params.xdefault;
89868
+ const newKey = params.newKey;
89869
+ if (typeof databaseId === "undefined") {
89870
+ throw new AppwriteException('Missing required parameter: "databaseId"');
89871
+ }
89872
+ if (typeof collectionId === "undefined") {
89873
+ throw new AppwriteException('Missing required parameter: "collectionId"');
89874
+ }
89875
+ if (typeof key === "undefined") {
89876
+ throw new AppwriteException('Missing required parameter: "key"');
89877
+ }
89878
+ if (typeof required2 === "undefined") {
89879
+ throw new AppwriteException('Missing required parameter: "required"');
89880
+ }
89881
+ if (typeof xdefault === "undefined") {
89882
+ throw new AppwriteException('Missing required parameter: "xdefault"');
89883
+ }
89884
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/longtext/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
89885
+ const payload = {};
89886
+ if (typeof required2 !== "undefined") {
89887
+ payload["required"] = required2;
89888
+ }
89889
+ if (typeof xdefault !== "undefined") {
89890
+ payload["default"] = xdefault;
89891
+ }
89892
+ if (typeof newKey !== "undefined") {
89893
+ payload["newKey"] = newKey;
89894
+ }
89895
+ const uri = new URL(this.client.config.endpoint + apiPath);
89896
+ const apiHeaders = {
89897
+ "content-type": "application/json"
89898
+ };
89899
+ return this.client.call("patch", uri, apiHeaders, payload);
89900
+ }
89901
+ createMediumtextAttribute(paramsOrFirst, ...rest) {
89902
+ let params;
89903
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
89904
+ params = paramsOrFirst || {};
89905
+ } else {
89906
+ params = {
89907
+ databaseId: paramsOrFirst,
89908
+ collectionId: rest[0],
89909
+ key: rest[1],
89910
+ required: rest[2],
89911
+ xdefault: rest[3],
89912
+ array: rest[4]
89913
+ };
89914
+ }
89915
+ const databaseId = params.databaseId;
89916
+ const collectionId = params.collectionId;
89917
+ const key = params.key;
89918
+ const required2 = params.required;
89919
+ const xdefault = params.xdefault;
89920
+ const array2 = params.array;
89921
+ if (typeof databaseId === "undefined") {
89922
+ throw new AppwriteException('Missing required parameter: "databaseId"');
89923
+ }
89924
+ if (typeof collectionId === "undefined") {
89925
+ throw new AppwriteException('Missing required parameter: "collectionId"');
89926
+ }
89927
+ if (typeof key === "undefined") {
89928
+ throw new AppwriteException('Missing required parameter: "key"');
89929
+ }
89930
+ if (typeof required2 === "undefined") {
89931
+ throw new AppwriteException('Missing required parameter: "required"');
89932
+ }
89933
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
89934
+ const payload = {};
89935
+ if (typeof key !== "undefined") {
89936
+ payload["key"] = key;
89937
+ }
89938
+ if (typeof required2 !== "undefined") {
89939
+ payload["required"] = required2;
89940
+ }
89941
+ if (typeof xdefault !== "undefined") {
89942
+ payload["default"] = xdefault;
89943
+ }
89944
+ if (typeof array2 !== "undefined") {
89945
+ payload["array"] = array2;
89946
+ }
89947
+ const uri = new URL(this.client.config.endpoint + apiPath);
89948
+ const apiHeaders = {
89949
+ "content-type": "application/json"
89950
+ };
89951
+ return this.client.call("post", uri, apiHeaders, payload);
89952
+ }
89953
+ updateMediumtextAttribute(paramsOrFirst, ...rest) {
89954
+ let params;
89955
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
89956
+ params = paramsOrFirst || {};
89957
+ } else {
89958
+ params = {
89959
+ databaseId: paramsOrFirst,
89960
+ collectionId: rest[0],
89961
+ key: rest[1],
89962
+ required: rest[2],
89963
+ xdefault: rest[3],
89964
+ newKey: rest[4]
89965
+ };
89966
+ }
89967
+ const databaseId = params.databaseId;
89968
+ const collectionId = params.collectionId;
89969
+ const key = params.key;
89970
+ const required2 = params.required;
89971
+ const xdefault = params.xdefault;
89972
+ const newKey = params.newKey;
89973
+ if (typeof databaseId === "undefined") {
89974
+ throw new AppwriteException('Missing required parameter: "databaseId"');
89975
+ }
89976
+ if (typeof collectionId === "undefined") {
89977
+ throw new AppwriteException('Missing required parameter: "collectionId"');
89978
+ }
89979
+ if (typeof key === "undefined") {
89980
+ throw new AppwriteException('Missing required parameter: "key"');
89981
+ }
89982
+ if (typeof required2 === "undefined") {
89983
+ throw new AppwriteException('Missing required parameter: "required"');
89984
+ }
89985
+ if (typeof xdefault === "undefined") {
89986
+ throw new AppwriteException('Missing required parameter: "xdefault"');
89987
+ }
89988
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
89989
+ const payload = {};
89990
+ if (typeof required2 !== "undefined") {
89991
+ payload["required"] = required2;
89992
+ }
89993
+ if (typeof xdefault !== "undefined") {
89994
+ payload["default"] = xdefault;
89995
+ }
89996
+ if (typeof newKey !== "undefined") {
89997
+ payload["newKey"] = newKey;
89998
+ }
89999
+ const uri = new URL(this.client.config.endpoint + apiPath);
90000
+ const apiHeaders = {
90001
+ "content-type": "application/json"
90002
+ };
90003
+ return this.client.call("patch", uri, apiHeaders, payload);
90004
+ }
89818
90005
  createPointAttribute(paramsOrFirst, ...rest) {
89819
90006
  let params;
89820
90007
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -90171,7 +90358,332 @@ var Databases = class {
90171
90358
  if (typeof xdefault === "undefined") {
90172
90359
  throw new AppwriteException('Missing required parameter: "xdefault"');
90173
90360
  }
90174
- const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
90361
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
90362
+ const payload = {};
90363
+ if (typeof required2 !== "undefined") {
90364
+ payload["required"] = required2;
90365
+ }
90366
+ if (typeof xdefault !== "undefined") {
90367
+ payload["default"] = xdefault;
90368
+ }
90369
+ if (typeof size !== "undefined") {
90370
+ payload["size"] = size;
90371
+ }
90372
+ if (typeof newKey !== "undefined") {
90373
+ payload["newKey"] = newKey;
90374
+ }
90375
+ const uri = new URL(this.client.config.endpoint + apiPath);
90376
+ const apiHeaders = {
90377
+ "content-type": "application/json"
90378
+ };
90379
+ return this.client.call("patch", uri, apiHeaders, payload);
90380
+ }
90381
+ createTextAttribute(paramsOrFirst, ...rest) {
90382
+ let params;
90383
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
90384
+ params = paramsOrFirst || {};
90385
+ } else {
90386
+ params = {
90387
+ databaseId: paramsOrFirst,
90388
+ collectionId: rest[0],
90389
+ key: rest[1],
90390
+ required: rest[2],
90391
+ xdefault: rest[3],
90392
+ array: rest[4]
90393
+ };
90394
+ }
90395
+ const databaseId = params.databaseId;
90396
+ const collectionId = params.collectionId;
90397
+ const key = params.key;
90398
+ const required2 = params.required;
90399
+ const xdefault = params.xdefault;
90400
+ const array2 = params.array;
90401
+ if (typeof databaseId === "undefined") {
90402
+ throw new AppwriteException('Missing required parameter: "databaseId"');
90403
+ }
90404
+ if (typeof collectionId === "undefined") {
90405
+ throw new AppwriteException('Missing required parameter: "collectionId"');
90406
+ }
90407
+ if (typeof key === "undefined") {
90408
+ throw new AppwriteException('Missing required parameter: "key"');
90409
+ }
90410
+ if (typeof required2 === "undefined") {
90411
+ throw new AppwriteException('Missing required parameter: "required"');
90412
+ }
90413
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/text".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
90414
+ const payload = {};
90415
+ if (typeof key !== "undefined") {
90416
+ payload["key"] = key;
90417
+ }
90418
+ if (typeof required2 !== "undefined") {
90419
+ payload["required"] = required2;
90420
+ }
90421
+ if (typeof xdefault !== "undefined") {
90422
+ payload["default"] = xdefault;
90423
+ }
90424
+ if (typeof array2 !== "undefined") {
90425
+ payload["array"] = array2;
90426
+ }
90427
+ const uri = new URL(this.client.config.endpoint + apiPath);
90428
+ const apiHeaders = {
90429
+ "content-type": "application/json"
90430
+ };
90431
+ return this.client.call("post", uri, apiHeaders, payload);
90432
+ }
90433
+ updateTextAttribute(paramsOrFirst, ...rest) {
90434
+ let params;
90435
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
90436
+ params = paramsOrFirst || {};
90437
+ } else {
90438
+ params = {
90439
+ databaseId: paramsOrFirst,
90440
+ collectionId: rest[0],
90441
+ key: rest[1],
90442
+ required: rest[2],
90443
+ xdefault: rest[3],
90444
+ newKey: rest[4]
90445
+ };
90446
+ }
90447
+ const databaseId = params.databaseId;
90448
+ const collectionId = params.collectionId;
90449
+ const key = params.key;
90450
+ const required2 = params.required;
90451
+ const xdefault = params.xdefault;
90452
+ const newKey = params.newKey;
90453
+ if (typeof databaseId === "undefined") {
90454
+ throw new AppwriteException('Missing required parameter: "databaseId"');
90455
+ }
90456
+ if (typeof collectionId === "undefined") {
90457
+ throw new AppwriteException('Missing required parameter: "collectionId"');
90458
+ }
90459
+ if (typeof key === "undefined") {
90460
+ throw new AppwriteException('Missing required parameter: "key"');
90461
+ }
90462
+ if (typeof required2 === "undefined") {
90463
+ throw new AppwriteException('Missing required parameter: "required"');
90464
+ }
90465
+ if (typeof xdefault === "undefined") {
90466
+ throw new AppwriteException('Missing required parameter: "xdefault"');
90467
+ }
90468
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/text/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
90469
+ const payload = {};
90470
+ if (typeof required2 !== "undefined") {
90471
+ payload["required"] = required2;
90472
+ }
90473
+ if (typeof xdefault !== "undefined") {
90474
+ payload["default"] = xdefault;
90475
+ }
90476
+ if (typeof newKey !== "undefined") {
90477
+ payload["newKey"] = newKey;
90478
+ }
90479
+ const uri = new URL(this.client.config.endpoint + apiPath);
90480
+ const apiHeaders = {
90481
+ "content-type": "application/json"
90482
+ };
90483
+ return this.client.call("patch", uri, apiHeaders, payload);
90484
+ }
90485
+ createUrlAttribute(paramsOrFirst, ...rest) {
90486
+ let params;
90487
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
90488
+ params = paramsOrFirst || {};
90489
+ } else {
90490
+ params = {
90491
+ databaseId: paramsOrFirst,
90492
+ collectionId: rest[0],
90493
+ key: rest[1],
90494
+ required: rest[2],
90495
+ xdefault: rest[3],
90496
+ array: rest[4]
90497
+ };
90498
+ }
90499
+ const databaseId = params.databaseId;
90500
+ const collectionId = params.collectionId;
90501
+ const key = params.key;
90502
+ const required2 = params.required;
90503
+ const xdefault = params.xdefault;
90504
+ const array2 = params.array;
90505
+ if (typeof databaseId === "undefined") {
90506
+ throw new AppwriteException('Missing required parameter: "databaseId"');
90507
+ }
90508
+ if (typeof collectionId === "undefined") {
90509
+ throw new AppwriteException('Missing required parameter: "collectionId"');
90510
+ }
90511
+ if (typeof key === "undefined") {
90512
+ throw new AppwriteException('Missing required parameter: "key"');
90513
+ }
90514
+ if (typeof required2 === "undefined") {
90515
+ throw new AppwriteException('Missing required parameter: "required"');
90516
+ }
90517
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/url".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
90518
+ const payload = {};
90519
+ if (typeof key !== "undefined") {
90520
+ payload["key"] = key;
90521
+ }
90522
+ if (typeof required2 !== "undefined") {
90523
+ payload["required"] = required2;
90524
+ }
90525
+ if (typeof xdefault !== "undefined") {
90526
+ payload["default"] = xdefault;
90527
+ }
90528
+ if (typeof array2 !== "undefined") {
90529
+ payload["array"] = array2;
90530
+ }
90531
+ const uri = new URL(this.client.config.endpoint + apiPath);
90532
+ const apiHeaders = {
90533
+ "content-type": "application/json"
90534
+ };
90535
+ return this.client.call("post", uri, apiHeaders, payload);
90536
+ }
90537
+ updateUrlAttribute(paramsOrFirst, ...rest) {
90538
+ let params;
90539
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
90540
+ params = paramsOrFirst || {};
90541
+ } else {
90542
+ params = {
90543
+ databaseId: paramsOrFirst,
90544
+ collectionId: rest[0],
90545
+ key: rest[1],
90546
+ required: rest[2],
90547
+ xdefault: rest[3],
90548
+ newKey: rest[4]
90549
+ };
90550
+ }
90551
+ const databaseId = params.databaseId;
90552
+ const collectionId = params.collectionId;
90553
+ const key = params.key;
90554
+ const required2 = params.required;
90555
+ const xdefault = params.xdefault;
90556
+ const newKey = params.newKey;
90557
+ if (typeof databaseId === "undefined") {
90558
+ throw new AppwriteException('Missing required parameter: "databaseId"');
90559
+ }
90560
+ if (typeof collectionId === "undefined") {
90561
+ throw new AppwriteException('Missing required parameter: "collectionId"');
90562
+ }
90563
+ if (typeof key === "undefined") {
90564
+ throw new AppwriteException('Missing required parameter: "key"');
90565
+ }
90566
+ if (typeof required2 === "undefined") {
90567
+ throw new AppwriteException('Missing required parameter: "required"');
90568
+ }
90569
+ if (typeof xdefault === "undefined") {
90570
+ throw new AppwriteException('Missing required parameter: "xdefault"');
90571
+ }
90572
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
90573
+ const payload = {};
90574
+ if (typeof required2 !== "undefined") {
90575
+ payload["required"] = required2;
90576
+ }
90577
+ if (typeof xdefault !== "undefined") {
90578
+ payload["default"] = xdefault;
90579
+ }
90580
+ if (typeof newKey !== "undefined") {
90581
+ payload["newKey"] = newKey;
90582
+ }
90583
+ const uri = new URL(this.client.config.endpoint + apiPath);
90584
+ const apiHeaders = {
90585
+ "content-type": "application/json"
90586
+ };
90587
+ return this.client.call("patch", uri, apiHeaders, payload);
90588
+ }
90589
+ createVarcharAttribute(paramsOrFirst, ...rest) {
90590
+ let params;
90591
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
90592
+ params = paramsOrFirst || {};
90593
+ } else {
90594
+ params = {
90595
+ databaseId: paramsOrFirst,
90596
+ collectionId: rest[0],
90597
+ key: rest[1],
90598
+ size: rest[2],
90599
+ required: rest[3],
90600
+ xdefault: rest[4],
90601
+ array: rest[5]
90602
+ };
90603
+ }
90604
+ const databaseId = params.databaseId;
90605
+ const collectionId = params.collectionId;
90606
+ const key = params.key;
90607
+ const size = params.size;
90608
+ const required2 = params.required;
90609
+ const xdefault = params.xdefault;
90610
+ const array2 = params.array;
90611
+ if (typeof databaseId === "undefined") {
90612
+ throw new AppwriteException('Missing required parameter: "databaseId"');
90613
+ }
90614
+ if (typeof collectionId === "undefined") {
90615
+ throw new AppwriteException('Missing required parameter: "collectionId"');
90616
+ }
90617
+ if (typeof key === "undefined") {
90618
+ throw new AppwriteException('Missing required parameter: "key"');
90619
+ }
90620
+ if (typeof size === "undefined") {
90621
+ throw new AppwriteException('Missing required parameter: "size"');
90622
+ }
90623
+ if (typeof required2 === "undefined") {
90624
+ throw new AppwriteException('Missing required parameter: "required"');
90625
+ }
90626
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/varchar".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
90627
+ const payload = {};
90628
+ if (typeof key !== "undefined") {
90629
+ payload["key"] = key;
90630
+ }
90631
+ if (typeof size !== "undefined") {
90632
+ payload["size"] = size;
90633
+ }
90634
+ if (typeof required2 !== "undefined") {
90635
+ payload["required"] = required2;
90636
+ }
90637
+ if (typeof xdefault !== "undefined") {
90638
+ payload["default"] = xdefault;
90639
+ }
90640
+ if (typeof array2 !== "undefined") {
90641
+ payload["array"] = array2;
90642
+ }
90643
+ const uri = new URL(this.client.config.endpoint + apiPath);
90644
+ const apiHeaders = {
90645
+ "content-type": "application/json"
90646
+ };
90647
+ return this.client.call("post", uri, apiHeaders, payload);
90648
+ }
90649
+ updateVarcharAttribute(paramsOrFirst, ...rest) {
90650
+ let params;
90651
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
90652
+ params = paramsOrFirst || {};
90653
+ } else {
90654
+ params = {
90655
+ databaseId: paramsOrFirst,
90656
+ collectionId: rest[0],
90657
+ key: rest[1],
90658
+ required: rest[2],
90659
+ xdefault: rest[3],
90660
+ size: rest[4],
90661
+ newKey: rest[5]
90662
+ };
90663
+ }
90664
+ const databaseId = params.databaseId;
90665
+ const collectionId = params.collectionId;
90666
+ const key = params.key;
90667
+ const required2 = params.required;
90668
+ const xdefault = params.xdefault;
90669
+ const size = params.size;
90670
+ const newKey = params.newKey;
90671
+ if (typeof databaseId === "undefined") {
90672
+ throw new AppwriteException('Missing required parameter: "databaseId"');
90673
+ }
90674
+ if (typeof collectionId === "undefined") {
90675
+ throw new AppwriteException('Missing required parameter: "collectionId"');
90676
+ }
90677
+ if (typeof key === "undefined") {
90678
+ throw new AppwriteException('Missing required parameter: "key"');
90679
+ }
90680
+ if (typeof required2 === "undefined") {
90681
+ throw new AppwriteException('Missing required parameter: "required"');
90682
+ }
90683
+ if (typeof xdefault === "undefined") {
90684
+ throw new AppwriteException('Missing required parameter: "xdefault"');
90685
+ }
90686
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/varchar/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
90175
90687
  const payload = {};
90176
90688
  if (typeof required2 !== "undefined") {
90177
90689
  payload["required"] = required2;
@@ -90191,110 +90703,6 @@ var Databases = class {
90191
90703
  };
90192
90704
  return this.client.call("patch", uri, apiHeaders, payload);
90193
90705
  }
90194
- createUrlAttribute(paramsOrFirst, ...rest) {
90195
- let params;
90196
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
90197
- params = paramsOrFirst || {};
90198
- } else {
90199
- params = {
90200
- databaseId: paramsOrFirst,
90201
- collectionId: rest[0],
90202
- key: rest[1],
90203
- required: rest[2],
90204
- xdefault: rest[3],
90205
- array: rest[4]
90206
- };
90207
- }
90208
- const databaseId = params.databaseId;
90209
- const collectionId = params.collectionId;
90210
- const key = params.key;
90211
- const required2 = params.required;
90212
- const xdefault = params.xdefault;
90213
- const array2 = params.array;
90214
- if (typeof databaseId === "undefined") {
90215
- throw new AppwriteException('Missing required parameter: "databaseId"');
90216
- }
90217
- if (typeof collectionId === "undefined") {
90218
- throw new AppwriteException('Missing required parameter: "collectionId"');
90219
- }
90220
- if (typeof key === "undefined") {
90221
- throw new AppwriteException('Missing required parameter: "key"');
90222
- }
90223
- if (typeof required2 === "undefined") {
90224
- throw new AppwriteException('Missing required parameter: "required"');
90225
- }
90226
- const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/url".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
90227
- const payload = {};
90228
- if (typeof key !== "undefined") {
90229
- payload["key"] = key;
90230
- }
90231
- if (typeof required2 !== "undefined") {
90232
- payload["required"] = required2;
90233
- }
90234
- if (typeof xdefault !== "undefined") {
90235
- payload["default"] = xdefault;
90236
- }
90237
- if (typeof array2 !== "undefined") {
90238
- payload["array"] = array2;
90239
- }
90240
- const uri = new URL(this.client.config.endpoint + apiPath);
90241
- const apiHeaders = {
90242
- "content-type": "application/json"
90243
- };
90244
- return this.client.call("post", uri, apiHeaders, payload);
90245
- }
90246
- updateUrlAttribute(paramsOrFirst, ...rest) {
90247
- let params;
90248
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
90249
- params = paramsOrFirst || {};
90250
- } else {
90251
- params = {
90252
- databaseId: paramsOrFirst,
90253
- collectionId: rest[0],
90254
- key: rest[1],
90255
- required: rest[2],
90256
- xdefault: rest[3],
90257
- newKey: rest[4]
90258
- };
90259
- }
90260
- const databaseId = params.databaseId;
90261
- const collectionId = params.collectionId;
90262
- const key = params.key;
90263
- const required2 = params.required;
90264
- const xdefault = params.xdefault;
90265
- const newKey = params.newKey;
90266
- if (typeof databaseId === "undefined") {
90267
- throw new AppwriteException('Missing required parameter: "databaseId"');
90268
- }
90269
- if (typeof collectionId === "undefined") {
90270
- throw new AppwriteException('Missing required parameter: "collectionId"');
90271
- }
90272
- if (typeof key === "undefined") {
90273
- throw new AppwriteException('Missing required parameter: "key"');
90274
- }
90275
- if (typeof required2 === "undefined") {
90276
- throw new AppwriteException('Missing required parameter: "required"');
90277
- }
90278
- if (typeof xdefault === "undefined") {
90279
- throw new AppwriteException('Missing required parameter: "xdefault"');
90280
- }
90281
- const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
90282
- const payload = {};
90283
- if (typeof required2 !== "undefined") {
90284
- payload["required"] = required2;
90285
- }
90286
- if (typeof xdefault !== "undefined") {
90287
- payload["default"] = xdefault;
90288
- }
90289
- if (typeof newKey !== "undefined") {
90290
- payload["newKey"] = newKey;
90291
- }
90292
- const uri = new URL(this.client.config.endpoint + apiPath);
90293
- const apiHeaders = {
90294
- "content-type": "application/json"
90295
- };
90296
- return this.client.call("patch", uri, apiHeaders, payload);
90297
- }
90298
90706
  getAttribute(paramsOrFirst, ...rest) {
90299
90707
  let params;
90300
90708
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -91382,7 +91790,7 @@ var Functions = class {
91382
91790
  }
91383
91791
  listTemplates(paramsOrFirst, ...rest) {
91384
91792
  let params;
91385
- if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
91793
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && "runtimes" in paramsOrFirst) {
91386
91794
  params = paramsOrFirst || {};
91387
91795
  } else {
91388
91796
  params = {
@@ -95150,7 +95558,7 @@ var Organizations = class {
95150
95558
  }
95151
95559
  estimationCreateOrganization(paramsOrFirst, ...rest) {
95152
95560
  let params;
95153
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && "billingPlan" in paramsOrFirst) {
95561
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
95154
95562
  params = paramsOrFirst || {};
95155
95563
  } else {
95156
95564
  params = {
@@ -95773,6 +96181,169 @@ var Organizations = class {
95773
96181
  const apiHeaders = {};
95774
96182
  return this.client.call("get", uri, apiHeaders, payload);
95775
96183
  }
96184
+ listKeys(paramsOrFirst, ...rest) {
96185
+ let params;
96186
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
96187
+ params = paramsOrFirst || {};
96188
+ } else {
96189
+ params = {
96190
+ organizationId: paramsOrFirst,
96191
+ total: rest[0]
96192
+ };
96193
+ }
96194
+ const organizationId = params.organizationId;
96195
+ const total = params.total;
96196
+ if (typeof organizationId === "undefined") {
96197
+ throw new AppwriteException('Missing required parameter: "organizationId"');
96198
+ }
96199
+ const apiPath = "/organizations/{organizationId}/keys".replace("{organizationId}", organizationId);
96200
+ const payload = {};
96201
+ if (typeof total !== "undefined") {
96202
+ payload["total"] = total;
96203
+ }
96204
+ const uri = new URL(this.client.config.endpoint + apiPath);
96205
+ const apiHeaders = {};
96206
+ return this.client.call("get", uri, apiHeaders, payload);
96207
+ }
96208
+ createKey(paramsOrFirst, ...rest) {
96209
+ let params;
96210
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
96211
+ params = paramsOrFirst || {};
96212
+ } else {
96213
+ params = {
96214
+ organizationId: paramsOrFirst,
96215
+ name: rest[0],
96216
+ scopes: rest[1],
96217
+ expire: rest[2]
96218
+ };
96219
+ }
96220
+ const organizationId = params.organizationId;
96221
+ const name = params.name;
96222
+ const scopes = params.scopes;
96223
+ const expire = params.expire;
96224
+ if (typeof organizationId === "undefined") {
96225
+ throw new AppwriteException('Missing required parameter: "organizationId"');
96226
+ }
96227
+ if (typeof name === "undefined") {
96228
+ throw new AppwriteException('Missing required parameter: "name"');
96229
+ }
96230
+ if (typeof scopes === "undefined") {
96231
+ throw new AppwriteException('Missing required parameter: "scopes"');
96232
+ }
96233
+ const apiPath = "/organizations/{organizationId}/keys".replace("{organizationId}", organizationId);
96234
+ const payload = {};
96235
+ if (typeof name !== "undefined") {
96236
+ payload["name"] = name;
96237
+ }
96238
+ if (typeof scopes !== "undefined") {
96239
+ payload["scopes"] = scopes;
96240
+ }
96241
+ if (typeof expire !== "undefined") {
96242
+ payload["expire"] = expire;
96243
+ }
96244
+ const uri = new URL(this.client.config.endpoint + apiPath);
96245
+ const apiHeaders = {
96246
+ "content-type": "application/json"
96247
+ };
96248
+ return this.client.call("post", uri, apiHeaders, payload);
96249
+ }
96250
+ getKey(paramsOrFirst, ...rest) {
96251
+ let params;
96252
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
96253
+ params = paramsOrFirst || {};
96254
+ } else {
96255
+ params = {
96256
+ organizationId: paramsOrFirst,
96257
+ keyId: rest[0]
96258
+ };
96259
+ }
96260
+ const organizationId = params.organizationId;
96261
+ const keyId = params.keyId;
96262
+ if (typeof organizationId === "undefined") {
96263
+ throw new AppwriteException('Missing required parameter: "organizationId"');
96264
+ }
96265
+ if (typeof keyId === "undefined") {
96266
+ throw new AppwriteException('Missing required parameter: "keyId"');
96267
+ }
96268
+ const apiPath = "/organizations/{organizationId}/keys/{keyId}".replace("{organizationId}", organizationId).replace("{keyId}", keyId);
96269
+ const payload = {};
96270
+ const uri = new URL(this.client.config.endpoint + apiPath);
96271
+ const apiHeaders = {};
96272
+ return this.client.call("get", uri, apiHeaders, payload);
96273
+ }
96274
+ updateKey(paramsOrFirst, ...rest) {
96275
+ let params;
96276
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
96277
+ params = paramsOrFirst || {};
96278
+ } else {
96279
+ params = {
96280
+ organizationId: paramsOrFirst,
96281
+ keyId: rest[0],
96282
+ name: rest[1],
96283
+ scopes: rest[2],
96284
+ expire: rest[3]
96285
+ };
96286
+ }
96287
+ const organizationId = params.organizationId;
96288
+ const keyId = params.keyId;
96289
+ const name = params.name;
96290
+ const scopes = params.scopes;
96291
+ const expire = params.expire;
96292
+ if (typeof organizationId === "undefined") {
96293
+ throw new AppwriteException('Missing required parameter: "organizationId"');
96294
+ }
96295
+ if (typeof keyId === "undefined") {
96296
+ throw new AppwriteException('Missing required parameter: "keyId"');
96297
+ }
96298
+ if (typeof name === "undefined") {
96299
+ throw new AppwriteException('Missing required parameter: "name"');
96300
+ }
96301
+ if (typeof scopes === "undefined") {
96302
+ throw new AppwriteException('Missing required parameter: "scopes"');
96303
+ }
96304
+ const apiPath = "/organizations/{organizationId}/keys/{keyId}".replace("{organizationId}", organizationId).replace("{keyId}", keyId);
96305
+ const payload = {};
96306
+ if (typeof name !== "undefined") {
96307
+ payload["name"] = name;
96308
+ }
96309
+ if (typeof scopes !== "undefined") {
96310
+ payload["scopes"] = scopes;
96311
+ }
96312
+ if (typeof expire !== "undefined") {
96313
+ payload["expire"] = expire;
96314
+ }
96315
+ const uri = new URL(this.client.config.endpoint + apiPath);
96316
+ const apiHeaders = {
96317
+ "content-type": "application/json"
96318
+ };
96319
+ return this.client.call("put", uri, apiHeaders, payload);
96320
+ }
96321
+ deleteKey(paramsOrFirst, ...rest) {
96322
+ let params;
96323
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
96324
+ params = paramsOrFirst || {};
96325
+ } else {
96326
+ params = {
96327
+ organizationId: paramsOrFirst,
96328
+ keyId: rest[0]
96329
+ };
96330
+ }
96331
+ const organizationId = params.organizationId;
96332
+ const keyId = params.keyId;
96333
+ if (typeof organizationId === "undefined") {
96334
+ throw new AppwriteException('Missing required parameter: "organizationId"');
96335
+ }
96336
+ if (typeof keyId === "undefined") {
96337
+ throw new AppwriteException('Missing required parameter: "keyId"');
96338
+ }
96339
+ const apiPath = "/organizations/{organizationId}/keys/{keyId}".replace("{organizationId}", organizationId).replace("{keyId}", keyId);
96340
+ const payload = {};
96341
+ const uri = new URL(this.client.config.endpoint + apiPath);
96342
+ const apiHeaders = {
96343
+ "content-type": "application/json"
96344
+ };
96345
+ return this.client.call("delete", uri, apiHeaders, payload);
96346
+ }
95776
96347
  setDefaultPaymentMethod(paramsOrFirst, ...rest) {
95777
96348
  let params;
95778
96349
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -96022,6 +96593,25 @@ var Organizations = class {
96022
96593
  };
96023
96594
  return this.client.call("patch", uri, apiHeaders, payload);
96024
96595
  }
96596
+ listRegions(paramsOrFirst) {
96597
+ let params;
96598
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
96599
+ params = paramsOrFirst || {};
96600
+ } else {
96601
+ params = {
96602
+ organizationId: paramsOrFirst
96603
+ };
96604
+ }
96605
+ const organizationId = params.organizationId;
96606
+ if (typeof organizationId === "undefined") {
96607
+ throw new AppwriteException('Missing required parameter: "organizationId"');
96608
+ }
96609
+ const apiPath = "/organizations/{organizationId}/regions".replace("{organizationId}", organizationId);
96610
+ const payload = {};
96611
+ const uri = new URL(this.client.config.endpoint + apiPath);
96612
+ const apiHeaders = {};
96613
+ return this.client.call("get", uri, apiHeaders, payload);
96614
+ }
96025
96615
  getScopes(paramsOrFirst) {
96026
96616
  let params;
96027
96617
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -98841,7 +99431,7 @@ var Sites = class {
98841
99431
  }
98842
99432
  listTemplates(paramsOrFirst, ...rest) {
98843
99433
  let params;
98844
- if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
99434
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && "frameworks" in paramsOrFirst) {
98845
99435
  params = paramsOrFirst || {};
98846
99436
  } else {
98847
99437
  params = {
@@ -100531,9 +101121,6 @@ var TablesDB = class {
100531
101121
  if (typeof databaseId === "undefined") {
100532
101122
  throw new AppwriteException('Missing required parameter: "databaseId"');
100533
101123
  }
100534
- if (typeof name === "undefined") {
100535
- throw new AppwriteException('Missing required parameter: "name"');
100536
- }
100537
101124
  const apiPath = "/tablesdb/{databaseId}".replace("{databaseId}", databaseId);
100538
101125
  const payload = {};
100539
101126
  if (typeof name !== "undefined") {
@@ -100715,9 +101302,6 @@ var TablesDB = class {
100715
101302
  if (typeof tableId === "undefined") {
100716
101303
  throw new AppwriteException('Missing required parameter: "tableId"');
100717
101304
  }
100718
- if (typeof name === "undefined") {
100719
- throw new AppwriteException('Missing required parameter: "name"');
100720
- }
100721
101305
  const apiPath = "/tablesdb/{databaseId}/tables/{tableId}".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
100722
101306
  const payload = {};
100723
101307
  if (typeof name !== "undefined") {
@@ -101678,6 +102262,214 @@ var TablesDB = class {
101678
102262
  };
101679
102263
  return this.client.call("patch", uri, apiHeaders, payload);
101680
102264
  }
102265
+ createLongtextColumn(paramsOrFirst, ...rest) {
102266
+ let params;
102267
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
102268
+ params = paramsOrFirst || {};
102269
+ } else {
102270
+ params = {
102271
+ databaseId: paramsOrFirst,
102272
+ tableId: rest[0],
102273
+ key: rest[1],
102274
+ required: rest[2],
102275
+ xdefault: rest[3],
102276
+ array: rest[4]
102277
+ };
102278
+ }
102279
+ const databaseId = params.databaseId;
102280
+ const tableId = params.tableId;
102281
+ const key = params.key;
102282
+ const required2 = params.required;
102283
+ const xdefault = params.xdefault;
102284
+ const array2 = params.array;
102285
+ if (typeof databaseId === "undefined") {
102286
+ throw new AppwriteException('Missing required parameter: "databaseId"');
102287
+ }
102288
+ if (typeof tableId === "undefined") {
102289
+ throw new AppwriteException('Missing required parameter: "tableId"');
102290
+ }
102291
+ if (typeof key === "undefined") {
102292
+ throw new AppwriteException('Missing required parameter: "key"');
102293
+ }
102294
+ if (typeof required2 === "undefined") {
102295
+ throw new AppwriteException('Missing required parameter: "required"');
102296
+ }
102297
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/longtext".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
102298
+ const payload = {};
102299
+ if (typeof key !== "undefined") {
102300
+ payload["key"] = key;
102301
+ }
102302
+ if (typeof required2 !== "undefined") {
102303
+ payload["required"] = required2;
102304
+ }
102305
+ if (typeof xdefault !== "undefined") {
102306
+ payload["default"] = xdefault;
102307
+ }
102308
+ if (typeof array2 !== "undefined") {
102309
+ payload["array"] = array2;
102310
+ }
102311
+ const uri = new URL(this.client.config.endpoint + apiPath);
102312
+ const apiHeaders = {
102313
+ "content-type": "application/json"
102314
+ };
102315
+ return this.client.call("post", uri, apiHeaders, payload);
102316
+ }
102317
+ updateLongtextColumn(paramsOrFirst, ...rest) {
102318
+ let params;
102319
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
102320
+ params = paramsOrFirst || {};
102321
+ } else {
102322
+ params = {
102323
+ databaseId: paramsOrFirst,
102324
+ tableId: rest[0],
102325
+ key: rest[1],
102326
+ required: rest[2],
102327
+ xdefault: rest[3],
102328
+ newKey: rest[4]
102329
+ };
102330
+ }
102331
+ const databaseId = params.databaseId;
102332
+ const tableId = params.tableId;
102333
+ const key = params.key;
102334
+ const required2 = params.required;
102335
+ const xdefault = params.xdefault;
102336
+ const newKey = params.newKey;
102337
+ if (typeof databaseId === "undefined") {
102338
+ throw new AppwriteException('Missing required parameter: "databaseId"');
102339
+ }
102340
+ if (typeof tableId === "undefined") {
102341
+ throw new AppwriteException('Missing required parameter: "tableId"');
102342
+ }
102343
+ if (typeof key === "undefined") {
102344
+ throw new AppwriteException('Missing required parameter: "key"');
102345
+ }
102346
+ if (typeof required2 === "undefined") {
102347
+ throw new AppwriteException('Missing required parameter: "required"');
102348
+ }
102349
+ if (typeof xdefault === "undefined") {
102350
+ throw new AppwriteException('Missing required parameter: "xdefault"');
102351
+ }
102352
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/longtext/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
102353
+ const payload = {};
102354
+ if (typeof required2 !== "undefined") {
102355
+ payload["required"] = required2;
102356
+ }
102357
+ if (typeof xdefault !== "undefined") {
102358
+ payload["default"] = xdefault;
102359
+ }
102360
+ if (typeof newKey !== "undefined") {
102361
+ payload["newKey"] = newKey;
102362
+ }
102363
+ const uri = new URL(this.client.config.endpoint + apiPath);
102364
+ const apiHeaders = {
102365
+ "content-type": "application/json"
102366
+ };
102367
+ return this.client.call("patch", uri, apiHeaders, payload);
102368
+ }
102369
+ createMediumtextColumn(paramsOrFirst, ...rest) {
102370
+ let params;
102371
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
102372
+ params = paramsOrFirst || {};
102373
+ } else {
102374
+ params = {
102375
+ databaseId: paramsOrFirst,
102376
+ tableId: rest[0],
102377
+ key: rest[1],
102378
+ required: rest[2],
102379
+ xdefault: rest[3],
102380
+ array: rest[4]
102381
+ };
102382
+ }
102383
+ const databaseId = params.databaseId;
102384
+ const tableId = params.tableId;
102385
+ const key = params.key;
102386
+ const required2 = params.required;
102387
+ const xdefault = params.xdefault;
102388
+ const array2 = params.array;
102389
+ if (typeof databaseId === "undefined") {
102390
+ throw new AppwriteException('Missing required parameter: "databaseId"');
102391
+ }
102392
+ if (typeof tableId === "undefined") {
102393
+ throw new AppwriteException('Missing required parameter: "tableId"');
102394
+ }
102395
+ if (typeof key === "undefined") {
102396
+ throw new AppwriteException('Missing required parameter: "key"');
102397
+ }
102398
+ if (typeof required2 === "undefined") {
102399
+ throw new AppwriteException('Missing required parameter: "required"');
102400
+ }
102401
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
102402
+ const payload = {};
102403
+ if (typeof key !== "undefined") {
102404
+ payload["key"] = key;
102405
+ }
102406
+ if (typeof required2 !== "undefined") {
102407
+ payload["required"] = required2;
102408
+ }
102409
+ if (typeof xdefault !== "undefined") {
102410
+ payload["default"] = xdefault;
102411
+ }
102412
+ if (typeof array2 !== "undefined") {
102413
+ payload["array"] = array2;
102414
+ }
102415
+ const uri = new URL(this.client.config.endpoint + apiPath);
102416
+ const apiHeaders = {
102417
+ "content-type": "application/json"
102418
+ };
102419
+ return this.client.call("post", uri, apiHeaders, payload);
102420
+ }
102421
+ updateMediumtextColumn(paramsOrFirst, ...rest) {
102422
+ let params;
102423
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
102424
+ params = paramsOrFirst || {};
102425
+ } else {
102426
+ params = {
102427
+ databaseId: paramsOrFirst,
102428
+ tableId: rest[0],
102429
+ key: rest[1],
102430
+ required: rest[2],
102431
+ xdefault: rest[3],
102432
+ newKey: rest[4]
102433
+ };
102434
+ }
102435
+ const databaseId = params.databaseId;
102436
+ const tableId = params.tableId;
102437
+ const key = params.key;
102438
+ const required2 = params.required;
102439
+ const xdefault = params.xdefault;
102440
+ const newKey = params.newKey;
102441
+ if (typeof databaseId === "undefined") {
102442
+ throw new AppwriteException('Missing required parameter: "databaseId"');
102443
+ }
102444
+ if (typeof tableId === "undefined") {
102445
+ throw new AppwriteException('Missing required parameter: "tableId"');
102446
+ }
102447
+ if (typeof key === "undefined") {
102448
+ throw new AppwriteException('Missing required parameter: "key"');
102449
+ }
102450
+ if (typeof required2 === "undefined") {
102451
+ throw new AppwriteException('Missing required parameter: "required"');
102452
+ }
102453
+ if (typeof xdefault === "undefined") {
102454
+ throw new AppwriteException('Missing required parameter: "xdefault"');
102455
+ }
102456
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
102457
+ const payload = {};
102458
+ if (typeof required2 !== "undefined") {
102459
+ payload["required"] = required2;
102460
+ }
102461
+ if (typeof xdefault !== "undefined") {
102462
+ payload["default"] = xdefault;
102463
+ }
102464
+ if (typeof newKey !== "undefined") {
102465
+ payload["newKey"] = newKey;
102466
+ }
102467
+ const uri = new URL(this.client.config.endpoint + apiPath);
102468
+ const apiHeaders = {
102469
+ "content-type": "application/json"
102470
+ };
102471
+ return this.client.call("patch", uri, apiHeaders, payload);
102472
+ }
101681
102473
  createPointColumn(paramsOrFirst, ...rest) {
101682
102474
  let params;
101683
102475
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -101757,7 +102549,103 @@ var TablesDB = class {
101757
102549
  if (typeof required2 === "undefined") {
101758
102550
  throw new AppwriteException('Missing required parameter: "required"');
101759
102551
  }
101760
- const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
102552
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
102553
+ const payload = {};
102554
+ if (typeof required2 !== "undefined") {
102555
+ payload["required"] = required2;
102556
+ }
102557
+ if (typeof xdefault !== "undefined") {
102558
+ payload["default"] = xdefault;
102559
+ }
102560
+ if (typeof newKey !== "undefined") {
102561
+ payload["newKey"] = newKey;
102562
+ }
102563
+ const uri = new URL(this.client.config.endpoint + apiPath);
102564
+ const apiHeaders = {
102565
+ "content-type": "application/json"
102566
+ };
102567
+ return this.client.call("patch", uri, apiHeaders, payload);
102568
+ }
102569
+ createPolygonColumn(paramsOrFirst, ...rest) {
102570
+ let params;
102571
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
102572
+ params = paramsOrFirst || {};
102573
+ } else {
102574
+ params = {
102575
+ databaseId: paramsOrFirst,
102576
+ tableId: rest[0],
102577
+ key: rest[1],
102578
+ required: rest[2],
102579
+ xdefault: rest[3]
102580
+ };
102581
+ }
102582
+ const databaseId = params.databaseId;
102583
+ const tableId = params.tableId;
102584
+ const key = params.key;
102585
+ const required2 = params.required;
102586
+ const xdefault = params.xdefault;
102587
+ if (typeof databaseId === "undefined") {
102588
+ throw new AppwriteException('Missing required parameter: "databaseId"');
102589
+ }
102590
+ if (typeof tableId === "undefined") {
102591
+ throw new AppwriteException('Missing required parameter: "tableId"');
102592
+ }
102593
+ if (typeof key === "undefined") {
102594
+ throw new AppwriteException('Missing required parameter: "key"');
102595
+ }
102596
+ if (typeof required2 === "undefined") {
102597
+ throw new AppwriteException('Missing required parameter: "required"');
102598
+ }
102599
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/polygon".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
102600
+ const payload = {};
102601
+ if (typeof key !== "undefined") {
102602
+ payload["key"] = key;
102603
+ }
102604
+ if (typeof required2 !== "undefined") {
102605
+ payload["required"] = required2;
102606
+ }
102607
+ if (typeof xdefault !== "undefined") {
102608
+ payload["default"] = xdefault;
102609
+ }
102610
+ const uri = new URL(this.client.config.endpoint + apiPath);
102611
+ const apiHeaders = {
102612
+ "content-type": "application/json"
102613
+ };
102614
+ return this.client.call("post", uri, apiHeaders, payload);
102615
+ }
102616
+ updatePolygonColumn(paramsOrFirst, ...rest) {
102617
+ let params;
102618
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
102619
+ params = paramsOrFirst || {};
102620
+ } else {
102621
+ params = {
102622
+ databaseId: paramsOrFirst,
102623
+ tableId: rest[0],
102624
+ key: rest[1],
102625
+ required: rest[2],
102626
+ xdefault: rest[3],
102627
+ newKey: rest[4]
102628
+ };
102629
+ }
102630
+ const databaseId = params.databaseId;
102631
+ const tableId = params.tableId;
102632
+ const key = params.key;
102633
+ const required2 = params.required;
102634
+ const xdefault = params.xdefault;
102635
+ const newKey = params.newKey;
102636
+ if (typeof databaseId === "undefined") {
102637
+ throw new AppwriteException('Missing required parameter: "databaseId"');
102638
+ }
102639
+ if (typeof tableId === "undefined") {
102640
+ throw new AppwriteException('Missing required parameter: "tableId"');
102641
+ }
102642
+ if (typeof key === "undefined") {
102643
+ throw new AppwriteException('Missing required parameter: "key"');
102644
+ }
102645
+ if (typeof required2 === "undefined") {
102646
+ throw new AppwriteException('Missing required parameter: "required"');
102647
+ }
102648
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
101761
102649
  const payload = {};
101762
102650
  if (typeof required2 !== "undefined") {
101763
102651
  payload["required"] = required2;
@@ -101774,7 +102662,69 @@ var TablesDB = class {
101774
102662
  };
101775
102663
  return this.client.call("patch", uri, apiHeaders, payload);
101776
102664
  }
101777
- createPolygonColumn(paramsOrFirst, ...rest) {
102665
+ createRelationshipColumn(paramsOrFirst, ...rest) {
102666
+ let params;
102667
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
102668
+ params = paramsOrFirst || {};
102669
+ } else {
102670
+ params = {
102671
+ databaseId: paramsOrFirst,
102672
+ tableId: rest[0],
102673
+ relatedTableId: rest[1],
102674
+ type: rest[2],
102675
+ twoWay: rest[3],
102676
+ key: rest[4],
102677
+ twoWayKey: rest[5],
102678
+ onDelete: rest[6]
102679
+ };
102680
+ }
102681
+ const databaseId = params.databaseId;
102682
+ const tableId = params.tableId;
102683
+ const relatedTableId = params.relatedTableId;
102684
+ const type = params.type;
102685
+ const twoWay = params.twoWay;
102686
+ const key = params.key;
102687
+ const twoWayKey = params.twoWayKey;
102688
+ const onDelete = params.onDelete;
102689
+ if (typeof databaseId === "undefined") {
102690
+ throw new AppwriteException('Missing required parameter: "databaseId"');
102691
+ }
102692
+ if (typeof tableId === "undefined") {
102693
+ throw new AppwriteException('Missing required parameter: "tableId"');
102694
+ }
102695
+ if (typeof relatedTableId === "undefined") {
102696
+ throw new AppwriteException('Missing required parameter: "relatedTableId"');
102697
+ }
102698
+ if (typeof type === "undefined") {
102699
+ throw new AppwriteException('Missing required parameter: "type"');
102700
+ }
102701
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/relationship".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
102702
+ const payload = {};
102703
+ if (typeof relatedTableId !== "undefined") {
102704
+ payload["relatedTableId"] = relatedTableId;
102705
+ }
102706
+ if (typeof type !== "undefined") {
102707
+ payload["type"] = type;
102708
+ }
102709
+ if (typeof twoWay !== "undefined") {
102710
+ payload["twoWay"] = twoWay;
102711
+ }
102712
+ if (typeof key !== "undefined") {
102713
+ payload["key"] = key;
102714
+ }
102715
+ if (typeof twoWayKey !== "undefined") {
102716
+ payload["twoWayKey"] = twoWayKey;
102717
+ }
102718
+ if (typeof onDelete !== "undefined") {
102719
+ payload["onDelete"] = onDelete;
102720
+ }
102721
+ const uri = new URL(this.client.config.endpoint + apiPath);
102722
+ const apiHeaders = {
102723
+ "content-type": "application/json"
102724
+ };
102725
+ return this.client.call("post", uri, apiHeaders, payload);
102726
+ }
102727
+ createStringColumn(paramsOrFirst, ...rest) {
101778
102728
  let params;
101779
102729
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
101780
102730
  params = paramsOrFirst || {};
@@ -101783,15 +102733,21 @@ var TablesDB = class {
101783
102733
  databaseId: paramsOrFirst,
101784
102734
  tableId: rest[0],
101785
102735
  key: rest[1],
101786
- required: rest[2],
101787
- xdefault: rest[3]
102736
+ size: rest[2],
102737
+ required: rest[3],
102738
+ xdefault: rest[4],
102739
+ array: rest[5],
102740
+ encrypt: rest[6]
101788
102741
  };
101789
102742
  }
101790
102743
  const databaseId = params.databaseId;
101791
102744
  const tableId = params.tableId;
101792
102745
  const key = params.key;
102746
+ const size = params.size;
101793
102747
  const required2 = params.required;
101794
102748
  const xdefault = params.xdefault;
102749
+ const array2 = params.array;
102750
+ const encrypt = params.encrypt;
101795
102751
  if (typeof databaseId === "undefined") {
101796
102752
  throw new AppwriteException('Missing required parameter: "databaseId"');
101797
102753
  }
@@ -101801,27 +102757,39 @@ var TablesDB = class {
101801
102757
  if (typeof key === "undefined") {
101802
102758
  throw new AppwriteException('Missing required parameter: "key"');
101803
102759
  }
102760
+ if (typeof size === "undefined") {
102761
+ throw new AppwriteException('Missing required parameter: "size"');
102762
+ }
101804
102763
  if (typeof required2 === "undefined") {
101805
102764
  throw new AppwriteException('Missing required parameter: "required"');
101806
102765
  }
101807
- const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/polygon".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
102766
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/string".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
101808
102767
  const payload = {};
101809
102768
  if (typeof key !== "undefined") {
101810
102769
  payload["key"] = key;
101811
102770
  }
102771
+ if (typeof size !== "undefined") {
102772
+ payload["size"] = size;
102773
+ }
101812
102774
  if (typeof required2 !== "undefined") {
101813
102775
  payload["required"] = required2;
101814
102776
  }
101815
102777
  if (typeof xdefault !== "undefined") {
101816
102778
  payload["default"] = xdefault;
101817
102779
  }
102780
+ if (typeof array2 !== "undefined") {
102781
+ payload["array"] = array2;
102782
+ }
102783
+ if (typeof encrypt !== "undefined") {
102784
+ payload["encrypt"] = encrypt;
102785
+ }
101818
102786
  const uri = new URL(this.client.config.endpoint + apiPath);
101819
102787
  const apiHeaders = {
101820
102788
  "content-type": "application/json"
101821
102789
  };
101822
102790
  return this.client.call("post", uri, apiHeaders, payload);
101823
102791
  }
101824
- updatePolygonColumn(paramsOrFirst, ...rest) {
102792
+ updateStringColumn(paramsOrFirst, ...rest) {
101825
102793
  let params;
101826
102794
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
101827
102795
  params = paramsOrFirst || {};
@@ -101832,7 +102800,8 @@ var TablesDB = class {
101832
102800
  key: rest[1],
101833
102801
  required: rest[2],
101834
102802
  xdefault: rest[3],
101835
- newKey: rest[4]
102803
+ size: rest[4],
102804
+ newKey: rest[5]
101836
102805
  };
101837
102806
  }
101838
102807
  const databaseId = params.databaseId;
@@ -101840,6 +102809,7 @@ var TablesDB = class {
101840
102809
  const key = params.key;
101841
102810
  const required2 = params.required;
101842
102811
  const xdefault = params.xdefault;
102812
+ const size = params.size;
101843
102813
  const newKey = params.newKey;
101844
102814
  if (typeof databaseId === "undefined") {
101845
102815
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -101853,7 +102823,10 @@ var TablesDB = class {
101853
102823
  if (typeof required2 === "undefined") {
101854
102824
  throw new AppwriteException('Missing required parameter: "required"');
101855
102825
  }
101856
- const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
102826
+ if (typeof xdefault === "undefined") {
102827
+ throw new AppwriteException('Missing required parameter: "xdefault"');
102828
+ }
102829
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
101857
102830
  const payload = {};
101858
102831
  if (typeof required2 !== "undefined") {
101859
102832
  payload["required"] = required2;
@@ -101861,6 +102834,9 @@ var TablesDB = class {
101861
102834
  if (typeof xdefault !== "undefined") {
101862
102835
  payload["default"] = xdefault;
101863
102836
  }
102837
+ if (typeof size !== "undefined") {
102838
+ payload["size"] = size;
102839
+ }
101864
102840
  if (typeof newKey !== "undefined") {
101865
102841
  payload["newKey"] = newKey;
101866
102842
  }
@@ -101870,7 +102846,7 @@ var TablesDB = class {
101870
102846
  };
101871
102847
  return this.client.call("patch", uri, apiHeaders, payload);
101872
102848
  }
101873
- createRelationshipColumn(paramsOrFirst, ...rest) {
102849
+ createTextColumn(paramsOrFirst, ...rest) {
101874
102850
  let params;
101875
102851
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
101876
102852
  params = paramsOrFirst || {};
@@ -101878,53 +102854,43 @@ var TablesDB = class {
101878
102854
  params = {
101879
102855
  databaseId: paramsOrFirst,
101880
102856
  tableId: rest[0],
101881
- relatedTableId: rest[1],
101882
- type: rest[2],
101883
- twoWay: rest[3],
101884
- key: rest[4],
101885
- twoWayKey: rest[5],
101886
- onDelete: rest[6]
102857
+ key: rest[1],
102858
+ required: rest[2],
102859
+ xdefault: rest[3],
102860
+ array: rest[4]
101887
102861
  };
101888
102862
  }
101889
102863
  const databaseId = params.databaseId;
101890
102864
  const tableId = params.tableId;
101891
- const relatedTableId = params.relatedTableId;
101892
- const type = params.type;
101893
- const twoWay = params.twoWay;
101894
102865
  const key = params.key;
101895
- const twoWayKey = params.twoWayKey;
101896
- const onDelete = params.onDelete;
102866
+ const required2 = params.required;
102867
+ const xdefault = params.xdefault;
102868
+ const array2 = params.array;
101897
102869
  if (typeof databaseId === "undefined") {
101898
102870
  throw new AppwriteException('Missing required parameter: "databaseId"');
101899
102871
  }
101900
102872
  if (typeof tableId === "undefined") {
101901
102873
  throw new AppwriteException('Missing required parameter: "tableId"');
101902
102874
  }
101903
- if (typeof relatedTableId === "undefined") {
101904
- throw new AppwriteException('Missing required parameter: "relatedTableId"');
102875
+ if (typeof key === "undefined") {
102876
+ throw new AppwriteException('Missing required parameter: "key"');
101905
102877
  }
101906
- if (typeof type === "undefined") {
101907
- throw new AppwriteException('Missing required parameter: "type"');
102878
+ if (typeof required2 === "undefined") {
102879
+ throw new AppwriteException('Missing required parameter: "required"');
101908
102880
  }
101909
- const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/relationship".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
102881
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/text".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
101910
102882
  const payload = {};
101911
- if (typeof relatedTableId !== "undefined") {
101912
- payload["relatedTableId"] = relatedTableId;
101913
- }
101914
- if (typeof type !== "undefined") {
101915
- payload["type"] = type;
101916
- }
101917
- if (typeof twoWay !== "undefined") {
101918
- payload["twoWay"] = twoWay;
101919
- }
101920
102883
  if (typeof key !== "undefined") {
101921
102884
  payload["key"] = key;
101922
102885
  }
101923
- if (typeof twoWayKey !== "undefined") {
101924
- payload["twoWayKey"] = twoWayKey;
102886
+ if (typeof required2 !== "undefined") {
102887
+ payload["required"] = required2;
101925
102888
  }
101926
- if (typeof onDelete !== "undefined") {
101927
- payload["onDelete"] = onDelete;
102889
+ if (typeof xdefault !== "undefined") {
102890
+ payload["default"] = xdefault;
102891
+ }
102892
+ if (typeof array2 !== "undefined") {
102893
+ payload["array"] = array2;
101928
102894
  }
101929
102895
  const uri = new URL(this.client.config.endpoint + apiPath);
101930
102896
  const apiHeaders = {
@@ -101932,7 +102898,7 @@ var TablesDB = class {
101932
102898
  };
101933
102899
  return this.client.call("post", uri, apiHeaders, payload);
101934
102900
  }
101935
- createStringColumn(paramsOrFirst, ...rest) {
102901
+ updateTextColumn(paramsOrFirst, ...rest) {
101936
102902
  let params;
101937
102903
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
101938
102904
  params = paramsOrFirst || {};
@@ -101941,21 +102907,17 @@ var TablesDB = class {
101941
102907
  databaseId: paramsOrFirst,
101942
102908
  tableId: rest[0],
101943
102909
  key: rest[1],
101944
- size: rest[2],
101945
- required: rest[3],
101946
- xdefault: rest[4],
101947
- array: rest[5],
101948
- encrypt: rest[6]
102910
+ required: rest[2],
102911
+ xdefault: rest[3],
102912
+ newKey: rest[4]
101949
102913
  };
101950
102914
  }
101951
102915
  const databaseId = params.databaseId;
101952
102916
  const tableId = params.tableId;
101953
102917
  const key = params.key;
101954
- const size = params.size;
101955
102918
  const required2 = params.required;
101956
102919
  const xdefault = params.xdefault;
101957
- const array2 = params.array;
101958
- const encrypt = params.encrypt;
102920
+ const newKey = params.newKey;
101959
102921
  if (typeof databaseId === "undefined") {
101960
102922
  throw new AppwriteException('Missing required parameter: "databaseId"');
101961
102923
  }
@@ -101965,20 +102927,66 @@ var TablesDB = class {
101965
102927
  if (typeof key === "undefined") {
101966
102928
  throw new AppwriteException('Missing required parameter: "key"');
101967
102929
  }
101968
- if (typeof size === "undefined") {
101969
- throw new AppwriteException('Missing required parameter: "size"');
102930
+ if (typeof required2 === "undefined") {
102931
+ throw new AppwriteException('Missing required parameter: "required"');
102932
+ }
102933
+ if (typeof xdefault === "undefined") {
102934
+ throw new AppwriteException('Missing required parameter: "xdefault"');
102935
+ }
102936
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/text/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
102937
+ const payload = {};
102938
+ if (typeof required2 !== "undefined") {
102939
+ payload["required"] = required2;
102940
+ }
102941
+ if (typeof xdefault !== "undefined") {
102942
+ payload["default"] = xdefault;
102943
+ }
102944
+ if (typeof newKey !== "undefined") {
102945
+ payload["newKey"] = newKey;
102946
+ }
102947
+ const uri = new URL(this.client.config.endpoint + apiPath);
102948
+ const apiHeaders = {
102949
+ "content-type": "application/json"
102950
+ };
102951
+ return this.client.call("patch", uri, apiHeaders, payload);
102952
+ }
102953
+ createUrlColumn(paramsOrFirst, ...rest) {
102954
+ let params;
102955
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
102956
+ params = paramsOrFirst || {};
102957
+ } else {
102958
+ params = {
102959
+ databaseId: paramsOrFirst,
102960
+ tableId: rest[0],
102961
+ key: rest[1],
102962
+ required: rest[2],
102963
+ xdefault: rest[3],
102964
+ array: rest[4]
102965
+ };
102966
+ }
102967
+ const databaseId = params.databaseId;
102968
+ const tableId = params.tableId;
102969
+ const key = params.key;
102970
+ const required2 = params.required;
102971
+ const xdefault = params.xdefault;
102972
+ const array2 = params.array;
102973
+ if (typeof databaseId === "undefined") {
102974
+ throw new AppwriteException('Missing required parameter: "databaseId"');
102975
+ }
102976
+ if (typeof tableId === "undefined") {
102977
+ throw new AppwriteException('Missing required parameter: "tableId"');
102978
+ }
102979
+ if (typeof key === "undefined") {
102980
+ throw new AppwriteException('Missing required parameter: "key"');
101970
102981
  }
101971
102982
  if (typeof required2 === "undefined") {
101972
102983
  throw new AppwriteException('Missing required parameter: "required"');
101973
102984
  }
101974
- const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/string".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
102985
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/url".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
101975
102986
  const payload = {};
101976
102987
  if (typeof key !== "undefined") {
101977
102988
  payload["key"] = key;
101978
102989
  }
101979
- if (typeof size !== "undefined") {
101980
- payload["size"] = size;
101981
- }
101982
102990
  if (typeof required2 !== "undefined") {
101983
102991
  payload["required"] = required2;
101984
102992
  }
@@ -101988,16 +102996,13 @@ var TablesDB = class {
101988
102996
  if (typeof array2 !== "undefined") {
101989
102997
  payload["array"] = array2;
101990
102998
  }
101991
- if (typeof encrypt !== "undefined") {
101992
- payload["encrypt"] = encrypt;
101993
- }
101994
102999
  const uri = new URL(this.client.config.endpoint + apiPath);
101995
103000
  const apiHeaders = {
101996
103001
  "content-type": "application/json"
101997
103002
  };
101998
103003
  return this.client.call("post", uri, apiHeaders, payload);
101999
103004
  }
102000
- updateStringColumn(paramsOrFirst, ...rest) {
103005
+ updateUrlColumn(paramsOrFirst, ...rest) {
102001
103006
  let params;
102002
103007
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
102003
103008
  params = paramsOrFirst || {};
@@ -102008,8 +103013,7 @@ var TablesDB = class {
102008
103013
  key: rest[1],
102009
103014
  required: rest[2],
102010
103015
  xdefault: rest[3],
102011
- size: rest[4],
102012
- newKey: rest[5]
103016
+ newKey: rest[4]
102013
103017
  };
102014
103018
  }
102015
103019
  const databaseId = params.databaseId;
@@ -102017,7 +103021,6 @@ var TablesDB = class {
102017
103021
  const key = params.key;
102018
103022
  const required2 = params.required;
102019
103023
  const xdefault = params.xdefault;
102020
- const size = params.size;
102021
103024
  const newKey = params.newKey;
102022
103025
  if (typeof databaseId === "undefined") {
102023
103026
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -102034,7 +103037,7 @@ var TablesDB = class {
102034
103037
  if (typeof xdefault === "undefined") {
102035
103038
  throw new AppwriteException('Missing required parameter: "xdefault"');
102036
103039
  }
102037
- const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
103040
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
102038
103041
  const payload = {};
102039
103042
  if (typeof required2 !== "undefined") {
102040
103043
  payload["required"] = required2;
@@ -102042,9 +103045,6 @@ var TablesDB = class {
102042
103045
  if (typeof xdefault !== "undefined") {
102043
103046
  payload["default"] = xdefault;
102044
103047
  }
102045
- if (typeof size !== "undefined") {
102046
- payload["size"] = size;
102047
- }
102048
103048
  if (typeof newKey !== "undefined") {
102049
103049
  payload["newKey"] = newKey;
102050
103050
  }
@@ -102054,7 +103054,7 @@ var TablesDB = class {
102054
103054
  };
102055
103055
  return this.client.call("patch", uri, apiHeaders, payload);
102056
103056
  }
102057
- createUrlColumn(paramsOrFirst, ...rest) {
103057
+ createVarcharColumn(paramsOrFirst, ...rest) {
102058
103058
  let params;
102059
103059
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
102060
103060
  params = paramsOrFirst || {};
@@ -102063,14 +103063,16 @@ var TablesDB = class {
102063
103063
  databaseId: paramsOrFirst,
102064
103064
  tableId: rest[0],
102065
103065
  key: rest[1],
102066
- required: rest[2],
102067
- xdefault: rest[3],
102068
- array: rest[4]
103066
+ size: rest[2],
103067
+ required: rest[3],
103068
+ xdefault: rest[4],
103069
+ array: rest[5]
102069
103070
  };
102070
103071
  }
102071
103072
  const databaseId = params.databaseId;
102072
103073
  const tableId = params.tableId;
102073
103074
  const key = params.key;
103075
+ const size = params.size;
102074
103076
  const required2 = params.required;
102075
103077
  const xdefault = params.xdefault;
102076
103078
  const array2 = params.array;
@@ -102083,14 +103085,20 @@ var TablesDB = class {
102083
103085
  if (typeof key === "undefined") {
102084
103086
  throw new AppwriteException('Missing required parameter: "key"');
102085
103087
  }
103088
+ if (typeof size === "undefined") {
103089
+ throw new AppwriteException('Missing required parameter: "size"');
103090
+ }
102086
103091
  if (typeof required2 === "undefined") {
102087
103092
  throw new AppwriteException('Missing required parameter: "required"');
102088
103093
  }
102089
- const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/url".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
103094
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/varchar".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
102090
103095
  const payload = {};
102091
103096
  if (typeof key !== "undefined") {
102092
103097
  payload["key"] = key;
102093
103098
  }
103099
+ if (typeof size !== "undefined") {
103100
+ payload["size"] = size;
103101
+ }
102094
103102
  if (typeof required2 !== "undefined") {
102095
103103
  payload["required"] = required2;
102096
103104
  }
@@ -102106,7 +103114,7 @@ var TablesDB = class {
102106
103114
  };
102107
103115
  return this.client.call("post", uri, apiHeaders, payload);
102108
103116
  }
102109
- updateUrlColumn(paramsOrFirst, ...rest) {
103117
+ updateVarcharColumn(paramsOrFirst, ...rest) {
102110
103118
  let params;
102111
103119
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
102112
103120
  params = paramsOrFirst || {};
@@ -102117,7 +103125,8 @@ var TablesDB = class {
102117
103125
  key: rest[1],
102118
103126
  required: rest[2],
102119
103127
  xdefault: rest[3],
102120
- newKey: rest[4]
103128
+ size: rest[4],
103129
+ newKey: rest[5]
102121
103130
  };
102122
103131
  }
102123
103132
  const databaseId = params.databaseId;
@@ -102125,6 +103134,7 @@ var TablesDB = class {
102125
103134
  const key = params.key;
102126
103135
  const required2 = params.required;
102127
103136
  const xdefault = params.xdefault;
103137
+ const size = params.size;
102128
103138
  const newKey = params.newKey;
102129
103139
  if (typeof databaseId === "undefined") {
102130
103140
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -102141,7 +103151,7 @@ var TablesDB = class {
102141
103151
  if (typeof xdefault === "undefined") {
102142
103152
  throw new AppwriteException('Missing required parameter: "xdefault"');
102143
103153
  }
102144
- const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
103154
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/varchar/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
102145
103155
  const payload = {};
102146
103156
  if (typeof required2 !== "undefined") {
102147
103157
  payload["required"] = required2;
@@ -102149,6 +103159,9 @@ var TablesDB = class {
102149
103159
  if (typeof xdefault !== "undefined") {
102150
103160
  payload["default"] = xdefault;
102151
103161
  }
103162
+ if (typeof size !== "undefined") {
103163
+ payload["size"] = size;
103164
+ }
102152
103165
  if (typeof newKey !== "undefined") {
102153
103166
  payload["newKey"] = newKey;
102154
103167
  }
@@ -103669,6 +104682,72 @@ Operator.toggle = () => new Operator("toggle", []).toString();
103669
104682
  Operator.dateAddDays = (days) => new Operator("dateAddDays", [days]).toString();
103670
104683
  Operator.dateSubDays = (days) => new Operator("dateSubDays", [days]).toString();
103671
104684
  Operator.dateSetNow = () => new Operator("dateSetNow", []).toString();
104685
+ var Scopes;
104686
+ (function(Scopes2) {
104687
+ Scopes2["SessionsWrite"] = "sessions.write";
104688
+ Scopes2["UsersRead"] = "users.read";
104689
+ Scopes2["UsersWrite"] = "users.write";
104690
+ Scopes2["TeamsRead"] = "teams.read";
104691
+ Scopes2["TeamsWrite"] = "teams.write";
104692
+ Scopes2["DatabasesRead"] = "databases.read";
104693
+ Scopes2["DatabasesWrite"] = "databases.write";
104694
+ Scopes2["CollectionsRead"] = "collections.read";
104695
+ Scopes2["CollectionsWrite"] = "collections.write";
104696
+ Scopes2["TablesRead"] = "tables.read";
104697
+ Scopes2["TablesWrite"] = "tables.write";
104698
+ Scopes2["AttributesRead"] = "attributes.read";
104699
+ Scopes2["AttributesWrite"] = "attributes.write";
104700
+ Scopes2["ColumnsRead"] = "columns.read";
104701
+ Scopes2["ColumnsWrite"] = "columns.write";
104702
+ Scopes2["IndexesRead"] = "indexes.read";
104703
+ Scopes2["IndexesWrite"] = "indexes.write";
104704
+ Scopes2["DocumentsRead"] = "documents.read";
104705
+ Scopes2["DocumentsWrite"] = "documents.write";
104706
+ Scopes2["RowsRead"] = "rows.read";
104707
+ Scopes2["RowsWrite"] = "rows.write";
104708
+ Scopes2["FilesRead"] = "files.read";
104709
+ Scopes2["FilesWrite"] = "files.write";
104710
+ Scopes2["BucketsRead"] = "buckets.read";
104711
+ Scopes2["BucketsWrite"] = "buckets.write";
104712
+ Scopes2["FunctionsRead"] = "functions.read";
104713
+ Scopes2["FunctionsWrite"] = "functions.write";
104714
+ Scopes2["SitesRead"] = "sites.read";
104715
+ Scopes2["SitesWrite"] = "sites.write";
104716
+ Scopes2["LogRead"] = "log.read";
104717
+ Scopes2["LogWrite"] = "log.write";
104718
+ Scopes2["ExecutionRead"] = "execution.read";
104719
+ Scopes2["ExecutionWrite"] = "execution.write";
104720
+ Scopes2["LocaleRead"] = "locale.read";
104721
+ Scopes2["AvatarsRead"] = "avatars.read";
104722
+ Scopes2["HealthRead"] = "health.read";
104723
+ Scopes2["ProvidersRead"] = "providers.read";
104724
+ Scopes2["ProvidersWrite"] = "providers.write";
104725
+ Scopes2["MessagesRead"] = "messages.read";
104726
+ Scopes2["MessagesWrite"] = "messages.write";
104727
+ Scopes2["TopicsRead"] = "topics.read";
104728
+ Scopes2["TopicsWrite"] = "topics.write";
104729
+ Scopes2["SubscribersRead"] = "subscribers.read";
104730
+ Scopes2["SubscribersWrite"] = "subscribers.write";
104731
+ Scopes2["TargetsRead"] = "targets.read";
104732
+ Scopes2["TargetsWrite"] = "targets.write";
104733
+ Scopes2["RulesRead"] = "rules.read";
104734
+ Scopes2["RulesWrite"] = "rules.write";
104735
+ Scopes2["MigrationsRead"] = "migrations.read";
104736
+ Scopes2["MigrationsWrite"] = "migrations.write";
104737
+ Scopes2["VcsRead"] = "vcs.read";
104738
+ Scopes2["VcsWrite"] = "vcs.write";
104739
+ Scopes2["AssistantRead"] = "assistant.read";
104740
+ Scopes2["TokensRead"] = "tokens.read";
104741
+ Scopes2["TokensWrite"] = "tokens.write";
104742
+ Scopes2["PoliciesWrite"] = "policies.write";
104743
+ Scopes2["PoliciesRead"] = "policies.read";
104744
+ Scopes2["ArchivesRead"] = "archives.read";
104745
+ Scopes2["ArchivesWrite"] = "archives.write";
104746
+ Scopes2["RestorationsRead"] = "restorations.read";
104747
+ Scopes2["RestorationsWrite"] = "restorations.write";
104748
+ Scopes2["DomainsRead"] = "domains.read";
104749
+ Scopes2["DomainsWrite"] = "domains.write";
104750
+ })(Scopes || (Scopes = {}));
103672
104751
  var AuthenticatorType;
103673
104752
  (function(AuthenticatorType2) {
103674
104753
  AuthenticatorType2["Totp"] = "totp";
@@ -104386,6 +105465,29 @@ var Timezone;
104386
105465
  Timezone2["PacificWallis"] = "pacific/wallis";
104387
105466
  Timezone2["Utc"] = "utc";
104388
105467
  })(Timezone || (Timezone = {}));
105468
+ var BrowserPermission;
105469
+ (function(BrowserPermission2) {
105470
+ BrowserPermission2["Geolocation"] = "geolocation";
105471
+ BrowserPermission2["Camera"] = "camera";
105472
+ BrowserPermission2["Microphone"] = "microphone";
105473
+ BrowserPermission2["Notifications"] = "notifications";
105474
+ BrowserPermission2["Midi"] = "midi";
105475
+ BrowserPermission2["Push"] = "push";
105476
+ BrowserPermission2["Clipboardread"] = "clipboard-read";
105477
+ BrowserPermission2["Clipboardwrite"] = "clipboard-write";
105478
+ BrowserPermission2["Paymenthandler"] = "payment-handler";
105479
+ BrowserPermission2["Usb"] = "usb";
105480
+ BrowserPermission2["Bluetooth"] = "bluetooth";
105481
+ BrowserPermission2["Accelerometer"] = "accelerometer";
105482
+ BrowserPermission2["Gyroscope"] = "gyroscope";
105483
+ BrowserPermission2["Magnetometer"] = "magnetometer";
105484
+ BrowserPermission2["Ambientlightsensor"] = "ambient-light-sensor";
105485
+ BrowserPermission2["Backgroundsync"] = "background-sync";
105486
+ BrowserPermission2["Persistentstorage"] = "persistent-storage";
105487
+ BrowserPermission2["Screenwakelock"] = "screen-wake-lock";
105488
+ BrowserPermission2["Webshare"] = "web-share";
105489
+ BrowserPermission2["Xrspatialtracking"] = "xr-spatial-tracking";
105490
+ })(BrowserPermission || (BrowserPermission = {}));
104389
105491
  var ImageFormat;
104390
105492
  (function(ImageFormat2) {
104391
105493
  ImageFormat2["Jpg"] = "jpg";
@@ -104396,6 +105498,12 @@ var ImageFormat;
104396
105498
  ImageFormat2["Avif"] = "avif";
104397
105499
  ImageFormat2["Gif"] = "gif";
104398
105500
  })(ImageFormat || (ImageFormat = {}));
105501
+ var Services;
105502
+ (function(Services2) {
105503
+ Services2["Databases"] = "databases";
105504
+ Services2["Functions"] = "functions";
105505
+ Services2["Storage"] = "storage";
105506
+ })(Services || (Services = {}));
104399
105507
  var Platform;
104400
105508
  (function(Platform2) {
104401
105509
  Platform2["Appwrite"] = "appwrite";
@@ -104431,6 +105539,11 @@ var IndexType;
104431
105539
  IndexType2["Unique"] = "unique";
104432
105540
  IndexType2["Spatial"] = "spatial";
104433
105541
  })(IndexType || (IndexType = {}));
105542
+ var OrderBy;
105543
+ (function(OrderBy2) {
105544
+ OrderBy2["Asc"] = "asc";
105545
+ OrderBy2["Desc"] = "desc";
105546
+ })(OrderBy || (OrderBy = {}));
104434
105547
  var FilterType;
104435
105548
  (function(FilterType2) {
104436
105549
  FilterType2["Premium"] = "premium";
@@ -104503,6 +105616,85 @@ var Runtime;
104503
105616
  Runtime2["Flutter332"] = "flutter-3.32";
104504
105617
  Runtime2["Flutter335"] = "flutter-3.35";
104505
105618
  })(Runtime || (Runtime = {}));
105619
+ var Runtimes;
105620
+ (function(Runtimes2) {
105621
+ Runtimes2["Node145"] = "node-14.5";
105622
+ Runtimes2["Node160"] = "node-16.0";
105623
+ Runtimes2["Node180"] = "node-18.0";
105624
+ Runtimes2["Node190"] = "node-19.0";
105625
+ Runtimes2["Node200"] = "node-20.0";
105626
+ Runtimes2["Node210"] = "node-21.0";
105627
+ Runtimes2["Node22"] = "node-22";
105628
+ Runtimes2["Php80"] = "php-8.0";
105629
+ Runtimes2["Php81"] = "php-8.1";
105630
+ Runtimes2["Php82"] = "php-8.2";
105631
+ Runtimes2["Php83"] = "php-8.3";
105632
+ Runtimes2["Ruby30"] = "ruby-3.0";
105633
+ Runtimes2["Ruby31"] = "ruby-3.1";
105634
+ Runtimes2["Ruby32"] = "ruby-3.2";
105635
+ Runtimes2["Ruby33"] = "ruby-3.3";
105636
+ Runtimes2["Python38"] = "python-3.8";
105637
+ Runtimes2["Python39"] = "python-3.9";
105638
+ Runtimes2["Python310"] = "python-3.10";
105639
+ Runtimes2["Python311"] = "python-3.11";
105640
+ Runtimes2["Python312"] = "python-3.12";
105641
+ Runtimes2["Pythonml311"] = "python-ml-3.11";
105642
+ Runtimes2["Pythonml312"] = "python-ml-3.12";
105643
+ Runtimes2["Deno140"] = "deno-1.40";
105644
+ Runtimes2["Deno146"] = "deno-1.46";
105645
+ Runtimes2["Deno20"] = "deno-2.0";
105646
+ Runtimes2["Dart215"] = "dart-2.15";
105647
+ Runtimes2["Dart216"] = "dart-2.16";
105648
+ Runtimes2["Dart217"] = "dart-2.17";
105649
+ Runtimes2["Dart218"] = "dart-2.18";
105650
+ Runtimes2["Dart219"] = "dart-2.19";
105651
+ Runtimes2["Dart30"] = "dart-3.0";
105652
+ Runtimes2["Dart31"] = "dart-3.1";
105653
+ Runtimes2["Dart33"] = "dart-3.3";
105654
+ Runtimes2["Dart35"] = "dart-3.5";
105655
+ Runtimes2["Dart38"] = "dart-3.8";
105656
+ Runtimes2["Dart39"] = "dart-3.9";
105657
+ Runtimes2["Dotnet60"] = "dotnet-6.0";
105658
+ Runtimes2["Dotnet70"] = "dotnet-7.0";
105659
+ Runtimes2["Dotnet80"] = "dotnet-8.0";
105660
+ Runtimes2["Java80"] = "java-8.0";
105661
+ Runtimes2["Java110"] = "java-11.0";
105662
+ Runtimes2["Java170"] = "java-17.0";
105663
+ Runtimes2["Java180"] = "java-18.0";
105664
+ Runtimes2["Java210"] = "java-21.0";
105665
+ Runtimes2["Java22"] = "java-22";
105666
+ Runtimes2["Swift55"] = "swift-5.5";
105667
+ Runtimes2["Swift58"] = "swift-5.8";
105668
+ Runtimes2["Swift59"] = "swift-5.9";
105669
+ Runtimes2["Swift510"] = "swift-5.10";
105670
+ Runtimes2["Kotlin16"] = "kotlin-1.6";
105671
+ Runtimes2["Kotlin18"] = "kotlin-1.8";
105672
+ Runtimes2["Kotlin19"] = "kotlin-1.9";
105673
+ Runtimes2["Kotlin20"] = "kotlin-2.0";
105674
+ Runtimes2["Cpp17"] = "cpp-17";
105675
+ Runtimes2["Cpp20"] = "cpp-20";
105676
+ Runtimes2["Bun10"] = "bun-1.0";
105677
+ Runtimes2["Bun11"] = "bun-1.1";
105678
+ Runtimes2["Go123"] = "go-1.23";
105679
+ Runtimes2["Static1"] = "static-1";
105680
+ Runtimes2["Flutter324"] = "flutter-3.24";
105681
+ Runtimes2["Flutter327"] = "flutter-3.27";
105682
+ Runtimes2["Flutter329"] = "flutter-3.29";
105683
+ Runtimes2["Flutter332"] = "flutter-3.32";
105684
+ Runtimes2["Flutter335"] = "flutter-3.35";
105685
+ })(Runtimes || (Runtimes = {}));
105686
+ var UseCases;
105687
+ (function(UseCases2) {
105688
+ UseCases2["Portfolio"] = "portfolio";
105689
+ UseCases2["Starter"] = "starter";
105690
+ UseCases2["Events"] = "events";
105691
+ UseCases2["Ecommerce"] = "ecommerce";
105692
+ UseCases2["Documentation"] = "documentation";
105693
+ UseCases2["Blog"] = "blog";
105694
+ UseCases2["Ai"] = "ai";
105695
+ UseCases2["Forms"] = "forms";
105696
+ UseCases2["Dashboard"] = "dashboard";
105697
+ })(UseCases || (UseCases = {}));
104506
105698
  var TemplateReferenceType;
104507
105699
  (function(TemplateReferenceType2) {
104508
105700
  TemplateReferenceType2["Branch"] = "branch";
@@ -104557,24 +105749,20 @@ var SmtpEncryption;
104557
105749
  SmtpEncryption2["Ssl"] = "ssl";
104558
105750
  SmtpEncryption2["Tls"] = "tls";
104559
105751
  })(SmtpEncryption || (SmtpEncryption = {}));
104560
- var BillingPlan;
104561
- (function(BillingPlan2) {
104562
- BillingPlan2["Tier0"] = "tier-0";
104563
- BillingPlan2["Tier1"] = "tier-1";
104564
- BillingPlan2["Tier2"] = "tier-2";
104565
- BillingPlan2["Imaginetier0"] = "imagine-tier-0";
104566
- BillingPlan2["Imaginetier1"] = "imagine-tier-1";
104567
- BillingPlan2["Imaginetier150"] = "imagine-tier-1-50";
104568
- BillingPlan2["Imaginetier1100"] = "imagine-tier-1-100";
104569
- BillingPlan2["Imaginetier1200"] = "imagine-tier-1-200";
104570
- BillingPlan2["Imaginetier1290"] = "imagine-tier-1-290";
104571
- BillingPlan2["Imaginetier1480"] = "imagine-tier-1-480";
104572
- BillingPlan2["Imaginetier1700"] = "imagine-tier-1-700";
104573
- BillingPlan2["Imaginetier1900"] = "imagine-tier-1-900";
104574
- BillingPlan2["Imaginetier11100"] = "imagine-tier-1-1100";
104575
- BillingPlan2["Imaginetier11650"] = "imagine-tier-1-1650";
104576
- BillingPlan2["Imaginetier12200"] = "imagine-tier-1-2200";
104577
- })(BillingPlan || (BillingPlan = {}));
105752
+ var Resources;
105753
+ (function(Resources2) {
105754
+ Resources2["User"] = "user";
105755
+ Resources2["Database"] = "database";
105756
+ Resources2["Table"] = "table";
105757
+ Resources2["Column"] = "column";
105758
+ Resources2["Index"] = "index";
105759
+ Resources2["Row"] = "row";
105760
+ Resources2["Document"] = "document";
105761
+ Resources2["Attribute"] = "attribute";
105762
+ Resources2["Collection"] = "collection";
105763
+ Resources2["Bucket"] = "bucket";
105764
+ Resources2["File"] = "file";
105765
+ })(Resources || (Resources = {}));
104578
105766
  var ProjectUsageRange;
104579
105767
  (function(ProjectUsageRange2) {
104580
105768
  ProjectUsageRange2["OneHour"] = "1h";
@@ -105036,6 +106224,24 @@ var Adapter;
105036
106224
  Adapter2["Static"] = "static";
105037
106225
  Adapter2["Ssr"] = "ssr";
105038
106226
  })(Adapter || (Adapter = {}));
106227
+ var Frameworks;
106228
+ (function(Frameworks2) {
106229
+ Frameworks2["Analog"] = "analog";
106230
+ Frameworks2["Angular"] = "angular";
106231
+ Frameworks2["Nextjs"] = "nextjs";
106232
+ Frameworks2["React"] = "react";
106233
+ Frameworks2["Nuxt"] = "nuxt";
106234
+ Frameworks2["Vue"] = "vue";
106235
+ Frameworks2["Sveltekit"] = "sveltekit";
106236
+ Frameworks2["Astro"] = "astro";
106237
+ Frameworks2["Tanstackstart"] = "tanstack-start";
106238
+ Frameworks2["Remix"] = "remix";
106239
+ Frameworks2["Lynx"] = "lynx";
106240
+ Frameworks2["Flutter"] = "flutter";
106241
+ Frameworks2["Reactnative"] = "react-native";
106242
+ Frameworks2["Vite"] = "vite";
106243
+ Frameworks2["Other"] = "other";
106244
+ })(Frameworks || (Frameworks = {}));
105039
106245
  var Compression;
105040
106246
  (function(Compression2) {
105041
106247
  Compression2["None"] = "none";
@@ -105054,6 +106260,14 @@ var ImageGravity;
105054
106260
  ImageGravity2["Bottom"] = "bottom";
105055
106261
  ImageGravity2["Bottomright"] = "bottom-right";
105056
106262
  })(ImageGravity || (ImageGravity = {}));
106263
+ var Roles;
106264
+ (function(Roles2) {
106265
+ Roles2["Developer"] = "developer";
106266
+ Roles2["Editor"] = "editor";
106267
+ Roles2["Analyst"] = "analyst";
106268
+ Roles2["Billing"] = "billing";
106269
+ Roles2["Owner"] = "owner";
106270
+ })(Roles || (Roles = {}));
105057
106271
  var PasswordHash;
105058
106272
  (function(PasswordHash2) {
105059
106273
  PasswordHash2["Sha1"] = "sha1";
@@ -105114,6 +106328,7 @@ var DeploymentStatus;
105114
106328
  DeploymentStatus2["Processing"] = "processing";
105115
106329
  DeploymentStatus2["Building"] = "building";
105116
106330
  DeploymentStatus2["Ready"] = "ready";
106331
+ DeploymentStatus2["Canceled"] = "canceled";
105117
106332
  DeploymentStatus2["Failed"] = "failed";
105118
106333
  })(DeploymentStatus || (DeploymentStatus = {}));
105119
106334
  var ExecutionTrigger;
@@ -105178,7 +106393,7 @@ var package_default = {
105178
106393
  type: "module",
105179
106394
  homepage: "https://appwrite.io/support",
105180
106395
  description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
105181
- version: "13.1.0",
106396
+ version: "13.2.0",
105182
106397
  license: "BSD-3-Clause",
105183
106398
  main: "dist/index.js",
105184
106399
  types: "dist/index.d.ts",
@@ -105207,7 +106422,7 @@ var package_default = {
105207
106422
  "windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe"
105208
106423
  },
105209
106424
  dependencies: {
105210
- "@appwrite.io/console": "^2.1.3",
106425
+ "@appwrite.io/console": "^2.2.0",
105211
106426
  "bignumber.js": "^9.0.0",
105212
106427
  chalk: "4.1.2",
105213
106428
  chokidar: "^3.6.0",
@@ -105579,8 +106794,8 @@ var sdkForConsole = async (requiresAuth = true) => {
105579
106794
  };
105580
106795
  var sdkForProject = async () => {
105581
106796
  const client = new Client();
105582
- const endpoint = localConfig2.getEndpoint() || globalConfig2.getEndpoint() || DEFAULT_ENDPOINT;
105583
- const project = localConfig2.getProject().projectId ? localConfig2.getProject().projectId : globalConfig2.getProject();
106797
+ const endpoint = localConfig.getEndpoint() || globalConfig2.getEndpoint() || DEFAULT_ENDPOINT;
106798
+ const project = localConfig.getProject().projectId ? localConfig.getProject().projectId : globalConfig2.getProject();
105584
106799
  const key = globalConfig2.getKey();
105585
106800
  const cookie = globalConfig2.getCookie();
105586
106801
  const selfSigned = globalConfig2.getSelfSigned();
@@ -105674,9 +106889,9 @@ var questionsInitProject = [
105674
106889
  {
105675
106890
  type: "confirm",
105676
106891
  name: "override",
105677
- message: `An ${SDK_TITLE} project ( ${localConfig2.getProject()["projectId"]} ) is already associated with the current directory. Would you like to override it?`,
106892
+ message: `An ${SDK_TITLE} project ( ${localConfig.getProject()["projectId"]} ) is already associated with the current directory. Would you like to override it?`,
105678
106893
  when() {
105679
- return Object.keys(localConfig2.getProject()).length !== 0;
106894
+ return Object.keys(localConfig.getProject()).length !== 0;
105680
106895
  }
105681
106896
  },
105682
106897
  {
@@ -105960,10 +107175,10 @@ var questionsPushSites = [
105960
107175
  name: "sites",
105961
107176
  message: "Which sites would you like to push?",
105962
107177
  validate: (value) => validateRequired("site", value),
105963
- when: () => localConfig2.getSites().length > 0,
107178
+ when: () => localConfig.getSites().length > 0,
105964
107179
  choices: () => {
105965
- let sites = localConfig2.getSites();
105966
- checkDeployConditions(localConfig2);
107180
+ let sites = localConfig.getSites();
107181
+ checkDeployConditions(localConfig);
105967
107182
  let choices = sites.map((site, idx) => {
105968
107183
  return {
105969
107184
  name: `${site.name} (${site.$id})`,
@@ -105980,10 +107195,10 @@ var questionsPushFunctions = [
105980
107195
  name: "functions",
105981
107196
  message: "Which functions would you like to push?",
105982
107197
  validate: (value) => validateRequired("function", value),
105983
- when: () => localConfig2.getFunctions().length > 0,
107198
+ when: () => localConfig.getFunctions().length > 0,
105984
107199
  choices: () => {
105985
- let functions = localConfig2.getFunctions();
105986
- checkDeployConditions(localConfig2);
107200
+ let functions = localConfig.getFunctions();
107201
+ checkDeployConditions(localConfig);
105987
107202
  let choices = functions.map((func, idx) => {
105988
107203
  return {
105989
107204
  name: `${func.name} (${func.$id})`,
@@ -106000,10 +107215,10 @@ var questionsPushCollections = [
106000
107215
  name: "collections",
106001
107216
  message: "Which collections would you like to push?",
106002
107217
  validate: (value) => validateRequired("collection", value),
106003
- when: () => localConfig2.getCollections().length > 0,
107218
+ when: () => localConfig.getCollections().length > 0,
106004
107219
  choices: () => {
106005
- let collections = localConfig2.getCollections();
106006
- checkDeployConditions(localConfig2);
107220
+ let collections = localConfig.getCollections();
107221
+ checkDeployConditions(localConfig);
106007
107222
  return collections.map((collection) => {
106008
107223
  return {
106009
107224
  name: `${collection.name} (${collection["databaseId"]} - ${collection["$id"]})`,
@@ -106019,10 +107234,10 @@ var questionsPushTables = [
106019
107234
  name: "tables",
106020
107235
  message: "Which tables would you like to push?",
106021
107236
  validate: (value) => validateRequired("table", value),
106022
- when: () => localConfig2.getTables().length > 0,
107237
+ when: () => localConfig.getTables().length > 0,
106023
107238
  choices: () => {
106024
- let tables = localConfig2.getTables();
106025
- checkDeployConditions(localConfig2);
107239
+ let tables = localConfig.getTables();
107240
+ checkDeployConditions(localConfig);
106026
107241
  return tables.map((table) => {
106027
107242
  return {
106028
107243
  name: `${table.name} (${table["databaseId"]} - ${table["$id"]})`,
@@ -106052,10 +107267,10 @@ var questionsPushBuckets = [
106052
107267
  name: "buckets",
106053
107268
  message: "Which buckets would you like to push?",
106054
107269
  validate: (value) => validateRequired("bucket", value),
106055
- when: () => localConfig2.getBuckets().length > 0,
107270
+ when: () => localConfig.getBuckets().length > 0,
106056
107271
  choices: () => {
106057
- let buckets = localConfig2.getBuckets();
106058
- checkDeployConditions(localConfig2);
107272
+ let buckets = localConfig.getBuckets();
107273
+ checkDeployConditions(localConfig);
106059
107274
  return buckets.map((bucket) => {
106060
107275
  return {
106061
107276
  name: `${bucket.name} (${bucket["$id"]})`,
@@ -106071,9 +107286,9 @@ var questionsPushMessagingTopics = [
106071
107286
  name: "topics",
106072
107287
  message: "Which messaging topic would you like to push?",
106073
107288
  validate: (value) => validateRequired("topics", value),
106074
- when: () => localConfig2.getMessagingTopics().length > 0,
107289
+ when: () => localConfig.getMessagingTopics().length > 0,
106075
107290
  choices: () => {
106076
- let topics = localConfig2.getMessagingTopics();
107291
+ let topics = localConfig.getMessagingTopics();
106077
107292
  return topics.map((topic) => {
106078
107293
  return {
106079
107294
  name: `${topic.name} (${topic["$id"]})`,
@@ -106102,10 +107317,10 @@ var questionsPushTeams = [
106102
107317
  name: "teams",
106103
107318
  message: "Which teams would you like to push?",
106104
107319
  validate: (value) => validateRequired("team", value),
106105
- when: () => localConfig2.getTeams().length > 0,
107320
+ when: () => localConfig.getTeams().length > 0,
106106
107321
  choices: () => {
106107
- let teams = localConfig2.getTeams();
106108
- checkDeployConditions(localConfig2);
107322
+ let teams = localConfig.getTeams();
107323
+ checkDeployConditions(localConfig);
106109
107324
  return teams.map((team) => {
106110
107325
  return {
106111
107326
  name: `${team.name} (${team["$id"]})`,
@@ -107035,7 +108250,7 @@ var approveChanges = async (resource, resourceGetFunction, keys, resourceName, r
107035
108250
  var import_chalk6 = __toESM(require_source(), 1);
107036
108251
  var checkAndApplyTablesDBChanges = async () => {
107037
108252
  log("Checking for tablesDB changes ...");
107038
- const localTablesDBs = localConfig2.getTablesDBs();
108253
+ const localTablesDBs = localConfig.getTablesDBs();
107039
108254
  const { databases: remoteTablesDBs } = await paginate(
107040
108255
  async (args) => {
107041
108256
  const tablesDBService = await getTablesDBService();
@@ -108418,14 +109633,14 @@ var pushResources = async ({
108418
109633
  skipDeprecated = false
108419
109634
  } = {}) => {
108420
109635
  if (cliConfig.all) {
108421
- checkDeployConditions(localConfig2);
108422
- const functions = localConfig2.getFunctions();
109636
+ checkDeployConditions(localConfig);
109637
+ const functions = localConfig.getFunctions();
108423
109638
  let allowFunctionsCodePush = cliConfig.force === true ? true : null;
108424
109639
  if (functions.length > 0 && allowFunctionsCodePush === null) {
108425
109640
  const codeAnswer = await import_inquirer3.default.prompt(questionsPushFunctionsCode);
108426
109641
  allowFunctionsCodePush = codeAnswer.override;
108427
109642
  }
108428
- const sites = localConfig2.getSites();
109643
+ const sites = localConfig.getSites();
108429
109644
  let allowSitesCodePush = cliConfig.force === true ? true : null;
108430
109645
  if (sites.length > 0 && allowSitesCodePush === null) {
108431
109646
  const codeAnswer = await import_inquirer3.default.prompt(questionsPushSitesCode);
@@ -108434,20 +109649,20 @@ var pushResources = async ({
108434
109649
  const pushInstance = await createPushInstance({
108435
109650
  requiresConsoleAuth: true
108436
109651
  });
108437
- const project = localConfig2.getProject();
109652
+ const project = localConfig.getProject();
108438
109653
  const config2 = {
108439
109654
  projectId: project.projectId ?? "",
108440
109655
  projectName: project.projectName,
108441
109656
  settings: project.projectSettings,
108442
109657
  functions,
108443
109658
  sites,
108444
- collections: localConfig2.getCollections(),
108445
- databases: localConfig2.getDatabases(),
108446
- tables: localConfig2.getTables(),
108447
- tablesDB: localConfig2.getTablesDBs(),
108448
- buckets: localConfig2.getBuckets(),
108449
- teams: localConfig2.getTeams(),
108450
- topics: localConfig2.getMessagingTopics()
109659
+ collections: localConfig.getCollections(),
109660
+ databases: localConfig.getDatabases(),
109661
+ tables: localConfig.getTables(),
109662
+ tablesDB: localConfig.getTablesDBs(),
109663
+ buckets: localConfig.getBuckets(),
109664
+ teams: localConfig.getTeams(),
109665
+ topics: localConfig.getMessagingTopics()
108451
109666
  };
108452
109667
  parseWithBetterErrors(
108453
109668
  ConfigSchema,
@@ -108486,14 +109701,14 @@ var pushResources = async ({
108486
109701
  }
108487
109702
  };
108488
109703
  var pushSettings = async () => {
108489
- checkDeployConditions(localConfig2);
109704
+ checkDeployConditions(localConfig);
108490
109705
  try {
108491
109706
  const projectsService = await getProjectsService();
108492
109707
  let response = await projectsService.get(
108493
- localConfig2.getProject().projectId
109708
+ localConfig.getProject().projectId
108494
109709
  );
108495
109710
  const remoteSettings = createSettingsObject(response);
108496
- const localSettings = localConfig2.getProject().projectSettings ?? {};
109711
+ const localSettings = localConfig.getProject().projectSettings ?? {};
108497
109712
  log("Checking for changes ...");
108498
109713
  const changes = [];
108499
109714
  changes.push(
@@ -108529,7 +109744,7 @@ var pushSettings = async () => {
108529
109744
  const pushInstance = await createPushInstance({
108530
109745
  requiresConsoleAuth: true
108531
109746
  });
108532
- const config2 = localConfig2.getProject();
109747
+ const config2 = localConfig.getProject();
108533
109748
  await pushInstance.pushSettings({
108534
109749
  projectId: config2.projectId,
108535
109750
  projectName: config2.projectName,
@@ -108546,13 +109761,13 @@ var pushSite = async ({
108546
109761
  code,
108547
109762
  withVariables
108548
109763
  } = {}) => {
108549
- process.chdir(localConfig2.configDirectoryPath);
109764
+ process.chdir(localConfig.configDirectoryPath);
108550
109765
  const siteIds = [];
108551
109766
  if (siteId) {
108552
109767
  siteIds.push(siteId);
108553
109768
  } else if (cliConfig.all) {
108554
- checkDeployConditions(localConfig2);
108555
- const sites2 = localConfig2.getSites();
109769
+ checkDeployConditions(localConfig);
109770
+ const sites2 = localConfig.getSites();
108556
109771
  siteIds.push(
108557
109772
  ...sites2.map((site) => {
108558
109773
  return site.$id;
@@ -108573,7 +109788,7 @@ var pushSite = async ({
108573
109788
  return;
108574
109789
  }
108575
109790
  let sites = siteIds.map((id) => {
108576
- const sites2 = localConfig2.getSites();
109791
+ const sites2 = localConfig.getSites();
108577
109792
  const site = sites2.find((s) => s.$id === id);
108578
109793
  if (!site) {
108579
109794
  throw new Error("Site '" + id + "' not found.");
@@ -108586,7 +109801,7 @@ var pushSite = async ({
108586
109801
  log(`Site ${site.name} is missing build command.`);
108587
109802
  const answers = await import_inquirer3.default.prompt(questionsGetEntrypoint);
108588
109803
  site.buildCommand = answers.entrypoint;
108589
- localConfig2.addSite(site);
109804
+ localConfig.addSite(site);
108590
109805
  }
108591
109806
  }
108592
109807
  if (!await approveChanges(
@@ -108623,7 +109838,7 @@ var pushSite = async ({
108623
109838
  } = result;
108624
109839
  failedDeployments.forEach((failed) => {
108625
109840
  const { name, deployment, $id } = failed;
108626
- const failUrl = `${globalConfig2.getEndpoint().slice(0, -3)}/console/project-${localConfig2.getProject().projectId}/sites/site-${$id}/deployments/deployment-${deployment}`;
109841
+ const failUrl = `${globalConfig2.getEndpoint().slice(0, -3)}/console/project-${localConfig.getProject().projectId}/sites/site-${$id}/deployments/deployment-${deployment}`;
108627
109842
  error48(
108628
109843
  `Deployment of ${name} has failed. Check at ${failUrl} for more details
108629
109844
  `
@@ -108654,13 +109869,13 @@ var pushFunction = async ({
108654
109869
  code,
108655
109870
  withVariables
108656
109871
  } = {}) => {
108657
- process.chdir(localConfig2.configDirectoryPath);
109872
+ process.chdir(localConfig.configDirectoryPath);
108658
109873
  const functionIds = [];
108659
109874
  if (functionId) {
108660
109875
  functionIds.push(functionId);
108661
109876
  } else if (cliConfig.all) {
108662
- checkDeployConditions(localConfig2);
108663
- const functions2 = localConfig2.getFunctions();
109877
+ checkDeployConditions(localConfig);
109878
+ const functions2 = localConfig.getFunctions();
108664
109879
  functionIds.push(
108665
109880
  ...functions2.map((func) => {
108666
109881
  return func.$id;
@@ -108681,7 +109896,7 @@ var pushFunction = async ({
108681
109896
  return;
108682
109897
  }
108683
109898
  let functions = functionIds.map((id) => {
108684
- const functions2 = localConfig2.getFunctions();
109899
+ const functions2 = localConfig.getFunctions();
108685
109900
  const func = functions2.find((f) => f.$id === id);
108686
109901
  if (!func) {
108687
109902
  throw new Error("Function '" + id + "' not found.");
@@ -108694,7 +109909,7 @@ var pushFunction = async ({
108694
109909
  log(`Function ${func.name} is missing an entrypoint.`);
108695
109910
  const answers = await import_inquirer3.default.prompt(questionsGetEntrypoint);
108696
109911
  func.entrypoint = answers.entrypoint;
108697
- localConfig2.addFunction(func);
109912
+ localConfig.addFunction(func);
108698
109913
  }
108699
109914
  }
108700
109915
  if (!await approveChanges(
@@ -108731,7 +109946,7 @@ var pushFunction = async ({
108731
109946
  } = result;
108732
109947
  failedDeployments.forEach((failed) => {
108733
109948
  const { name, deployment, $id } = failed;
108734
- const failUrl = `${globalConfig2.getEndpoint().slice(0, -3)}/console/project-${localConfig2.getProject().projectId}/functions/function-${$id}/deployment-${deployment}`;
109949
+ const failUrl = `${globalConfig2.getEndpoint().slice(0, -3)}/console/project-${localConfig.getProject().projectId}/functions/function-${$id}/deployment-${deployment}`;
108735
109950
  error48(
108736
109951
  `Deployment of ${name} has failed. Check at ${failUrl} for more details
108737
109952
  `
@@ -108772,23 +109987,23 @@ var pushTable = async ({
108772
109987
  100,
108773
109988
  "databases"
108774
109989
  )).databases;
108775
- const localTablesDBs2 = localConfig2.getTablesDBs();
109990
+ const localTablesDBs2 = localConfig.getTablesDBs();
108776
109991
  const remoteDatabaseIds = new Set(remoteTablesDBs.map((db) => db.$id));
108777
- const localTables2 = localConfig2.getTables();
109992
+ const localTables2 = localConfig.getTables();
108778
109993
  const validTables = localTables2.filter(
108779
109994
  (table) => remoteDatabaseIds.has(table.databaseId)
108780
109995
  );
108781
- localConfig2.set("tables", validTables);
109996
+ localConfig.set("tables", validTables);
108782
109997
  const validTablesDBs = localTablesDBs2.filter(
108783
109998
  (db) => remoteDatabaseIds.has(db.$id)
108784
109999
  );
108785
- localConfig2.set("tablesDB", validTablesDBs);
110000
+ localConfig.set("tablesDB", validTablesDBs);
108786
110001
  success2("Configuration resynced successfully.");
108787
110002
  console.log();
108788
110003
  }
108789
110004
  log("Checking for deleted tables ...");
108790
- const localTablesDBs = localConfig2.getTablesDBs();
108791
- const localTables = localConfig2.getTables();
110005
+ const localTablesDBs = localConfig.getTablesDBs();
110006
+ const localTables = localConfig.getTables();
108792
110007
  const tablesToDelete = [];
108793
110008
  for (const db of localTablesDBs) {
108794
110009
  try {
@@ -108850,13 +110065,13 @@ var pushTable = async ({
108850
110065
  }
108851
110066
  }
108852
110067
  if (cliConfig.all) {
108853
- checkDeployConditions(localConfig2);
108854
- tables.push(...localConfig2.getTables());
110068
+ checkDeployConditions(localConfig);
110069
+ tables.push(...localConfig.getTables());
108855
110070
  } else {
108856
110071
  const answers = await import_inquirer3.default.prompt(questionsPushTables);
108857
110072
  if (answers.tables) {
108858
110073
  const configTables = /* @__PURE__ */ new Map();
108859
- localConfig2.getTables().forEach((c) => {
110074
+ localConfig.getTables().forEach((c) => {
108860
110075
  configTables.set(`${c["databaseId"]}|${c["$id"]}`, c);
108861
110076
  });
108862
110077
  answers.tables.forEach((a) => {
@@ -108906,13 +110121,13 @@ var pushCollection = async () => {
108906
110121
  );
108907
110122
  const collections = [];
108908
110123
  if (cliConfig.all) {
108909
- checkDeployConditions(localConfig2);
108910
- collections.push(...localConfig2.getCollections());
110124
+ checkDeployConditions(localConfig);
110125
+ collections.push(...localConfig.getCollections());
108911
110126
  } else {
108912
110127
  const answers = await import_inquirer3.default.prompt(questionsPushCollections);
108913
110128
  if (answers.collections) {
108914
110129
  const configCollections = /* @__PURE__ */ new Map();
108915
- localConfig2.getCollections().forEach((c) => {
110130
+ localConfig.getCollections().forEach((c) => {
108916
110131
  configCollections.set(`${c["databaseId"]}|${c["$id"]}`, c);
108917
110132
  });
108918
110133
  answers.collections.forEach((a) => {
@@ -108929,7 +110144,7 @@ var pushCollection = async () => {
108929
110144
  return;
108930
110145
  }
108931
110146
  collections.forEach((collection) => {
108932
- const localDatabase = localConfig2.getDatabase(collection.databaseId);
110147
+ const localDatabase = localConfig.getDatabase(collection.databaseId);
108933
110148
  collection.databaseName = localDatabase.name ?? collection.databaseId;
108934
110149
  });
108935
110150
  if (!await approveChanges(
@@ -108965,9 +110180,9 @@ var pushCollection = async () => {
108965
110180
  };
108966
110181
  var pushBucket = async () => {
108967
110182
  let bucketIds = [];
108968
- const configBuckets = localConfig2.getBuckets();
110183
+ const configBuckets = localConfig.getBuckets();
108969
110184
  if (cliConfig.all) {
108970
- checkDeployConditions(localConfig2);
110185
+ checkDeployConditions(localConfig);
108971
110186
  bucketIds.push(...configBuckets.map((b) => b.$id));
108972
110187
  }
108973
110188
  if (bucketIds.length === 0) {
@@ -109015,9 +110230,9 @@ var pushBucket = async () => {
109015
110230
  };
109016
110231
  var pushTeam = async () => {
109017
110232
  let teamIds = [];
109018
- const configTeams = localConfig2.getTeams();
110233
+ const configTeams = localConfig.getTeams();
109019
110234
  if (cliConfig.all) {
109020
- checkDeployConditions(localConfig2);
110235
+ checkDeployConditions(localConfig);
109021
110236
  teamIds.push(...configTeams.map((t) => t.$id));
109022
110237
  }
109023
110238
  if (teamIds.length === 0) {
@@ -109065,9 +110280,9 @@ var pushTeam = async () => {
109065
110280
  };
109066
110281
  var pushMessagingTopic = async () => {
109067
110282
  let topicsIds = [];
109068
- const configTopics = localConfig2.getMessagingTopics();
110283
+ const configTopics = localConfig.getMessagingTopics();
109069
110284
  if (cliConfig.all) {
109070
- checkDeployConditions(localConfig2);
110285
+ checkDeployConditions(localConfig);
109071
110286
  topicsIds.push(...configTopics.map((b) => b.$id));
109072
110287
  }
109073
110288
  if (topicsIds.length === 0) {
@@ -109168,7 +110383,7 @@ async function createPullInstance(options = {
109168
110383
  const projectClient = await sdkForProject();
109169
110384
  const consoleClient = await sdkForConsole(requiresConsoleAuth);
109170
110385
  const pullInstance = new Pull(projectClient, consoleClient, silent);
109171
- pullInstance.setConfigDirectoryPath(localConfig2.configDirectoryPath);
110386
+ pullInstance.setConfigDirectoryPath(localConfig.configDirectoryPath);
109172
110387
  return pullInstance;
109173
110388
  }
109174
110389
  var Pull = class {
@@ -109538,9 +110753,13 @@ var Pull = class {
109538
110753
  const filteredColumns = table.columns?.map(
109539
110754
  (col) => filterBySchema(col, ColumnSchema)
109540
110755
  );
110756
+ const filteredIndexes = table.indexes?.map(
110757
+ (idx) => filterBySchema(idx, IndexTableSchema)
110758
+ );
109541
110759
  allTables.push({
109542
110760
  ...filterBySchema(table, TableSchema),
109543
- columns: filteredColumns || []
110761
+ columns: filteredColumns || [],
110762
+ indexes: filteredIndexes || []
109544
110763
  });
109545
110764
  }
109546
110765
  }
@@ -109642,7 +110861,7 @@ var Pull = class {
109642
110861
  var pullResources = async ({
109643
110862
  skipDeprecated = true
109644
110863
  } = {}) => {
109645
- const project = localConfig2.getProject();
110864
+ const project = localConfig.getProject();
109646
110865
  if (!project.projectId) {
109647
110866
  error48(
109648
110867
  "Project configuration not found. Please run 'appwrite init project' to initialize your project first."
@@ -109679,9 +110898,9 @@ var pullSettings = async () => {
109679
110898
  const pullInstance = await createPullInstance({
109680
110899
  requiresConsoleAuth: true
109681
110900
  });
109682
- const projectId = localConfig2.getProject().projectId;
110901
+ const projectId = localConfig.getProject().projectId;
109683
110902
  const settings = await pullInstance.pullSettings(projectId);
109684
- localConfig2.setProject(projectId, settings.projectName, settings.project);
110903
+ localConfig.setProject(projectId, settings.projectName, settings.project);
109685
110904
  };
109686
110905
  var pullFunctions = async ({
109687
110906
  code,
@@ -109714,9 +110933,9 @@ var pullFunctions = async ({
109714
110933
  functionIds: selectedFunctionIds
109715
110934
  });
109716
110935
  for (const func of functions) {
109717
- const localFunction = localConfig2.getFunction(func.$id);
110936
+ const localFunction = localConfig.getFunction(func.$id);
109718
110937
  func["path"] = localFunction["path"] || func["path"];
109719
- localConfig2.addFunction(func);
110938
+ localConfig.addFunction(func);
109720
110939
  }
109721
110940
  };
109722
110941
  var pullSites = async ({
@@ -109752,15 +110971,15 @@ var pullSites = async ({
109752
110971
  siteIds: selectedSiteIds
109753
110972
  });
109754
110973
  for (const site of sites) {
109755
- const localSite = localConfig2.getSite(site.$id);
110974
+ const localSite = localConfig.getSite(site.$id);
109756
110975
  site["path"] = localSite["path"] || site["path"];
109757
- localConfig2.addSite(site);
110976
+ localConfig.addSite(site);
109758
110977
  }
109759
110978
  };
109760
110979
  var pullCollection = async () => {
109761
110980
  const pullInstance = await createPullInstance();
109762
110981
  const { databases, collections } = await pullInstance.pullCollections();
109763
- const localCollections = localConfig2.getCollections();
110982
+ const localCollections = localConfig.getCollections();
109764
110983
  const remoteCollectionIds = new Set(collections.map((c) => c.$id));
109765
110984
  const collectionsToRemove = localCollections.filter(
109766
110985
  (c) => !remoteCollectionIds.has(c.$id)
@@ -109774,13 +110993,13 @@ var pullCollection = async () => {
109774
110993
  return;
109775
110994
  }
109776
110995
  }
109777
- localConfig2.set("databases", databases);
109778
- localConfig2.set("collections", collections);
110996
+ localConfig.set("databases", databases);
110997
+ localConfig.set("collections", collections);
109779
110998
  };
109780
110999
  var pullTable = async () => {
109781
111000
  const pullInstance = await createPullInstance();
109782
111001
  const { databases, tables } = await pullInstance.pullTables();
109783
- const localTables = localConfig2.getTables();
111002
+ const localTables = localConfig.getTables();
109784
111003
  const remoteTableIds = new Set(tables.map((t) => t.$id));
109785
111004
  const tablesToRemove = localTables.filter(
109786
111005
  (t) => !remoteTableIds.has(t.$id)
@@ -109794,13 +111013,13 @@ var pullTable = async () => {
109794
111013
  return;
109795
111014
  }
109796
111015
  }
109797
- localConfig2.set("tablesDB", databases);
109798
- localConfig2.set("tables", tables);
111016
+ localConfig.set("tablesDB", databases);
111017
+ localConfig.set("tables", tables);
109799
111018
  };
109800
111019
  var pullBucket = async () => {
109801
111020
  const pullInstance = await createPullInstance();
109802
111021
  const buckets = await pullInstance.pullBuckets();
109803
- const localBuckets = localConfig2.getBuckets();
111022
+ const localBuckets = localConfig.getBuckets();
109804
111023
  const remoteBucketIds = new Set(buckets.map((b) => b.$id));
109805
111024
  const bucketsToRemove = localBuckets.filter(
109806
111025
  (b) => !remoteBucketIds.has(b.$id)
@@ -109814,12 +111033,12 @@ var pullBucket = async () => {
109814
111033
  return;
109815
111034
  }
109816
111035
  }
109817
- localConfig2.set("buckets", buckets);
111036
+ localConfig.set("buckets", buckets);
109818
111037
  };
109819
111038
  var pullTeam = async () => {
109820
111039
  const pullInstance = await createPullInstance();
109821
111040
  const teams = await pullInstance.pullTeams();
109822
- const localTeams = localConfig2.getTeams();
111041
+ const localTeams = localConfig.getTeams();
109823
111042
  const remoteTeamIds = new Set(teams.map((t) => t.$id));
109824
111043
  const teamsToRemove = localTeams.filter(
109825
111044
  (t) => !remoteTeamIds.has(t.$id)
@@ -109833,12 +111052,12 @@ var pullTeam = async () => {
109833
111052
  return;
109834
111053
  }
109835
111054
  }
109836
- localConfig2.set("teams", teams);
111055
+ localConfig.set("teams", teams);
109837
111056
  };
109838
111057
  var pullMessagingTopic = async () => {
109839
111058
  const pullInstance = await createPullInstance();
109840
111059
  const topics = await pullInstance.pullMessagingTopics();
109841
- const localTopics = localConfig2.getMessagingTopics();
111060
+ const localTopics = localConfig.getMessagingTopics();
109842
111061
  const remoteTopicIds = new Set(topics.map((t) => t.$id));
109843
111062
  const topicsToRemove = localTopics.filter(
109844
111063
  (t) => !remoteTopicIds.has(t.$id)
@@ -109852,7 +111071,7 @@ var pullMessagingTopic = async () => {
109852
111071
  return;
109853
111072
  }
109854
111073
  }
109855
- localConfig2.set("topics", topics);
111074
+ localConfig.set("topics", topics);
109856
111075
  };
109857
111076
  var pull = new Command("pull").description(commandDescriptions["pull"]).action(actionRunner(() => pullResources({ skipDeprecated: true })));
109858
111077
  pull.command("all").description("Pull all resources").action(
@@ -110196,8 +111415,18 @@ var TypeScriptDatabasesGenerator = class extends BaseDatabasesGenerator {
110196
111415
  $id: e.$id,
110197
111416
  name: e.name
110198
111417
  }));
110199
- const createAttributes = this.buildAttributes(entity, typeEntities, " ", true);
110200
- const rowAttributes = this.buildAttributes(entity, typeEntities, " ", false);
111418
+ const createAttributes = this.buildAttributes(
111419
+ entity,
111420
+ typeEntities,
111421
+ " ",
111422
+ true
111423
+ );
111424
+ const rowAttributes = this.buildAttributes(
111425
+ entity,
111426
+ typeEntities,
111427
+ " ",
111428
+ false
111429
+ );
110201
111430
  const createType = createAttributes.trim().length === 0 ? `export type ${typeName}Create = Record<string, never>` : `export type ${typeName}Create = {
110202
111431
  ${createAttributes}
110203
111432
  }`;