node-appwrite 12.1.0-rc.4 → 13.0.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 (409) hide show
  1. package/README.md +1 -1
  2. package/dist/client.js +2 -2
  3. package/dist/client.js.map +1 -1
  4. package/dist/client.mjs +8 -7
  5. package/dist/client.mjs.map +1 -1
  6. package/dist/enums/authentication-factor.mjs +1 -0
  7. package/dist/enums/authentication-factor.mjs.map +1 -1
  8. package/dist/enums/authenticator-type.mjs +1 -0
  9. package/dist/enums/authenticator-type.mjs.map +1 -1
  10. package/dist/enums/browser.mjs +1 -0
  11. package/dist/enums/browser.mjs.map +1 -1
  12. package/dist/enums/compression.mjs +1 -0
  13. package/dist/enums/compression.mjs.map +1 -1
  14. package/dist/enums/credit-card.d.mts +1 -1
  15. package/dist/enums/credit-card.d.ts +1 -1
  16. package/dist/enums/credit-card.js +1 -1
  17. package/dist/enums/credit-card.js.map +1 -1
  18. package/dist/enums/credit-card.mjs +2 -1
  19. package/dist/enums/credit-card.mjs.map +1 -1
  20. package/dist/enums/execution-method.mjs +1 -0
  21. package/dist/enums/execution-method.mjs.map +1 -1
  22. package/dist/enums/flag.d.mts +1 -0
  23. package/dist/enums/flag.d.ts +1 -0
  24. package/dist/enums/flag.js +1 -0
  25. package/dist/enums/flag.js.map +1 -1
  26. package/dist/enums/flag.mjs +2 -0
  27. package/dist/enums/flag.mjs.map +1 -1
  28. package/dist/enums/image-format.mjs +1 -0
  29. package/dist/enums/image-format.mjs.map +1 -1
  30. package/dist/enums/image-gravity.mjs +1 -0
  31. package/dist/enums/image-gravity.mjs.map +1 -1
  32. package/dist/enums/index-type.mjs +1 -0
  33. package/dist/enums/index-type.mjs.map +1 -1
  34. package/dist/enums/messaging-provider-type.mjs +1 -0
  35. package/dist/enums/messaging-provider-type.mjs.map +1 -1
  36. package/dist/enums/name.d.mts +1 -2
  37. package/dist/enums/name.d.ts +1 -2
  38. package/dist/enums/name.js +0 -1
  39. package/dist/enums/name.js.map +1 -1
  40. package/dist/enums/name.mjs +1 -1
  41. package/dist/enums/name.mjs.map +1 -1
  42. package/dist/enums/o-auth-provider.mjs +1 -0
  43. package/dist/enums/o-auth-provider.mjs.map +1 -1
  44. package/dist/enums/password-hash.mjs +1 -0
  45. package/dist/enums/password-hash.mjs.map +1 -1
  46. package/dist/enums/relation-mutate.mjs +1 -0
  47. package/dist/enums/relation-mutate.mjs.map +1 -1
  48. package/dist/enums/relationship-type.mjs +1 -0
  49. package/dist/enums/relationship-type.mjs.map +1 -1
  50. package/dist/enums/runtime.d.mts +1 -0
  51. package/dist/enums/runtime.d.ts +1 -0
  52. package/dist/enums/runtime.js +1 -0
  53. package/dist/enums/runtime.js.map +1 -1
  54. package/dist/enums/runtime.mjs +2 -0
  55. package/dist/enums/runtime.mjs.map +1 -1
  56. package/dist/enums/smtp-encryption.mjs +1 -0
  57. package/dist/enums/smtp-encryption.mjs.map +1 -1
  58. package/dist/id.mjs +4 -3
  59. package/dist/id.mjs.map +1 -1
  60. package/dist/index.mjs +33 -33
  61. package/dist/index.mjs.map +1 -1
  62. package/dist/inputFile.mjs +3 -2
  63. package/dist/inputFile.mjs.map +1 -1
  64. package/dist/models.d.mts +11 -3
  65. package/dist/models.d.ts +11 -3
  66. package/dist/permission.mjs +3 -2
  67. package/dist/permission.mjs.map +1 -1
  68. package/dist/query.mjs +3 -2
  69. package/dist/query.mjs.map +1 -1
  70. package/dist/role.mjs +3 -2
  71. package/dist/role.mjs.map +1 -1
  72. package/dist/services/account.d.mts +4 -4
  73. package/dist/services/account.d.ts +4 -4
  74. package/dist/services/account.js +3 -3
  75. package/dist/services/account.js.map +1 -1
  76. package/dist/services/account.mjs +7 -6
  77. package/dist/services/account.mjs.map +1 -1
  78. package/dist/services/avatars.mjs +4 -3
  79. package/dist/services/avatars.mjs.map +1 -1
  80. package/dist/services/databases.mjs +4 -3
  81. package/dist/services/databases.mjs.map +1 -1
  82. package/dist/services/functions.mjs +4 -3
  83. package/dist/services/functions.mjs.map +1 -1
  84. package/dist/services/graphql.mjs +4 -3
  85. package/dist/services/graphql.mjs.map +1 -1
  86. package/dist/services/health.mjs +4 -3
  87. package/dist/services/health.mjs.map +1 -1
  88. package/dist/services/locale.mjs +3 -2
  89. package/dist/services/locale.mjs.map +1 -1
  90. package/dist/services/messaging.d.mts +6 -5
  91. package/dist/services/messaging.d.ts +6 -5
  92. package/dist/services/messaging.js +14 -10
  93. package/dist/services/messaging.js.map +1 -1
  94. package/dist/services/messaging.mjs +18 -13
  95. package/dist/services/messaging.mjs.map +1 -1
  96. package/dist/services/storage.mjs +4 -3
  97. package/dist/services/storage.mjs.map +1 -1
  98. package/dist/services/teams.mjs +4 -3
  99. package/dist/services/teams.mjs.map +1 -1
  100. package/dist/services/users.d.mts +2 -1
  101. package/dist/services/users.d.ts +2 -1
  102. package/dist/services/users.js +11 -10
  103. package/dist/services/users.js.map +1 -1
  104. package/dist/services/users.mjs +15 -13
  105. package/dist/services/users.mjs.map +1 -1
  106. package/package.json +5 -1
  107. package/.github/ISSUE_TEMPLATE/bug.yaml +0 -82
  108. package/.github/ISSUE_TEMPLATE/documentation.yaml +0 -32
  109. package/.github/ISSUE_TEMPLATE/feature.yaml +0 -40
  110. package/.travis.yml +0 -35
  111. package/CHANGELOG.md +0 -1
  112. package/docs/examples/account/create-anonymous-session.md +0 -9
  113. package/docs/examples/account/create-email-password-session.md +0 -12
  114. package/docs/examples/account/create-email-token.md +0 -13
  115. package/docs/examples/account/create-j-w-t.md +0 -9
  116. package/docs/examples/account/create-magic-u-r-l-token.md +0 -14
  117. package/docs/examples/account/create-mfa-authenticator.md +0 -12
  118. package/docs/examples/account/create-mfa-challenge.md +0 -11
  119. package/docs/examples/account/create-mfa-recovery-codes.md +0 -10
  120. package/docs/examples/account/create-o-auth2token.md +0 -14
  121. package/docs/examples/account/create-phone-token.md +0 -12
  122. package/docs/examples/account/create-phone-verification.md +0 -10
  123. package/docs/examples/account/create-recovery.md +0 -13
  124. package/docs/examples/account/create-session.md +0 -12
  125. package/docs/examples/account/create-verification.md +0 -12
  126. package/docs/examples/account/create.md +0 -14
  127. package/docs/examples/account/delete-identity.md +0 -12
  128. package/docs/examples/account/delete-mfa-authenticator.md +0 -13
  129. package/docs/examples/account/delete-session.md +0 -12
  130. package/docs/examples/account/delete-sessions.md +0 -10
  131. package/docs/examples/account/get-mfa-recovery-codes.md +0 -10
  132. package/docs/examples/account/get-prefs.md +0 -10
  133. package/docs/examples/account/get-session.md +0 -12
  134. package/docs/examples/account/get.md +0 -10
  135. package/docs/examples/account/list-identities.md +0 -12
  136. package/docs/examples/account/list-logs.md +0 -12
  137. package/docs/examples/account/list-mfa-factors.md +0 -10
  138. package/docs/examples/account/list-sessions.md +0 -10
  139. package/docs/examples/account/update-email.md +0 -13
  140. package/docs/examples/account/update-m-f-a.md +0 -12
  141. package/docs/examples/account/update-magic-u-r-l-session.md +0 -12
  142. package/docs/examples/account/update-mfa-authenticator.md +0 -13
  143. package/docs/examples/account/update-mfa-challenge.md +0 -13
  144. package/docs/examples/account/update-mfa-recovery-codes.md +0 -10
  145. package/docs/examples/account/update-name.md +0 -12
  146. package/docs/examples/account/update-password.md +0 -13
  147. package/docs/examples/account/update-phone-session.md +0 -12
  148. package/docs/examples/account/update-phone-verification.md +0 -13
  149. package/docs/examples/account/update-phone.md +0 -13
  150. package/docs/examples/account/update-prefs.md +0 -12
  151. package/docs/examples/account/update-recovery.md +0 -14
  152. package/docs/examples/account/update-session.md +0 -12
  153. package/docs/examples/account/update-status.md +0 -10
  154. package/docs/examples/account/update-verification.md +0 -13
  155. package/docs/examples/avatars/get-browser.md +0 -15
  156. package/docs/examples/avatars/get-credit-card.md +0 -15
  157. package/docs/examples/avatars/get-favicon.md +0 -12
  158. package/docs/examples/avatars/get-flag.md +0 -15
  159. package/docs/examples/avatars/get-image.md +0 -14
  160. package/docs/examples/avatars/get-initials.md +0 -15
  161. package/docs/examples/avatars/get-q-r.md +0 -15
  162. package/docs/examples/databases/create-boolean-attribute.md +0 -17
  163. package/docs/examples/databases/create-collection.md +0 -17
  164. package/docs/examples/databases/create-datetime-attribute.md +0 -17
  165. package/docs/examples/databases/create-document.md +0 -16
  166. package/docs/examples/databases/create-email-attribute.md +0 -17
  167. package/docs/examples/databases/create-enum-attribute.md +0 -18
  168. package/docs/examples/databases/create-float-attribute.md +0 -19
  169. package/docs/examples/databases/create-index.md +0 -17
  170. package/docs/examples/databases/create-integer-attribute.md +0 -19
  171. package/docs/examples/databases/create-ip-attribute.md +0 -17
  172. package/docs/examples/databases/create-relationship-attribute.md +0 -19
  173. package/docs/examples/databases/create-string-attribute.md +0 -19
  174. package/docs/examples/databases/create-url-attribute.md +0 -17
  175. package/docs/examples/databases/create.md +0 -14
  176. package/docs/examples/databases/delete-attribute.md +0 -14
  177. package/docs/examples/databases/delete-collection.md +0 -13
  178. package/docs/examples/databases/delete-document.md +0 -14
  179. package/docs/examples/databases/delete-index.md +0 -14
  180. package/docs/examples/databases/delete.md +0 -12
  181. package/docs/examples/databases/get-attribute.md +0 -14
  182. package/docs/examples/databases/get-collection.md +0 -13
  183. package/docs/examples/databases/get-document.md +0 -15
  184. package/docs/examples/databases/get-index.md +0 -14
  185. package/docs/examples/databases/get.md +0 -12
  186. package/docs/examples/databases/list-attributes.md +0 -14
  187. package/docs/examples/databases/list-collections.md +0 -14
  188. package/docs/examples/databases/list-documents.md +0 -14
  189. package/docs/examples/databases/list-indexes.md +0 -14
  190. package/docs/examples/databases/list.md +0 -13
  191. package/docs/examples/databases/update-boolean-attribute.md +0 -16
  192. package/docs/examples/databases/update-collection.md +0 -17
  193. package/docs/examples/databases/update-datetime-attribute.md +0 -16
  194. package/docs/examples/databases/update-document.md +0 -16
  195. package/docs/examples/databases/update-email-attribute.md +0 -16
  196. package/docs/examples/databases/update-enum-attribute.md +0 -17
  197. package/docs/examples/databases/update-float-attribute.md +0 -18
  198. package/docs/examples/databases/update-integer-attribute.md +0 -18
  199. package/docs/examples/databases/update-ip-attribute.md +0 -16
  200. package/docs/examples/databases/update-relationship-attribute.md +0 -15
  201. package/docs/examples/databases/update-string-attribute.md +0 -16
  202. package/docs/examples/databases/update-url-attribute.md +0 -16
  203. package/docs/examples/databases/update.md +0 -14
  204. package/docs/examples/functions/create-build.md +0 -14
  205. package/docs/examples/functions/create-deployment.md +0 -17
  206. package/docs/examples/functions/create-execution.md +0 -17
  207. package/docs/examples/functions/create-variable.md +0 -14
  208. package/docs/examples/functions/create.md +0 -31
  209. package/docs/examples/functions/delete-deployment.md +0 -13
  210. package/docs/examples/functions/delete-variable.md +0 -13
  211. package/docs/examples/functions/delete.md +0 -12
  212. package/docs/examples/functions/download-deployment.md +0 -13
  213. package/docs/examples/functions/get-deployment.md +0 -13
  214. package/docs/examples/functions/get-execution.md +0 -13
  215. package/docs/examples/functions/get-variable.md +0 -13
  216. package/docs/examples/functions/get.md +0 -12
  217. package/docs/examples/functions/list-deployments.md +0 -14
  218. package/docs/examples/functions/list-executions.md +0 -14
  219. package/docs/examples/functions/list-runtimes.md +0 -10
  220. package/docs/examples/functions/list-variables.md +0 -12
  221. package/docs/examples/functions/list.md +0 -13
  222. package/docs/examples/functions/update-deployment.md +0 -13
  223. package/docs/examples/functions/update-variable.md +0 -15
  224. package/docs/examples/functions/update.md +0 -27
  225. package/docs/examples/graphql/mutation.md +0 -12
  226. package/docs/examples/graphql/query.md +0 -12
  227. package/docs/examples/health/get-antivirus.md +0 -10
  228. package/docs/examples/health/get-cache.md +0 -10
  229. package/docs/examples/health/get-certificate.md +0 -12
  230. package/docs/examples/health/get-d-b.md +0 -10
  231. package/docs/examples/health/get-failed-jobs.md +0 -13
  232. package/docs/examples/health/get-pub-sub.md +0 -10
  233. package/docs/examples/health/get-queue-builds.md +0 -12
  234. package/docs/examples/health/get-queue-certificates.md +0 -12
  235. package/docs/examples/health/get-queue-databases.md +0 -13
  236. package/docs/examples/health/get-queue-deletes.md +0 -12
  237. package/docs/examples/health/get-queue-functions.md +0 -12
  238. package/docs/examples/health/get-queue-logs.md +0 -12
  239. package/docs/examples/health/get-queue-mails.md +0 -12
  240. package/docs/examples/health/get-queue-messaging.md +0 -12
  241. package/docs/examples/health/get-queue-migrations.md +0 -12
  242. package/docs/examples/health/get-queue-usage-dump.md +0 -12
  243. package/docs/examples/health/get-queue-usage.md +0 -12
  244. package/docs/examples/health/get-queue-webhooks.md +0 -12
  245. package/docs/examples/health/get-queue.md +0 -10
  246. package/docs/examples/health/get-storage-local.md +0 -10
  247. package/docs/examples/health/get-storage.md +0 -10
  248. package/docs/examples/health/get-time.md +0 -10
  249. package/docs/examples/health/get.md +0 -10
  250. package/docs/examples/locale/get.md +0 -10
  251. package/docs/examples/locale/list-codes.md +0 -10
  252. package/docs/examples/locale/list-continents.md +0 -10
  253. package/docs/examples/locale/list-countries-e-u.md +0 -10
  254. package/docs/examples/locale/list-countries-phones.md +0 -10
  255. package/docs/examples/locale/list-countries.md +0 -10
  256. package/docs/examples/locale/list-currencies.md +0 -10
  257. package/docs/examples/locale/list-languages.md +0 -10
  258. package/docs/examples/messaging/create-apns-provider.md +0 -19
  259. package/docs/examples/messaging/create-email.md +0 -23
  260. package/docs/examples/messaging/create-fcm-provider.md +0 -15
  261. package/docs/examples/messaging/create-mailgun-provider.md +0 -21
  262. package/docs/examples/messaging/create-msg91provider.md +0 -17
  263. package/docs/examples/messaging/create-push.md +0 -27
  264. package/docs/examples/messaging/create-sendgrid-provider.md +0 -19
  265. package/docs/examples/messaging/create-sms.md +0 -18
  266. package/docs/examples/messaging/create-smtp-provider.md +0 -25
  267. package/docs/examples/messaging/create-subscriber.md +0 -14
  268. package/docs/examples/messaging/create-telesign-provider.md +0 -17
  269. package/docs/examples/messaging/create-textmagic-provider.md +0 -17
  270. package/docs/examples/messaging/create-topic.md +0 -14
  271. package/docs/examples/messaging/create-twilio-provider.md +0 -17
  272. package/docs/examples/messaging/create-vonage-provider.md +0 -17
  273. package/docs/examples/messaging/delete-provider.md +0 -12
  274. package/docs/examples/messaging/delete-subscriber.md +0 -13
  275. package/docs/examples/messaging/delete-topic.md +0 -12
  276. package/docs/examples/messaging/delete.md +0 -12
  277. package/docs/examples/messaging/get-message.md +0 -12
  278. package/docs/examples/messaging/get-provider.md +0 -12
  279. package/docs/examples/messaging/get-subscriber.md +0 -13
  280. package/docs/examples/messaging/get-topic.md +0 -12
  281. package/docs/examples/messaging/list-message-logs.md +0 -13
  282. package/docs/examples/messaging/list-messages.md +0 -13
  283. package/docs/examples/messaging/list-provider-logs.md +0 -13
  284. package/docs/examples/messaging/list-providers.md +0 -13
  285. package/docs/examples/messaging/list-subscriber-logs.md +0 -13
  286. package/docs/examples/messaging/list-subscribers.md +0 -14
  287. package/docs/examples/messaging/list-targets.md +0 -13
  288. package/docs/examples/messaging/list-topic-logs.md +0 -13
  289. package/docs/examples/messaging/list-topics.md +0 -13
  290. package/docs/examples/messaging/update-apns-provider.md +0 -19
  291. package/docs/examples/messaging/update-email.md +0 -22
  292. package/docs/examples/messaging/update-fcm-provider.md +0 -15
  293. package/docs/examples/messaging/update-mailgun-provider.md +0 -21
  294. package/docs/examples/messaging/update-msg91provider.md +0 -17
  295. package/docs/examples/messaging/update-push.md +0 -27
  296. package/docs/examples/messaging/update-sendgrid-provider.md +0 -19
  297. package/docs/examples/messaging/update-sms.md +0 -18
  298. package/docs/examples/messaging/update-smtp-provider.md +0 -25
  299. package/docs/examples/messaging/update-telesign-provider.md +0 -17
  300. package/docs/examples/messaging/update-textmagic-provider.md +0 -17
  301. package/docs/examples/messaging/update-topic.md +0 -14
  302. package/docs/examples/messaging/update-twilio-provider.md +0 -17
  303. package/docs/examples/messaging/update-vonage-provider.md +0 -17
  304. package/docs/examples/storage/create-bucket.md +0 -21
  305. package/docs/examples/storage/create-file.md +0 -16
  306. package/docs/examples/storage/delete-bucket.md +0 -12
  307. package/docs/examples/storage/delete-file.md +0 -13
  308. package/docs/examples/storage/get-bucket.md +0 -12
  309. package/docs/examples/storage/get-file-download.md +0 -13
  310. package/docs/examples/storage/get-file-preview.md +0 -24
  311. package/docs/examples/storage/get-file-view.md +0 -13
  312. package/docs/examples/storage/get-file.md +0 -13
  313. package/docs/examples/storage/list-buckets.md +0 -13
  314. package/docs/examples/storage/list-files.md +0 -14
  315. package/docs/examples/storage/update-bucket.md +0 -21
  316. package/docs/examples/storage/update-file.md +0 -15
  317. package/docs/examples/teams/create-membership.md +0 -18
  318. package/docs/examples/teams/create.md +0 -14
  319. package/docs/examples/teams/delete-membership.md +0 -13
  320. package/docs/examples/teams/delete.md +0 -12
  321. package/docs/examples/teams/get-membership.md +0 -13
  322. package/docs/examples/teams/get-prefs.md +0 -12
  323. package/docs/examples/teams/get.md +0 -12
  324. package/docs/examples/teams/list-memberships.md +0 -14
  325. package/docs/examples/teams/list.md +0 -13
  326. package/docs/examples/teams/update-membership-status.md +0 -15
  327. package/docs/examples/teams/update-membership.md +0 -14
  328. package/docs/examples/teams/update-name.md +0 -13
  329. package/docs/examples/teams/update-prefs.md +0 -13
  330. package/docs/examples/users/create-argon2user.md +0 -15
  331. package/docs/examples/users/create-bcrypt-user.md +0 -15
  332. package/docs/examples/users/create-m-d5user.md +0 -15
  333. package/docs/examples/users/create-mfa-recovery-codes.md +0 -12
  334. package/docs/examples/users/create-p-h-pass-user.md +0 -15
  335. package/docs/examples/users/create-s-h-a-user.md +0 -16
  336. package/docs/examples/users/create-scrypt-modified-user.md +0 -18
  337. package/docs/examples/users/create-scrypt-user.md +0 -20
  338. package/docs/examples/users/create-session.md +0 -12
  339. package/docs/examples/users/create-target.md +0 -17
  340. package/docs/examples/users/create-token.md +0 -14
  341. package/docs/examples/users/create.md +0 -16
  342. package/docs/examples/users/delete-identity.md +0 -12
  343. package/docs/examples/users/delete-mfa-authenticator.md +0 -13
  344. package/docs/examples/users/delete-session.md +0 -13
  345. package/docs/examples/users/delete-sessions.md +0 -12
  346. package/docs/examples/users/delete-target.md +0 -13
  347. package/docs/examples/users/delete.md +0 -12
  348. package/docs/examples/users/get-mfa-recovery-codes.md +0 -12
  349. package/docs/examples/users/get-prefs.md +0 -12
  350. package/docs/examples/users/get-target.md +0 -13
  351. package/docs/examples/users/get.md +0 -12
  352. package/docs/examples/users/list-identities.md +0 -13
  353. package/docs/examples/users/list-logs.md +0 -13
  354. package/docs/examples/users/list-memberships.md +0 -12
  355. package/docs/examples/users/list-mfa-factors.md +0 -12
  356. package/docs/examples/users/list-sessions.md +0 -12
  357. package/docs/examples/users/list-targets.md +0 -13
  358. package/docs/examples/users/list.md +0 -13
  359. package/docs/examples/users/update-email-verification.md +0 -13
  360. package/docs/examples/users/update-email.md +0 -13
  361. package/docs/examples/users/update-labels.md +0 -13
  362. package/docs/examples/users/update-mfa-recovery-codes.md +0 -12
  363. package/docs/examples/users/update-mfa.md +0 -13
  364. package/docs/examples/users/update-name.md +0 -13
  365. package/docs/examples/users/update-password.md +0 -13
  366. package/docs/examples/users/update-phone-verification.md +0 -13
  367. package/docs/examples/users/update-phone.md +0 -13
  368. package/docs/examples/users/update-prefs.md +0 -13
  369. package/docs/examples/users/update-status.md +0 -13
  370. package/docs/examples/users/update-target.md +0 -16
  371. package/src/client.ts +0 -366
  372. package/src/enums/authentication-factor.ts +0 -6
  373. package/src/enums/authenticator-type.ts +0 -3
  374. package/src/enums/browser.ts +0 -16
  375. package/src/enums/compression.ts +0 -5
  376. package/src/enums/credit-card.ts +0 -18
  377. package/src/enums/execution-method.ts +0 -8
  378. package/src/enums/flag.ts +0 -196
  379. package/src/enums/image-format.ts +0 -7
  380. package/src/enums/image-gravity.ts +0 -11
  381. package/src/enums/index-type.ts +0 -5
  382. package/src/enums/messaging-provider-type.ts +0 -5
  383. package/src/enums/name.ts +0 -15
  384. package/src/enums/o-auth-provider.ts +0 -41
  385. package/src/enums/password-hash.ts +0 -13
  386. package/src/enums/relation-mutate.ts +0 -5
  387. package/src/enums/relationship-type.ts +0 -6
  388. package/src/enums/runtime.ts +0 -46
  389. package/src/enums/smtp-encryption.ts +0 -5
  390. package/src/id.ts +0 -28
  391. package/src/index.ts +0 -35
  392. package/src/inputFile.ts +0 -23
  393. package/src/models.ts +0 -2404
  394. package/src/permission.ts +0 -22
  395. package/src/query.ts +0 -101
  396. package/src/role.ts +0 -100
  397. package/src/services/account.ts +0 -1418
  398. package/src/services/avatars.ts +0 -312
  399. package/src/services/databases.ts +0 -1993
  400. package/src/services/functions.ts +0 -878
  401. package/src/services/graphql.ts +0 -75
  402. package/src/services/health.ts +0 -629
  403. package/src/services/locale.ts +0 -205
  404. package/src/services/messaging.ts +0 -2243
  405. package/src/services/storage.ts +0 -576
  406. package/src/services/teams.ts +0 -490
  407. package/src/services/users.ts +0 -1547
  408. package/tsconfig.json +0 -18
  409. package/tsup.config.js +0 -19
