node-appwrite 11.1.1 → 12.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 (297) hide show
  1. package/.travis.yml +2 -2
  2. package/LICENSE +1 -1
  3. package/README.md +6 -6
  4. package/docs/examples/account/create-anonymous-session.md +9 -0
  5. package/docs/examples/account/create-email-password-session.md +12 -0
  6. package/docs/examples/account/create-email-token.md +13 -0
  7. package/docs/examples/account/create-j-w-t.md +9 -0
  8. package/docs/examples/account/create-magic-u-r-l-token.md +14 -0
  9. package/docs/examples/account/create-mfa-authenticator.md +12 -0
  10. package/docs/examples/account/create-mfa-challenge.md +11 -0
  11. package/docs/examples/account/create-mfa-recovery-codes.md +10 -0
  12. package/docs/examples/account/create-o-auth2token.md +14 -0
  13. package/docs/examples/account/create-phone-token.md +12 -0
  14. package/docs/examples/account/create-phone-verification.md +4 -14
  15. package/docs/examples/account/create-recovery.md +7 -14
  16. package/docs/examples/account/create-session.md +12 -0
  17. package/docs/examples/account/create-verification.md +6 -14
  18. package/docs/examples/account/create.md +14 -0
  19. package/docs/examples/account/delete-identity.md +6 -14
  20. package/docs/examples/account/delete-mfa-authenticator.md +13 -0
  21. package/docs/examples/account/delete-session.md +6 -14
  22. package/docs/examples/account/delete-sessions.md +4 -14
  23. package/docs/examples/account/get-mfa-recovery-codes.md +10 -0
  24. package/docs/examples/account/get-prefs.md +4 -14
  25. package/docs/examples/account/get-session.md +6 -14
  26. package/docs/examples/account/get.md +4 -14
  27. package/docs/examples/account/list-identities.md +6 -14
  28. package/docs/examples/account/list-logs.md +6 -14
  29. package/docs/examples/account/list-mfa-factors.md +10 -0
  30. package/docs/examples/account/list-sessions.md +4 -14
  31. package/docs/examples/account/update-email.md +7 -14
  32. package/docs/examples/account/update-m-f-a.md +12 -0
  33. package/docs/examples/account/update-magic-u-r-l-session.md +12 -0
  34. package/docs/examples/account/update-mfa-authenticator.md +13 -0
  35. package/docs/examples/account/update-mfa-challenge.md +13 -0
  36. package/docs/examples/account/update-mfa-recovery-codes.md +10 -0
  37. package/docs/examples/account/update-name.md +6 -14
  38. package/docs/examples/account/update-password.md +7 -14
  39. package/docs/examples/account/update-phone-session.md +12 -0
  40. package/docs/examples/account/update-phone-verification.md +7 -14
  41. package/docs/examples/account/update-phone.md +7 -14
  42. package/docs/examples/account/update-prefs.md +6 -14
  43. package/docs/examples/account/update-recovery.md +8 -14
  44. package/docs/examples/account/update-session.md +6 -14
  45. package/docs/examples/account/update-status.md +4 -14
  46. package/docs/examples/account/update-verification.md +7 -14
  47. package/docs/examples/avatars/get-browser.md +9 -14
  48. package/docs/examples/avatars/get-credit-card.md +9 -14
  49. package/docs/examples/avatars/get-favicon.md +6 -14
  50. package/docs/examples/avatars/get-flag.md +9 -14
  51. package/docs/examples/avatars/get-image.md +8 -14
  52. package/docs/examples/avatars/get-initials.md +9 -14
  53. package/docs/examples/avatars/get-q-r.md +9 -14
  54. package/docs/examples/databases/create-boolean-attribute.md +11 -14
  55. package/docs/examples/databases/create-collection.md +11 -14
  56. package/docs/examples/databases/create-datetime-attribute.md +11 -14
  57. package/docs/examples/databases/create-document.md +10 -14
  58. package/docs/examples/databases/create-email-attribute.md +11 -14
  59. package/docs/examples/databases/create-enum-attribute.md +12 -14
  60. package/docs/examples/databases/create-float-attribute.md +13 -14
  61. package/docs/examples/databases/create-index.md +11 -14
  62. package/docs/examples/databases/create-integer-attribute.md +13 -14
  63. package/docs/examples/databases/create-ip-attribute.md +11 -14
  64. package/docs/examples/databases/create-relationship-attribute.md +13 -14
  65. package/docs/examples/databases/create-string-attribute.md +13 -14
  66. package/docs/examples/databases/create-url-attribute.md +11 -14
  67. package/docs/examples/databases/create.md +8 -14
  68. package/docs/examples/databases/delete-attribute.md +8 -14
  69. package/docs/examples/databases/delete-collection.md +7 -14
  70. package/docs/examples/databases/delete-document.md +8 -14
  71. package/docs/examples/databases/delete-index.md +8 -14
  72. package/docs/examples/databases/delete.md +6 -14
  73. package/docs/examples/databases/get-attribute.md +8 -14
  74. package/docs/examples/databases/get-collection.md +7 -14
  75. package/docs/examples/databases/get-document.md +9 -14
  76. package/docs/examples/databases/get-index.md +8 -14
  77. package/docs/examples/databases/get.md +6 -14
  78. package/docs/examples/databases/list-attributes.md +8 -14
  79. package/docs/examples/databases/list-collections.md +8 -14
  80. package/docs/examples/databases/list-documents.md +8 -14
  81. package/docs/examples/databases/list-indexes.md +8 -14
  82. package/docs/examples/databases/list.md +7 -14
  83. package/docs/examples/databases/update-boolean-attribute.md +10 -14
  84. package/docs/examples/databases/update-collection.md +11 -14
  85. package/docs/examples/databases/update-datetime-attribute.md +10 -14
  86. package/docs/examples/databases/update-document.md +10 -14
  87. package/docs/examples/databases/update-email-attribute.md +10 -14
  88. package/docs/examples/databases/update-enum-attribute.md +11 -14
  89. package/docs/examples/databases/update-float-attribute.md +12 -14
  90. package/docs/examples/databases/update-integer-attribute.md +12 -14
  91. package/docs/examples/databases/update-ip-attribute.md +10 -14
  92. package/docs/examples/databases/update-relationship-attribute.md +9 -14
  93. package/docs/examples/databases/update-string-attribute.md +10 -14
  94. package/docs/examples/databases/update-url-attribute.md +10 -14
  95. package/docs/examples/databases/update.md +8 -14
  96. package/docs/examples/functions/create-build.md +8 -14
  97. package/docs/examples/functions/create-deployment.md +10 -14
  98. package/docs/examples/functions/create-execution.md +11 -14
  99. package/docs/examples/functions/create-variable.md +8 -14
  100. package/docs/examples/functions/create.md +25 -14
  101. package/docs/examples/functions/delete-deployment.md +7 -14
  102. package/docs/examples/functions/delete-variable.md +7 -14
  103. package/docs/examples/functions/delete.md +6 -14
  104. package/docs/examples/functions/download-deployment.md +7 -14
  105. package/docs/examples/functions/get-deployment.md +7 -14
  106. package/docs/examples/functions/get-execution.md +7 -14
  107. package/docs/examples/functions/get-variable.md +7 -14
  108. package/docs/examples/functions/get.md +6 -14
  109. package/docs/examples/functions/list-deployments.md +8 -14
  110. package/docs/examples/functions/list-executions.md +8 -14
  111. package/docs/examples/functions/list-runtimes.md +4 -14
  112. package/docs/examples/functions/list-variables.md +6 -14
  113. package/docs/examples/functions/list.md +7 -14
  114. package/docs/examples/functions/update-deployment.md +7 -14
  115. package/docs/examples/functions/update-variable.md +9 -14
  116. package/docs/examples/functions/update.md +21 -14
  117. package/docs/examples/graphql/mutation.md +6 -14
  118. package/docs/examples/graphql/query.md +6 -14
  119. package/docs/examples/health/get-antivirus.md +4 -14
  120. package/docs/examples/health/get-cache.md +4 -14
  121. package/docs/examples/health/get-certificate.md +12 -0
  122. package/docs/examples/health/get-d-b.md +4 -14
  123. package/docs/examples/health/get-failed-jobs.md +13 -0
  124. package/docs/examples/health/get-pub-sub.md +4 -14
  125. package/docs/examples/health/get-queue-builds.md +6 -14
  126. package/docs/examples/health/get-queue-certificates.md +6 -14
  127. package/docs/examples/health/get-queue-databases.md +7 -14
  128. package/docs/examples/health/get-queue-deletes.md +6 -14
  129. package/docs/examples/health/get-queue-functions.md +6 -14
  130. package/docs/examples/health/get-queue-logs.md +6 -14
  131. package/docs/examples/health/get-queue-mails.md +6 -14
  132. package/docs/examples/health/get-queue-messaging.md +6 -14
  133. package/docs/examples/health/get-queue-migrations.md +6 -14
  134. package/docs/examples/health/get-queue-usage-dump.md +12 -0
  135. package/docs/examples/health/get-queue-usage.md +12 -0
  136. package/docs/examples/health/get-queue-webhooks.md +6 -14
  137. package/docs/examples/health/get-queue.md +4 -14
  138. package/docs/examples/health/get-storage-local.md +4 -14
  139. package/docs/examples/health/get-storage.md +10 -0
  140. package/docs/examples/health/get-time.md +4 -14
  141. package/docs/examples/health/get.md +4 -14
  142. package/docs/examples/locale/get.md +4 -14
  143. package/docs/examples/locale/list-codes.md +4 -14
  144. package/docs/examples/locale/list-continents.md +4 -14
  145. package/docs/examples/locale/list-countries-e-u.md +4 -14
  146. package/docs/examples/locale/list-countries-phones.md +4 -14
  147. package/docs/examples/locale/list-countries.md +4 -14
  148. package/docs/examples/locale/list-currencies.md +4 -14
  149. package/docs/examples/locale/list-languages.md +4 -14
  150. package/docs/examples/messaging/create-apns-provider.md +19 -0
  151. package/docs/examples/messaging/create-email.md +23 -0
  152. package/docs/examples/messaging/create-fcm-provider.md +15 -0
  153. package/docs/examples/messaging/create-mailgun-provider.md +21 -0
  154. package/docs/examples/messaging/create-msg91provider.md +17 -0
  155. package/docs/examples/messaging/create-push.md +27 -0
  156. package/docs/examples/messaging/create-sendgrid-provider.md +19 -0
  157. package/docs/examples/messaging/create-sms.md +18 -0
  158. package/docs/examples/messaging/create-smtp-provider.md +25 -0
  159. package/docs/examples/messaging/create-subscriber.md +14 -0
  160. package/docs/examples/messaging/create-telesign-provider.md +17 -0
  161. package/docs/examples/messaging/create-textmagic-provider.md +17 -0
  162. package/docs/examples/messaging/create-topic.md +14 -0
  163. package/docs/examples/messaging/create-twilio-provider.md +17 -0
  164. package/docs/examples/messaging/create-vonage-provider.md +17 -0
  165. package/docs/examples/messaging/delete-provider.md +12 -0
  166. package/docs/examples/messaging/delete-subscriber.md +13 -0
  167. package/docs/examples/messaging/delete-topic.md +12 -0
  168. package/docs/examples/messaging/delete.md +12 -0
  169. package/docs/examples/messaging/get-message.md +12 -0
  170. package/docs/examples/messaging/get-provider.md +12 -0
  171. package/docs/examples/messaging/get-subscriber.md +13 -0
  172. package/docs/examples/messaging/get-topic.md +12 -0
  173. package/docs/examples/messaging/list-message-logs.md +13 -0
  174. package/docs/examples/messaging/list-messages.md +13 -0
  175. package/docs/examples/messaging/list-provider-logs.md +13 -0
  176. package/docs/examples/messaging/list-providers.md +13 -0
  177. package/docs/examples/messaging/list-subscriber-logs.md +13 -0
  178. package/docs/examples/messaging/list-subscribers.md +14 -0
  179. package/docs/examples/messaging/list-targets.md +13 -0
  180. package/docs/examples/messaging/list-topic-logs.md +13 -0
  181. package/docs/examples/messaging/list-topics.md +13 -0
  182. package/docs/examples/messaging/update-apns-provider.md +19 -0
  183. package/docs/examples/messaging/update-email.md +22 -0
  184. package/docs/examples/messaging/update-fcm-provider.md +15 -0
  185. package/docs/examples/messaging/update-mailgun-provider.md +21 -0
  186. package/docs/examples/messaging/update-msg91provider.md +17 -0
  187. package/docs/examples/messaging/update-push.md +27 -0
  188. package/docs/examples/messaging/update-sendgrid-provider.md +19 -0
  189. package/docs/examples/messaging/update-sms.md +18 -0
  190. package/docs/examples/messaging/update-smtp-provider.md +25 -0
  191. package/docs/examples/messaging/update-telesign-provider.md +17 -0
  192. package/docs/examples/messaging/update-textmagic-provider.md +17 -0
  193. package/docs/examples/messaging/update-topic.md +14 -0
  194. package/docs/examples/messaging/update-twilio-provider.md +17 -0
  195. package/docs/examples/messaging/update-vonage-provider.md +17 -0
  196. package/docs/examples/storage/create-bucket.md +15 -14
  197. package/docs/examples/storage/create-file.md +9 -14
  198. package/docs/examples/storage/delete-bucket.md +6 -14
  199. package/docs/examples/storage/delete-file.md +7 -14
  200. package/docs/examples/storage/get-bucket.md +6 -14
  201. package/docs/examples/storage/get-file-download.md +7 -14
  202. package/docs/examples/storage/get-file-preview.md +18 -14
  203. package/docs/examples/storage/get-file-view.md +7 -14
  204. package/docs/examples/storage/get-file.md +7 -14
  205. package/docs/examples/storage/list-buckets.md +7 -14
  206. package/docs/examples/storage/list-files.md +8 -14
  207. package/docs/examples/storage/update-bucket.md +15 -14
  208. package/docs/examples/storage/update-file.md +9 -14
  209. package/docs/examples/teams/create-membership.md +12 -14
  210. package/docs/examples/teams/create.md +8 -14
  211. package/docs/examples/teams/delete-membership.md +7 -14
  212. package/docs/examples/teams/delete.md +6 -14
  213. package/docs/examples/teams/get-membership.md +7 -14
  214. package/docs/examples/teams/get-prefs.md +6 -14
  215. package/docs/examples/teams/get.md +6 -14
  216. package/docs/examples/teams/list-memberships.md +8 -14
  217. package/docs/examples/teams/list.md +7 -14
  218. package/docs/examples/teams/update-membership-status.md +9 -14
  219. package/docs/examples/teams/update-membership.md +8 -14
  220. package/docs/examples/teams/update-name.md +7 -14
  221. package/docs/examples/teams/update-prefs.md +7 -14
  222. package/docs/examples/users/create-argon2user.md +9 -14
  223. package/docs/examples/users/create-bcrypt-user.md +9 -14
  224. package/docs/examples/users/create-m-d5user.md +9 -14
  225. package/docs/examples/users/create-mfa-recovery-codes.md +12 -0
  226. package/docs/examples/users/create-p-h-pass-user.md +9 -14
  227. package/docs/examples/users/create-s-h-a-user.md +10 -14
  228. package/docs/examples/users/create-scrypt-modified-user.md +12 -14
  229. package/docs/examples/users/create-scrypt-user.md +14 -14
  230. package/docs/examples/users/create-session.md +12 -0
  231. package/docs/examples/users/create-target.md +17 -0
  232. package/docs/examples/users/create-token.md +14 -0
  233. package/docs/examples/users/create.md +10 -14
  234. package/docs/examples/users/delete-identity.md +6 -14
  235. package/docs/examples/users/delete-mfa-authenticator.md +13 -0
  236. package/docs/examples/users/delete-session.md +7 -14
  237. package/docs/examples/users/delete-sessions.md +6 -14
  238. package/docs/examples/users/delete-target.md +13 -0
  239. package/docs/examples/users/delete.md +6 -14
  240. package/docs/examples/users/get-mfa-recovery-codes.md +12 -0
  241. package/docs/examples/users/get-prefs.md +6 -14
  242. package/docs/examples/users/get-target.md +13 -0
  243. package/docs/examples/users/get.md +6 -14
  244. package/docs/examples/users/list-identities.md +7 -14
  245. package/docs/examples/users/list-logs.md +7 -14
  246. package/docs/examples/users/list-memberships.md +6 -14
  247. package/docs/examples/users/list-mfa-factors.md +12 -0
  248. package/docs/examples/users/list-sessions.md +6 -14
  249. package/docs/examples/users/list-targets.md +13 -0
  250. package/docs/examples/users/list.md +7 -14
  251. package/docs/examples/users/update-email-verification.md +7 -14
  252. package/docs/examples/users/update-email.md +7 -14
  253. package/docs/examples/users/update-labels.md +7 -14
  254. package/docs/examples/users/update-mfa-recovery-codes.md +12 -0
  255. package/docs/examples/users/update-mfa.md +13 -0
  256. package/docs/examples/users/update-name.md +7 -14
  257. package/docs/examples/users/update-password.md +7 -14
  258. package/docs/examples/users/update-phone-verification.md +7 -14
  259. package/docs/examples/users/update-phone.md +7 -14
  260. package/docs/examples/users/update-prefs.md +7 -14
  261. package/docs/examples/users/update-status.md +7 -14
  262. package/docs/examples/users/update-target.md +16 -0
  263. package/index.d.ts +2164 -81
  264. package/index.js +38 -0
  265. package/lib/client.js +107 -65
  266. package/lib/enums/authentication-factor.js +8 -0
  267. package/lib/enums/authenticator-type.js +5 -0
  268. package/lib/enums/browser.js +18 -0
  269. package/lib/enums/compression.js +7 -0
  270. package/lib/enums/credit-card.js +20 -0
  271. package/lib/enums/execution-method.js +10 -0
  272. package/lib/enums/flag.js +198 -0
  273. package/lib/enums/image-format.js +9 -0
  274. package/lib/enums/image-gravity.js +13 -0
  275. package/lib/enums/index-type.js +7 -0
  276. package/lib/enums/messaging-provider-type.js +7 -0
  277. package/lib/enums/name.js +17 -0
  278. package/lib/enums/o-auth-provider.js +43 -0
  279. package/lib/enums/password-hash.js +15 -0
  280. package/lib/enums/relation-mutate.js +7 -0
  281. package/lib/enums/relationship-type.js +8 -0
  282. package/lib/enums/runtime.js +48 -0
  283. package/lib/enums/smtp-encryption.js +7 -0
  284. package/lib/inputFile.js +88 -16
  285. package/lib/query.js +56 -38
  286. package/lib/services/account.js +722 -16
  287. package/lib/services/avatars.js +5 -3
  288. package/lib/services/databases.js +34 -4
  289. package/lib/services/functions.js +51 -87
  290. package/lib/services/graphql.js +2 -0
  291. package/lib/services/health.js +118 -0
  292. package/lib/services/locale.js +2 -0
  293. package/lib/services/messaging.js +2218 -0
  294. package/lib/services/storage.js +52 -88
  295. package/lib/services/teams.js +2 -0
  296. package/lib/services/users.js +405 -3
  297. package/package.json +2 -3
