@appwrite.io/console 0.6.1 → 0.6.4

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 (398) hide show
  1. package/.github/workflows/autoclose.yml +11 -0
  2. package/.github/workflows/publish.yml +40 -16
  3. package/.travis.yml +2 -2
  4. package/README.md +2 -2
  5. package/dist/cjs/sdk.js +315 -29
  6. package/dist/cjs/sdk.js.map +1 -1
  7. package/dist/esm/sdk.js +314 -28
  8. package/dist/esm/sdk.js.map +1 -1
  9. package/dist/iife/sdk.js +317 -28
  10. package/docs/examples/account/create-anonymous-session.md +1 -1
  11. package/docs/examples/account/create-email-password-session.md +1 -1
  12. package/docs/examples/account/create-email-token.md +1 -1
  13. package/docs/examples/account/create-j-w-t.md +1 -1
  14. package/docs/examples/account/create-magic-u-r-l-token.md +1 -1
  15. package/docs/examples/account/create-mfa-authenticator.md +1 -1
  16. package/docs/examples/account/create-mfa-challenge.md +1 -1
  17. package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
  18. package/docs/examples/account/create-o-auth2session.md +1 -1
  19. package/docs/examples/account/create-o-auth2token.md +1 -1
  20. package/docs/examples/account/create-phone-token.md +1 -1
  21. package/docs/examples/account/create-phone-verification.md +1 -1
  22. package/docs/examples/account/create-push-target.md +1 -1
  23. package/docs/examples/account/create-recovery.md +1 -1
  24. package/docs/examples/account/create-session.md +1 -1
  25. package/docs/examples/account/create-verification.md +1 -1
  26. package/docs/examples/account/create.md +1 -1
  27. package/docs/examples/account/delete-identity.md +1 -1
  28. package/docs/examples/account/delete-mfa-authenticator.md +1 -1
  29. package/docs/examples/account/delete-push-target.md +1 -1
  30. package/docs/examples/account/delete-session.md +1 -1
  31. package/docs/examples/account/delete-sessions.md +1 -1
  32. package/docs/examples/account/delete.md +1 -1
  33. package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
  34. package/docs/examples/account/get-prefs.md +1 -1
  35. package/docs/examples/account/get-session.md +1 -1
  36. package/docs/examples/account/get.md +1 -1
  37. package/docs/examples/account/list-identities.md +1 -1
  38. package/docs/examples/account/list-logs.md +1 -1
  39. package/docs/examples/account/list-mfa-factors.md +1 -1
  40. package/docs/examples/account/list-sessions.md +1 -1
  41. package/docs/examples/account/update-email.md +1 -1
  42. package/docs/examples/account/update-m-f-a.md +1 -1
  43. package/docs/examples/account/update-magic-u-r-l-session.md +1 -1
  44. package/docs/examples/account/update-mfa-authenticator.md +1 -1
  45. package/docs/examples/account/update-mfa-challenge.md +1 -1
  46. package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
  47. package/docs/examples/account/update-name.md +1 -1
  48. package/docs/examples/account/update-password.md +1 -1
  49. package/docs/examples/account/update-phone-session.md +1 -1
  50. package/docs/examples/account/update-phone-verification.md +1 -1
  51. package/docs/examples/account/update-phone.md +1 -1
  52. package/docs/examples/account/update-prefs.md +1 -1
  53. package/docs/examples/account/update-push-target.md +1 -1
  54. package/docs/examples/account/update-recovery.md +1 -1
  55. package/docs/examples/account/update-session.md +1 -1
  56. package/docs/examples/account/update-status.md +1 -1
  57. package/docs/examples/account/update-verification.md +1 -1
  58. package/docs/examples/assistant/chat.md +1 -1
  59. package/docs/examples/avatars/get-browser.md +1 -1
  60. package/docs/examples/avatars/get-credit-card.md +1 -1
  61. package/docs/examples/avatars/get-favicon.md +1 -1
  62. package/docs/examples/avatars/get-flag.md +1 -1
  63. package/docs/examples/avatars/get-image.md +1 -1
  64. package/docs/examples/avatars/get-initials.md +1 -1
  65. package/docs/examples/avatars/get-q-r.md +1 -1
  66. package/docs/examples/console/variables.md +1 -1
  67. package/docs/examples/databases/create-boolean-attribute.md +1 -1
  68. package/docs/examples/databases/create-collection.md +1 -1
  69. package/docs/examples/databases/create-datetime-attribute.md +1 -1
  70. package/docs/examples/databases/create-document.md +1 -1
  71. package/docs/examples/databases/create-email-attribute.md +1 -1
  72. package/docs/examples/databases/create-enum-attribute.md +1 -1
  73. package/docs/examples/databases/create-float-attribute.md +1 -1
  74. package/docs/examples/databases/create-index.md +1 -1
  75. package/docs/examples/databases/create-integer-attribute.md +1 -1
  76. package/docs/examples/databases/create-ip-attribute.md +1 -1
  77. package/docs/examples/databases/create-relationship-attribute.md +1 -1
  78. package/docs/examples/databases/create-string-attribute.md +1 -1
  79. package/docs/examples/databases/create-url-attribute.md +1 -1
  80. package/docs/examples/databases/create.md +1 -1
  81. package/docs/examples/databases/delete-attribute.md +1 -1
  82. package/docs/examples/databases/delete-collection.md +1 -1
  83. package/docs/examples/databases/delete-document.md +1 -1
  84. package/docs/examples/databases/delete-index.md +1 -1
  85. package/docs/examples/databases/delete.md +1 -1
  86. package/docs/examples/databases/get-attribute.md +1 -1
  87. package/docs/examples/databases/get-collection-usage.md +1 -1
  88. package/docs/examples/databases/get-collection.md +1 -1
  89. package/docs/examples/databases/get-database-usage.md +1 -1
  90. package/docs/examples/databases/get-document.md +1 -1
  91. package/docs/examples/databases/get-index.md +1 -1
  92. package/docs/examples/databases/get-usage.md +1 -1
  93. package/docs/examples/databases/get.md +1 -1
  94. package/docs/examples/databases/list-attributes.md +1 -1
  95. package/docs/examples/databases/list-collection-logs.md +1 -1
  96. package/docs/examples/databases/list-collections.md +1 -1
  97. package/docs/examples/databases/list-document-logs.md +1 -1
  98. package/docs/examples/databases/list-documents.md +1 -1
  99. package/docs/examples/databases/list-indexes.md +1 -1
  100. package/docs/examples/databases/list-logs.md +1 -1
  101. package/docs/examples/databases/list.md +1 -1
  102. package/docs/examples/databases/update-boolean-attribute.md +1 -1
  103. package/docs/examples/databases/update-collection.md +1 -1
  104. package/docs/examples/databases/update-datetime-attribute.md +1 -1
  105. package/docs/examples/databases/update-document.md +1 -1
  106. package/docs/examples/databases/update-email-attribute.md +1 -1
  107. package/docs/examples/databases/update-enum-attribute.md +1 -1
  108. package/docs/examples/databases/update-float-attribute.md +1 -1
  109. package/docs/examples/databases/update-integer-attribute.md +1 -1
  110. package/docs/examples/databases/update-ip-attribute.md +1 -1
  111. package/docs/examples/databases/update-relationship-attribute.md +1 -1
  112. package/docs/examples/databases/update-string-attribute.md +1 -1
  113. package/docs/examples/databases/update-url-attribute.md +1 -1
  114. package/docs/examples/databases/update.md +1 -1
  115. package/docs/examples/functions/create-build.md +1 -1
  116. package/docs/examples/functions/create-deployment.md +1 -1
  117. package/docs/examples/functions/create-execution.md +1 -1
  118. package/docs/examples/functions/create-variable.md +1 -1
  119. package/docs/examples/functions/create.md +3 -2
  120. package/docs/examples/functions/delete-deployment.md +1 -1
  121. package/docs/examples/functions/delete-variable.md +1 -1
  122. package/docs/examples/functions/delete.md +1 -1
  123. package/docs/examples/functions/download-deployment.md +1 -1
  124. package/docs/examples/functions/get-deployment.md +1 -1
  125. package/docs/examples/functions/get-execution.md +1 -1
  126. package/docs/examples/functions/get-function-usage.md +1 -1
  127. package/docs/examples/functions/get-specifications.md +11 -0
  128. package/docs/examples/functions/get-usage.md +1 -1
  129. package/docs/examples/functions/get-variable.md +1 -1
  130. package/docs/examples/functions/get.md +1 -1
  131. package/docs/examples/functions/list-deployments.md +1 -1
  132. package/docs/examples/functions/list-executions.md +1 -1
  133. package/docs/examples/functions/list-runtimes.md +1 -1
  134. package/docs/examples/functions/list-variables.md +1 -1
  135. package/docs/examples/functions/list.md +1 -1
  136. package/docs/examples/functions/update-deployment.md +1 -1
  137. package/docs/examples/functions/update-variable.md +1 -1
  138. package/docs/examples/functions/update.md +3 -2
  139. package/docs/examples/graphql/mutation.md +1 -1
  140. package/docs/examples/graphql/query.md +1 -1
  141. package/docs/examples/health/get-antivirus.md +1 -1
  142. package/docs/examples/health/get-cache.md +1 -1
  143. package/docs/examples/health/get-certificate.md +1 -1
  144. package/docs/examples/health/get-d-b.md +1 -1
  145. package/docs/examples/health/get-failed-jobs.md +1 -1
  146. package/docs/examples/health/get-pub-sub.md +1 -1
  147. package/docs/examples/health/get-queue-builds.md +1 -1
  148. package/docs/examples/health/get-queue-certificates.md +1 -1
  149. package/docs/examples/health/get-queue-databases.md +1 -1
  150. package/docs/examples/health/get-queue-deletes.md +1 -1
  151. package/docs/examples/health/get-queue-functions.md +1 -1
  152. package/docs/examples/health/get-queue-logs.md +1 -1
  153. package/docs/examples/health/get-queue-mails.md +1 -1
  154. package/docs/examples/health/get-queue-messaging.md +1 -1
  155. package/docs/examples/health/get-queue-migrations.md +1 -1
  156. package/docs/examples/health/get-queue-usage-dump.md +1 -1
  157. package/docs/examples/health/get-queue-usage.md +1 -1
  158. package/docs/examples/health/get-queue-webhooks.md +1 -1
  159. package/docs/examples/health/get-queue.md +1 -1
  160. package/docs/examples/health/get-storage-local.md +1 -1
  161. package/docs/examples/health/get-storage.md +1 -1
  162. package/docs/examples/health/get-time.md +1 -1
  163. package/docs/examples/health/get.md +1 -1
  164. package/docs/examples/locale/get.md +1 -1
  165. package/docs/examples/locale/list-codes.md +1 -1
  166. package/docs/examples/locale/list-continents.md +1 -1
  167. package/docs/examples/locale/list-countries-e-u.md +1 -1
  168. package/docs/examples/locale/list-countries-phones.md +1 -1
  169. package/docs/examples/locale/list-countries.md +1 -1
  170. package/docs/examples/locale/list-currencies.md +1 -1
  171. package/docs/examples/locale/list-languages.md +1 -1
  172. package/docs/examples/messaging/create-apns-provider.md +1 -1
  173. package/docs/examples/messaging/create-email.md +1 -1
  174. package/docs/examples/messaging/create-fcm-provider.md +1 -1
  175. package/docs/examples/messaging/create-mailgun-provider.md +1 -1
  176. package/docs/examples/messaging/create-msg91provider.md +1 -1
  177. package/docs/examples/messaging/create-push.md +1 -1
  178. package/docs/examples/messaging/create-sendgrid-provider.md +1 -1
  179. package/docs/examples/messaging/create-sms.md +1 -1
  180. package/docs/examples/messaging/create-smtp-provider.md +1 -1
  181. package/docs/examples/messaging/create-subscriber.md +1 -1
  182. package/docs/examples/messaging/create-telesign-provider.md +1 -1
  183. package/docs/examples/messaging/create-textmagic-provider.md +1 -1
  184. package/docs/examples/messaging/create-topic.md +1 -1
  185. package/docs/examples/messaging/create-twilio-provider.md +1 -1
  186. package/docs/examples/messaging/create-vonage-provider.md +1 -1
  187. package/docs/examples/messaging/delete-provider.md +1 -1
  188. package/docs/examples/messaging/delete-subscriber.md +1 -1
  189. package/docs/examples/messaging/delete-topic.md +1 -1
  190. package/docs/examples/messaging/delete.md +1 -1
  191. package/docs/examples/messaging/get-message.md +1 -1
  192. package/docs/examples/messaging/get-provider.md +1 -1
  193. package/docs/examples/messaging/get-subscriber.md +1 -1
  194. package/docs/examples/messaging/get-topic.md +1 -1
  195. package/docs/examples/messaging/list-message-logs.md +1 -1
  196. package/docs/examples/messaging/list-messages.md +1 -1
  197. package/docs/examples/messaging/list-provider-logs.md +1 -1
  198. package/docs/examples/messaging/list-providers.md +1 -1
  199. package/docs/examples/messaging/list-subscriber-logs.md +1 -1
  200. package/docs/examples/messaging/list-subscribers.md +1 -1
  201. package/docs/examples/messaging/list-targets.md +1 -1
  202. package/docs/examples/messaging/list-topic-logs.md +1 -1
  203. package/docs/examples/messaging/list-topics.md +1 -1
  204. package/docs/examples/messaging/update-apns-provider.md +1 -1
  205. package/docs/examples/messaging/update-email.md +3 -2
  206. package/docs/examples/messaging/update-fcm-provider.md +1 -1
  207. package/docs/examples/messaging/update-mailgun-provider.md +1 -1
  208. package/docs/examples/messaging/update-msg91provider.md +1 -1
  209. package/docs/examples/messaging/update-push.md +1 -1
  210. package/docs/examples/messaging/update-sendgrid-provider.md +1 -1
  211. package/docs/examples/messaging/update-sms.md +1 -1
  212. package/docs/examples/messaging/update-smtp-provider.md +1 -1
  213. package/docs/examples/messaging/update-telesign-provider.md +1 -1
  214. package/docs/examples/messaging/update-textmagic-provider.md +1 -1
  215. package/docs/examples/messaging/update-topic.md +1 -1
  216. package/docs/examples/messaging/update-twilio-provider.md +1 -1
  217. package/docs/examples/messaging/update-vonage-provider.md +1 -1
  218. package/docs/examples/migrations/create-appwrite-migration.md +1 -1
  219. package/docs/examples/migrations/create-firebase-migration.md +1 -1
  220. package/docs/examples/migrations/create-firebase-o-auth-migration.md +1 -1
  221. package/docs/examples/migrations/create-n-host-migration.md +1 -1
  222. package/docs/examples/migrations/create-supabase-migration.md +1 -1
  223. package/docs/examples/migrations/delete-firebase-auth.md +1 -1
  224. package/docs/examples/migrations/delete.md +1 -1
  225. package/docs/examples/migrations/get-appwrite-report.md +1 -1
  226. package/docs/examples/migrations/get-firebase-report-o-auth.md +1 -1
  227. package/docs/examples/migrations/get-firebase-report.md +1 -1
  228. package/docs/examples/migrations/get-n-host-report.md +1 -1
  229. package/docs/examples/migrations/get-supabase-report.md +1 -1
  230. package/docs/examples/migrations/get.md +1 -1
  231. package/docs/examples/migrations/list-firebase-projects.md +1 -1
  232. package/docs/examples/migrations/list.md +1 -1
  233. package/docs/examples/migrations/retry.md +1 -1
  234. package/docs/examples/project/create-variable.md +1 -1
  235. package/docs/examples/project/delete-variable.md +1 -1
  236. package/docs/examples/project/get-usage.md +1 -1
  237. package/docs/examples/project/get-variable.md +1 -1
  238. package/docs/examples/project/list-variables.md +1 -1
  239. package/docs/examples/project/update-variable.md +1 -1
  240. package/docs/examples/projects/create-key.md +1 -1
  241. package/docs/examples/projects/create-platform.md +1 -1
  242. package/docs/examples/projects/create-smtp-test.md +1 -1
  243. package/docs/examples/projects/create-webhook.md +1 -1
  244. package/docs/examples/projects/create.md +1 -1
  245. package/docs/examples/projects/delete-email-template.md +1 -1
  246. package/docs/examples/projects/delete-key.md +1 -1
  247. package/docs/examples/projects/delete-platform.md +1 -1
  248. package/docs/examples/projects/delete-sms-template.md +1 -1
  249. package/docs/examples/projects/delete-webhook.md +1 -1
  250. package/docs/examples/projects/delete.md +1 -1
  251. package/docs/examples/projects/get-email-template.md +1 -1
  252. package/docs/examples/projects/get-key.md +1 -1
  253. package/docs/examples/projects/get-platform.md +1 -1
  254. package/docs/examples/projects/get-sms-template.md +1 -1
  255. package/docs/examples/projects/get-webhook.md +1 -1
  256. package/docs/examples/projects/get.md +1 -1
  257. package/docs/examples/projects/list-keys.md +1 -1
  258. package/docs/examples/projects/list-platforms.md +1 -1
  259. package/docs/examples/projects/list-webhooks.md +1 -1
  260. package/docs/examples/projects/list.md +1 -1
  261. package/docs/examples/projects/update-api-status-all.md +1 -1
  262. package/docs/examples/projects/update-api-status.md +1 -1
  263. package/docs/examples/projects/update-auth-duration.md +1 -1
  264. package/docs/examples/projects/update-auth-limit.md +1 -1
  265. package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
  266. package/docs/examples/projects/update-auth-password-history.md +1 -1
  267. package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
  268. package/docs/examples/projects/update-auth-status.md +1 -1
  269. package/docs/examples/projects/update-email-template.md +1 -1
  270. package/docs/examples/projects/update-key.md +1 -1
  271. package/docs/examples/projects/update-o-auth2.md +1 -1
  272. package/docs/examples/projects/update-personal-data-check.md +1 -1
  273. package/docs/examples/projects/update-platform.md +1 -1
  274. package/docs/examples/projects/update-service-status-all.md +1 -1
  275. package/docs/examples/projects/update-service-status.md +1 -1
  276. package/docs/examples/projects/update-sms-template.md +1 -1
  277. package/docs/examples/projects/update-smtp.md +1 -1
  278. package/docs/examples/projects/update-team.md +1 -1
  279. package/docs/examples/projects/update-webhook-signature.md +1 -1
  280. package/docs/examples/projects/update-webhook.md +1 -1
  281. package/docs/examples/projects/update.md +1 -1
  282. package/docs/examples/proxy/create-rule.md +1 -1
  283. package/docs/examples/proxy/delete-rule.md +1 -1
  284. package/docs/examples/proxy/get-rule.md +1 -1
  285. package/docs/examples/proxy/list-rules.md +1 -1
  286. package/docs/examples/proxy/update-rule-verification.md +1 -1
  287. package/docs/examples/storage/create-bucket.md +1 -1
  288. package/docs/examples/storage/create-file.md +1 -1
  289. package/docs/examples/storage/delete-bucket.md +1 -1
  290. package/docs/examples/storage/delete-file.md +1 -1
  291. package/docs/examples/storage/get-bucket-usage.md +1 -1
  292. package/docs/examples/storage/get-bucket.md +1 -1
  293. package/docs/examples/storage/get-file-download.md +1 -1
  294. package/docs/examples/storage/get-file-preview.md +1 -1
  295. package/docs/examples/storage/get-file-view.md +1 -1
  296. package/docs/examples/storage/get-file.md +1 -1
  297. package/docs/examples/storage/get-usage.md +1 -1
  298. package/docs/examples/storage/list-buckets.md +1 -1
  299. package/docs/examples/storage/list-files.md +1 -1
  300. package/docs/examples/storage/update-bucket.md +1 -1
  301. package/docs/examples/storage/update-file.md +1 -1
  302. package/docs/examples/teams/create-membership.md +1 -1
  303. package/docs/examples/teams/create.md +1 -1
  304. package/docs/examples/teams/delete-membership.md +1 -1
  305. package/docs/examples/teams/delete.md +1 -1
  306. package/docs/examples/teams/get-membership.md +1 -1
  307. package/docs/examples/teams/get-prefs.md +1 -1
  308. package/docs/examples/teams/get.md +1 -1
  309. package/docs/examples/teams/list-logs.md +1 -1
  310. package/docs/examples/teams/list-memberships.md +1 -1
  311. package/docs/examples/teams/list.md +1 -1
  312. package/docs/examples/teams/update-membership-status.md +1 -1
  313. package/docs/examples/teams/update-membership.md +1 -1
  314. package/docs/examples/teams/update-name.md +1 -1
  315. package/docs/examples/teams/update-prefs.md +1 -1
  316. package/docs/examples/users/create-argon2user.md +1 -1
  317. package/docs/examples/users/create-bcrypt-user.md +1 -1
  318. package/docs/examples/users/create-m-d5user.md +1 -1
  319. package/docs/examples/users/create-mfa-recovery-codes.md +1 -1
  320. package/docs/examples/users/create-p-h-pass-user.md +1 -1
  321. package/docs/examples/users/create-s-h-a-user.md +1 -1
  322. package/docs/examples/users/create-scrypt-modified-user.md +1 -1
  323. package/docs/examples/users/create-scrypt-user.md +1 -1
  324. package/docs/examples/users/create-session.md +1 -1
  325. package/docs/examples/users/create-target.md +1 -1
  326. package/docs/examples/users/create-token.md +1 -1
  327. package/docs/examples/users/create.md +1 -1
  328. package/docs/examples/users/delete-identity.md +1 -1
  329. package/docs/examples/users/delete-mfa-authenticator.md +1 -1
  330. package/docs/examples/users/delete-session.md +1 -1
  331. package/docs/examples/users/delete-sessions.md +1 -1
  332. package/docs/examples/users/delete-target.md +1 -1
  333. package/docs/examples/users/delete.md +1 -1
  334. package/docs/examples/users/get-mfa-recovery-codes.md +1 -1
  335. package/docs/examples/users/get-prefs.md +1 -1
  336. package/docs/examples/users/get-target.md +1 -1
  337. package/docs/examples/users/get-usage.md +1 -1
  338. package/docs/examples/users/get.md +1 -1
  339. package/docs/examples/users/list-identities.md +1 -1
  340. package/docs/examples/users/list-logs.md +1 -1
  341. package/docs/examples/users/list-memberships.md +1 -1
  342. package/docs/examples/users/list-mfa-factors.md +1 -1
  343. package/docs/examples/users/list-sessions.md +1 -1
  344. package/docs/examples/users/list-targets.md +1 -1
  345. package/docs/examples/users/list.md +1 -1
  346. package/docs/examples/users/update-email-verification.md +1 -1
  347. package/docs/examples/users/update-email.md +1 -1
  348. package/docs/examples/users/update-labels.md +1 -1
  349. package/docs/examples/users/update-mfa-recovery-codes.md +1 -1
  350. package/docs/examples/users/update-mfa.md +1 -1
  351. package/docs/examples/users/update-name.md +1 -1
  352. package/docs/examples/users/update-password.md +1 -1
  353. package/docs/examples/users/update-phone-verification.md +1 -1
  354. package/docs/examples/users/update-phone.md +1 -1
  355. package/docs/examples/users/update-prefs.md +1 -1
  356. package/docs/examples/users/update-status.md +1 -1
  357. package/docs/examples/users/update-target.md +1 -1
  358. package/docs/examples/vcs/create-repository-detection.md +1 -1
  359. package/docs/examples/vcs/create-repository.md +1 -1
  360. package/docs/examples/vcs/delete-installation.md +1 -1
  361. package/docs/examples/vcs/get-installation.md +1 -1
  362. package/docs/examples/vcs/get-repository.md +1 -1
  363. package/docs/examples/vcs/list-installations.md +1 -1
  364. package/docs/examples/vcs/list-repositories.md +1 -1
  365. package/docs/examples/vcs/list-repository-branches.md +1 -1
  366. package/docs/examples/vcs/update-external-deployments.md +1 -1
  367. package/package.json +1 -5
  368. package/rollup.config.js +1 -5
  369. package/src/client.ts +230 -5
  370. package/src/enums/credit-card.ts +1 -1
  371. package/src/enums/flag.ts +1 -0
  372. package/src/enums/name.ts +1 -2
  373. package/src/enums/runtime.ts +1 -0
  374. package/src/id.ts +21 -2
  375. package/src/index.ts +7 -0
  376. package/src/models.ts +108 -3
  377. package/src/permission.ts +41 -6
  378. package/src/query.ts +161 -1
  379. package/src/service.ts +3 -0
  380. package/src/services/account.ts +6 -6
  381. package/src/services/functions.ts +33 -4
  382. package/src/services/messaging.ts +6 -1
  383. package/src/services/users.ts +4 -4
  384. package/types/client.d.ts +82 -1
  385. package/types/enums/credit-card.d.ts +1 -1
  386. package/types/enums/flag.d.ts +1 -0
  387. package/types/enums/name.d.ts +2 -3
  388. package/types/enums/runtime.d.ts +1 -0
  389. package/types/id.d.ts +15 -0
  390. package/types/index.d.ts +7 -0
  391. package/types/models.d.ts +108 -3
  392. package/types/permission.d.ts +36 -0
  393. package/types/query.d.ts +160 -0
  394. package/types/service.d.ts +3 -0
  395. package/types/services/account.d.ts +6 -6
  396. package/types/services/functions.d.ts +16 -4
  397. package/types/services/messaging.d.ts +2 -1
  398. package/types/services/users.d.ts +4 -4
