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,8 +0,0 @@
1
- export enum ExecutionMethod {
2
- GET = 'GET',
3
- POST = 'POST',
4
- PUT = 'PUT',
5
- PATCH = 'PATCH',
6
- DELETE = 'DELETE',
7
- OPTIONS = 'OPTIONS',
8
- }
package/src/enums/flag.ts DELETED
@@ -1,196 +0,0 @@
1
- export enum Flag {
2
- Afghanistan = 'af',
3
- Angola = 'ao',
4
- Albania = 'al',
5
- Andorra = 'ad',
6
- UnitedArabEmirates = 'ae',
7
- Argentina = 'ar',
8
- Armenia = 'am',
9
- AntiguaAndBarbuda = 'ag',
10
- Australia = 'au',
11
- Austria = 'at',
12
- Azerbaijan = 'az',
13
- Burundi = 'bi',
14
- Belgium = 'be',
15
- Benin = 'bj',
16
- BurkinaFaso = 'bf',
17
- Bangladesh = 'bd',
18
- Bulgaria = 'bg',
19
- Bahrain = 'bh',
20
- Bahamas = 'bs',
21
- BosniaAndHerzegovina = 'ba',
22
- Belarus = 'by',
23
- Belize = 'bz',
24
- Bolivia = 'bo',
25
- Brazil = 'br',
26
- Barbados = 'bb',
27
- BruneiDarussalam = 'bn',
28
- Bhutan = 'bt',
29
- Botswana = 'bw',
30
- CentralAfricanRepublic = 'cf',
31
- Canada = 'ca',
32
- Switzerland = 'ch',
33
- Chile = 'cl',
34
- China = 'cn',
35
- CoteDIvoire = 'ci',
36
- Cameroon = 'cm',
37
- DemocraticRepublicOfTheCongo = 'cd',
38
- RepublicOfTheCongo = 'cg',
39
- Colombia = 'co',
40
- Comoros = 'km',
41
- CapeVerde = 'cv',
42
- CostaRica = 'cr',
43
- Cuba = 'cu',
44
- Cyprus = 'cy',
45
- CzechRepublic = 'cz',
46
- Germany = 'de',
47
- Djibouti = 'dj',
48
- Dominica = 'dm',
49
- Denmark = 'dk',
50
- DominicanRepublic = 'do',
51
- Algeria = 'dz',
52
- Ecuador = 'ec',
53
- Egypt = 'eg',
54
- Eritrea = 'er',
55
- Spain = 'es',
56
- Estonia = 'ee',
57
- Ethiopia = 'et',
58
- Finland = 'fi',
59
- Fiji = 'fj',
60
- France = 'fr',
61
- MicronesiaFederatedStatesOf = 'fm',
62
- Gabon = 'ga',
63
- UnitedKingdom = 'gb',
64
- Georgia = 'ge',
65
- Ghana = 'gh',
66
- Guinea = 'gn',
67
- Gambia = 'gm',
68
- GuineaBissau = 'gw',
69
- EquatorialGuinea = 'gq',
70
- Greece = 'gr',
71
- Grenada = 'gd',
72
- Guatemala = 'gt',
73
- Guyana = 'gy',
74
- Honduras = 'hn',
75
- Croatia = 'hr',
76
- Haiti = 'ht',
77
- Hungary = 'hu',
78
- Indonesia = 'id',
79
- India = 'in',
80
- Ireland = 'ie',
81
- IranIslamicRepublicOf = 'ir',
82
- Iraq = 'iq',
83
- Iceland = 'is',
84
- Israel = 'il',
85
- Italy = 'it',
86
- Jamaica = 'jm',
87
- Jordan = 'jo',
88
- Japan = 'jp',
89
- Kazakhstan = 'kz',
90
- Kenya = 'ke',
91
- Kyrgyzstan = 'kg',
92
- Cambodia = 'kh',
93
- Kiribati = 'ki',
94
- SaintKittsAndNevis = 'kn',
95
- SouthKorea = 'kr',
96
- Kuwait = 'kw',
97
- LaoPeopleSDemocraticRepublic = 'la',
98
- Lebanon = 'lb',
99
- Liberia = 'lr',
100
- Libya = 'ly',
101
- SaintLucia = 'lc',
102
- Liechtenstein = 'li',
103
- SriLanka = 'lk',
104
- Lesotho = 'ls',
105
- Lithuania = 'lt',
106
- Luxembourg = 'lu',
107
- Latvia = 'lv',
108
- Morocco = 'ma',
109
- Monaco = 'mc',
110
- Moldova = 'md',
111
- Madagascar = 'mg',
112
- Maldives = 'mv',
113
- Mexico = 'mx',
114
- MarshallIslands = 'mh',
115
- NorthMacedonia = 'mk',
116
- Mali = 'ml',
117
- Malta = 'mt',
118
- Myanmar = 'mm',
119
- Montenegro = 'me',
120
- Mongolia = 'mn',
121
- Mozambique = 'mz',
122
- Mauritania = 'mr',
123
- Mauritius = 'mu',
124
- Malawi = 'mw',
125
- Malaysia = 'my',
126
- Namibia = 'na',
127
- Niger = 'ne',
128
- Nigeria = 'ng',
129
- Nicaragua = 'ni',
130
- Netherlands = 'nl',
131
- Norway = 'no',
132
- Nepal = 'np',
133
- Nauru = 'nr',
134
- NewZealand = 'nz',
135
- Oman = 'om',
136
- Pakistan = 'pk',
137
- Panama = 'pa',
138
- Peru = 'pe',
139
- Philippines = 'ph',
140
- Palau = 'pw',
141
- PapuaNewGuinea = 'pg',
142
- Poland = 'pl',
143
- NorthKorea = 'kp',
144
- Portugal = 'pt',
145
- Paraguay = 'py',
146
- Qatar = 'qa',
147
- Romania = 'ro',
148
- Russia = 'ru',
149
- Rwanda = 'rw',
150
- SaudiArabia = 'sa',
151
- Sudan = 'sd',
152
- Senegal = 'sn',
153
- Singapore = 'sg',
154
- SolomonIslands = 'sb',
155
- SierraLeone = 'sl',
156
- ElSalvador = 'sv',
157
- SanMarino = 'sm',
158
- Somalia = 'so',
159
- Serbia = 'rs',
160
- SouthSudan = 'ss',
161
- SaoTomeAndPrincipe = 'st',
162
- Suriname = 'sr',
163
- Slovakia = 'sk',
164
- Slovenia = 'si',
165
- Sweden = 'se',
166
- Eswatini = 'sz',
167
- Seychelles = 'sc',
168
- Syria = 'sy',
169
- Chad = 'td',
170
- Togo = 'tg',
171
- Thailand = 'th',
172
- Tajikistan = 'tj',
173
- Turkmenistan = 'tm',
174
- TimorLeste = 'tl',
175
- Tonga = 'to',
176
- TrinidadAndTobago = 'tt',
177
- Tunisia = 'tn',
178
- Turkey = 'tr',
179
- Tuvalu = 'tv',
180
- Tanzania = 'tz',
181
- Uganda = 'ug',
182
- Ukraine = 'ua',
183
- Uruguay = 'uy',
184
- UnitedStates = 'us',
185
- Uzbekistan = 'uz',
186
- VaticanCity = 'va',
187
- SaintVincentAndTheGrenadines = 'vc',
188
- Venezuela = 've',
189
- Vietnam = 'vn',
190
- Vanuatu = 'vu',
191
- Samoa = 'ws',
192
- Yemen = 'ye',
193
- SouthAfrica = 'za',
194
- Zambia = 'zm',
195
- Zimbabwe = 'zw',
196
- }
@@ -1,7 +0,0 @@
1
- export enum ImageFormat {
2
- Jpg = 'jpg',
3
- Jpeg = 'jpeg',
4
- Gif = 'gif',
5
- Png = 'png',
6
- Webp = 'webp',
7
- }
@@ -1,11 +0,0 @@
1
- export enum ImageGravity {
2
- Center = 'center',
3
- Topleft = 'top-left',
4
- Top = 'top',
5
- Topright = 'top-right',
6
- Left = 'left',
7
- Right = 'right',
8
- Bottomleft = 'bottom-left',
9
- Bottom = 'bottom',
10
- Bottomright = 'bottom-right',
11
- }
@@ -1,5 +0,0 @@
1
- export enum IndexType {
2
- Key = 'key',
3
- Fulltext = 'fulltext',
4
- Unique = 'unique',
5
- }
@@ -1,5 +0,0 @@
1
- export enum MessagingProviderType {
2
- Email = 'email',
3
- Sms = 'sms',
4
- Push = 'push',
5
- }
package/src/enums/name.ts DELETED
@@ -1,15 +0,0 @@
1
- export enum Name {
2
- V1database = 'v1-database',
3
- V1deletes = 'v1-deletes',
4
- V1audits = 'v1-audits',
5
- V1mails = 'v1-mails',
6
- V1functions = 'v1-functions',
7
- V1usage = 'v1-usage',
8
- V1usagedump = 'v1-usage-dump',
9
- Webhooksv1 = 'webhooksv1',
10
- V1certificates = 'v1-certificates',
11
- V1builds = 'v1-builds',
12
- V1messaging = 'v1-messaging',
13
- V1migrations = 'v1-migrations',
14
- Hamsterv1 = 'hamsterv1',
15
- }
@@ -1,41 +0,0 @@
1
- export enum OAuthProvider {
2
- Amazon = 'amazon',
3
- Apple = 'apple',
4
- Auth0 = 'auth0',
5
- Authentik = 'authentik',
6
- Autodesk = 'autodesk',
7
- Bitbucket = 'bitbucket',
8
- Bitly = 'bitly',
9
- Box = 'box',
10
- Dailymotion = 'dailymotion',
11
- Discord = 'discord',
12
- Disqus = 'disqus',
13
- Dropbox = 'dropbox',
14
- Etsy = 'etsy',
15
- Facebook = 'facebook',
16
- Github = 'github',
17
- Gitlab = 'gitlab',
18
- Google = 'google',
19
- Linkedin = 'linkedin',
20
- Microsoft = 'microsoft',
21
- Notion = 'notion',
22
- Oidc = 'oidc',
23
- Okta = 'okta',
24
- Paypal = 'paypal',
25
- PaypalSandbox = 'paypalSandbox',
26
- Podio = 'podio',
27
- Salesforce = 'salesforce',
28
- Slack = 'slack',
29
- Spotify = 'spotify',
30
- Stripe = 'stripe',
31
- Tradeshift = 'tradeshift',
32
- TradeshiftBox = 'tradeshiftBox',
33
- Twitch = 'twitch',
34
- Wordpress = 'wordpress',
35
- Yahoo = 'yahoo',
36
- Yammer = 'yammer',
37
- Yandex = 'yandex',
38
- Zoho = 'zoho',
39
- Zoom = 'zoom',
40
- Mock = 'mock',
41
- }
@@ -1,13 +0,0 @@
1
- export enum PasswordHash {
2
- Sha1 = 'sha1',
3
- Sha224 = 'sha224',
4
- Sha256 = 'sha256',
5
- Sha384 = 'sha384',
6
- Sha512224 = 'sha512/224',
7
- Sha512256 = 'sha512/256',
8
- Sha512 = 'sha512',
9
- Sha3224 = 'sha3-224',
10
- Sha3256 = 'sha3-256',
11
- Sha3384 = 'sha3-384',
12
- Sha3512 = 'sha3-512',
13
- }
@@ -1,5 +0,0 @@
1
- export enum RelationMutate {
2
- Cascade = 'cascade',
3
- Restrict = 'restrict',
4
- SetNull = 'setNull',
5
- }
@@ -1,6 +0,0 @@
1
- export enum RelationshipType {
2
- OneToOne = 'oneToOne',
3
- ManyToOne = 'manyToOne',
4
- ManyToMany = 'manyToMany',
5
- OneToMany = 'oneToMany',
6
- }
@@ -1,46 +0,0 @@
1
- export enum Runtime {
2
- Node145 = 'node-14.5',
3
- Node160 = 'node-16.0',
4
- Node180 = 'node-18.0',
5
- Node190 = 'node-19.0',
6
- Node200 = 'node-20.0',
7
- Node210 = 'node-21.0',
8
- Php80 = 'php-8.0',
9
- Php81 = 'php-8.1',
10
- Php82 = 'php-8.2',
11
- Php83 = 'php-8.3',
12
- Ruby30 = 'ruby-3.0',
13
- Ruby31 = 'ruby-3.1',
14
- Ruby32 = 'ruby-3.2',
15
- Ruby33 = 'ruby-3.3',
16
- Python38 = 'python-3.8',
17
- Python39 = 'python-3.9',
18
- Python310 = 'python-3.10',
19
- Python311 = 'python-3.11',
20
- Python312 = 'python-3.12',
21
- Deno140 = 'deno-1.40',
22
- Dart215 = 'dart-2.15',
23
- Dart216 = 'dart-2.16',
24
- Dart217 = 'dart-2.17',
25
- Dart218 = 'dart-2.18',
26
- Dart30 = 'dart-3.0',
27
- Dart31 = 'dart-3.1',
28
- Dart33 = 'dart-3.3',
29
- Dotnet31 = 'dotnet-3.1',
30
- Dotnet60 = 'dotnet-6.0',
31
- Dotnet70 = 'dotnet-7.0',
32
- Java80 = 'java-8.0',
33
- Java110 = 'java-11.0',
34
- Java170 = 'java-17.0',
35
- Java180 = 'java-18.0',
36
- Java210 = 'java-21.0',
37
- Swift55 = 'swift-5.5',
38
- Swift58 = 'swift-5.8',
39
- Swift59 = 'swift-5.9',
40
- Kotlin16 = 'kotlin-1.6',
41
- Kotlin18 = 'kotlin-1.8',
42
- Kotlin19 = 'kotlin-1.9',
43
- Cpp17 = 'cpp-17',
44
- Cpp20 = 'cpp-20',
45
- Bun10 = 'bun-1.0',
46
- }
@@ -1,5 +0,0 @@
1
- export enum SmtpEncryption {
2
- None = 'none',
3
- Ssl = 'ssl',
4
- Tls = 'tls',
5
- }
package/src/id.ts DELETED
@@ -1,28 +0,0 @@
1
- export class ID {
2
- // Generate an hex ID based on timestamp
3
- // Recreated from https://www.php.net/manual/en/function.uniqid.php
4
- static #hexTimestamp(): string {
5
- const now = new Date();
6
- const sec = Math.floor(now.getTime() / 1000);
7
- const msec = now.getMilliseconds();
8
-
9
- // Convert to hexadecimal
10
- const hexTimestamp = sec.toString(16) + msec.toString(16).padStart(5, '0');
11
- return hexTimestamp;
12
- }
13
-
14
- public static custom(id: string): string {
15
- return id
16
- }
17
-
18
- public static unique(padding: number = 7): string {
19
- // Generate a unique ID with padding to have a longer ID
20
- const baseId = ID.#hexTimestamp();
21
- let randomPadding = '';
22
- for (let i = 0; i < padding; i++) {
23
- const randomHexDigit = Math.floor(Math.random() * 16).toString(16);
24
- randomPadding += randomHexDigit;
25
- }
26
- return baseId + randomPadding;
27
- }
28
- }
package/src/index.ts DELETED
@@ -1,35 +0,0 @@
1
- export { Client, Query, AppwriteException } from './client';
2
- export { Account } from './services/account';
3
- export { Avatars } from './services/avatars';
4
- export { Databases } from './services/databases';
5
- export { Functions } from './services/functions';
6
- export { Graphql } from './services/graphql';
7
- export { Health } from './services/health';
8
- export { Locale } from './services/locale';
9
- export { Messaging } from './services/messaging';
10
- export { Storage } from './services/storage';
11
- export { Teams } from './services/teams';
12
- export { Users } from './services/users';
13
- export type { Models, Payload, UploadProgress } from './client';
14
- export type { QueryTypes, QueryTypesList } from './query';
15
- export { Permission } from './permission';
16
- export { Role } from './role';
17
- export { ID } from './id';
18
- export { AuthenticatorType } from './enums/authenticator-type';
19
- export { AuthenticationFactor } from './enums/authentication-factor';
20
- export { OAuthProvider } from './enums/o-auth-provider';
21
- export { Browser } from './enums/browser';
22
- export { CreditCard } from './enums/credit-card';
23
- export { Flag } from './enums/flag';
24
- export { RelationshipType } from './enums/relationship-type';
25
- export { RelationMutate } from './enums/relation-mutate';
26
- export { IndexType } from './enums/index-type';
27
- export { Runtime } from './enums/runtime';
28
- export { ExecutionMethod } from './enums/execution-method';
29
- export { Name } from './enums/name';
30
- export { SmtpEncryption } from './enums/smtp-encryption';
31
- export { Compression } from './enums/compression';
32
- export { ImageGravity } from './enums/image-gravity';
33
- export { ImageFormat } from './enums/image-format';
34
- export { PasswordHash } from './enums/password-hash';
35
- export { MessagingProviderType } from './enums/messaging-provider-type';
package/src/inputFile.ts DELETED
@@ -1,23 +0,0 @@
1
- import { File } from "node-fetch-native-with-agent";
2
- import { realpathSync, readFileSync } from "fs";
3
- import type { BinaryLike } from "crypto";
4
-
5
- export class InputFile {
6
- static fromBuffer(
7
- parts: Blob | BinaryLike,
8
- name: string
9
- ): File {
10
- return new File([parts], name);
11
- }
12
-
13
- static fromPath(path: string, name: string): File {
14
- const realPath = realpathSync(path);
15
- const contents = readFileSync(realPath);
16
- return this.fromBuffer(contents, name);
17
- }
18
-
19
- static fromPlainText(content: string, name: string): File {
20
- const arrayBytes = new TextEncoder().encode(content);
21
- return this.fromBuffer(arrayBytes, name);
22
- }
23
- }