package/index.d.ts CHANGED
@@ -300,6 +300,71 @@ declare module "node-appwrite" {
300
300
  localeCodes: LocaleCode[];
301
301
  }
302
302
  /**
303
+ * Provider list
304
+ */
305
+ export type ProviderList = {
306
+ /**
307
+ * Total number of providers documents that matched your query.
308
+ */
309
+ total: number;
310
+ /**
311
+ * List of providers.
312
+ */
313
+ providers: Provider[];
314
+ }
315
+ /**
316
+ * Message list
317
+ */
318
+ export type MessageList = {
319
+ /**
320
+ * Total number of messages documents that matched your query.
321
+ */
322
+ total: number;
323
+ /**
324
+ * List of messages.
325
+ */
326
+ messages: Message[];
327
+ }
328
+ /**
329
+ * Topic list
330
+ */
331
+ export type TopicList = {
332
+ /**
333
+ * Total number of topics documents that matched your query.
334
+ */
335
+ total: number;
336
+ /**
337
+ * List of topics.
338
+ */
339
+ topics: Topic[];
340
+ }
341
+ /**
342
+ * Subscriber list
343
+ */
344
+ export type SubscriberList = {
345
+ /**
346
+ * Total number of subscribers documents that matched your query.
347
+ */
348
+ total: number;
349
+ /**
350
+ * List of subscribers.
351
+ */
352
+ subscribers: Subscriber[];
353
+ }
354
+ /**
355
+ * Target list
356
+ */
357
+ export type TargetList = {
358
+ /**
359
+ * Total number of targets documents that matched your query.
360
+ */
361
+ total: number;
362
+ /**
363
+ * List of targets.
364
+ */
365
+ targets: Target[];
366
+ }
367
+ /**
303
368
  * Database
304
369
  */