package/dist/cjs/sdk.js CHANGED
@@ -1,8 +1,5 @@
1
1
  'use strict';
2
2
 
3
- require('isomorphic-form-data');
4
- var crossFetch = require('cross-fetch');
5
-
6
3
  /******************************************************************************
7
4
  Copyright (c) Microsoft Corporation.
8
5
 
@@ -52,9 +49,22 @@ class Service {
52
49
  return output;
53
50
  }
54
51
  }
52
+ /**
53
+ * The size for chunked uploads in bytes.
54
+ */
55
55
  Service.CHUNK_SIZE = 5 * 1024 * 1024; // 5MB
56
56
 
57
+ /**
58
+ * Helper class to generate query strings.
59
+ */
57
60
  class Query {
61
+ /**
62
+ * Constructor for Query class.
63
+ *
64
+ * @param {string} method
65
+ * @param {AttributesTypes} attribute
66
+ * @param {QueryTypes} values
67
+ */
58
68
  constructor(method, attribute, values) {
59
69
  this.method = method;
60
70
  this.attribute = attribute;
@@ -67,6 +77,11 @@ class Query {
67
77
  }
68
78
  }
69
79
  }
80
+ /**
81
+ * Convert the query object to a JSON string.
82
+ *
83
+ * @returns {string}
84
+ */
70
85
  toString() {
71
86
  return JSON.stringify({
72
87
  method: this.method,
@@ -75,30 +90,186 @@ class Query {
75
90
  });
76
91
  }
77
92
  }