@@ -1,312 +0,0 @@
1
- import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
2
- import type { Models } from '../models';
3
- import { Browser } from '../enums/browser';
4
- import { CreditCard } from '../enums/credit-card';
5
- import { Flag } from '../enums/flag';
6
-
7
- export class Avatars {
8
- client: Client;
9
-
10
- constructor(client: Client) {
11
- this.client = client;
12
- }
13
-
14
- /**
15
- * Get browser icon
16
- *
17
- * You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.
18
-
19
- When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
20
- *
21
- * @param {Browser} code
22
- * @param {number} width
23
- * @param {number} height
24
- * @param {number} quality
25
- * @throws {AppwriteException}
26
- * @returns {Promise<ArrayBuffer>}
27
- */
28
- async getBrowser(code: Browser, width?: number, height?: number, quality?: number): Promise<ArrayBuffer> {
29
- if (typeof code === 'undefined') {
30
- throw new AppwriteException('Missing required parameter: "code"');
31
- }
32
- const apiPath = '/avatars/browsers/{code}'.replace('{code}', code);
33
- const payload: Payload = {};
34
- if (typeof width !== 'undefined') {
35
- payload['width'] = width;
36
- }
37
- if (typeof height !== 'undefined') {
38
- payload['height'] = height;
39
- }
40
- if (typeof quality !== 'undefined') {
41
- payload['quality'] = quality;
42
- }
43
- const uri = new URL(this.client.config.endpoint + apiPath);
44
-
45
- const apiHeaders: { [header: string]: string } = {
46
- 'content-type': 'application/json',
47
- }
48
-
49
- return await this.client.call(
50
- 'get',
51
- uri,
52
- apiHeaders,
53
- payload,
54
- 'arrayBuffer'
55
- );
56
- }
57
- /**
58
- * Get credit card icon
59
- *
60
- * The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.
61
-
62
- When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
63
-
64
- *
65
- * @param {CreditCard} code
66
- * @param {number} width
67
- * @param {number} height
68
- * @param {number} quality
69
- * @throws {AppwriteException}
70
- * @returns {Promise<ArrayBuffer>}
71
- */
72
- async getCreditCard(code: CreditCard, width?: number, height?: number, quality?: number): Promise<ArrayBuffer> {
73
- if (typeof code === 'undefined') {
74
- throw new AppwriteException('Missing required parameter: "code"');
75
- }
76
- const apiPath = '/avatars/credit-cards/{code}'.replace('{code}', code);
77
- const payload: Payload = {};
78
- if (typeof width !== 'undefined') {
79
- payload['width'] = width;
80
- }
81
- if (typeof height !== 'undefined') {
82
- payload['height'] = height;
83
- }
84
- if (typeof quality !== 'undefined') {
85
- payload['quality'] = quality;
86
- }
87
- const uri = new URL(this.client.config.endpoint + apiPath);
88
-
89
- const apiHeaders: { [header: string]: string } = {
90
- 'content-type': 'application/json',
91
- }
92
-
93
- return await this.client.call(
94
- 'get',
95
- uri,
96
- apiHeaders,
97
- payload,
98
- 'arrayBuffer'
99
- );
100
- }
101
- /**
102
- * Get favicon
103
- *
104
- * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.
105
-
106
- *
107
- * @param {string} url
108
- * @throws {AppwriteException}
109
- * @returns {Promise<ArrayBuffer>}
110
- */
111
- async getFavicon(url: string): Promise<ArrayBuffer> {
112
- if (typeof url === 'undefined') {
113
- throw new AppwriteException('Missing required parameter: "url"');
114
- }
115
- const apiPath = '/avatars/favicon';
116
- const payload: Payload = {};
117
- if (typeof url !== 'undefined') {
118
- payload['url'] = url;
119
- }
120
- const uri = new URL(this.client.config.endpoint + apiPath);
121
-
122
- const apiHeaders: { [header: string]: string } = {
123
- 'content-type': 'application/json',
124
- }
125
-
126
- return await this.client.call(
127
- 'get',
128
- uri,
129
- apiHeaders,
130
- payload,
131
- 'arrayBuffer'
132
- );
133
- }
134
- /**
135
- * Get country flag
136
- *
137
- * You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.
138
-
139
- When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
140
-
141
- *
142
- * @param {Flag} code
143
- * @param {number} width
144
- * @param {number} height
145
- * @param {number} quality
146
- * @throws {AppwriteException}
147
- * @returns {Promise<ArrayBuffer>}
148
- */
149
- async getFlag(code: Flag, width?: number, height?: number, quality?: number): Promise<ArrayBuffer> {
150
- if (typeof code === 'undefined') {
151
- throw new AppwriteException('Missing required parameter: "code"');
152
- }
153
- const apiPath = '/avatars/flags/{code}'.replace('{code}', code);
154
- const payload: Payload = {};
155
- if (typeof width !== 'undefined') {
156
- payload['width'] = width;
157
- }
158
- if (typeof height !== 'undefined') {
159
- payload['height'] = height;
160
- }
161
- if (typeof quality !== 'undefined') {
162
- payload['quality'] = quality;
163
- }
164
- const uri = new URL(this.client.config.endpoint + apiPath);
165
-
166
- const apiHeaders: { [header: string]: string } = {
167
- 'content-type': 'application/json',
168
- }
169
-
170
- return await this.client.call(
171
- 'get',
172
- uri,
173
- apiHeaders,
174
- payload,
175
- 'arrayBuffer'
176
- );
177
- }
178
- /**
179
- * Get image from URL
180
- *
181
- * Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.
182
-
183
- When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.
184
-
185
- *
186
- * @param {string} url
187
- * @param {number} width
188
- * @param {number} height
189
- * @throws {AppwriteException}
190
- * @returns {Promise<ArrayBuffer>}
191
- */
192
- async getImage(url: string, width?: number, height?: number): Promise<ArrayBuffer> {
193
- if (typeof url === 'undefined') {
194
- throw new AppwriteException('Missing required parameter: "url"');
195
- }
196
- const apiPath = '/avatars/image';
197
- const payload: Payload = {};
198
- if (typeof url !== 'undefined') {
199
- payload['url'] = url;
200
- }
201
- if (typeof width !== 'undefined') {
202
- payload['width'] = width;
203
- }
204
- if (typeof height !== 'undefined') {
205
- payload['height'] = height;
206
- }
207
- const uri = new URL(this.client.config.endpoint + apiPath);
208
-
209
- const apiHeaders: { [header: string]: string } = {
210
- 'content-type': 'application/json',
211
- }
212
-
213
- return await this.client.call(
214
- 'get',
215
- uri,
216
- apiHeaders,
217
- payload,
218
- 'arrayBuffer'
219
- );
220
- }
221
- /**
222
- * Get user initials
223
- *
224
- * Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the &#039;name&#039; parameter. If no name is given and no user is logged, an empty avatar will be returned.
225
-
226
- You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user&#039;s initials when reloading the same theme will always return for the same initials.
227
-
228
- When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
229
-
230
- *
231
- * @param {string} name
232
- * @param {number} width
233
- * @param {number} height
234
- * @param {string} background
235
- * @throws {AppwriteException}
236
- * @returns {Promise<ArrayBuffer>}
237
- */
238
- async getInitials(name?: string, width?: number, height?: number, background?: string): Promise<ArrayBuffer> {
239
- const apiPath = '/avatars/initials';
240
- const payload: Payload = {};
241
- if (typeof name !== 'undefined') {
242
- payload['name'] = name;
243
- }
244
- if (typeof width !== 'undefined') {
245
- payload['width'] = width;
246
- }
247
- if (typeof height !== 'undefined') {
248
- payload['height'] = height;
249
- }
250
- if (typeof background !== 'undefined') {
251
- payload['background'] = background;
252
- }
253
- const uri = new URL(this.client.config.endpoint + apiPath);
254
-
255
- const apiHeaders: { [header: string]: string } = {
256
- 'content-type': 'application/json',
257
- }
258
-
259
- return await this.client.call(
260
- 'get',
261
- uri,
262
- apiHeaders,
263
- payload,
264
- 'arrayBuffer'
265
- );
266
- }
267
- /**
268
- * Get QR code
269
- *
270
- * Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.
271
-
272
- *
273
- * @param {string} text
274
- * @param {number} size
275
- * @param {number} margin
276
- * @param {boolean} download
277
- * @throws {AppwriteException}
278
- * @returns {Promise<ArrayBuffer>}
279
- */
280
- async getQR(text: string, size?: number, margin?: number, download?: boolean): Promise<ArrayBuffer> {
281
- if (typeof text === 'undefined') {
282
- throw new AppwriteException('Missing required parameter: "text"');
283
- }
284
- const apiPath = '/avatars/qr';
285
- const payload: Payload = {};
286
- if (typeof text !== 'undefined') {
287
- payload['text'] = text;
288
- }
289
- if (typeof size !== 'undefined') {
290
- payload['size'] = size;
291
- }
292
- if (typeof margin !== 'undefined') {
293
- payload['margin'] = margin;
294
- }
295
- if (typeof download !== 'undefined') {
296
- payload['download'] = download;
297
- }
298
- const uri = new URL(this.client.config.endpoint + apiPath);
299
-
300
- const apiHeaders: { [header: string]: string } = {
301
- 'content-type': 'application/json',
302
- }
303
-
304
- return await this.client.call(
305
- 'get',
306
- uri,
307
- apiHeaders,
308
- payload,
309
- 'arrayBuffer'
310
- );
311
- }
312
- }