305
370
  export type Database = {
@@ -988,10 +1053,18 @@ declare module "node-appwrite" {
988
1053
  */
989
1054
  phoneVerification: boolean;
990
1055
  /**
1056
+ * Multi factor authentication status.
1057
+ */
1058
+ mfa: boolean;
1059
+ /**
991
1060
  * User preferences as a key-value object
992
1061
  */
993
1062
  prefs: Preferences;
994
1063
  /**
1064
+ * A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.
1065
+ */
1066
+ targets: Target[];
1067
+ /**
995
1068
  * Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.
996
1069
  */
997
1070
  accessedAt: string;
@@ -1208,6 +1281,18 @@ declare module "node-appwrite" {
1208
1281
  * Returns true if this the current user session.
1209
1282
  */
1210
1283
  current: boolean;
1284
+ /**
1285
+ * Returns a list of active session factors.
1286
+ */
1287
+ factors: string[];
1288
+ /**
1289
+ * Secret used to authenticate the user. Only included if the request was made with an API key
1290
+ */
1291
+ secret: string;
1292
+ /**
1293
+ * Most recent date in ISO 8601 format when the session successfully passed MFA challenge.
1294
+ */
1295
+ mfaUpdatedAt: string;
1211
1296
  }
1212
1297
  /**
1213
1298
  * Identity
@@ -1278,6 +1363,19 @@ declare module "node-appwrite" {
1278
1363
  * Token expiration date in ISO 8601 format.
1279
1364
  */
1280
1365
  expire: string;
1366
+ /**
1367
+ * Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.
1368
+ */
1369
+ phrase: string;
1370
+ }
1371
+ /**
1372
+ * JWT
1373
+ */
1374
+ export type Jwt = {
1375
+ /**
1376
+ * JWT encoded string.
1377
+ */
1378
+ jwt: string;
1281
1379
  }
1282
1380
  /**
1283
1381
  * Locale
@@ -1505,6 +1603,10 @@ declare module "node-appwrite" {
1505
1603
  */
1506
1604
  confirm: boolean;
1507
1605
  /**
1606
+ * Multi factor authentication status, true if the user has MFA enabled or false otherwise.
1607
+ */
1608
+ mfa: boolean;
1609
+ /**
1508
1610
  * User list of roles
1509
1611
  */
1510
1612
  roles: string[];
@@ -1967,6 +2069,35 @@ declare module "node-appwrite" {
1967
2069
  status: string;
1968
2070
  }
1969
2071
  /**
2072
+ * Health Certificate
2073
+ */
2074
+ export type HealthCertificate = {
2075
+ /**
2076
+ * Certificate name
2077
+ */
2078
+ name: string;
2079
+ /**
2080
+ * Subject SN
2081
+ */
2082
+ subjectSN: string;
2083
+ /**
2084
+ * Issuer organisation
2085
+ */
2086
+ issuerOrganisation: string;
2087
+ /**
2088
+ * Valid from
2089
+ */
2090
+ validFrom: string;
2091
+ /**
2092
+ * Valid to
2093
+ */
2094
+ validTo: string;
2095
+ /**
2096
+ * Signature type SN
2097
+ */
2098
+ signatureTypeSN: string;
2099
+ }
2100
+ /**
1970
2101
  * Health Time
1971
2102
  */
1972
2103
  export type HealthTime = {
@@ -1996,6 +2127,279 @@ declare module "node-appwrite" {
1996
2127
  */
1997
2128
  value: string;
1998
2129
  }
2130
+ /**
2131
+ * MFA Challenge
2132
+ */
2133
+ export type MfaChallenge = {
2134
+ /**
2135
+ * Token ID.
2136
+ */
2137
+ $id: string;
2138
+ /**
2139
+ * Token creation date in ISO 8601 format.
2140
+ */
2141
+ $createdAt: string;
2142
+ /**
2143
+ * User ID.
2144
+ */
2145
+ userId: string;
2146
+ /**
2147
+ * Token expiration date in ISO 8601 format.
2148
+ */
2149
+ expire: string;
2150
+ }
2151
+ /**
2152
+ * MFA Recovery Codes
2153
+ */
2154
+ export type MfaRecoveryCodes = {
2155
+ /**
2156
+ * Recovery codes.
2157
+ */
2158
+ recoveryCodes: string[];
2159
+ }
2160
+ /**
2161
+ * MFAType
2162
+ */
2163
+ export type MfaType = {
2164
+ /**
2165
+ * Secret token used for TOTP factor.
2166
+ */
2167
+ secret: string;
2168
+ /**
2169
+ * URI for authenticator apps.
2170
+ */
2171
+ uri: string;
2172
+ }
2173
+ /**
2174
+ * MFAFactors
2175
+ */
2176
+ export type MfaFactors = {
2177
+ /**
2178
+ * TOTP
2179
+ */
2180
+ totp: boolean;
2181
+ /**
2182
+ * Phone
2183
+ */
2184
+ phone: boolean;
2185
+ /**
2186
+ * Email
2187
+ */
2188
+ email: boolean;
2189
+ }
2190
+ /**
2191
+ * Provider
2192
+ */
2193
+ export type Provider = {
2194
+ /**
2195
+ * Provider ID.
2196
+ */
2197
+ $id: string;
2198
+ /**
2199
+ * Provider creation time in ISO 8601 format.
2200
+ */
2201
+ $createdAt: string;
2202
+ /**
2203
+ * Provider update date in ISO 8601 format.
2204
+ */
2205
+ $updatedAt: string;
2206
+ /**
2207
+ * The name for the provider instance.
2208
+ */
2209
+ name: string;
2210
+ /**
2211
+ * The name of the provider service.
2212
+ */
2213
+ provider: string;
2214
+ /**
2215
+ * Is provider enabled?
2216
+ */
2217
+ enabled: boolean;
2218
+ /**
2219
+ * Type of provider.
2220
+ */
2221
+ type: string;
2222
+ /**
2223
+ * Provider credentials.
2224
+ */
2225
+ credentials: object;
2226
+ /**
2227
+ * Provider options.
2228
+ */
2229
+ options?: object;
2230
+ }
2231
+ /**
2232
+ * Message
2233
+ */
2234
+ export type Message = {
2235
+ /**
2236
+ * Message ID.
2237
+ */
2238
+ $id: string;
2239
+ /**
2240
+ * Message creation time in ISO 8601 format.
2241
+ */
2242
+ $createdAt: string;
2243
+ /**
2244
+ * Message update date in ISO 8601 format.
2245
+ */
2246
+ $updatedAt: string;
2247
+ /**
2248
+ * Message provider type.
2249
+ */
2250
+ providerType: string;
2251
+ /**
2252
+ * Topic IDs set as recipients.
2253
+ */
2254
+ topics: string[];
2255
+ /**
2256
+ * User IDs set as recipients.
2257
+ */
2258
+ users: string[];
2259
+ /**
2260
+ * Target IDs set as recipients.
2261
+ */
2262
+ targets: string[];
2263
+ /**
2264
+ * The scheduled time for message.
2265
+ */
2266
+ scheduledAt?: string;
2267
+ /**
2268
+ * The time when the message was delivered.
2269
+ */
2270
+ deliveredAt?: string;
2271
+ /**
2272
+ * Delivery errors if any.
2273
+ */
2274
+ deliveryErrors?: string[];
2275
+ /**
2276
+ * Number of recipients the message was delivered to.
2277
+ */
2278
+ deliveredTotal: number;
2279
+ /**
2280
+ * Data of the message.
2281
+ */
2282
+ data: object;
2283
+ /**
2284
+ * Status of delivery.
2285
+ */
2286
+ status: string;
2287
+ }
2288
+ /**
2289
+ * Topic
2290
+ */
2291
+ export type Topic = {
2292
+ /**
2293
+ * Topic ID.
2294
+ */
2295
+ $id: string;
2296
+ /**
2297
+ * Topic creation time in ISO 8601 format.
2298
+ */
2299
+ $createdAt: string;
2300
+ /**
2301
+ * Topic update date in ISO 8601 format.
2302
+ */
2303
+ $updatedAt: string;
2304
+ /**
2305
+ * The name of the topic.
2306
+ */
2307
+ name: string;
2308
+ /**
2309
+ * Total count of email subscribers subscribed to the topic.
2310
+ */
2311
+ emailTotal: number;
2312
+ /**
2313
+ * Total count of SMS subscribers subscribed to the topic.
2314
+ */
2315
+ smsTotal: number;
2316
+ /**
2317
+ * Total count of push subscribers subscribed to the topic.
2318
+ */
2319
+ pushTotal: number;
2320
+ /**
2321
+ * Subscribe permissions.
2322
+ */
2323
+ subscribe: string[];
2324
+ }
2325
+ /**
2326
+ * Subscriber
2327
+ */
2328
+ export type Subscriber = {
2329
+ /**
2330
+ * Subscriber ID.
2331
+ */
2332
+ $id: string;
2333
+ /**
2334
+ * Subscriber creation time in ISO 8601 format.
2335
+ */
2336
+ $createdAt: string;
2337
+ /**
2338
+ * Subscriber update date in ISO 8601 format.
2339
+ */
2340
+ $updatedAt: string;
2341
+ /**
2342
+ * Target ID.
2343
+ */
2344
+ targetId: string;
2345
+ /**
2346
+ * Target.
2347
+ */
2348
+ target: Target;
2349
+ /**
2350
+ * Topic ID.
2351
+ */
2352
+ userId: string;
2353
+ /**
2354
+ * User Name.
2355
+ */
2356
+ userName: string;
2357
+ /**
2358
+ * Topic ID.
2359
+ */
2360
+ topicId: string;
2361
+ /**
2362
+ * The target provider type. Can be one of the following: `email`, `sms` or `push`.
2363
+ */
2364
+ providerType: string;
2365
+ }
2366
+ /**
2367
+ * Target
2368
+ */
2369
+ export type Target = {
2370
+ /**
2371
+ * Target ID.
2372
+ */
2373
+ $id: string;
2374
+ /**
2375
+ * Target creation time in ISO 8601 format.
2376
+ */
2377
+ $createdAt: string;
2378
+ /**
2379
+ * Target update date in ISO 8601 format.
2380
+ */
2381
+ $updatedAt: string;
2382
+ /**
2383
+ * Target Name.
2384
+ */
2385
+ name: string;
2386
+ /**
2387
+ * User ID.
2388
+ */
2389
+ userId: string;
2390
+ /**
2391
+ * Provider ID.
2392
+ */
2393
+ providerId?: string;
2394
+ /**
2395
+ * The target provider type. Can be one of the following: `email`, `sms` or `push`.
2396
+ */
2397
+ providerType: string;
2398
+ /**
2399
+ * The target identifier.
2400
+ */
2401
+ identifier: string;
2402
+ }
1999
2403
  }
2000
2404
  export class Client {
2001
2405
  /**
@@ -2057,10 +2461,32 @@ declare module "node-appwrite" {
2057
2461
  * @returns {this}
2058
2462
  */
2059
2463
  setLocale(locale: string): Client;
2060
- }
2061
2464
 
2062
- export class AppwriteException extends Error {
2063
- public code: number | null;
2465
+ /**
2466
+ * Set Session
2467
+ *
2468
+ * The user session to authenticate with
2469
+ *
2470
+ * @param {string} value
2471
+ *
2472
+ * @returns {this}
2473
+ */
2474
+ setSession(session: string): Client;
2475
+
2476
+ /**
2477
+ * Set ForwardedUserAgent
2478
+ *
2479
+ * The user agent string of the client that made the request
2480
+ *
2481
+ * @param {string} value
2482
+ *
2483
+ * @returns {this}
2484
+ */
2485
+ setForwardedUserAgent(forwardeduseragent: string): Client;
2486
+ }
2487
+
2488
+ export class AppwriteException extends Error {
2489
+ public code: number | null;
2064
2490
  public response: string | null;
2065
2491
  constructor(message: string, code?: number, response?: string);
2066
2492
  }
@@ -2167,6 +2593,25 @@ declare module "node-appwrite" {
2167
2593
  * @returns {Promise}
2168
2594
  */
2169
2595
  get<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
2596
+ /**
2597
+ * Create account
2598
+ *
2599
+ * Use this endpoint to allow a new user to register a new account in your
2600
+ * project. After the user registration completes successfully, you can use
2601
+ * the
2602
+ * [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification)
2603
+ * route to start verifying the user email address. To allow the new user to
2604
+ * login to their new account, you need to create a new [account
2605
+ * session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).
2606
+ *
2607
+ * @param {string} userId
2608
+ * @param {string} email
2609
+ * @param {string} password
2610
+ * @param {string} name
2611
+ * @throws {AppwriteException}
2612
+ * @returns {Promise}
2613
+ */
2614
+ create<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
2170
2615
  /**
2171
2616
  * Update email
2172
2617
  *
@@ -2190,13 +2635,13 @@ declare module "node-appwrite" {
2190
2635
  *
2191
2636
  * Get the list of identities for the currently logged in user.
2192
2637
  *
2193
- * @param {string} queries
2638
+ * @param {string[]} queries
2194
2639
  * @throws {AppwriteException}
2195
2640
  * @returns {Promise}
2196
2641
  */
2197
- listIdentities(queries?: string): Promise<Models.IdentityList>;
2642
+ listIdentities(queries?: string[]): Promise<Models.IdentityList>;
2198
2643
  /**
2199
- * Delete Identity
2644
+ * Delete identity
2200
2645
  *
2201
2646
  * Delete an identity by its unique ID.
2202
2647
  *
@@ -2205,6 +2650,19 @@ declare module "node-appwrite" {
2205
2650
  * @returns {Promise}
2206
2651
  */
2207
2652
  deleteIdentity(identityId: string): Promise<string>;
2653
+ /**
2654
+ * Create JWT
2655
+ *
2656
+ * Use this endpoint to create a JSON Web Token. You can use the resulting JWT
2657
+ * to authenticate on behalf of the current user when working with the
2658
+ * Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes
2659
+ * from its creation and will be invalid if the user will logout in that time
2660
+ * frame.
2661
+ *
2662
+ * @throws {AppwriteException}
2663
+ * @returns {Promise}
2664
+ */
2665
+ createJWT(): Promise<Models.Jwt>;
2208
2666
  /**
2209
2667
  * List logs
2210
2668
  *
@@ -2216,6 +2674,126 @@ declare module "node-appwrite" {
2216
2674
  * @returns {Promise}
2217
2675
  */
2218
2676
  listLogs(queries?: string[]): Promise<Models.LogList>;
2677
+ /**
2678
+ * Update MFA
2679
+ *
2680
+ * Enable or disable MFA on an account.
2681
+ *
2682
+ * @param {boolean} mfa
2683
+ * @throws {AppwriteException}
2684
+ * @returns {Promise}
2685
+ */
2686
+ updateMFA<Preferences extends Models.Preferences>(mfa: boolean): Promise<Models.User<Preferences>>;
2687
+ /**
2688
+ * Add Authenticator
2689
+ *
2690
+ * Add an authenticator app to be used as an MFA factor. Verify the
2691
+ * authenticator using the [verify
2692
+ * authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator)
2693
+ * method.
2694
+ *
2695
+ * @param {AuthenticatorType} type
2696
+ * @throws {AppwriteException}
2697
+ * @returns {Promise}
2698
+ */
2699
+ createMfaAuthenticator(type: AuthenticatorType): Promise<Models.MfaType>;
2700
+ /**
2701
+ * Verify Authenticator
2702
+ *
2703
+ * Verify an authenticator app after adding it using the [add
2704
+ * authenticator](/docs/references/cloud/client-web/account#addAuthenticator)
2705
+ * method.
2706
+ *
2707
+ * @param {AuthenticatorType} type
2708
+ * @param {string} otp
2709
+ * @throws {AppwriteException}
2710
+ * @returns {Promise}
2711
+ */
2712
+ updateMfaAuthenticator<Preferences extends Models.Preferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>>;
2713
+ /**
2714
+ * Delete Authenticator
2715
+ *
2716
+ * Delete an authenticator for a user by ID.
2717
+ *
2718
+ * @param {AuthenticatorType} type
2719
+ * @param {string} otp
2720
+ * @throws {AppwriteException}
2721
+ * @returns {Promise}
2722
+ */
2723
+ deleteMfaAuthenticator<Preferences extends Models.Preferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>>;
2724
+ /**
2725
+ * Create 2FA Challenge
2726
+ *
2727
+ * Begin the process of MFA verification after sign-in. Finish the flow with
2728
+ * [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge)
2729
+ * method.
2730
+ *
2731
+ * @param {AuthenticationFactor} factor
2732
+ * @throws {AppwriteException}
2733
+ * @returns {Promise}
2734
+ */
2735
+ createMfaChallenge(factor: AuthenticationFactor): Promise<Models.MfaChallenge>;
2736
+ /**
2737
+ * Create MFA Challenge (confirmation)
2738
+ *
2739
+ * Complete the MFA challenge by providing the one-time password. Finish the
2740
+ * process of MFA verification by providing the one-time password. To begin
2741
+ * the flow, use
2742
+ * [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)
2743
+ * method.
2744
+ *
2745
+ * @param {string} challengeId
2746
+ * @param {string} otp
2747
+ * @throws {AppwriteException}
2748
+ * @returns {Promise}
2749
+ */
2750
+ updateMfaChallenge(challengeId: string, otp: string): Promise<any>;
2751
+ /**
2752
+ * List Factors
2753
+ *
2754
+ * List the factors available on the account to be used as a MFA challange.
2755
+ *
2756
+ * @throws {AppwriteException}
2757
+ * @returns {Promise}
2758
+ */
2759
+ listMfaFactors(): Promise<Models.MfaFactors>;
2760
+ /**
2761
+ * Get MFA Recovery Codes
2762
+ *
2763
+ * Get recovery codes that can be used as backup for MFA flow. Before getting
2764
+ * codes, they must be generated using
2765
+ * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
2766
+ * method. An OTP challenge is required to read recovery codes.
2767
+ *
2768
+ * @throws {AppwriteException}
2769
+ * @returns {Promise}
2770
+ */
2771
+ getMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
2772
+ /**
2773
+ * Create MFA Recovery Codes
2774
+ *
2775
+ * Generate recovery codes as backup for MFA flow. It's recommended to
2776
+ * generate and show then immediately after user successfully adds their
2777
+ * authehticator. Recovery codes can be used as a MFA verification type in
2778
+ * [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)
2779
+ * method.
2780
+ *
2781
+ * @throws {AppwriteException}
2782
+ * @returns {Promise}
2783
+ */
2784
+ createMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
2785
+ /**
2786
+ * Regenerate MFA Recovery Codes
2787
+ *
2788
+ * Regenerate recovery codes that can be used as backup for MFA flow. Before
2789
+ * regenerating codes, they must be first generated using
2790
+ * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
2791
+ * method. An OTP challenge is required to regenreate recovery codes.
2792
+ *
2793
+ * @throws {AppwriteException}
2794
+ * @returns {Promise}
2795
+ */
2796
+ updateMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
2219
2797
  /**
2220
2798
  * Update name
2221
2799
  *
@@ -2310,11 +2888,10 @@ declare module "node-appwrite" {
2310
2888
  * @param {string} userId
2311
2889
  * @param {string} secret
2312
2890
  * @param {string} password
2313
- * @param {string} passwordAgain
2314
2891
  * @throws {AppwriteException}
2315
2892
  * @returns {Promise}
2316
2893
  */
2317
- updateRecovery(userId: string, secret: string, password: string, passwordAgain: string): Promise<Models.Token>;
2894
+ updateRecovery(userId: string, secret: string, password: string): Promise<Models.Token>;
2318
2895
  /**
2319
2896
  * List sessions
2320
2897
  *
@@ -2335,6 +2912,76 @@ declare module "node-appwrite" {
2335
2912
  * @returns {Promise}
2336
2913
  */
2337
2914
  deleteSessions(): Promise<string>;
2915
+ /**
2916
+ * Create anonymous session
2917
+ *
2918
+ * Use this endpoint to allow a new user to register an anonymous account in
2919
+ * your project. This route will also create a new session for the user. To
2920
+ * allow the new user to convert an anonymous account to a normal account, you
2921
+ * need to update its [email and
2922
+ * password](https://appwrite.io/docs/references/cloud/client-web/account#updateEmail)
2923
+ * or create an [OAuth2
2924
+ * session](https://appwrite.io/docs/references/cloud/client-web/account#CreateOAuth2Session).
2925
+ *
2926
+ * @throws {AppwriteException}
2927
+ * @returns {Promise}
2928
+ */
2929
+ createAnonymousSession(): Promise<Models.Session>;
2930
+ /**
2931
+ * Create email password session
2932
+ *
2933
+ * Allow the user to login into their account by providing a valid email and
2934
+ * password combination. This route will create a new session for the user.
2935
+ *
2936
+ * A user is limited to 10 active sessions at a time by default. [Learn more
2937
+ * about session
2938
+ * limits](https://appwrite.io/docs/authentication-security#limits).
2939
+ *
2940
+ * @param {string} email
2941
+ * @param {string} password
2942
+ * @throws {AppwriteException}
2943
+ * @returns {Promise}
2944
+ */
2945
+ createEmailPasswordSession(email: string, password: string): Promise<Models.Session>;
2946
+ /**
2947
+ * Update magic URL session
2948
+ *
2949
+ * Use this endpoint to create a session from token. Provide the **userId**
2950
+ * and **secret** parameters from the successful response of authentication
2951
+ * flows initiated by token creation. For example, magic URL and phone login.
2952
+ *
2953
+ * @param {string} userId
2954
+ * @param {string} secret
2955
+ * @throws {AppwriteException}
2956
+ * @returns {Promise}
2957
+ */
2958
+ updateMagicURLSession(userId: string, secret: string): Promise<Models.Session>;
2959
+ /**
2960
+ * Update phone session
2961
+ *
2962
+ * Use this endpoint to create a session from token. Provide the **userId**
2963
+ * and **secret** parameters from the successful response of authentication
2964
+ * flows initiated by token creation. For example, magic URL and phone login.
2965
+ *
2966
+ * @param {string} userId
2967
+ * @param {string} secret
2968
+ * @throws {AppwriteException}
2969
+ * @returns {Promise}
2970
+ */
2971
+ updatePhoneSession(userId: string, secret: string): Promise<Models.Session>;
2972
+ /**
2973
+ * Create session
2974
+ *
2975
+ * Use this endpoint to create a session from token. Provide the **userId**
2976
+ * and **secret** parameters from the successful response of authentication
2977
+ * flows initiated by token creation. For example, magic URL and phone login.
2978
+ *
2979
+ * @param {string} userId
2980
+ * @param {string} secret
2981
+ * @throws {AppwriteException}
2982
+ * @returns {Promise}
2983
+ */
2984
+ createSession(userId: string, secret: string): Promise<Models.Session>;
2338
2985
  /**
2339
2986
  * Get session
2340
2987
  *
@@ -2347,11 +2994,11 @@ declare module "node-appwrite" {
2347
2994
  */
2348
2995
  getSession(sessionId: string): Promise<Models.Session>;
2349
2996
  /**
2350
- * Update OAuth session (refresh tokens)
2997
+ * Update session
2351
2998
  *
2352
- * Access tokens have limited lifespan and expire to mitigate security risks.
2353
- * If session was created using an OAuth provider, this route can be used to
2354
- * "refresh" the access token.
2999
+ * Use this endpoint to extend a session's length. Extending a session is
3000
+ * useful when session expiry is short. If the session was created using an
3001
+ * OAuth provider, this endpoint refreshes the access token from the provider.
2355
3002
  *
2356
3003
  * @param {string} sessionId
2357
3004
  * @throws {AppwriteException}
@@ -2383,6 +3030,101 @@ declare module "node-appwrite" {
2383
3030
  * @returns {Promise}
2384
3031
  */
2385
3032
  updateStatus<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
3033
+ /**
3034
+ * Create email token (OTP)
3035
+ *
3036
+ * Sends the user an email with a secret key for creating a session. If the
3037
+ * provided user ID has not be registered, a new user will be created. Use the
3038
+ * returned user ID and secret and submit a request to the [POST
3039
+ * /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
3040
+ * endpoint to complete the login process. The secret sent to the user's email
3041
+ * is valid for 15 minutes.
3042
+ *
3043
+ * A user is limited to 10 active sessions at a time by default. [Learn more
3044
+ * about session
3045
+ * limits](https://appwrite.io/docs/authentication-security#limits).
3046
+ *
3047
+ * @param {string} userId
3048
+ * @param {string} email
3049
+ * @param {boolean} phrase
3050
+ * @throws {AppwriteException}
3051
+ * @returns {Promise}
3052
+ */
3053
+ createEmailToken(userId: string, email: string, phrase?: boolean): Promise<Models.Token>;
3054
+ /**
3055
+ * Create magic URL token
3056
+ *
3057
+ * Sends the user an email with a secret key for creating a session. If the
3058
+ * provided user ID has not been registered, a new user will be created. When
3059
+ * the user clicks the link in the email, the user is redirected back to the
3060
+ * URL you provided with the secret key and userId values attached to the URL
3061
+ * query string. Use the query string parameters to submit a request to the
3062
+ * [POST
3063
+ * /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
3064
+ * endpoint to complete the login process. The link sent to the user's email
3065
+ * address is valid for 1 hour. If you are on a mobile device you can leave
3066
+ * the URL parameter empty, so that the login completion will be handled by
3067
+ * your Appwrite instance by default.
3068
+ *
3069
+ * A user is limited to 10 active sessions at a time by default. [Learn more
3070
+ * about session
3071
+ * limits](https://appwrite.io/docs/authentication-security#limits).
3072
+ *
3073
+ *
3074
+ * @param {string} userId
3075
+ * @param {string} email
3076
+ * @param {string} url
3077
+ * @param {boolean} phrase
3078
+ * @throws {AppwriteException}
3079
+ * @returns {Promise}
3080
+ */
3081
+ createMagicURLToken(userId: string, email: string, url?: string, phrase?: boolean): Promise<Models.Token>;
3082
+ /**
3083
+ * Create OAuth2 token
3084
+ *
3085
+ * Allow the user to login to their account using the OAuth2 provider of their
3086
+ * choice. Each OAuth2 provider should be enabled from the Appwrite console
3087
+ * first. Use the success and failure arguments to provide a redirect URL's
3088
+ * back to your app when login is completed.
3089
+ *
3090
+ * If authentication succeeds, `userId` and `secret` of a token will be
3091
+ * appended to the success URL as query parameters. These can be used to
3092
+ * create a new session using the [Create
3093
+ * session](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
3094
+ * endpoint.
3095
+ *
3096
+ * A user is limited to 10 active sessions at a time by default. [Learn more
3097
+ * about session
3098
+ * limits](https://appwrite.io/docs/authentication-security#limits).
3099
+ *
3100
+ * @param {OAuthProvider} provider
3101
+ * @param {string} success
3102
+ * @param {string} failure
3103
+ * @param {string[]} scopes
3104
+ * @throws {AppwriteException}
3105
+ * @returns {Promise}
3106
+ */
3107
+ createOAuth2Token(provider: OAuthProvider, success?: string, failure?: string, scopes?: string[]): Promise<string>;
3108
+ /**
3109
+ * Create phone token
3110
+ *
3111
+ * Sends the user an SMS with a secret key for creating a session. If the
3112
+ * provided user ID has not be registered, a new user will be created. Use the
3113
+ * returned user ID and secret and submit a request to the [POST
3114
+ * /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
3115
+ * endpoint to complete the login process. The secret sent to the user's phone
3116
+ * is valid for 15 minutes.
3117
+ *
3118
+ * A user is limited to 10 active sessions at a time by default. [Learn more
3119
+ * about session
3120
+ * limits](https://appwrite.io/docs/authentication-security#limits).
3121
+ *
3122
+ * @param {string} userId
3123
+ * @param {string} phone
3124
+ * @throws {AppwriteException}
3125
+ * @returns {Promise}
3126
+ */
3127
+ createPhoneToken(userId: string, phone: string): Promise<Models.Token>;
2386
3128
  /**
2387
3129
  * Create email verification
2388
3130
  *
@@ -2469,14 +3211,14 @@ declare module "node-appwrite" {
2469
3211
  * image at source quality. If dimensions are not specified, the default size
2470
3212
  * of image returned is 100x100px.
2471
3213
  *
2472
- * @param {string} code
3214
+ * @param {Browser} code
2473
3215
  * @param {number} width
2474
3216
  * @param {number} height
2475
3217
  * @param {number} quality
2476
3218
  * @throws {AppwriteException}
2477
3219
  * @returns {Promise}
2478
3220
  */
2479
- getBrowser(code: string, width?: number, height?: number, quality?: number): Promise<Buffer>;
3221
+ getBrowser(code: Browser, width?: number, height?: number, quality?: number): Promise<ArrayBuffer>;
2480
3222
  /**
2481
3223
  * Get credit card icon
2482
3224
  *
@@ -2490,14 +3232,14 @@ declare module "node-appwrite" {
2490
3232
  * of image returned is 100x100px.
2491
3233
  *
2492
3234
  *
2493
- * @param {string} code
3235
+ * @param {CreditCard} code
2494
3236
  * @param {number} width
2495
3237
  * @param {number} height
2496
3238
  * @param {number} quality
2497
3239
  * @throws {AppwriteException}
2498
3240
  * @returns {Promise}
2499
3241
  */
2500
- getCreditCard(code: string, width?: number, height?: number, quality?: number): Promise<Buffer>;
3242
+ getCreditCard(code: CreditCard, width?: number, height?: number, quality?: number): Promise<ArrayBuffer>;
2501
3243
  /**
2502
3244
  * Get favicon
2503
3245
  *
@@ -2509,7 +3251,7 @@ declare module "node-appwrite" {
2509
3251
  * @throws {AppwriteException}
2510
3252
  * @returns {Promise}
2511
3253
  */
2512
- getFavicon(url: string): Promise<Buffer>;
3254
+ getFavicon(url: string): Promise<ArrayBuffer>;
2513
3255
  /**
2514
3256
  * Get country flag
2515
3257
  *
@@ -2524,14 +3266,14 @@ declare module "node-appwrite" {
2524
3266
  * of image returned is 100x100px.
2525
3267
  *
2526
3268
  *
2527
- * @param {string} code
3269
+ * @param {Flag} code
2528
3270
  * @param {number} width
2529
3271
  * @param {number} height
2530
3272
  * @param {number} quality
2531
3273
  * @throws {AppwriteException}
2532
3274
  * @returns {Promise}
2533
3275
  */
2534
- getFlag(code: string, width?: number, height?: number, quality?: number): Promise<Buffer>;
3276
+ getFlag(code: Flag, width?: number, height?: number, quality?: number): Promise<ArrayBuffer>;
2535
3277
  /**
2536
3278
  * Get image from URL
2537
3279
  *
@@ -2552,7 +3294,7 @@ declare module "node-appwrite" {
2552
3294
  * @throws {AppwriteException}
2553
3295
  * @returns {Promise}
2554
3296
  */
2555
- getImage(url: string, width?: number, height?: number): Promise<Buffer>;
3297
+ getImage(url: string, width?: number, height?: number): Promise<ArrayBuffer>;
2556
3298
  /**
2557
3299
  * Get user initials
2558
3300
  *
@@ -2580,7 +3322,7 @@ declare module "node-appwrite" {
2580
3322
  * @throws {AppwriteException}
2581
3323
  * @returns {Promise}
2582
3324
  */
2583
- getInitials(name?: string, width?: number, height?: number, background?: string): Promise<Buffer>;
3325
+ getInitials(name?: string, width?: number, height?: number, background?: string): Promise<ArrayBuffer>;
2584
3326
  /**
2585
3327
  * Get QR code
2586
3328
  *
@@ -2595,7 +3337,7 @@ declare module "node-appwrite" {
2595
3337
  * @throws {AppwriteException}
2596
3338
  * @returns {Promise}
2597
3339
  */
2598
- getQR(text: string, size?: number, margin?: number, download?: boolean): Promise<Buffer>;
3340
+ getQR(text: string, size?: number, margin?: number, download?: boolean): Promise<ArrayBuffer>;
2599
3341
  }
2600
3342
  export class Databases extends Service {
2601
3343
  constructor(client: Client);
@@ -2732,6 +3474,8 @@ declare module "node-appwrite" {
2732
3474
  /**
2733
3475
  * List attributes
2734
3476
  *
3477
+ * List attributes in the collection.
3478
+ *
2735
3479
  * @param {string} databaseId
2736
3480
  * @param {string} collectionId
2737
3481
  * @param {string[]} queries
@@ -2758,6 +3502,9 @@ declare module "node-appwrite" {
2758
3502
  /**
2759
3503
  * Update boolean attribute
2760
3504
  *
3505
+ * Update a boolean attribute. Changing the `default` value will not update
3506
+ * already existing documents.
3507
+ *
2761
3508
  * @param {string} databaseId
2762
3509
  * @param {string} collectionId
2763
3510
  * @param {string} key
@@ -2770,6 +3517,8 @@ declare module "node-appwrite" {
2770
3517
  /**
2771
3518
  * Create datetime attribute
2772
3519
  *
3520
+ * Create a date time attribute according to the ISO 8601 standard.
3521
+ *
2773
3522
  * @param {string} databaseId
2774
3523
  * @param {string} collectionId
2775
3524
  * @param {string} key
@@ -2783,6 +3532,9 @@ declare module "node-appwrite" {
2783
3532
  /**
2784
3533
  * Update dateTime attribute
2785
3534
  *
3535
+ * Update a date time attribute. Changing the `default` value will not update
3536
+ * already existing documents.
3537
+ *
2786
3538
  * @param {string} databaseId
2787
3539
  * @param {string} collectionId
2788
3540
  * @param {string} key
@@ -2827,6 +3579,10 @@ declare module "node-appwrite" {
2827
3579
  /**
2828
3580
  * Create enum attribute
2829
3581
  *
3582
+ * Create an enumeration attribute. The `elements` param acts as a white-list
3583
+ * of accepted values for this attribute.
3584
+ *
3585
+ *
2830
3586
  * @param {string} databaseId
2831
3587
  * @param {string} collectionId
2832
3588
  * @param {string} key
@@ -2971,15 +3727,15 @@ declare module "node-appwrite" {
2971
3727
  * @param {string} databaseId
2972
3728
  * @param {string} collectionId
2973
3729
  * @param {string} relatedCollectionId
2974
- * @param {string} type
3730
+ * @param {RelationshipType} type
2975
3731
  * @param {boolean} twoWay
2976
3732
  * @param {string} key
2977
3733
  * @param {string} twoWayKey
2978
- * @param {string} onDelete
3734
+ * @param {RelationMutate} onDelete
2979
3735
  * @throws {AppwriteException}
2980
3736
  * @returns {Promise}
2981
3737
  */
2982
- createRelationshipAttribute(databaseId: string, collectionId: string, relatedCollectionId: string, type: string, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: string): Promise<Models.AttributeRelationship>;
3738
+ createRelationshipAttribute(databaseId: string, collectionId: string, relatedCollectionId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate): Promise<Models.AttributeRelationship>;
2983
3739
  /**
2984
3740
  * Create string attribute
2985
3741
  *
@@ -3049,6 +3805,8 @@ declare module "node-appwrite" {
3049
3805
  /**
3050
3806
  * Get attribute
3051
3807
  *
3808
+ * Get attribute by ID.
3809
+ *
3052
3810
  * @param {string} databaseId
3053
3811
  * @param {string} collectionId
3054
3812
  * @param {string} key
@@ -3059,6 +3817,8 @@ declare module "node-appwrite" {
3059
3817
  /**
3060
3818
  * Delete attribute
3061
3819
  *
3820
+ * Deletes an attribute.
3821
+ *
3062
3822
  * @param {string} databaseId
3063
3823
  * @param {string} collectionId
3064
3824
  * @param {string} key
@@ -3076,11 +3836,11 @@ declare module "node-appwrite" {
3076
3836
  * @param {string} databaseId
3077
3837
  * @param {string} collectionId
3078
3838
  * @param {string} key
3079
- * @param {string} onDelete
3839
+ * @param {RelationMutate} onDelete
3080
3840
  * @throws {AppwriteException}
3081
3841
  * @returns {Promise}
3082
3842
  */
3083
- updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: string): Promise<Models.AttributeRelationship>;
3843
+ updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate): Promise<Models.AttributeRelationship>;
3084
3844
  /**
3085
3845
  * List documents
3086
3846
  *
@@ -3155,6 +3915,8 @@ declare module "node-appwrite" {
3155
3915
  /**
3156
3916
  * List indexes
3157
3917
  *
3918
+ * List indexes in the collection.
3919
+ *
3158
3920
  * @param {string} databaseId
3159
3921
  * @param {string} collectionId
3160
3922
  * @param {string[]} queries
@@ -3165,19 +3927,25 @@ declare module "node-appwrite" {
3165
3927
  /**
3166
3928
  * Create index
3167
3929
  *
3930
+ * Creates an index on the attributes listed. Your index should include all
3931
+ * the attributes you will query in a single request.
3932
+ * Attributes can be `key`, `fulltext`, and `unique`.
3933
+ *
3168
3934
  * @param {string} databaseId
3169
3935
  * @param {string} collectionId
3170
3936
  * @param {string} key
3171
- * @param {string} type
3937
+ * @param {IndexType} type
3172
3938
  * @param {string[]} attributes
3173
3939
  * @param {string[]} orders
3174
3940
  * @throws {AppwriteException}
3175
3941
  * @returns {Promise}
3176
3942
  */
3177
- createIndex(databaseId: string, collectionId: string, key: string, type: string, attributes: string[], orders?: string[]): Promise<Models.Index>;
3943
+ createIndex(databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[]): Promise<Models.Index>;
3178
3944
  /**
3179
3945
  * Get index
3180
3946
  *
3947
+ * Get index by ID.
3948
+ *
3181
3949
  * @param {string} databaseId
3182
3950
  * @param {string} collectionId
3183
3951
  * @param {string} key
@@ -3188,6 +3956,8 @@ declare module "node-appwrite" {
3188
3956
  /**
3189
3957
  * Delete index
3190
3958
  *
3959
+ * Delete an index.
3960
+ *
3191
3961
  * @param {string} databaseId
3192
3962
  * @param {string} collectionId
3193
3963
  * @param {string} key
@@ -3221,7 +3991,7 @@ declare module "node-appwrite" {
3221
3991
  *
3222
3992
  * @param {string} functionId
3223
3993
  * @param {string} name
3224
- * @param {string} runtime
3994
+ * @param {Runtime} runtime
3225
3995
  * @param {string[]} execute
3226
3996
  * @param {string[]} events
3227
3997
  * @param {string} schedule
@@ -3242,7 +4012,7 @@ declare module "node-appwrite" {
3242
4012
  * @throws {AppwriteException}
3243
4013
  * @returns {Promise}
3244
4014
  */
3245
- create(functionId: string, name: string, runtime: string, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, templateRepository?: string, templateOwner?: string, templateRootDirectory?: string, templateBranch?: string): Promise<Models.Function>;
4015
+ create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, templateRepository?: string, templateOwner?: string, templateRootDirectory?: string, templateBranch?: string): Promise<Models.Function>;
3246
4016
  /**
3247
4017
  * List runtimes
3248
4018
  *
@@ -3269,7 +4039,7 @@ declare module "node-appwrite" {
3269
4039
  *
3270
4040
  * @param {string} functionId
3271
4041
  * @param {string} name
3272
- * @param {string} runtime
4042
+ * @param {Runtime} runtime
3273
4043
  * @param {string[]} execute
3274
4044
  * @param {string[]} events
3275
4045
  * @param {string} schedule
@@ -3286,7 +4056,7 @@ declare module "node-appwrite" {
3286
4056
  * @throws {AppwriteException}
3287
4057
  * @returns {Promise}
3288
4058
  */