93
+ /**
94
+ * Filter resources where attribute is equal to value.
95
+ *
96
+ * @param {string} attribute
97
+ * @param {QueryTypes} value
98
+ * @returns {string}
99
+ */
78
100
  Query.equal = (attribute, value) => new Query("equal", attribute, value).toString();
101
+ /**
102
+ * Filter resources where attribute is not equal to value.
103
+ *
104
+ * @param {string} attribute
105
+ * @param {QueryTypes} value
106
+ * @returns {string}
107
+ */
79
108
  Query.notEqual = (attribute, value) => new Query("notEqual", attribute, value).toString();
109
+ /**
110
+ * Filter resources where attribute is less than value.
111
+ *
112
+ * @param {string} attribute
113
+ * @param {QueryTypes} value
114
+ * @returns {string}
115
+ */
80
116
  Query.lessThan = (attribute, value) => new Query("lessThan", attribute, value).toString();
117
+ /**
118
+ * Filter resources where attribute is less than or equal to value.
119
+ *
120
+ * @param {string} attribute
121
+ * @param {QueryTypes} value
122
+ * @returns {string}
123
+ */
81
124
  Query.lessThanEqual = (attribute, value) => new Query("lessThanEqual", attribute, value).toString();
125
+ /**
126
+ * Filter resources where attribute is greater than value.
127
+ *
128
+ * @param {string} attribute
129
+ * @param {QueryTypes} value
130
+ * @returns {string}
131
+ */
82
132
  Query.greaterThan = (attribute, value) => new Query("greaterThan", attribute, value).toString();
133
+ /**
134
+ * Filter resources where attribute is greater than or equal to value.
135
+ *
136
+ * @param {string} attribute
137
+ * @param {QueryTypes} value
138
+ * @returns {string}
139
+ */
83
140
  Query.greaterThanEqual = (attribute, value) => new Query("greaterThanEqual", attribute, value).toString();
141
+ /**
142
+ * Filter resources where attribute is null.
143
+ *
144
+ * @param {string} attribute
145
+ * @returns {string}
146
+ */
84
147
  Query.isNull = (attribute) => new Query("isNull", attribute).toString();
148
+ /**
149
+ * Filter resources where attribute is not null.
150
+ *
151
+ * @param {string} attribute
152
+ * @returns {string}
153
+ */
85
154
  Query.isNotNull = (attribute) => new Query("isNotNull", attribute).toString();
155
+ /**
156
+ * Filter resources where attribute is between start and end (inclusive).
157
+ *
158
+ * @param {string} attribute
159
+ * @param {string | number} start
160
+ * @param {string | number} end
161
+ * @returns {string}
162
+ */
86
163
  Query.between = (attribute, start, end) => new Query("between", attribute, [start, end]).toString();
164
+ /**
165
+ * Filter resources where attribute starts with value.
166
+ *
167
+ * @param {string} attribute
168
+ * @param {string} value
169
+ * @returns {string}
170
+ */
87
171
  Query.startsWith = (attribute, value) => new Query("startsWith", attribute, value).toString();