3289
- update(functionId: string, name: string, runtime?: string, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string): Promise<Models.Function>;
4059
+ update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string): Promise<Models.Function>;
3290
4060
  /**
3291
4061
  * Delete function
3292
4062
  *
@@ -3392,7 +4162,7 @@ declare module "node-appwrite" {
3392
4162
  * @throws {AppwriteException}
3393
4163
  * @returns {Promise}
3394
4164
  */
3395
- downloadDeployment(functionId: string, deploymentId: string): Promise<Buffer>;
4165
+ downloadDeployment(functionId: string, deploymentId: string): Promise<ArrayBuffer>;
3396
4166
  /**
3397
4167
  * List executions
3398
4168
  *
@@ -3418,12 +4188,12 @@ declare module "node-appwrite" {
3418
4188
  * @param {string} body
3419
4189
  * @param {boolean} async
3420
4190
  * @param {string} path
3421
- * @param {string} method
4191
+ * @param {ExecutionMethod} method
3422
4192
  * @param {object} headers
3423
4193
  * @throws {AppwriteException}
3424
4194
  * @returns {Promise}
3425
4195
  */
3426
- createExecution(functionId: string, body?: string, async?: boolean, xpath?: string, method?: string, headers?: object): Promise<Models.Execution>;
4196
+ createExecution(functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object): Promise<Models.Execution>;
3427
4197
  /**
3428
4198
  * Get execution
3429
4199
  *
@@ -3549,6 +4319,16 @@ declare module "node-appwrite" {
3549
4319
  * @returns {Promise}
3550
4320
  */