172
+ /**
173
+ * Filter resources where attribute ends with value.
174
+ *
175
+ * @param {string} attribute
176
+ * @param {string} value
177
+ * @returns {string}
178
+ */
88
179
  Query.endsWith = (attribute, value) => new Query("endsWith", attribute, value).toString();
180
+ /**
181
+ * Specify which attributes should be returned by the API call.
182
+ *
183
+ * @param {string[]} attributes
184
+ * @returns {string}
185
+ */
89
186
  Query.select = (attributes) => new Query("select", undefined, attributes).toString();
187
+ /**
188
+ * Filter resources by searching attribute for value.
189
+ * A fulltext index on attribute is required for this query to work.
190
+ *
191
+ * @param {string} attribute
192
+ * @param {string} value
193
+ * @returns {string}
194
+ */
90
195
  Query.search = (attribute, value) => new Query("search", attribute, value).toString();
196
+ /**
197
+ * Sort results by attribute descending.
198
+ *
199
+ * @param {string} attribute
200
+ * @returns {string}
201
+ */
91
202
  Query.orderDesc = (attribute) => new Query("orderDesc", attribute).toString();
203
+ /**
204
+ * Sort results by attribute ascending.
205
+ *
206
+ * @param {string} attribute
207
+ * @returns {string}
208
+ */
92
209
  Query.orderAsc = (attribute) => new Query("orderAsc", attribute).toString();
210
+ /**
211
+ * Return results after documentId.
212
+ *
213
+ * @param {string} documentId
214
+ * @returns {string}
215
+ */
93
216
  Query.cursorAfter = (documentId) => new Query("cursorAfter", undefined, documentId).toString();
217
+ /**
218
+ * Return results before documentId.
219
+ *
220
+ * @param {string} documentId
221
+ * @returns {string}
222
+ */
94
223
  Query.cursorBefore = (documentId) => new Query("cursorBefore", undefined, documentId).toString();
224
+ /**
225
+ * Return only limit results.
226
+ *
227
+ * @param {number} limit
228
+ * @returns {string}
229
+ */
95
230
  Query.limit = (limit) => new Query("limit", undefined, limit).toString();
231
+ /**
232
+ * Filter resources by skipping the first offset results.
233
+ *
234
+ * @param {number} offset
235
+ * @returns {string}
236
+ */
96
237
  Query.offset = (offset) => new Query("offset", undefined, offset).toString();