3551
4321
  getCache(): Promise<Models.HealthStatus>;
4322
+ /**
4323
+ * Get the SSL certificate for a domain
4324
+ *
4325
+ * Get the SSL certificate for a domain
4326
+ *
4327
+ * @param {string} domain
4328
+ * @throws {AppwriteException}
4329
+ * @returns {Promise}
4330
+ */
4331
+ getCertificate(domain?: string): Promise<Models.HealthCertificate>;
3552
4332
  /**
3553
4333
  * Get DB
3554
4334
  *
@@ -3623,9 +4403,24 @@ declare module "node-appwrite" {
3623
4403
  * @returns {Promise}
3624
4404
  */
3625
4405
  getQueueDeletes(threshold?: number): Promise<Models.HealthQueue>;
4406
+ /**
4407
+ * Get number of failed queue jobs
4408
+ *
4409
+ * Returns the amount of failed jobs in a given queue.
4410
+ *
4411
+ *
4412
+ * @param {Name} name
4413
+ * @param {number} threshold
4414
+ * @throws {AppwriteException}
4415
+ * @returns {Promise}
4416
+ */
4417
+ getFailedJobs(name: Name, threshold?: number): Promise<Models.HealthQueue>;
3626
4418
  /**
3627
4419
  * Get functions queue
3628
4420
  *
4421
+ * Get the number of function executions that are waiting to be processed in
4422
+ * the Appwrite internal queue server.
4423
+ *
3629
4424
  * @param {number} threshold
3630
4425
  * @throws {AppwriteException}
3631
4426
  * @returns {Promise}
@@ -3675,6 +4470,28 @@ declare module "node-appwrite" {
3675
4470
  * @returns {Promise}
3676
4471
  */
3677
4472
  getQueueMigrations(threshold?: number): Promise<Models.HealthQueue>;
4473
+ /**
4474
+ * Get usage queue
4475
+ *
4476
+ * Get the number of metrics that are waiting to be processed in the Appwrite
4477
+ * internal queue server.
4478
+ *
4479
+ * @param {number} threshold
4480
+ * @throws {AppwriteException}
4481
+ * @returns {Promise}
4482
+ */
4483
+ getQueueUsage(threshold?: number): Promise<Models.HealthQueue>;
4484
+ /**
4485
+ * Get usage dump queue
4486
+ *
4487
+ * Get the number of projects containing metrics that are waiting to be
4488
+ * processed in the Appwrite internal queue server.
4489
+ *
4490
+ * @param {number} threshold
4491
+ * @throws {AppwriteException}
4492
+ * @returns {Promise}
4493
+ */
4494
+ getQueueUsageDump(threshold?: number): Promise<Models.HealthQueue>;
3678
4495
  /**
3679
4496
  * Get webhooks queue
3680
4497
  *
@@ -3686,6 +4503,15 @@ declare module "node-appwrite" {
3686
4503
  * @returns {Promise}
3687
4504
  */
3688
4505
  getQueueWebhooks(threshold?: number): Promise<Models.HealthQueue>;
4506
+ /**
4507
+ * Get storage
4508
+ *
4509
+ * Check the Appwrite storage device is up and connection is successful.
4510
+ *
4511
+ * @throws {AppwriteException}
4512
+ * @returns {Promise}
4513
+ */
4514
+ getStorage(): Promise<Models.HealthStatus>;
3689
4515
  /**
3690
4516
  * Get local storage
3691
4517
  *
@@ -3800,70 +4626,752 @@ declare module "node-appwrite" {
3800
4626
  */
3801
4627
  listLanguages(): Promise<Models.LanguageList>;
3802
4628
  }