238
+ /**
239
+ * Filter resources where attribute contains the specified value.
240
+ *
241
+ * @param {string} attribute
242
+ * @param {string | string[]} value
243
+ * @returns {string}
244
+ */
97
245
  Query.contains = (attribute, value) => new Query("contains", attribute, value).toString();
246
+ /**
247
+ * Combine multiple queries using logical OR operator.
248
+ *
249
+ * @param {string[]} queries
250
+ * @returns {string}
251
+ */
98
252
  Query.or = (queries) => new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString();
253
+ /**
254
+ * Combine multiple queries using logical AND operator.
255
+ *
256
+ * @param {string[]} queries
257
+ * @returns {string}
258
+ */
99
259
  Query.and = (queries) => new Query("and", undefined, queries.map((query) => JSON.parse(query))).toString();
100
260
 
261
+ /**
262
+ * Exception thrown by the package
263
+ */
101
264
  class AppwriteException extends Error {
265
+ /**
266
+ * Initializes a Appwrite Exception.
267
+ *
268
+ * @param {string} message - The error message.
269
+ * @param {number} code - The error code. Default is 0.
270
+ * @param {string} type - The error type. Default is an empty string.
271
+ * @param {string} response - The response string. Default is an empty string.
272
+ */
102
273
  constructor(message, code = 0, type = '', response = '') {
103
274
  super(message);
104
275
  this.name = 'AppwriteException';
@@ -108,8 +279,14 @@ class AppwriteException extends Error {
108
279
  this.response = response;
109
280
  }
110
281
  }
282
+ /**
283
+ * Client that handles requests to Appwrite
284
+ */
111
285
  class Client {
112
286
  constructor() {
287
+ /**
288
+ * Holds configuration such as project.
289
+ */
113
290
  this.config = {
114
291
  endpoint: 'https://cloud.appwrite.io/v1',
115
292
  endpointRealtime: '',
@@ -119,11 +296,14 @@ class Client {
119
296
  locale: '',
120
297
  mode: '',
121
298
  };
299
+ /**
300
+ * Custom headers for API requests.
301
+ */
122
302
  this.headers = {
123
303
  'x-sdk-name': 'Console',
124
304
  'x-sdk-platform': 'console',
125
305
  'x-sdk-language': 'web',
126
- 'x-sdk-version': '0.6.1',
306
+ 'x-sdk-version': '0.6.4',
127
307
  'X-Appwrite-Response-Format': '1.5.0',
128
308
  };
129
309
  this.realtime = {
@@ -155,9 +335,12 @@ class Client {
155
335
  }
156
336
  },
157
337
  createSocket: () => {
158
- var _a, _b;
159
- if (this.realtime.channels.size < 1)
338
+ var _a, _b, _c;
339
+ if (this.realtime.channels.size < 1) {
340
+ this.realtime.reconnect = false;
341
+ (_a = this.realtime.socket) === null || _a === void 0 ? void 0 : _a.close();
160
342
  return;
343
+ }
161
344
  const channels = new URLSearchParams();
162
345
  channels.set('project', this.config.project);
163
346
  this.realtime.channels.forEach(channel => {
@@ -166,10 +349,10 @@ class Client {
166
349
  const url = this.config.endpointRealtime + '/realtime?' + channels.toString();
167
350
  if (url !== this.realtime.url || // Check if URL is present
168
351
  !this.realtime.socket || // Check if WebSocket has not been created
169
- ((_a = this.realtime.socket) === null || _a === void 0 ? void 0 : _a.readyState) > WebSocket.OPEN // Check if WebSocket is CLOSING (3) or CLOSED (4)
352
+ ((_b = this.realtime.socket) === null || _b === void 0 ? void 0 : _b.readyState) > WebSocket.OPEN // Check if WebSocket is CLOSING (3) or CLOSED (4)
170
353
  ) {
171
354
  if (this.realtime.socket &&
172
- ((_b = this.realtime.socket) === null || _b === void 0 ? void 0 : _b.readyState) < WebSocket.CLOSING // Close WebSocket if it is CONNECTING (0) or OPEN (1)
355
+ ((_c = this.realtime.socket) === null || _c === void 0 ? void 0 : _c.readyState) < WebSocket.CLOSING // Close WebSocket if it is CONNECTING (0) or OPEN (1)
173
356
  ) {
174
357
  this.realtime.reconnect = false;
175
358
  this.realtime.socket.close();
@@ -385,8 +568,21 @@ class Client {
385
568
  this.realtime.connect();
386
569
  };
387
570
  }
571
+ /**
572
+ * Call API endpoint with the specified method, URL, headers, and parameters.
573
+ *
574
+ * @param {string} method - HTTP method (e.g., 'GET', 'POST', 'PUT', 'DELETE').
575
+ * @param {URL} url - The URL of the API endpoint.
576
+ * @param {Headers} headers - Custom headers for the API request.
577
+ * @param {Payload} params - Request parameters.
578
+ * @returns {Promise<any>} - A promise that resolves with the response data.
579
+ *
580
+ * @typedef {Object} Payload - Request payload data.
581
+ * @property {string} key - The key.
582
+ * @property {string} value - The value.
583
+ */
388
584
  call(method, url, headers = {}, params = {}) {
389
- var _a, _b;
585
+ var _a;
390
586
  return __awaiter(this, void 0, void 0, function* () {
391
587
  method = method.toUpperCase();
392
588
  headers = Object.assign({}, this.headers, headers);
@@ -396,7 +592,10 @@ class Client {
396
592
  credentials: 'include'
397
593
  };
398
594
  if (typeof window !== 'undefined' && window.localStorage) {
399
- headers['X-Fallback-Cookies'] = (_a = window.localStorage.getItem('cookieFallback')) !== null && _a !== void 0 ? _a : '';
595
+ const cookieFallback = window.localStorage.getItem('cookieFallback');
596
+ if (cookieFallback) {
597
+ headers['X-Fallback-Cookies'] = cookieFallback;
598
+ }
400
599
  }
401
600
  if (method === 'GET') {
402
601
  for (const [key, value] of Object.entries(Service.flatten(params))) {
@@ -427,8 +626,12 @@ class Client {
427
626
  }
428
627
  try {
429
628
  let data = null;
430
- const response = yield crossFetch.fetch(url.toString(), options);
431
- if ((_b = response.headers.get('content-type')) === null || _b === void 0 ? void 0 : _b.includes('application/json')) {
629
+ const response = yield fetch(url.toString(), options);
630
+ const warnings = response.headers.get('x-appwrite-warning');
631
+ if (warnings) {
632
+ warnings.split(';').forEach((warning) => console.warn('Warning: ' + warning));
633
+ }
634
+ if ((_a = response.headers.get('content-type')) === null || _a === void 0 ? void 0 : _a.includes('application/json')) {
432
635
  data = yield response.json();
433
636
  }
434
637
  else {
@@ -699,11 +902,11 @@ class Account extends Service {
699
902
  });
700
903
  }
701
904
  /**
702
- * Add Authenticator
905
+ * Create Authenticator
703
906
  *
704
907
  * Add an authenticator app to be used as an MFA factor. Verify the
705
908
  * authenticator using the [verify
706
- * authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator)
909
+ * authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator)
707
910
  * method.
708
911
  *
709
912
  * @param {AuthenticatorType} type
@@ -727,7 +930,7 @@ class Account extends Service {
727
930
  * Verify Authenticator
728
931
  *
729
932
  * Verify an authenticator app after adding it using the [add
730
- * authenticator](/docs/references/cloud/client-web/account#addAuthenticator)
933
+ * authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator)
731
934
  * method.
732
935
  *
733
936
  * @param {AuthenticatorType} type
@@ -784,7 +987,7 @@ class Account extends Service {
784
987
  });
785
988
  }
786
989
  /**
787
- * Create 2FA Challenge
990
+ * Create MFA Challenge
788
991
  *
789
992
  * Begin the process of MFA verification after sign-in. Finish the flow with
790
993
  * [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge)
@@ -1877,7 +2080,7 @@ class Account extends Service {
1877
2080
  });
1878
2081
  }
1879
2082
  /**
1880
- * Create phone verification (confirmation)
2083
+ * Update phone verification (confirmation)
1881
2084
  *
1882
2085
  * Use this endpoint to complete the user phone verification process. Use the
1883
2086
  * **userId** and **secret** that were sent to your user's phone number to
@@ -4245,10 +4448,11 @@ class Functions extends Service {
4245
4448
  * @param {string} templateOwner
4246
4449
  * @param {string} templateRootDirectory
4247
4450
  * @param {string} templateBranch
4451
+ * @param {string} specification
4248
4452
  * @throws {AppwriteException}
4249
4453
  * @returns {Promise}
4250
4454
  */
4251
- create(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, templateRepository, templateOwner, templateRootDirectory, templateBranch) {
4455
+ create(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, templateRepository, templateOwner, templateRootDirectory, templateBranch, specification) {
4252
4456
  return __awaiter(this, void 0, void 0, function* () {
4253
4457
  if (typeof functionId === 'undefined') {
4254
4458
  throw new AppwriteException('Missing required parameter: "functionId"');
@@ -4321,6 +4525,9 @@ class Functions extends Service {
4321
4525
  if (typeof templateBranch !== 'undefined') {
4322
4526
  payload['templateBranch'] = templateBranch;
4323
4527
  }
4528
+ if (typeof specification !== 'undefined') {
4529
+ payload['specification'] = specification;
4530
+ }
4324
4531
  const uri = new URL(this.client.config.endpoint + apiPath);
4325
4532
  return yield this.client.call('post', uri, {
4326
4533
  'content-type': 'application/json',
@@ -4345,6 +4552,25 @@ class Functions extends Service {
4345
4552
  }, payload);
4346
4553
  });
4347
4554
  }
4555
+ /**
4556
+ * Get available function runtime specifications
4557
+ *
4558
+ * Get allowed function specifications for this instance.
4559
+ *
4560
+ *
4561
+ * @throws {AppwriteException}
4562
+ * @returns {Promise}
4563
+ */
4564
+ getSpecifications() {
4565
+ return __awaiter(this, void 0, void 0, function* () {
4566
+ const apiPath = '/functions/specifications';
4567
+ const payload = {};
4568
+ const uri = new URL(this.client.config.endpoint + apiPath);
4569
+ return yield this.client.call('get', uri, {
4570
+ 'content-type': 'application/json',
4571
+ }, payload);
4572
+ });
4573
+ }
4348
4574
  /**
4349
4575
  * Get functions usage
4350
4576
  *
@@ -4409,10 +4635,11 @@ class Functions extends Service {
4409
4635
  * @param {string} providerBranch
4410
4636
  * @param {boolean} providerSilentMode
4411
4637
  * @param {string} providerRootDirectory
4638
+ * @param {string} specification
4412
4639
  * @throws {AppwriteException}
4413
4640
  * @returns {Promise}
4414
4641
  */
4415
- update(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory) {
4642
+ update(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification) {
4416
4643
  return __awaiter(this, void 0, void 0, function* () {
4417
4644
  if (typeof functionId === 'undefined') {
4418
4645
  throw new AppwriteException('Missing required parameter: "functionId"');
@@ -4467,6 +4694,9 @@ class Functions extends Service {
4467
4694
  if (typeof providerRootDirectory !== 'undefined') {
4468
4695
  payload['providerRootDirectory'] = providerRootDirectory;
4469
4696
  }
4697
+ if (typeof specification !== 'undefined') {
4698
+ payload['specification'] = specification;
4699
+ }
4470
4700
  const uri = new URL(this.client.config.endpoint + apiPath);
4471
4701
  return yield this.client.call('put', uri, {
4472
4702
  'content-type': 'application/json',
@@ -4638,7 +4868,7 @@ class Functions extends Service {
4638
4868
  });
4639
4869
  }
4640
4870
  /**
4641
- * Update function deployment
4871
+ * Update deployment
4642
4872
  *
4643
4873
  * Update the function code deployment ID using the unique function ID. Use
4644
4874
  * this endpoint to switch the code deployment that should be executed by the
@@ -4723,7 +4953,7 @@ class Functions extends Service {
4723
4953
  });
4724
4954
  }
4725
4955
  /**
4726
- * Download Deployment
4956
+ * Download deployment
4727
4957
  *
4728
4958
  * Get a Deployment's contents by its unique ID. This endpoint supports range
4729
4959
  * requests for partial or streaming file download.
@@ -5875,10 +6105,11 @@ class Messaging extends Service {
5875
6105
  * @param {string[]} cc
5876
6106
  * @param {string[]} bcc
5877
6107
  * @param {string} scheduledAt
6108
+ * @param {string[]} attachments
5878
6109
  * @throws {AppwriteException}
5879
6110
  * @returns {Promise}
5880
6111
  */
5881
- updateEmail(messageId, topics, users, targets, subject, content, draft, html, cc, bcc, scheduledAt) {
6112
+ updateEmail(messageId, topics, users, targets, subject, content, draft, html, cc, bcc, scheduledAt, attachments) {
5882
6113
  return __awaiter(this, void 0, void 0, function* () {
5883
6114
  if (typeof messageId === 'undefined') {
5884
6115
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5915,6 +6146,9 @@ class Messaging extends Service {
5915
6146
  if (typeof scheduledAt !== 'undefined') {
5916
6147
  payload['scheduledAt'] = scheduledAt;
5917
6148
  }
6149
+ if (typeof attachments !== 'undefined') {
6150
+ payload['attachments'] = attachments;
6151
+ }
5918
6152
  const uri = new URL(this.client.config.endpoint + apiPath);
5919
6153
  return yield this.client.call('patch', uri, {
5920
6154
  'content-type': 'application/json',
@@ -12442,12 +12676,12 @@ class Users extends Service {
12442
12676
  /**
12443
12677
  * Create token
12444
12678
  *
12445
- * Returns a token with a secret key for creating a session. If the provided
12446
- * user ID has not be registered, a new user will be created. Use the returned
12447
- * user ID and secret and submit a request to the [PUT
12448
- * /account/sessions/custom](https://appwrite.io/docs/references/cloud/client-web/account#updateCustomSession)
12679
+ * Returns a token with a secret key for creating a session. Use the user ID
12680
+ * and secret and submit a request to the [PUT
12681
+ * /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
12449
12682
  * endpoint to complete the login process.
12450
12683
  *
12684
+ *
12451
12685
  * @param {string} userId
12452
12686
  * @param {number} length
12453
12687
  * @param {number} expire
@@ -12777,20 +13011,56 @@ class Vcs extends Service {
12777
13011
  }
12778
13012
  }
12779
13013
 
13014
+ /**
13015
+ * Helper class to generate permission strings for resources.
13016
+ */
12780
13017
  class Permission {
12781
13018
  }
13019
+ /**
13020
+ * Generate read permission string for the provided role.
13021
+ *
13022
+ * @param {string} role
13023
+ * @returns {string}
13024
+ */
12782
13025
  Permission.read = (role) => {
12783
13026
  return `read("${role}")`;
12784
13027
  };
13028
+ /**
13029
+ * Generate write permission string for the provided role.
13030
+ *
13031
+ * This is an alias of update, delete, and possibly create.
13032
+ * Don't use write in combination with update, delete, or create.
13033
+ *
13034
+ * @param {string} role
13035
+ * @returns {string}
13036
+ */
12785
13037
  Permission.write = (role) => {
12786
13038
  return `write("${role}")`;
12787
13039
  };
13040
+ /**
13041
+ * Generate create permission string for the provided role.
13042
+ *
13043
+ * @param {string} role
13044
+ * @returns {string}
13045
+ */
12788
13046
  Permission.create = (role) => {
12789
13047
  return `create("${role}")`;
12790
13048
  };
13049
+ /**
13050
+ * Generate update permission string for the provided role.
13051
+ *
13052
+ * @param {string} role
13053
+ * @returns {string}
13054
+ */
12791
13055
  Permission.update = (role) => {
12792
13056
  return `update("${role}")`;
12793
13057
  };
13058
+ /**
13059
+ * Generate delete permission string for the provided role.
13060
+ *
13061
+ * @param {string} role
13062
+ * @returns {string}
13063
+ */
12794
13064
  Permission.delete = (role) => {
12795
13065
  return `delete("${role}")`;
12796
13066
  };
@@ -12890,10 +13160,25 @@ class Role {
12890
13160
  }
12891
13161
 
12892
13162
  var _a, _ID_hexTimestamp;
13163
+ /**
13164
+ * Helper class to generate ID strings for resources.
13165
+ */
12893
13166
  class ID {
13167
+ /**
13168
+ * Uses the provided ID as the ID for the resource.
13169
+ *
13170
+ * @param {string} id
13171
+ * @returns {string}
13172
+ */
12894
13173
  static custom(id) {
12895
13174
  return id;
12896
13175
  }
13176
+ /**
13177
+ * Have Appwrite generate a unique ID for you.
13178
+ *
13179
+ * @param {number} padding. Default is 7.
13180
+ * @returns {string}
13181
+ */
12897
13182
  static unique(padding = 7) {
12898
13183
  // Generate a unique ID with padding to have a longer ID
12899
13184
  const baseId = __classPrivateFieldGet(ID, _a, "m", _ID_hexTimestamp).call(ID);
@@ -12993,7 +13278,7 @@ exports.CreditCard = void 0;
12993
13278
  CreditCard["AmericanExpress"] = "amex";
12994
13279
  CreditCard["Argencard"] = "argencard";
12995
13280
  CreditCard["Cabal"] = "cabal";
12996
- CreditCard["Consosud"] = "censosud";
13281
+ CreditCard["Cencosud"] = "cencosud";
12997
13282
  CreditCard["DinersClub"] = "diners";
12998
13283
  CreditCard["Discover"] = "discover";
12999
13284
  CreditCard["Elo"] = "elo";
@@ -13151,6 +13436,7 @@ exports.Flag = void 0;
13151
13436
  Flag["Palau"] = "pw";
13152
13437
  Flag["PapuaNewGuinea"] = "pg";
13153
13438
  Flag["Poland"] = "pl";
13439
+ Flag["FrenchPolynesia"] = "pf";
13154
13440
  Flag["NorthKorea"] = "kp";
13155
13441
  Flag["Portugal"] = "pt";
13156
13442
  Flag["Paraguay"] = "py";
@@ -13256,6 +13542,7 @@ exports.Runtime = void 0;
13256
13542
  Runtime["Python310"] = "python-3.10";
13257
13543
  Runtime["Python311"] = "python-3.11";
13258
13544
  Runtime["Python312"] = "python-3.12";
13545
+ Runtime["Pythonml311"] = "python-ml-3.11";
13259
13546
  Runtime["Deno140"] = "deno-1.40";
13260
13547
  Runtime["Dart215"] = "dart-2.15";
13261
13548
  Runtime["Dart216"] = "dart-2.16";
@@ -13309,12 +13596,11 @@ exports.Name = void 0;
13309
13596
  Name["V1functions"] = "v1-functions";
13310
13597
  Name["V1usage"] = "v1-usage";
13311
13598
  Name["V1usagedump"] = "v1-usage-dump";
13312
- Name["Webhooksv1"] = "webhooksv1";
13599
+ Name["V1webhooks"] = "v1-webhooks";
13313
13600
  Name["V1certificates"] = "v1-certificates";
13314
13601
  Name["V1builds"] = "v1-builds";
13315
13602
  Name["V1messaging"] = "v1-messaging";
13316
13603
  Name["V1migrations"] = "v1-migrations";
13317
- Name["Hamsterv1"] = "hamsterv1";
13318
13604
  })(exports.Name || (exports.Name = {}));
13319
13605
 
13320
13606
  exports.SmtpEncryption = void 0;