3803
- export class Storage extends Service {
4629
+ export class Messaging extends Service {
3804
4630
  constructor(client: Client);
3805
4631
 
3806
4632
  /**
3807
- * List buckets
4633
+ * List messages
3808
4634
  *
3809
- * Get a list of all the storage buckets. You can use the query params to
3810
- * filter your results.
4635
+ * Get a list of all messages from the current Appwrite project.
3811
4636
  *
3812
4637
  * @param {string[]} queries
3813
4638
  * @param {string} search
3814
4639
  * @throws {AppwriteException}
3815
4640
  * @returns {Promise}
3816
4641
  */
3817
- listBuckets(queries?: string[], search?: string): Promise<Models.BucketList>;
4642
+ listMessages(queries?: string[], search?: string): Promise<Models.MessageList>;
3818
4643
  /**
3819
- * Create bucket
4644
+ * Create email
3820
4645
  *
3821
- * Create a new storage bucket.
4646
+ * Create a new email message.
3822
4647
  *
3823
- * @param {string} bucketId
3824
- * @param {string} name
3825
- * @param {string[]} permissions
3826
- * @param {boolean} fileSecurity
3827
- * @param {boolean} enabled
3828
- * @param {number} maximumFileSize
3829
- * @param {string[]} allowedFileExtensions
3830
- * @param {string} compression
3831
- * @param {boolean} encryption
3832
- * @param {boolean} antivirus
4648
+ * @param {string} messageId
4649
+ * @param {string} subject
4650
+ * @param {string} content
4651
+ * @param {string[]} topics
4652
+ * @param {string[]} users
4653
+ * @param {string[]} targets
4654
+ * @param {string[]} cc
4655
+ * @param {string[]} bcc
4656
+ * @param {string[]} attachments
4657
+ * @param {boolean} draft
4658
+ * @param {boolean} html
4659
+ * @param {string} scheduledAt
3833
4660
  * @throws {AppwriteException}
3834
4661
  * @returns {Promise}
3835
4662
  */
3836
- createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: string, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket>;
4663
+ createEmail(messageId: string, subject: string, content: string, topics?: string[], users?: string[], targets?: string[], cc?: string[], bcc?: string[], attachments?: string[], draft?: boolean, html?: boolean, scheduledAt?: string): Promise<Models.Message>;
3837
4664
  /**
3838
- * Get bucket
4665
+ * Update email
3839
4666
  *
3840
- * Get a storage bucket by its unique ID. This endpoint response returns a
3841
- * JSON object with the storage bucket metadata.
4667
+ * Update an email message by its unique ID.
4668
+ *
3842
4669
  *
3843
- * @param {string} bucketId
4670
+ * @param {string} messageId
4671
+ * @param {string[]} topics
4672
+ * @param {string[]} users
4673
+ * @param {string[]} targets
4674
+ * @param {string} subject
4675
+ * @param {string} content
4676
+ * @param {boolean} draft
4677
+ * @param {boolean} html
4678
+ * @param {string[]} cc
4679
+ * @param {string[]} bcc
4680
+ * @param {string} scheduledAt
3844
4681
  * @throws {AppwriteException}
3845
4682
  * @returns {Promise}
3846
4683
  */
3847
- getBucket(bucketId: string): Promise<Models.Bucket>;
4684
+ updateEmail(messageId: string, topics?: string[], users?: string[], targets?: string[], subject?: string, content?: string, draft?: boolean, html?: boolean, cc?: string[], bcc?: string[], scheduledAt?: string): Promise<Models.Message>;
3848
4685
  /**
3849
- * Update bucket
4686
+ * Create push notification
3850
4687
  *
3851
- * Update a storage bucket by its unique ID.
4688
+ * Create a new push notification.
3852
4689
  *
3853
- * @param {string} bucketId
3854
- * @param {string} name
3855
- * @param {string[]} permissions
3856
- * @param {boolean} fileSecurity
3857
- * @param {boolean} enabled
3858
- * @param {number} maximumFileSize
3859
- * @param {string[]} allowedFileExtensions
3860
- * @param {string} compression
4690
+ * @param {string} messageId
4691
+ * @param {string} title
4692
+ * @param {string} body
4693
+ * @param {string[]} topics
4694
+ * @param {string[]} users
4695
+ * @param {string[]} targets
4696
+ * @param {object} data
4697
+ * @param {string} action
4698
+ * @param {string} image
4699
+ * @param {string} icon
4700
+ * @param {string} sound
4701
+ * @param {string} color
4702
+ * @param {string} tag
4703
+ * @param {string} badge
4704
+ * @param {boolean} draft
4705
+ * @param {string} scheduledAt
4706
+ * @throws {AppwriteException}
4707
+ * @returns {Promise}
4708
+ */
4709
+ createPush(messageId: string, title: string, body: string, topics?: string[], users?: string[], targets?: string[], data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: string, draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
4710
+ /**
4711
+ * Update push notification
4712
+ *
4713
+ * Update a push notification by its unique ID.
4714
+ *
4715
+ *
4716
+ * @param {string} messageId
4717
+ * @param {string[]} topics
4718
+ * @param {string[]} users
4719
+ * @param {string[]} targets
4720
+ * @param {string} title
4721
+ * @param {string} body
4722
+ * @param {object} data
4723
+ * @param {string} action
4724
+ * @param {string} image
4725
+ * @param {string} icon
4726
+ * @param {string} sound
4727
+ * @param {string} color
4728
+ * @param {string} tag
4729
+ * @param {number} badge
4730
+ * @param {boolean} draft
4731
+ * @param {string} scheduledAt
4732
+ * @throws {AppwriteException}
4733
+ * @returns {Promise}
4734
+ */
4735
+ updatePush(messageId: string, topics?: string[], users?: string[], targets?: string[], title?: string, body?: string, data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
4736
+ /**
4737
+ * Create SMS
4738
+ *
4739
+ * Create a new SMS message.
4740
+ *
4741
+ * @param {string} messageId
4742
+ * @param {string} content
4743
+ * @param {string[]} topics
4744
+ * @param {string[]} users
4745
+ * @param {string[]} targets
4746
+ * @param {boolean} draft
4747
+ * @param {string} scheduledAt
4748
+ * @throws {AppwriteException}
4749
+ * @returns {Promise}
4750
+ */
4751
+ createSms(messageId: string, content: string, topics?: string[], users?: string[], targets?: string[], draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
4752
+ /**
4753
+ * Update SMS
4754
+ *
4755
+ * Update an email message by its unique ID.
4756
+ *
4757
+ *
4758
+ * @param {string} messageId
4759
+ * @param {string[]} topics
4760
+ * @param {string[]} users
4761
+ * @param {string[]} targets
4762
+ * @param {string} content
4763
+ * @param {boolean} draft
4764
+ * @param {string} scheduledAt
4765
+ * @throws {AppwriteException}
4766
+ * @returns {Promise}
4767
+ */
4768
+ updateSms(messageId: string, topics?: string[], users?: string[], targets?: string[], content?: string, draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
4769
+ /**
4770
+ * Get message
4771
+ *
4772
+ * Get a message by its unique ID.
4773
+ *
4774
+ *
4775
+ * @param {string} messageId
4776
+ * @throws {AppwriteException}
4777
+ * @returns {Promise}
4778
+ */
4779
+ getMessage(messageId: string): Promise<Models.Message>;
4780
+ /**
4781
+ * Delete message
4782
+ *
4783
+ * Delete a message. If the message is not a draft or scheduled, but has been
4784
+ * sent, this will not recall the message.
4785
+ *
4786
+ * @param {string} messageId
4787
+ * @throws {AppwriteException}
4788
+ * @returns {Promise}
4789
+ */
4790
+ delete(messageId: string): Promise<string>;
4791
+ /**
4792
+ * List message logs
4793
+ *
4794
+ * Get the message activity logs listed by its unique ID.
4795
+ *
4796
+ * @param {string} messageId
4797
+ * @param {string[]} queries
4798
+ * @throws {AppwriteException}
4799
+ * @returns {Promise}
4800
+ */
4801
+ listMessageLogs(messageId: string, queries?: string[]): Promise<Models.LogList>;
4802
+ /**
4803
+ * List message targets
4804
+ *
4805
+ * Get a list of the targets associated with a message.
4806
+ *
4807
+ * @param {string} messageId
4808
+ * @param {string[]} queries
4809
+ * @throws {AppwriteException}
4810
+ * @returns {Promise}
4811
+ */
4812
+ listTargets(messageId: string, queries?: string[]): Promise<Models.TargetList>;
4813
+ /**
4814
+ * List providers
4815
+ *
4816
+ * Get a list of all providers from the current Appwrite project.
4817
+ *
4818
+ * @param {string[]} queries
4819
+ * @param {string} search
4820
+ * @throws {AppwriteException}
4821
+ * @returns {Promise}
4822
+ */
4823
+ listProviders(queries?: string[], search?: string): Promise<Models.ProviderList>;
4824
+ /**
4825
+ * Create APNS provider
4826
+ *
4827
+ * Create a new Apple Push Notification service provider.
4828
+ *
4829
+ * @param {string} providerId
4830
+ * @param {string} name
4831
+ * @param {string} authKey
4832
+ * @param {string} authKeyId
4833
+ * @param {string} teamId
4834
+ * @param {string} bundleId
4835
+ * @param {boolean} sandbox
4836
+ * @param {boolean} enabled
4837
+ * @throws {AppwriteException}
4838
+ * @returns {Promise}
4839
+ */
4840
+ createApnsProvider(providerId: string, name: string, authKey?: string, authKeyId?: string, teamId?: string, bundleId?: string, sandbox?: boolean, enabled?: boolean): Promise<Models.Provider>;
4841
+ /**
4842
+ * Update APNS provider
4843
+ *
4844
+ * Update a Apple Push Notification service provider by its unique ID.
4845
+ *
4846
+ * @param {string} providerId
4847
+ * @param {string} name
4848
+ * @param {boolean} enabled
4849
+ * @param {string} authKey
4850
+ * @param {string} authKeyId
4851
+ * @param {string} teamId
4852
+ * @param {string} bundleId
4853
+ * @param {boolean} sandbox
4854
+ * @throws {AppwriteException}
4855
+ * @returns {Promise}
4856
+ */
4857
+ updateApnsProvider(providerId: string, name?: string, enabled?: boolean, authKey?: string, authKeyId?: string, teamId?: string, bundleId?: string, sandbox?: boolean): Promise<Models.Provider>;
4858
+ /**
4859
+ * Create FCM provider
4860
+ *
4861
+ * Create a new Firebase Cloud Messaging provider.
4862
+ *
4863
+ * @param {string} providerId
4864
+ * @param {string} name
4865
+ * @param {object} serviceAccountJSON
4866
+ * @param {boolean} enabled
4867
+ * @throws {AppwriteException}
4868
+ * @returns {Promise}
4869
+ */
4870
+ createFcmProvider(providerId: string, name: string, serviceAccountJSON?: object, enabled?: boolean): Promise<Models.Provider>;
4871
+ /**
4872
+ * Update FCM provider
4873
+ *
4874
+ * Update a Firebase Cloud Messaging provider by its unique ID.
4875
+ *
4876
+ * @param {string} providerId
4877
+ * @param {string} name
4878
+ * @param {boolean} enabled
4879
+ * @param {object} serviceAccountJSON
4880
+ * @throws {AppwriteException}
4881
+ * @returns {Promise}
4882
+ */
4883
+ updateFcmProvider(providerId: string, name?: string, enabled?: boolean, serviceAccountJSON?: object): Promise<Models.Provider>;
4884
+ /**
4885
+ * Create Mailgun provider
4886
+ *
4887
+ * Create a new Mailgun provider.
4888
+ *
4889
+ * @param {string} providerId
4890
+ * @param {string} name
4891
+ * @param {string} apiKey
4892
+ * @param {string} domain
4893
+ * @param {boolean} isEuRegion
4894
+ * @param {string} fromName
4895
+ * @param {string} fromEmail
4896
+ * @param {string} replyToName
4897
+ * @param {string} replyToEmail
4898
+ * @param {boolean} enabled
4899
+ * @throws {AppwriteException}
4900
+ * @returns {Promise}
4901
+ */
4902
+ createMailgunProvider(providerId: string, name: string, apiKey?: string, domain?: string, isEuRegion?: boolean, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider>;
4903
+ /**
4904
+ * Update Mailgun provider
4905
+ *
4906
+ * Update a Mailgun provider by its unique ID.
4907
+ *
4908
+ * @param {string} providerId
4909
+ * @param {string} name
4910
+ * @param {string} apiKey
4911
+ * @param {string} domain
4912
+ * @param {boolean} isEuRegion
4913
+ * @param {boolean} enabled
4914
+ * @param {string} fromName
4915
+ * @param {string} fromEmail
4916
+ * @param {string} replyToName
4917
+ * @param {string} replyToEmail
4918
+ * @throws {AppwriteException}
4919
+ * @returns {Promise}
4920
+ */
4921
+ updateMailgunProvider(providerId: string, name?: string, apiKey?: string, domain?: string, isEuRegion?: boolean, enabled?: boolean, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string): Promise<Models.Provider>;
4922
+ /**
4923
+ * Create Msg91 provider
4924
+ *
4925
+ * Create a new MSG91 provider.
4926
+ *
4927
+ * @param {string} providerId
4928
+ * @param {string} name
4929
+ * @param {string} from
4930
+ * @param {string} senderId
4931
+ * @param {string} authKey
4932
+ * @param {boolean} enabled
4933
+ * @throws {AppwriteException}
4934
+ * @returns {Promise}
4935
+ */
4936
+ createMsg91Provider(providerId: string, name: string, from?: string, senderId?: string, authKey?: string, enabled?: boolean): Promise<Models.Provider>;
4937
+ /**
4938
+ * Update Msg91 provider
4939
+ *
4940
+ * Update a MSG91 provider by its unique ID.
4941
+ *
4942
+ * @param {string} providerId
4943
+ * @param {string} name
4944
+ * @param {boolean} enabled
4945
+ * @param {string} senderId
4946
+ * @param {string} authKey
4947
+ * @param {string} from
4948
+ * @throws {AppwriteException}
4949
+ * @returns {Promise}
4950
+ */
4951
+ updateMsg91Provider(providerId: string, name?: string, enabled?: boolean, senderId?: string, authKey?: string, from?: string): Promise<Models.Provider>;
4952
+ /**
4953
+ * Create Sendgrid provider
4954
+ *
4955
+ * Create a new Sendgrid provider.
4956
+ *
4957
+ * @param {string} providerId
4958
+ * @param {string} name
4959
+ * @param {string} apiKey
4960
+ * @param {string} fromName
4961
+ * @param {string} fromEmail
4962
+ * @param {string} replyToName
4963
+ * @param {string} replyToEmail
4964
+ * @param {boolean} enabled
4965
+ * @throws {AppwriteException}
4966
+ * @returns {Promise}
4967
+ */
4968
+ createSendgridProvider(providerId: string, name: string, apiKey?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider>;
4969
+ /**
4970
+ * Update Sendgrid provider
4971
+ *
4972
+ * Update a Sendgrid provider by its unique ID.
4973
+ *
4974
+ * @param {string} providerId
4975
+ * @param {string} name
4976
+ * @param {boolean} enabled
4977
+ * @param {string} apiKey
4978
+ * @param {string} fromName
4979
+ * @param {string} fromEmail
4980
+ * @param {string} replyToName
4981
+ * @param {string} replyToEmail
4982
+ * @throws {AppwriteException}
4983
+ * @returns {Promise}
4984
+ */
4985
+ updateSendgridProvider(providerId: string, name?: string, enabled?: boolean, apiKey?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string): Promise<Models.Provider>;
4986
+ /**
4987
+ * Create SMTP provider
4988
+ *
4989
+ * Create a new SMTP provider.
4990
+ *
4991
+ * @param {string} providerId
4992
+ * @param {string} name
4993
+ * @param {string} host
4994
+ * @param {number} port
4995
+ * @param {string} username
4996
+ * @param {string} password
4997
+ * @param {SmtpEncryption} encryption
4998
+ * @param {boolean} autoTLS
4999
+ * @param {string} mailer
5000
+ * @param {string} fromName
5001
+ * @param {string} fromEmail
5002
+ * @param {string} replyToName
5003
+ * @param {string} replyToEmail
5004
+ * @param {boolean} enabled
5005
+ * @throws {AppwriteException}
5006
+ * @returns {Promise}
5007
+ */
5008
+ createSmtpProvider(providerId: string, name: string, host: string, port?: number, username?: string, password?: string, encryption?: SmtpEncryption, autoTLS?: boolean, mailer?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider>;
5009
+ /**
5010
+ * Update SMTP provider
5011
+ *
5012
+ * Update a SMTP provider by its unique ID.
5013
+ *
5014
+ * @param {string} providerId
5015
+ * @param {string} name
5016
+ * @param {string} host
5017
+ * @param {number} port
5018
+ * @param {string} username
5019
+ * @param {string} password
5020
+ * @param {SmtpEncryption} encryption
5021
+ * @param {boolean} autoTLS
5022
+ * @param {string} mailer
5023
+ * @param {string} fromName
5024
+ * @param {string} fromEmail
5025
+ * @param {string} replyToName
5026
+ * @param {string} replyToEmail
5027
+ * @param {boolean} enabled
5028
+ * @throws {AppwriteException}
5029
+ * @returns {Promise}
5030
+ */
5031
+ updateSmtpProvider(providerId: string, name?: string, host?: string, port?: number, username?: string, password?: string, encryption?: SmtpEncryption, autoTLS?: boolean, mailer?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider>;
5032
+ /**
5033
+ * Create Telesign provider
5034
+ *
5035
+ * Create a new Telesign provider.
5036
+ *
5037
+ * @param {string} providerId
5038
+ * @param {string} name
5039
+ * @param {string} from
5040
+ * @param {string} customerId
5041
+ * @param {string} apiKey
5042
+ * @param {boolean} enabled
5043
+ * @throws {AppwriteException}
5044
+ * @returns {Promise}
5045
+ */
5046
+ createTelesignProvider(providerId: string, name: string, from?: string, customerId?: string, apiKey?: string, enabled?: boolean): Promise<Models.Provider>;
5047
+ /**
5048
+ * Update Telesign provider
5049
+ *
5050
+ * Update a Telesign provider by its unique ID.
5051
+ *
5052
+ * @param {string} providerId
5053
+ * @param {string} name
5054
+ * @param {boolean} enabled
5055
+ * @param {string} customerId
5056
+ * @param {string} apiKey
5057
+ * @param {string} from
5058
+ * @throws {AppwriteException}
5059
+ * @returns {Promise}
5060
+ */
5061
+ updateTelesignProvider(providerId: string, name?: string, enabled?: boolean, customerId?: string, apiKey?: string, from?: string): Promise<Models.Provider>;
5062
+ /**
5063
+ * Create Textmagic provider
5064
+ *
5065
+ * Create a new Textmagic provider.
5066
+ *
5067
+ * @param {string} providerId
5068
+ * @param {string} name
5069
+ * @param {string} from
5070
+ * @param {string} username
5071
+ * @param {string} apiKey
5072
+ * @param {boolean} enabled
5073
+ * @throws {AppwriteException}
5074
+ * @returns {Promise}
5075
+ */
5076
+ createTextmagicProvider(providerId: string, name: string, from?: string, username?: string, apiKey?: string, enabled?: boolean): Promise<Models.Provider>;
5077
+ /**
5078
+ * Update Textmagic provider
5079
+ *
5080
+ * Update a Textmagic provider by its unique ID.
5081
+ *
5082
+ * @param {string} providerId
5083
+ * @param {string} name
5084
+ * @param {boolean} enabled
5085
+ * @param {string} username
5086
+ * @param {string} apiKey
5087
+ * @param {string} from
5088
+ * @throws {AppwriteException}
5089
+ * @returns {Promise}
5090
+ */
5091
+ updateTextmagicProvider(providerId: string, name?: string, enabled?: boolean, username?: string, apiKey?: string, from?: string): Promise<Models.Provider>;
5092
+ /**
5093
+ * Create Twilio provider
5094
+ *
5095
+ * Create a new Twilio provider.
5096
+ *
5097
+ * @param {string} providerId
5098
+ * @param {string} name
5099
+ * @param {string} from
5100
+ * @param {string} accountSid
5101
+ * @param {string} authToken
5102
+ * @param {boolean} enabled
5103
+ * @throws {AppwriteException}
5104
+ * @returns {Promise}
5105
+ */
5106
+ createTwilioProvider(providerId: string, name: string, from?: string, accountSid?: string, authToken?: string, enabled?: boolean): Promise<Models.Provider>;
5107
+ /**
5108
+ * Update Twilio provider
5109
+ *
5110
+ * Update a Twilio provider by its unique ID.
5111
+ *
5112
+ * @param {string} providerId
5113
+ * @param {string} name
5114
+ * @param {boolean} enabled
5115
+ * @param {string} accountSid
5116
+ * @param {string} authToken
5117
+ * @param {string} from
5118
+ * @throws {AppwriteException}
5119
+ * @returns {Promise}
5120
+ */
5121
+ updateTwilioProvider(providerId: string, name?: string, enabled?: boolean, accountSid?: string, authToken?: string, from?: string): Promise<Models.Provider>;
5122
+ /**
5123
+ * Create Vonage provider
5124
+ *
5125
+ * Create a new Vonage provider.
5126
+ *
5127
+ * @param {string} providerId
5128
+ * @param {string} name
5129
+ * @param {string} from
5130
+ * @param {string} apiKey
5131
+ * @param {string} apiSecret
5132
+ * @param {boolean} enabled
5133
+ * @throws {AppwriteException}
5134
+ * @returns {Promise}
5135
+ */
5136
+ createVonageProvider(providerId: string, name: string, from?: string, apiKey?: string, apiSecret?: string, enabled?: boolean): Promise<Models.Provider>;
5137
+ /**
5138
+ * Update Vonage provider
5139
+ *
5140
+ * Update a Vonage provider by its unique ID.
5141
+ *
5142
+ * @param {string} providerId
5143
+ * @param {string} name
5144
+ * @param {boolean} enabled
5145
+ * @param {string} apiKey
5146
+ * @param {string} apiSecret
5147
+ * @param {string} from
5148
+ * @throws {AppwriteException}
5149
+ * @returns {Promise}
5150
+ */
5151
+ updateVonageProvider(providerId: string, name?: string, enabled?: boolean, apiKey?: string, apiSecret?: string, from?: string): Promise<Models.Provider>;
5152
+ /**
5153
+ * Get provider
5154
+ *
5155
+ * Get a provider by its unique ID.
5156
+ *
5157
+ *
5158
+ * @param {string} providerId
5159
+ * @throws {AppwriteException}
5160
+ * @returns {Promise}
5161
+ */
5162
+ getProvider(providerId: string): Promise<Models.Provider>;
5163
+ /**
5164
+ * Delete provider
5165
+ *
5166
+ * Delete a provider by its unique ID.
5167
+ *
5168
+ * @param {string} providerId
5169
+ * @throws {AppwriteException}
5170
+ * @returns {Promise}
5171
+ */
5172
+ deleteProvider(providerId: string): Promise<string>;
5173
+ /**
5174
+ * List provider logs
5175
+ *
5176
+ * Get the provider activity logs listed by its unique ID.
5177
+ *
5178
+ * @param {string} providerId
5179
+ * @param {string[]} queries
5180
+ * @throws {AppwriteException}
5181
+ * @returns {Promise}
5182
+ */
5183
+ listProviderLogs(providerId: string, queries?: string[]): Promise<Models.LogList>;
5184
+ /**
5185
+ * List subscriber logs
5186
+ *
5187
+ * Get the subscriber activity logs listed by its unique ID.
5188
+ *
5189
+ * @param {string} subscriberId
5190
+ * @param {string[]} queries
5191
+ * @throws {AppwriteException}
5192
+ * @returns {Promise}
5193
+ */
5194
+ listSubscriberLogs(subscriberId: string, queries?: string[]): Promise<Models.LogList>;
5195
+ /**
5196
+ * List topics
5197
+ *
5198
+ * Get a list of all topics from the current Appwrite project.
5199
+ *
5200
+ * @param {string[]} queries
5201
+ * @param {string} search
5202
+ * @throws {AppwriteException}
5203
+ * @returns {Promise}
5204
+ */
5205
+ listTopics(queries?: string[], search?: string): Promise<Models.TopicList>;
5206
+ /**
5207
+ * Create topic
5208
+ *
5209
+ * Create a new topic.
5210
+ *
5211
+ * @param {string} topicId
5212
+ * @param {string} name
5213
+ * @param {string[]} subscribe
5214
+ * @throws {AppwriteException}
5215
+ * @returns {Promise}
5216
+ */
5217
+ createTopic(topicId: string, name: string, subscribe?: string[]): Promise<Models.Topic>;
5218
+ /**
5219
+ * Get topic
5220
+ *
5221
+ * Get a topic by its unique ID.
5222
+ *
5223
+ *
5224
+ * @param {string} topicId
5225
+ * @throws {AppwriteException}
5226
+ * @returns {Promise}
5227
+ */
5228
+ getTopic(topicId: string): Promise<Models.Topic>;
5229
+ /**
5230
+ * Update topic
5231
+ *
5232
+ * Update a topic by its unique ID.
5233
+ *
5234
+ *
5235
+ * @param {string} topicId
5236
+ * @param {string} name
5237
+ * @param {string[]} subscribe
5238
+ * @throws {AppwriteException}
5239
+ * @returns {Promise}
5240
+ */
5241
+ updateTopic(topicId: string, name?: string, subscribe?: string[]): Promise<Models.Topic>;
5242
+ /**
5243
+ * Delete topic
5244
+ *
5245
+ * Delete a topic by its unique ID.
5246
+ *
5247
+ * @param {string} topicId
5248
+ * @throws {AppwriteException}
5249
+ * @returns {Promise}
5250
+ */
5251
+ deleteTopic(topicId: string): Promise<string>;
5252
+ /**
5253
+ * List topic logs
5254
+ *
5255
+ * Get the topic activity logs listed by its unique ID.
5256
+ *
5257
+ * @param {string} topicId
5258
+ * @param {string[]} queries
5259
+ * @throws {AppwriteException}
5260
+ * @returns {Promise}
5261
+ */
5262
+ listTopicLogs(topicId: string, queries?: string[]): Promise<Models.LogList>;
5263
+ /**
5264
+ * List subscribers
5265
+ *
5266
+ * Get a list of all subscribers from the current Appwrite project.
5267
+ *
5268
+ * @param {string} topicId
5269
+ * @param {string[]} queries
5270
+ * @param {string} search
5271
+ * @throws {AppwriteException}
5272
+ * @returns {Promise}
5273
+ */
5274
+ listSubscribers(topicId: string, queries?: string[], search?: string): Promise<Models.SubscriberList>;
5275
+ /**
5276
+ * Create subscriber
5277
+ *
5278
+ * Create a new subscriber.
5279
+ *
5280
+ * @param {string} topicId
5281
+ * @param {string} subscriberId
5282
+ * @param {string} targetId
5283
+ * @throws {AppwriteException}
5284
+ * @returns {Promise}
5285
+ */
5286
+ createSubscriber(topicId: string, subscriberId: string, targetId: string): Promise<Models.Subscriber>;
5287
+ /**
5288
+ * Get subscriber
5289
+ *
5290
+ * Get a subscriber by its unique ID.
5291
+ *
5292
+ *
5293
+ * @param {string} topicId
5294
+ * @param {string} subscriberId
5295
+ * @throws {AppwriteException}
5296
+ * @returns {Promise}
5297
+ */
5298
+ getSubscriber(topicId: string, subscriberId: string): Promise<Models.Subscriber>;
5299
+ /**
5300
+ * Delete subscriber
5301
+ *
5302
+ * Delete a subscriber by its unique ID.
5303
+ *
5304
+ * @param {string} topicId
5305
+ * @param {string} subscriberId
5306
+ * @throws {AppwriteException}
5307
+ * @returns {Promise}
5308
+ */
5309
+ deleteSubscriber(topicId: string, subscriberId: string): Promise<string>;
5310
+ }
5311
+ export class Storage extends Service {
5312
+ constructor(client: Client);
5313
+
5314
+ /**
5315
+ * List buckets
5316
+ *
5317
+ * Get a list of all the storage buckets. You can use the query params to
5318
+ * filter your results.
5319
+ *
5320
+ * @param {string[]} queries
5321
+ * @param {string} search
5322
+ * @throws {AppwriteException}
5323
+ * @returns {Promise}
5324
+ */
5325
+ listBuckets(queries?: string[], search?: string): Promise<Models.BucketList>;
5326
+ /**
5327
+ * Create bucket
5328
+ *
5329
+ * Create a new storage bucket.
5330
+ *
5331
+ * @param {string} bucketId
5332
+ * @param {string} name
5333
+ * @param {string[]} permissions
5334
+ * @param {boolean} fileSecurity
5335
+ * @param {boolean} enabled
5336
+ * @param {number} maximumFileSize
5337
+ * @param {string[]} allowedFileExtensions
5338
+ * @param {Compression} compression
5339
+ * @param {boolean} encryption
5340
+ * @param {boolean} antivirus
5341
+ * @throws {AppwriteException}
5342
+ * @returns {Promise}
5343
+ */
5344
+ createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket>;
5345
+ /**
5346
+ * Get bucket
5347
+ *
5348
+ * Get a storage bucket by its unique ID. This endpoint response returns a
5349
+ * JSON object with the storage bucket metadata.
5350
+ *
5351
+ * @param {string} bucketId
5352
+ * @throws {AppwriteException}
5353
+ * @returns {Promise}
5354
+ */
5355
+ getBucket(bucketId: string): Promise<Models.Bucket>;
5356
+ /**
5357
+ * Update bucket
5358
+ *
5359
+ * Update a storage bucket by its unique ID.
5360
+ *
5361
+ * @param {string} bucketId
5362
+ * @param {string} name
5363
+ * @param {string[]} permissions
5364
+ * @param {boolean} fileSecurity
5365
+ * @param {boolean} enabled
5366
+ * @param {number} maximumFileSize
5367
+ * @param {string[]} allowedFileExtensions
5368
+ * @param {Compression} compression
3861
5369
  * @param {boolean} encryption
3862
5370
  * @param {boolean} antivirus
3863
5371
  * @throws {AppwriteException}
3864
5372
  * @returns {Promise}
3865
5373
  */
3866
- updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: string, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket>;
5374
+ updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket>;
3867
5375
  /**
3868
5376
  * Delete bucket
3869
5377
  *
@@ -3967,7 +5475,7 @@ declare module "node-appwrite" {
3967
5475
  * @throws {AppwriteException}
3968
5476
  * @returns {Promise}
3969
5477
  */
3970
- getFileDownload(bucketId: string, fileId: string): Promise<Buffer>;
5478
+ getFileDownload(bucketId: string, fileId: string): Promise<ArrayBuffer>;
3971
5479
  /**
3972
5480
  * Get file preview
3973
5481
  *
@@ -3981,7 +5489,7 @@ declare module "node-appwrite" {
3981
5489
  * @param {string} fileId
3982
5490
  * @param {number} width
3983
5491
  * @param {number} height
3984
- * @param {string} gravity
5492
+ * @param {ImageGravity} gravity
3985
5493
  * @param {number} quality
3986
5494
  * @param {number} borderWidth
3987
5495
  * @param {string} borderColor
@@ -3989,11 +5497,11 @@ declare module "node-appwrite" {
3989
5497
  * @param {number} opacity
3990
5498
  * @param {number} rotation
3991
5499
  * @param {string} background
3992
- * @param {string} output
5500
+ * @param {ImageFormat} output
3993
5501
  * @throws {AppwriteException}
3994
5502
  * @returns {Promise}
3995
5503
  */
3996
- getFilePreview(bucketId: string, fileId: string, width?: number, height?: number, gravity?: string, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: string): Promise<Buffer>;
5504
+ getFilePreview(bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat): Promise<ArrayBuffer>;
3997
5505
  /**
3998
5506
  * Get file for view
3999
5507
  *
@@ -4006,7 +5514,7 @@ declare module "node-appwrite" {
4006
5514
  * @throws {AppwriteException}
4007
5515
  * @returns {Promise}
4008
5516
  */
4009
- getFileView(bucketId: string, fileId: string): Promise<Buffer>;
5517
+ getFileView(bucketId: string, fileId: string): Promise<ArrayBuffer>;
4010
5518
  }
4011
5519
  export class Teams extends Service {
4012
5520
  constructor(client: Client);
@@ -4269,14 +5777,14 @@ declare module "node-appwrite" {
4269
5777
  *
4270
5778
  * Get identities for all users.
4271
5779
  *
4272
- * @param {string} queries
5780
+ * @param {string[]} queries
4273
5781
  * @param {string} search
4274
5782
  * @throws {AppwriteException}
4275
5783
  * @returns {Promise}
4276
5784
  */
4277
- listIdentities(queries?: string, search?: string): Promise<Models.IdentityList>;
5785
+ listIdentities(queries?: string[], search?: string): Promise<Models.IdentityList>;
4278
5786
  /**
4279
- * Delete Identity
5787
+ * Delete identity
4280
5788
  *
4281
5789
  * Delete an identity by its unique ID.
4282
5790
  *
@@ -4369,12 +5877,12 @@ declare module "node-appwrite" {
4369
5877
  * @param {string} userId
4370
5878
  * @param {string} email
4371
5879
  * @param {string} password
4372
- * @param {string} passwordVersion
5880
+ * @param {PasswordHash} passwordVersion
4373
5881
  * @param {string} name
4374
5882
  * @throws {AppwriteException}
4375
5883
  * @returns {Promise}
4376
5884
  */
4377
- createSHAUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordVersion?: string, name?: string): Promise<Models.User<Preferences>>;
5885
+ createSHAUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordVersion?: PasswordHash, name?: string): Promise<Models.User<Preferences>>;
4378
5886
  /**
4379
5887
  * Get user
4380
5888
  *
@@ -4448,6 +5956,77 @@ declare module "node-appwrite" {
4448
5956
  * @returns {Promise}
4449
5957
  */
4450
5958
  listMemberships(userId: string): Promise<Models.MembershipList>;
5959
+ /**
5960
+ * Update MFA
5961
+ *
5962
+ * Enable or disable MFA on a user account.
5963
+ *
5964
+ * @param {string} userId
5965
+ * @param {boolean} mfa
5966
+ * @throws {AppwriteException}
5967
+ * @returns {Promise}
5968
+ */
5969
+ updateMfa<Preferences extends Models.Preferences>(userId: string, mfa: boolean): Promise<Models.User<Preferences>>;
5970
+ /**
5971
+ * Delete Authenticator
5972
+ *
5973
+ * Delete an authenticator app.
5974
+ *
5975
+ * @param {string} userId
5976
+ * @param {AuthenticatorType} type
5977
+ * @throws {AppwriteException}
5978
+ * @returns {Promise}
5979
+ */
5980
+ deleteMfaAuthenticator<Preferences extends Models.Preferences>(userId: string, type: AuthenticatorType): Promise<Models.User<Preferences>>;
5981
+ /**
5982
+ * List Factors
5983
+ *
5984
+ * List the factors available on the account to be used as a MFA challange.
5985
+ *
5986
+ * @param {string} userId
5987
+ * @throws {AppwriteException}
5988
+ * @returns {Promise}
5989
+ */
5990
+ listMfaFactors(userId: string): Promise<Models.MfaFactors>;
5991
+ /**
5992
+ * Get MFA Recovery Codes
5993
+ *
5994
+ * Get recovery codes that can be used as backup for MFA flow by User ID.
5995
+ * Before getting codes, they must be generated using
5996
+ * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
5997
+ * method.
5998
+ *
5999
+ * @param {string} userId
6000
+ * @throws {AppwriteException}
6001
+ * @returns {Promise}
6002
+ */
6003
+ getMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes>;
6004
+ /**
6005
+ * Regenerate MFA Recovery Codes
6006
+ *
6007
+ * Regenerate recovery codes that can be used as backup for MFA flow by User
6008
+ * ID. Before regenerating codes, they must be first generated using
6009
+ * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
6010
+ * method.
6011
+ *
6012
+ * @param {string} userId
6013
+ * @throws {AppwriteException}
6014
+ * @returns {Promise}
6015
+ */
6016
+ updateMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes>;
6017
+ /**
6018
+ * Create MFA Recovery Codes
6019
+ *
6020
+ * Generate recovery codes used as backup for MFA flow for User ID. Recovery
6021
+ * codes can be used as a MFA verification type in
6022
+ * [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge)
6023
+ * method by client SDK.
6024
+ *
6025
+ * @param {string} userId
6026
+ * @throws {AppwriteException}
6027
+ * @returns {Promise}
6028
+ */
6029
+ createMfaRecoveryCodes(userId: string): Promise<Models.MfaRecoveryCodes>;
4451
6030
  /**
4452
6031
  * Update name
4453
6032
  *
@@ -4514,6 +6093,21 @@ declare module "node-appwrite" {
4514
6093
  * @returns {Promise}
4515
6094
  */
4516
6095
  listSessions(userId: string): Promise<Models.SessionList>;
6096
+ /**
6097
+ * Create session
6098
+ *
6099
+ * Creates a session for a user. Returns an immediately usable session object.
6100
+ *
6101
+ * If you want to generate a token for a custom authentication flow, use the
6102
+ * [POST
6103
+ * /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken)
6104
+ * endpoint.
6105
+ *
6106
+ * @param {string} userId
6107
+ * @throws {AppwriteException}
6108
+ * @returns {Promise}
6109
+ */
6110
+ createSession(userId: string): Promise<Models.Session>;
4517
6111
  /**
4518
6112
  * Delete user sessions
4519
6113
  *
@@ -4547,6 +6141,84 @@ declare module "node-appwrite" {
4547
6141
  * @returns {Promise}
4548
6142
  */
4549
6143
  updateStatus<Preferences extends Models.Preferences>(userId: string, status: boolean): Promise<Models.User<Preferences>>;
6144
+ /**
6145
+ * List User Targets
6146
+ *
6147
+ * List the messaging targets that are associated with a user.
6148
+ *
6149
+ * @param {string} userId
6150
+ * @param {string[]} queries
6151
+ * @throws {AppwriteException}
6152
+ * @returns {Promise}
6153
+ */
6154
+ listTargets(userId: string, queries?: string[]): Promise<Models.TargetList>;
6155
+ /**
6156
+ * Create User Target
6157
+ *
6158
+ * Create a messaging target.
6159
+ *
6160
+ * @param {string} userId
6161
+ * @param {string} targetId
6162
+ * @param {MessagingProviderType} providerType
6163
+ * @param {string} identifier
6164
+ * @param {string} providerId
6165
+ * @param {string} name
6166
+ * @throws {AppwriteException}
6167
+ * @returns {Promise}
6168
+ */
6169
+ createTarget(userId: string, targetId: string, providerType: MessagingProviderType, identifier: string, providerId?: string, name?: string): Promise<Models.Target>;
6170
+ /**
6171
+ * Get User Target
6172
+ *
6173
+ * Get a user's push notification target by ID.
6174
+ *
6175
+ * @param {string} userId
6176
+ * @param {string} targetId
6177
+ * @throws {AppwriteException}
6178
+ * @returns {Promise}
6179
+ */
6180
+ getTarget(userId: string, targetId: string): Promise<Models.Target>;
6181
+ /**
6182
+ * Update User target
6183
+ *
6184
+ * Update a messaging target.
6185
+ *
6186
+ * @param {string} userId
6187
+ * @param {string} targetId
6188
+ * @param {string} identifier
6189
+ * @param {string} providerId
6190
+ * @param {string} name
6191
+ * @throws {AppwriteException}
6192
+ * @returns {Promise}
6193
+ */
6194
+ updateTarget(userId: string, targetId: string, identifier?: string, providerId?: string, name?: string): Promise<Models.Target>;
6195
+ /**
6196
+ * Delete user target
6197
+ *
6198
+ * Delete a messaging target.
6199
+ *
6200
+ * @param {string} userId
6201
+ * @param {string} targetId
6202
+ * @throws {AppwriteException}
6203
+ * @returns {Promise}
6204
+ */
6205
+ deleteTarget(userId: string, targetId: string): Promise<string>;
6206
+ /**
6207
+ * Create token
6208
+ *
6209
+ * Returns a token with a secret key for creating a session. If the provided
6210
+ * user ID has not be registered, a new user will be created. Use the returned
6211
+ * user ID and secret and submit a request to the [PUT
6212
+ * /account/sessions/custom](https://appwrite.io/docs/references/cloud/client-web/account#updateCustomSession)
6213
+ * endpoint to complete the login process.
6214
+ *
6215
+ * @param {string} userId
6216
+ * @param {number} length
6217
+ * @param {number} expire
6218
+ * @throws {AppwriteException}
6219
+ * @returns {Promise}
6220
+ */
6221
+ createToken(userId: string, length?: number, expire?: number): Promise<Models.Token>;
4550
6222
  /**
4551
6223
  * Update email verification
4552
6224
  *
@@ -4570,4 +6242,415 @@ declare module "node-appwrite" {
4570
6242
  */
4571
6243
  updatePhoneVerification<Preferences extends Models.Preferences>(userId: string, phoneVerification: boolean): Promise<Models.User<Preferences>>;
4572
6244
  }
4573
- }
6245
+ export const AuthenticatorType: Readonly<{
6246
+ Totp: 'totp',
6247
+ }>
6248
+ export const AuthenticationFactor: Readonly<{
6249
+ Email: 'email',
6250
+ Phone: 'phone',
6251
+ Totp: 'totp',
6252
+ Recoverycode: 'recoverycode',
6253
+ }>
6254
+ export const OAuthProvider: Readonly<{
6255
+ Amazon: 'amazon',
6256
+ Apple: 'apple',
6257
+ Auth0: 'auth0',
6258
+ Authentik: 'authentik',
6259
+ Autodesk: 'autodesk',
6260
+ Bitbucket: 'bitbucket',
6261
+ Bitly: 'bitly',
6262
+ Box: 'box',
6263
+ Dailymotion: 'dailymotion',
6264
+ Discord: 'discord',
6265
+ Disqus: 'disqus',
6266
+ Dropbox: 'dropbox',
6267
+ Etsy: 'etsy',
6268
+ Facebook: 'facebook',
6269
+ Github: 'github',
6270
+ Gitlab: 'gitlab',
6271
+ Google: 'google',
6272
+ Linkedin: 'linkedin',
6273
+ Microsoft: 'microsoft',
6274
+ Notion: 'notion',
6275
+ Oidc: 'oidc',
6276
+ Okta: 'okta',
6277
+ Paypal: 'paypal',
6278
+ PaypalSandbox: 'paypalSandbox',
6279
+ Podio: 'podio',
6280
+ Salesforce: 'salesforce',
6281
+ Slack: 'slack',
6282
+ Spotify: 'spotify',
6283
+ Stripe: 'stripe',
6284
+ Tradeshift: 'tradeshift',
6285
+ TradeshiftBox: 'tradeshiftBox',
6286
+ Twitch: 'twitch',
6287
+ Wordpress: 'wordpress',
6288
+ Yahoo: 'yahoo',
6289
+ Yammer: 'yammer',
6290
+ Yandex: 'yandex',
6291
+ Zoho: 'zoho',
6292
+ Zoom: 'zoom',
6293
+ Mock: 'mock',
6294
+ }>
6295
+ export const Browser: Readonly<{
6296
+ AvantBrowser: 'aa',
6297
+ AndroidWebViewBeta: 'an',
6298
+ GoogleChrome: 'ch',
6299
+ GoogleChromeIOS: 'ci',
6300
+ GoogleChromeMobile: 'cm',
6301
+ Chromium: 'cr',
6302
+ MozillaFirefox: 'ff',
6303
+ Safari: 'sf',
6304
+ MobileSafari: 'mf',
6305
+ MicrosoftEdge: 'ps',
6306
+ MicrosoftEdgeIOS: 'oi',
6307
+ OperaMini: 'om',
6308
+ Opera: 'op',
6309
+ OperaNext: 'on',
6310
+ }>
6311
+ export const CreditCard: Readonly<{
6312
+ AmericanExpress: 'amex',
6313
+ Argencard: 'argencard',
6314
+ Cabal: 'cabal',
6315
+ Consosud: 'censosud',
6316
+ DinersClub: 'diners',
6317
+ Discover: 'discover',
6318
+ Elo: 'elo',
6319
+ Hipercard: 'hipercard',
6320
+ JCB: 'jcb',
6321
+ Mastercard: 'mastercard',
6322
+ Naranja: 'naranja',
6323
+ TarjetaShopping: 'targeta-shopping',
6324
+ UnionChinaPay: 'union-china-pay',
6325
+ Visa: 'visa',
6326
+ MIR: 'mir',
6327
+ Maestro: 'maestro',
6328
+ }>
6329
+ export const Flag: Readonly<{
6330
+ Afghanistan: 'af',
6331
+ Angola: 'ao',
6332
+ Albania: 'al',
6333
+ Andorra: 'ad',
6334
+ UnitedArabEmirates: 'ae',
6335
+ Argentina: 'ar',
6336
+ Armenia: 'am',
6337
+ AntiguaAndBarbuda: 'ag',
6338
+ Australia: 'au',
6339
+ Austria: 'at',
6340
+ Azerbaijan: 'az',
6341
+ Burundi: 'bi',
6342
+ Belgium: 'be',
6343
+ Benin: 'bj',
6344
+ BurkinaFaso: 'bf',
6345
+ Bangladesh: 'bd',
6346
+ Bulgaria: 'bg',
6347
+ Bahrain: 'bh',
6348
+ Bahamas: 'bs',
6349
+ BosniaAndHerzegovina: 'ba',
6350
+ Belarus: 'by',
6351
+ Belize: 'bz',
6352
+ Bolivia: 'bo',
6353
+ Brazil: 'br',
6354
+ Barbados: 'bb',
6355
+ BruneiDarussalam: 'bn',
6356
+ Bhutan: 'bt',
6357
+ Botswana: 'bw',
6358
+ CentralAfricanRepublic: 'cf',
6359
+ Canada: 'ca',
6360
+ Switzerland: 'ch',
6361
+ Chile: 'cl',
6362
+ China: 'cn',
6363
+ CoteDIvoire: 'ci',
6364
+ Cameroon: 'cm',
6365
+ DemocraticRepublicOfTheCongo: 'cd',
6366
+ RepublicOfTheCongo: 'cg',
6367
+ Colombia: 'co',
6368
+ Comoros: 'km',
6369
+ CapeVerde: 'cv',
6370
+ CostaRica: 'cr',
6371
+ Cuba: 'cu',
6372
+ Cyprus: 'cy',
6373
+ CzechRepublic: 'cz',
6374
+ Germany: 'de',
6375
+ Djibouti: 'dj',
6376
+ Dominica: 'dm',
6377
+ Denmark: 'dk',
6378
+ DominicanRepublic: 'do',
6379
+ Algeria: 'dz',
6380
+ Ecuador: 'ec',
6381
+ Egypt: 'eg',
6382
+ Eritrea: 'er',
6383
+ Spain: 'es',
6384
+ Estonia: 'ee',
6385
+ Ethiopia: 'et',
6386
+ Finland: 'fi',
6387
+ Fiji: 'fj',
6388
+ France: 'fr',
6389
+ MicronesiaFederatedStatesOf: 'fm',
6390
+ Gabon: 'ga',
6391
+ UnitedKingdom: 'gb',
6392
+ Georgia: 'ge',
6393
+ Ghana: 'gh',
6394
+ Guinea: 'gn',
6395
+ Gambia: 'gm',
6396
+ GuineaBissau: 'gw',
6397
+ EquatorialGuinea: 'gq',
6398
+ Greece: 'gr',
6399
+ Grenada: 'gd',
6400
+ Guatemala: 'gt',
6401
+ Guyana: 'gy',
6402
+ Honduras: 'hn',
6403
+ Croatia: 'hr',
6404
+ Haiti: 'ht',
6405
+ Hungary: 'hu',
6406
+ Indonesia: 'id',
6407
+ India: 'in',
6408
+ Ireland: 'ie',
6409
+ IranIslamicRepublicOf: 'ir',
6410
+ Iraq: 'iq',
6411
+ Iceland: 'is',
6412
+ Israel: 'il',
6413
+ Italy: 'it',
6414
+ Jamaica: 'jm',
6415
+ Jordan: 'jo',
6416
+ Japan: 'jp',
6417
+ Kazakhstan: 'kz',
6418
+ Kenya: 'ke',
6419
+ Kyrgyzstan: 'kg',
6420
+ Cambodia: 'kh',
6421
+ Kiribati: 'ki',
6422
+ SaintKittsAndNevis: 'kn',
6423
+ SouthKorea: 'kr',
6424
+ Kuwait: 'kw',
6425
+ LaoPeopleSDemocraticRepublic: 'la',
6426
+ Lebanon: 'lb',
6427
+ Liberia: 'lr',
6428
+ Libya: 'ly',
6429
+ SaintLucia: 'lc',
6430
+ Liechtenstein: 'li',
6431
+ SriLanka: 'lk',
6432
+ Lesotho: 'ls',
6433
+ Lithuania: 'lt',
6434
+ Luxembourg: 'lu',
6435
+ Latvia: 'lv',
6436
+ Morocco: 'ma',
6437
+ Monaco: 'mc',
6438
+ Moldova: 'md',
6439
+ Madagascar: 'mg',
6440
+ Maldives: 'mv',
6441
+ Mexico: 'mx',
6442
+ MarshallIslands: 'mh',
6443
+ NorthMacedonia: 'mk',
6444
+ Mali: 'ml',
6445
+ Malta: 'mt',
6446
+ Myanmar: 'mm',
6447
+ Montenegro: 'me',
6448
+ Mongolia: 'mn',
6449
+ Mozambique: 'mz',
6450
+ Mauritania: 'mr',
6451
+ Mauritius: 'mu',
6452
+ Malawi: 'mw',
6453
+ Malaysia: 'my',
6454
+ Namibia: 'na',
6455
+ Niger: 'ne',
6456
+ Nigeria: 'ng',
6457
+ Nicaragua: 'ni',
6458
+ Netherlands: 'nl',
6459
+ Norway: 'no',
6460
+ Nepal: 'np',
6461
+ Nauru: 'nr',
6462
+ NewZealand: 'nz',
6463
+ Oman: 'om',
6464
+ Pakistan: 'pk',
6465
+ Panama: 'pa',
6466
+ Peru: 'pe',
6467
+ Philippines: 'ph',
6468
+ Palau: 'pw',
6469
+ PapuaNewGuinea: 'pg',
6470
+ Poland: 'pl',
6471
+ NorthKorea: 'kp',
6472
+ Portugal: 'pt',
6473
+ Paraguay: 'py',
6474
+ Qatar: 'qa',
6475
+ Romania: 'ro',
6476
+ Russia: 'ru',
6477
+ Rwanda: 'rw',
6478
+ SaudiArabia: 'sa',
6479
+ Sudan: 'sd',
6480
+ Senegal: 'sn',
6481
+ Singapore: 'sg',
6482
+ SolomonIslands: 'sb',
6483
+ SierraLeone: 'sl',
6484
+ ElSalvador: 'sv',
6485
+ SanMarino: 'sm',
6486
+ Somalia: 'so',
6487
+ Serbia: 'rs',
6488
+ SouthSudan: 'ss',
6489
+ SaoTomeAndPrincipe: 'st',
6490
+ Suriname: 'sr',
6491
+ Slovakia: 'sk',
6492
+ Slovenia: 'si',
6493
+ Sweden: 'se',
6494
+ Eswatini: 'sz',
6495
+ Seychelles: 'sc',
6496
+ Syria: 'sy',
6497
+ Chad: 'td',
6498
+ Togo: 'tg',
6499
+ Thailand: 'th',
6500
+ Tajikistan: 'tj',
6501
+ Turkmenistan: 'tm',
6502
+ TimorLeste: 'tl',
6503
+ Tonga: 'to',
6504
+ TrinidadAndTobago: 'tt',
6505
+ Tunisia: 'tn',
6506
+ Turkey: 'tr',
6507
+ Tuvalu: 'tv',
6508
+ Tanzania: 'tz',
6509
+ Uganda: 'ug',
6510
+ Ukraine: 'ua',
6511
+ Uruguay: 'uy',
6512
+ UnitedStates: 'us',
6513
+ Uzbekistan: 'uz',
6514
+ VaticanCity: 'va',
6515
+ SaintVincentAndTheGrenadines: 'vc',
6516
+ Venezuela: 've',
6517
+ Vietnam: 'vn',
6518
+ Vanuatu: 'vu',
6519
+ Samoa: 'ws',
6520
+ Yemen: 'ye',
6521
+ SouthAfrica: 'za',
6522
+ Zambia: 'zm',
6523
+ Zimbabwe: 'zw',
6524
+ }>
6525
+ export const RelationshipType: Readonly<{
6526
+ OneToOne: 'oneToOne',
6527
+ ManyToOne: 'manyToOne',
6528
+ ManyToMany: 'manyToMany',
6529
+ OneToMany: 'oneToMany',
6530
+ }>
6531
+ export const RelationMutate: Readonly<{
6532
+ Cascade: 'cascade',
6533
+ Restrict: 'restrict',
6534
+ SetNull: 'setNull',
6535
+ }>
6536
+ export const IndexType: Readonly<{
6537
+ Key: 'key',
6538
+ Fulltext: 'fulltext',
6539
+ Unique: 'unique',
6540
+ }>
6541
+ export const Runtime: Readonly<{
6542
+ Node145: 'node-14.5',
6543
+ Node160: 'node-16.0',
6544
+ Node180: 'node-18.0',
6545
+ Node190: 'node-19.0',
6546
+ Node200: 'node-20.0',
6547
+ Node210: 'node-21.0',
6548
+ Php80: 'php-8.0',
6549
+ Php81: 'php-8.1',
6550
+ Php82: 'php-8.2',
6551
+ Php83: 'php-8.3',
6552
+ Ruby30: 'ruby-3.0',
6553
+ Ruby31: 'ruby-3.1',
6554
+ Ruby32: 'ruby-3.2',
6555
+ Ruby33: 'ruby-3.3',
6556
+ Python38: 'python-3.8',
6557
+ Python39: 'python-3.9',
6558
+ Python310: 'python-3.10',
6559
+ Python311: 'python-3.11',
6560
+ Python312: 'python-3.12',
6561
+ Deno140: 'deno-1.40',
6562
+ Dart215: 'dart-2.15',
6563
+ Dart216: 'dart-2.16',
6564
+ Dart217: 'dart-2.17',
6565
+ Dart218: 'dart-2.18',
6566
+ Dart30: 'dart-3.0',
6567
+ Dart31: 'dart-3.1',
6568
+ Dart33: 'dart-3.3',
6569
+ Dotnet31: 'dotnet-3.1',
6570
+ Dotnet60: 'dotnet-6.0',
6571
+ Dotnet70: 'dotnet-7.0',
6572
+ Java80: 'java-8.0',
6573
+ Java110: 'java-11.0',
6574
+ Java170: 'java-17.0',
6575
+ Java180: 'java-18.0',
6576
+ Java210: 'java-21.0',
6577
+ Swift55: 'swift-5.5',
6578
+ Swift58: 'swift-5.8',
6579
+ Swift59: 'swift-5.9',
6580
+ Kotlin16: 'kotlin-1.6',
6581
+ Kotlin18: 'kotlin-1.8',
6582
+ Kotlin19: 'kotlin-1.9',
6583
+ Cpp17: 'cpp-17',
6584
+ Cpp20: 'cpp-20',
6585
+ Bun10: 'bun-1.0',
6586
+ }>
6587
+ export const ExecutionMethod: Readonly<{
6588
+ GET: 'GET',
6589
+ POST: 'POST',
6590
+ PUT: 'PUT',
6591
+ PATCH: 'PATCH',
6592
+ DELETE: 'DELETE',
6593
+ OPTIONS: 'OPTIONS',
6594
+ }>
6595
+ export const Name: Readonly<{
6596
+ V1Database: 'v1-database',
6597
+ V1Deletes: 'v1-deletes',
6598
+ V1Audits: 'v1-audits',
6599
+ V1Mails: 'v1-mails',
6600
+ V1Functions: 'v1-functions',
6601
+ V1Usage: 'v1-usage',
6602
+ V1UsageDump: 'v1-usage-dump',
6603
+ Webhooksv1: 'webhooksv1',
6604
+ V1Certificates: 'v1-certificates',
6605
+ V1Builds: 'v1-builds',
6606
+ V1Messaging: 'v1-messaging',
6607
+ V1Migrations: 'v1-migrations',
6608
+ Hamsterv1: 'hamsterv1',
6609
+ }>
6610
+ export const SmtpEncryption: Readonly<{
6611
+ None: 'none',
6612
+ Ssl: 'ssl',
6613
+ Tls: 'tls',
6614
+ }>
6615
+ export const Compression: Readonly<{
6616
+ None: 'none',
6617
+ Gzip: 'gzip',
6618
+ Zstd: 'zstd',
6619
+ }>
6620
+ export const ImageGravity: Readonly<{
6621
+ Center: 'center',
6622
+ TopLeft: 'top-left',
6623
+ Top: 'top',
6624
+ TopRight: 'top-right',
6625
+ Left: 'left',
6626
+ Right: 'right',
6627
+ BottomLeft: 'bottom-left',
6628
+ Bottom: 'bottom',
6629
+ BottomRight: 'bottom-right',
6630
+ }>
6631
+ export const ImageFormat: Readonly<{
6632
+ Jpg: 'jpg',
6633
+ Jpeg: 'jpeg',
6634
+ Gif: 'gif',
6635
+ Png: 'png',
6636
+ Webp: 'webp',
6637
+ }>
6638
+ export const PasswordHash: Readonly<{
6639
+ Sha1: 'sha1',
6640
+ Sha224: 'sha224',
6641
+ Sha256: 'sha256',
6642
+ Sha384: 'sha384',
6643
+ Sha512224: 'sha512/224',
6644
+ Sha512256: 'sha512/256',
6645
+ Sha512: 'sha512',
6646
+ Sha3224: 'sha3-224',
6647
+ Sha3256: 'sha3-256',
6648
+ Sha3384: 'sha3-384',
6649
+ Sha3512: 'sha3-512',
6650
+ }>
6651
+ export const MessagingProviderType: Readonly<{
6652
+ Email: 'email',
6653
+ Sms: 'sms',
6654
+ Push: 'push',
6655
+ }>
6656
+ }