@appwrite.io/console 0.1.1 → 0.3.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 (317) hide show
  1. package/.github/workflows/publish.yml +18 -0
  2. package/README.md +2 -2
  3. package/dist/cjs/sdk.js +2417 -630
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +2413 -631
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +2417 -630
  8. package/docs/examples/account/create-anonymous-session.md +1 -1
  9. package/docs/examples/account/create-email-session.md +1 -1
  10. package/docs/examples/account/create-j-w-t.md +1 -1
  11. package/docs/examples/account/create-magic-u-r-l-session.md +1 -1
  12. package/docs/examples/account/create-o-auth2session.md +1 -1
  13. package/docs/examples/account/create-phone-session.md +1 -1
  14. package/docs/examples/account/create-phone-verification.md +1 -1
  15. package/docs/examples/account/create-recovery.md +1 -1
  16. package/docs/examples/account/create-verification.md +1 -1
  17. package/docs/examples/account/create-with-invite-code.md +18 -0
  18. package/docs/examples/account/create.md +1 -1
  19. package/docs/examples/account/delete-identity.md +18 -0
  20. package/docs/examples/account/delete-session.md +1 -1
  21. package/docs/examples/account/delete-sessions.md +1 -1
  22. package/docs/examples/account/get-prefs.md +1 -1
  23. package/docs/examples/account/get-session.md +1 -1
  24. package/docs/examples/account/get.md +1 -1
  25. package/docs/examples/account/list-identities.md +18 -0
  26. package/docs/examples/account/list-logs.md +1 -1
  27. package/docs/examples/account/list-sessions.md +1 -1
  28. package/docs/examples/account/update-email.md +1 -1
  29. package/docs/examples/account/update-magic-u-r-l-session.md +1 -1
  30. package/docs/examples/account/update-name.md +1 -1
  31. package/docs/examples/account/update-password.md +1 -1
  32. package/docs/examples/account/update-phone-session.md +1 -1
  33. package/docs/examples/account/update-phone-verification.md +1 -1
  34. package/docs/examples/account/update-phone.md +1 -1
  35. package/docs/examples/account/update-prefs.md +1 -1
  36. package/docs/examples/account/update-recovery.md +1 -1
  37. package/docs/examples/account/update-session.md +1 -1
  38. package/docs/examples/account/update-status.md +1 -1
  39. package/docs/examples/account/update-verification.md +1 -1
  40. package/docs/examples/assistant/chat.md +18 -0
  41. package/docs/examples/avatars/get-browser.md +1 -1
  42. package/docs/examples/avatars/get-credit-card.md +1 -1
  43. package/docs/examples/avatars/get-favicon.md +1 -1
  44. package/docs/examples/avatars/get-flag.md +1 -1
  45. package/docs/examples/avatars/get-image.md +1 -1
  46. package/docs/examples/avatars/get-initials.md +1 -1
  47. package/docs/examples/avatars/get-q-r.md +1 -1
  48. package/docs/examples/console/variables.md +1 -1
  49. package/docs/examples/databases/create-boolean-attribute.md +1 -1
  50. package/docs/examples/databases/create-collection.md +1 -1
  51. package/docs/examples/databases/create-datetime-attribute.md +1 -1
  52. package/docs/examples/databases/create-document.md +1 -1
  53. package/docs/examples/databases/create-email-attribute.md +1 -1
  54. package/docs/examples/databases/create-enum-attribute.md +1 -1
  55. package/docs/examples/databases/create-float-attribute.md +1 -1
  56. package/docs/examples/databases/create-index.md +1 -1
  57. package/docs/examples/databases/create-integer-attribute.md +1 -1
  58. package/docs/examples/databases/create-ip-attribute.md +1 -1
  59. package/docs/examples/databases/create-relationship-attribute.md +1 -1
  60. package/docs/examples/databases/create-string-attribute.md +1 -1
  61. package/docs/examples/databases/create-url-attribute.md +1 -1
  62. package/docs/examples/databases/create.md +1 -1
  63. package/docs/examples/databases/delete-attribute.md +1 -1
  64. package/docs/examples/databases/delete-collection.md +1 -1
  65. package/docs/examples/databases/delete-document.md +1 -1
  66. package/docs/examples/databases/delete-index.md +1 -1
  67. package/docs/examples/databases/delete.md +1 -1
  68. package/docs/examples/databases/get-attribute.md +1 -1
  69. package/docs/examples/databases/get-collection-usage.md +1 -1
  70. package/docs/examples/databases/get-collection.md +1 -1
  71. package/docs/examples/databases/get-database-usage.md +1 -1
  72. package/docs/examples/databases/get-document.md +1 -1
  73. package/docs/examples/databases/get-index.md +1 -1
  74. package/docs/examples/databases/get-usage.md +1 -1
  75. package/docs/examples/databases/get.md +1 -1
  76. package/docs/examples/databases/list-attributes.md +1 -1
  77. package/docs/examples/databases/list-collection-logs.md +1 -1
  78. package/docs/examples/databases/list-collections.md +1 -1
  79. package/docs/examples/databases/list-document-logs.md +1 -1
  80. package/docs/examples/databases/list-documents.md +1 -1
  81. package/docs/examples/databases/list-indexes.md +1 -1
  82. package/docs/examples/databases/list-logs.md +1 -1
  83. package/docs/examples/databases/list.md +1 -1
  84. package/docs/examples/databases/update-boolean-attribute.md +1 -1
  85. package/docs/examples/databases/update-collection.md +1 -1
  86. package/docs/examples/databases/update-datetime-attribute.md +1 -1
  87. package/docs/examples/databases/update-document.md +1 -1
  88. package/docs/examples/databases/update-email-attribute.md +1 -1
  89. package/docs/examples/databases/update-enum-attribute.md +1 -1
  90. package/docs/examples/databases/update-float-attribute.md +1 -1
  91. package/docs/examples/databases/update-integer-attribute.md +1 -1
  92. package/docs/examples/databases/update-ip-attribute.md +1 -1
  93. package/docs/examples/databases/update-relationship-attribute.md +1 -1
  94. package/docs/examples/databases/update-string-attribute.md +1 -1
  95. package/docs/examples/databases/update-url-attribute.md +1 -1
  96. package/docs/examples/databases/update.md +1 -1
  97. package/docs/examples/functions/create-build.md +1 -1
  98. package/docs/examples/functions/create-deployment.md +2 -2
  99. package/docs/examples/functions/create-execution.md +1 -1
  100. package/docs/examples/functions/create-variable.md +1 -1
  101. package/docs/examples/functions/create.md +1 -1
  102. package/docs/examples/functions/delete-deployment.md +1 -1
  103. package/docs/examples/functions/delete-variable.md +1 -1
  104. package/docs/examples/functions/delete.md +1 -1
  105. package/docs/examples/functions/download-deployment.md +14 -0
  106. package/docs/examples/functions/get-deployment.md +1 -1
  107. package/docs/examples/functions/get-execution.md +1 -1
  108. package/docs/examples/functions/get-function-usage.md +1 -1
  109. package/docs/examples/functions/get-usage.md +1 -1
  110. package/docs/examples/functions/get-variable.md +1 -1
  111. package/docs/examples/functions/get.md +1 -1
  112. package/docs/examples/functions/list-deployments.md +1 -1
  113. package/docs/examples/functions/list-executions.md +1 -1
  114. package/docs/examples/functions/list-runtimes.md +1 -1
  115. package/docs/examples/functions/list-variables.md +1 -1
  116. package/docs/examples/functions/list.md +1 -1
  117. package/docs/examples/functions/update-deployment.md +1 -1
  118. package/docs/examples/functions/update-variable.md +1 -1
  119. package/docs/examples/functions/update.md +2 -2
  120. package/docs/examples/graphql/mutation.md +1 -1
  121. package/docs/examples/graphql/query.md +1 -1
  122. package/docs/examples/health/get-antivirus.md +1 -1
  123. package/docs/examples/health/get-cache.md +1 -1
  124. package/docs/examples/health/get-d-b.md +1 -1
  125. package/docs/examples/health/get-pub-sub.md +18 -0
  126. package/docs/examples/health/get-queue-certificates.md +1 -1
  127. package/docs/examples/health/get-queue-functions.md +1 -1
  128. package/docs/examples/health/get-queue-logs.md +1 -1
  129. package/docs/examples/health/get-queue-webhooks.md +1 -1
  130. package/docs/examples/health/get-queue.md +18 -0
  131. package/docs/examples/health/get-storage-local.md +1 -1
  132. package/docs/examples/health/get-time.md +1 -1
  133. package/docs/examples/health/get.md +1 -1
  134. package/docs/examples/locale/get.md +1 -1
  135. package/docs/examples/locale/list-codes.md +18 -0
  136. package/docs/examples/locale/list-continents.md +1 -1
  137. package/docs/examples/locale/list-countries-e-u.md +1 -1
  138. package/docs/examples/locale/list-countries-phones.md +1 -1
  139. package/docs/examples/locale/list-countries.md +1 -1
  140. package/docs/examples/locale/list-currencies.md +1 -1
  141. package/docs/examples/locale/list-languages.md +1 -1
  142. package/docs/examples/migrations/create-appwrite-migration.md +18 -0
  143. package/docs/examples/migrations/create-firebase-migration.md +18 -0
  144. package/docs/examples/migrations/create-firebase-o-auth-migration.md +18 -0
  145. package/docs/examples/migrations/create-n-host-migration.md +18 -0
  146. package/docs/examples/migrations/create-supabase-migration.md +18 -0
  147. package/docs/examples/migrations/delete-firebase-auth.md +18 -0
  148. package/docs/examples/migrations/delete.md +18 -0
  149. package/docs/examples/migrations/get-appwrite-report.md +18 -0
  150. package/docs/examples/migrations/get-firebase-report-o-auth.md +18 -0
  151. package/docs/examples/migrations/get-firebase-report.md +18 -0
  152. package/docs/examples/migrations/get-n-host-report.md +18 -0
  153. package/docs/examples/migrations/get-supabase-report.md +18 -0
  154. package/docs/examples/migrations/get.md +18 -0
  155. package/docs/examples/migrations/list-firebase-projects.md +18 -0
  156. package/docs/examples/migrations/list.md +18 -0
  157. package/docs/examples/migrations/retry.md +18 -0
  158. package/docs/examples/project/create-variable.md +18 -0
  159. package/docs/examples/project/delete-variable.md +18 -0
  160. package/docs/examples/project/get-usage.md +18 -0
  161. package/docs/examples/project/get-variable.md +18 -0
  162. package/docs/examples/project/list-variables.md +18 -0
  163. package/docs/examples/project/update-variable.md +18 -0
  164. package/docs/examples/projects/create-key.md +1 -1
  165. package/docs/examples/projects/create-platform.md +1 -1
  166. package/docs/examples/projects/create-webhook.md +1 -1
  167. package/docs/examples/projects/create.md +2 -2
  168. package/docs/examples/projects/delete-email-template.md +18 -0
  169. package/docs/examples/projects/delete-key.md +1 -1
  170. package/docs/examples/projects/delete-platform.md +1 -1
  171. package/docs/examples/projects/delete-sms-template.md +18 -0
  172. package/docs/examples/projects/delete-webhook.md +1 -1
  173. package/docs/examples/projects/delete.md +2 -2
  174. package/docs/examples/projects/get-email-template.md +18 -0
  175. package/docs/examples/projects/get-key.md +1 -1
  176. package/docs/examples/projects/get-platform.md +1 -1
  177. package/docs/examples/projects/get-sms-template.md +18 -0
  178. package/docs/examples/projects/get-usage.md +1 -1
  179. package/docs/examples/projects/get-webhook.md +1 -1
  180. package/docs/examples/projects/get.md +1 -1
  181. package/docs/examples/projects/list-keys.md +1 -1
  182. package/docs/examples/projects/list-platforms.md +1 -1
  183. package/docs/examples/projects/list-webhooks.md +1 -1
  184. package/docs/examples/projects/list.md +1 -1
  185. package/docs/examples/projects/update-auth-duration.md +1 -1
  186. package/docs/examples/projects/update-auth-limit.md +1 -1
  187. package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
  188. package/docs/examples/projects/update-auth-password-history.md +1 -1
  189. package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
  190. package/docs/examples/projects/update-auth-status.md +1 -1
  191. package/docs/examples/projects/update-email-template.md +18 -0
  192. package/docs/examples/projects/update-key.md +1 -1
  193. package/docs/examples/projects/update-o-auth2.md +1 -1
  194. package/docs/examples/projects/{delete-domain.md → update-personal-data-check.md} +2 -2
  195. package/docs/examples/projects/update-platform.md +1 -1
  196. package/docs/examples/projects/{create-domain.md → update-service-status-all.md} +2 -2
  197. package/docs/examples/projects/update-service-status.md +1 -1
  198. package/docs/examples/projects/update-sms-template.md +18 -0
  199. package/docs/examples/projects/{get-domain.md → update-smtp-configuration.md} +2 -2
  200. package/docs/examples/projects/{list-domains.md → update-team.md} +2 -2
  201. package/docs/examples/projects/update-webhook-signature.md +1 -1
  202. package/docs/examples/projects/update-webhook.md +1 -1
  203. package/docs/examples/projects/update.md +1 -1
  204. package/docs/examples/proxy/create-rule.md +18 -0
  205. package/docs/examples/proxy/delete-rule.md +18 -0
  206. package/docs/examples/proxy/get-rule.md +18 -0
  207. package/docs/examples/proxy/list-rules.md +18 -0
  208. package/docs/examples/proxy/update-rule-verification.md +18 -0
  209. package/docs/examples/storage/create-bucket.md +1 -1
  210. package/docs/examples/storage/create-file.md +1 -1
  211. package/docs/examples/storage/delete-bucket.md +1 -1
  212. package/docs/examples/storage/delete-file.md +1 -1
  213. package/docs/examples/storage/get-bucket-usage.md +1 -1
  214. package/docs/examples/storage/get-bucket.md +1 -1
  215. package/docs/examples/storage/get-file-download.md +1 -1
  216. package/docs/examples/storage/get-file-preview.md +1 -1
  217. package/docs/examples/storage/get-file-view.md +1 -1
  218. package/docs/examples/storage/get-file.md +1 -1
  219. package/docs/examples/storage/get-usage.md +1 -1
  220. package/docs/examples/storage/list-buckets.md +1 -1
  221. package/docs/examples/storage/list-files.md +1 -1
  222. package/docs/examples/storage/update-bucket.md +1 -1
  223. package/docs/examples/storage/update-file.md +1 -1
  224. package/docs/examples/teams/create-membership.md +1 -1
  225. package/docs/examples/teams/create.md +1 -1
  226. package/docs/examples/teams/delete-membership.md +1 -1
  227. package/docs/examples/teams/delete.md +1 -1
  228. package/docs/examples/teams/get-membership.md +1 -1
  229. package/docs/examples/teams/get-prefs.md +1 -1
  230. package/docs/examples/teams/get.md +1 -1
  231. package/docs/examples/teams/list-logs.md +1 -1
  232. package/docs/examples/teams/list-memberships.md +1 -1
  233. package/docs/examples/teams/list.md +1 -1
  234. package/docs/examples/teams/update-membership-status.md +1 -1
  235. package/docs/examples/teams/{update-membership-roles.md → update-membership.md} +2 -2
  236. package/docs/examples/teams/update-name.md +1 -1
  237. package/docs/examples/teams/update-prefs.md +1 -1
  238. package/docs/examples/users/create-argon2user.md +1 -1
  239. package/docs/examples/users/create-bcrypt-user.md +1 -1
  240. package/docs/examples/users/create-m-d5user.md +1 -1
  241. package/docs/examples/users/create-p-h-pass-user.md +1 -1
  242. package/docs/examples/users/create-s-h-a-user.md +1 -1
  243. package/docs/examples/users/create-scrypt-modified-user.md +1 -1
  244. package/docs/examples/users/create-scrypt-user.md +1 -1
  245. package/docs/examples/users/create.md +1 -1
  246. package/docs/examples/users/delete-identity.md +18 -0
  247. package/docs/examples/users/delete-session.md +1 -1
  248. package/docs/examples/users/delete-sessions.md +1 -1
  249. package/docs/examples/users/delete.md +1 -1
  250. package/docs/examples/users/get-prefs.md +1 -1
  251. package/docs/examples/users/get-usage.md +1 -1
  252. package/docs/examples/users/get.md +1 -1
  253. package/docs/examples/users/list-identities.md +18 -0
  254. package/docs/examples/users/list-logs.md +1 -1
  255. package/docs/examples/users/list-memberships.md +1 -1
  256. package/docs/examples/users/list-sessions.md +1 -1
  257. package/docs/examples/users/list.md +1 -1
  258. package/docs/examples/users/update-email-verification.md +1 -1
  259. package/docs/examples/users/update-email.md +1 -1
  260. package/docs/examples/users/update-labels.md +18 -0
  261. package/docs/examples/users/update-name.md +1 -1
  262. package/docs/examples/users/update-password.md +1 -1
  263. package/docs/examples/users/update-phone-verification.md +1 -1
  264. package/docs/examples/users/update-phone.md +1 -1
  265. package/docs/examples/users/update-prefs.md +1 -1
  266. package/docs/examples/users/update-status.md +1 -1
  267. package/docs/examples/vcs/create-repository-detection.md +18 -0
  268. package/docs/examples/vcs/create-repository.md +18 -0
  269. package/docs/examples/vcs/delete-installation.md +18 -0
  270. package/docs/examples/vcs/get-installation.md +18 -0
  271. package/docs/examples/vcs/get-repository.md +18 -0
  272. package/docs/examples/vcs/list-installations.md +18 -0
  273. package/docs/examples/vcs/list-repositories.md +18 -0
  274. package/docs/examples/vcs/list-repository-branches.md +18 -0
  275. package/docs/examples/vcs/update-external-deployments.md +18 -0
  276. package/package.json +1 -1
  277. package/src/client.ts +2 -2
  278. package/src/index.ts +5 -0
  279. package/src/models.ts +750 -78
  280. package/src/services/account.ts +1102 -995
  281. package/src/services/assistant.ts +38 -0
  282. package/src/services/avatars.ts +337 -337
  283. package/src/services/console.ts +16 -16
  284. package/src/services/databases.ts +2170 -2140
  285. package/src/services/functions.ts +808 -652
  286. package/src/services/graphql.ts +47 -47
  287. package/src/services/health.ts +226 -189
  288. package/src/services/locale.ts +156 -137
  289. package/src/services/migrations.ts +707 -0
  290. package/src/services/project.ts +174 -0
  291. package/src/services/projects.ts +1538 -1283
  292. package/src/services/proxy.ts +150 -0
  293. package/src/services/storage.ts +576 -571
  294. package/src/services/teams.ts +502 -501
  295. package/src/services/users.ts +1094 -1006
  296. package/src/services/vcs.ts +272 -0
  297. package/types/index.d.ts +5 -0
  298. package/types/models.d.ts +750 -78
  299. package/types/services/account.d.ts +80 -40
  300. package/types/services/assistant.d.ts +14 -0
  301. package/types/services/avatars.d.ts +7 -7
  302. package/types/services/console.d.ts +1 -1
  303. package/types/services/databases.d.ts +60 -54
  304. package/types/services/functions.d.ts +66 -31
  305. package/types/services/graphql.d.ts +2 -2
  306. package/types/services/health.d.ts +31 -12
  307. package/types/services/locale.d.ts +17 -7
  308. package/types/services/migrations.d.ts +185 -0
  309. package/types/services/project.d.ts +70 -0
  310. package/types/services/projects.d.ts +150 -80
  311. package/types/services/proxy.d.ts +59 -0
  312. package/types/services/storage.d.ts +17 -16
  313. package/types/services/teams.d.ts +17 -16
  314. package/types/services/users.d.ts +63 -26
  315. package/types/services/vcs.d.ts +97 -0
  316. package/.travis.yml +0 -32
  317. package/docs/examples/projects/update-domain-verification.md +0 -18
@@ -6,11 +6,11 @@ export declare class Account extends Service {
6
6
  /**
7
7
  * Get Account
8
8
  *
9
- * Get currently logged in user data as JSON object.
9
+ * Get the currently logged in user.
10
10
  *
11
11
  * @throws {AppwriteException}
12
12
  * @returns {Promise}
13
- */
13
+ */
14
14
  get<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
15
15
  /**
16
16
  * Create Account
@@ -28,7 +28,7 @@ export declare class Account extends Service {
28
28
  * @param {string} name
29
29
  * @throws {AppwriteException}
30
30
  * @returns {Promise}
31
- */
31
+ */
32
32
  create<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
33
33
  /**
34
34
  * Update Email
@@ -46,8 +46,47 @@ export declare class Account extends Service {
46
46
  * @param {string} password
47
47
  * @throws {AppwriteException}
48
48
  * @returns {Promise}
49
- */
49
+ */
50
50
  updateEmail<Preferences extends Models.Preferences>(email: string, password: string): Promise<Models.User<Preferences>>;
51
+ /**
52
+ * List Identities
53
+ *
54
+ * Get the list of identities for the currently logged in user.
55
+ *
56
+ * @param {string} queries
57
+ * @throws {AppwriteException}
58
+ * @returns {Promise}
59
+ */
60
+ listIdentities(queries?: string): Promise<Models.IdentityList>;
61
+ /**
62
+ * Delete Identity
63
+ *
64
+ * Delete an identity by its unique ID.
65
+ *
66
+ * @param {string} identityId
67
+ * @throws {AppwriteException}
68
+ * @returns {Promise}
69
+ */
70
+ deleteIdentity(identityId: string): Promise<{}>;
71
+ /**
72
+ * Create account using an invite code
73
+ *
74
+ * Use this endpoint to allow a new user to register a new account in your
75
+ * project. After the user registration completes successfully, you can use
76
+ * the [/account/verfication](/docs/client/account#accountCreateVerification)
77
+ * route to start verifying the user email address. To allow the new user to
78
+ * login to their new account, you need to create a new [account
79
+ * session](/docs/client/account#accountCreateSession).
80
+ *
81
+ * @param {string} userId
82
+ * @param {string} email
83
+ * @param {string} password
84
+ * @param {string} name
85
+ * @param {string} code
86
+ * @throws {AppwriteException}
87
+ * @returns {Promise}
88
+ */
89
+ createWithInviteCode<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string, code?: string): Promise<Models.Account<Preferences>>;
51
90
  /**
52
91
  * Create JWT
53
92
  *
@@ -59,18 +98,18 @@ export declare class Account extends Service {
59
98
  *
60
99
  * @throws {AppwriteException}
61
100
  * @returns {Promise}
62
- */
101
+ */
63
102
  createJWT(): Promise<Models.Jwt>;
64
103
  /**
65
104
  * List Logs
66
105
  *
67
- * Get currently logged in user list of latest security activity logs. Each
68
- * log returns user IP address, location and date and time of log.
106
+ * Get the list of latest security activity logs for the currently logged in
107
+ * user. Each log returns user IP address, location and date and time of log.
69
108
  *
70
109
  * @param {string[]} queries
71
110
  * @throws {AppwriteException}
72
111
  * @returns {Promise}
73
- */
112
+ */
74
113
  listLogs(queries?: string[]): Promise<Models.LogList>;
75
114
  /**
76
115
  * Update Name
@@ -80,7 +119,7 @@ export declare class Account extends Service {
80
119
  * @param {string} name
81
120
  * @throws {AppwriteException}
82
121
  * @returns {Promise}
83
- */
122
+ */
84
123
  updateName<Preferences extends Models.Preferences>(name: string): Promise<Models.User<Preferences>>;
85
124
  /**
86
125
  * Update Password
@@ -93,7 +132,7 @@ export declare class Account extends Service {
93
132
  * @param {string} oldPassword
94
133
  * @throws {AppwriteException}
95
134
  * @returns {Promise}
96
- */
135
+ */
97
136
  updatePassword<Preferences extends Models.Preferences>(password: string, oldPassword?: string): Promise<Models.User<Preferences>>;
98
137
  /**
99
138
  * Update Phone
@@ -108,16 +147,16 @@ export declare class Account extends Service {
108
147
  * @param {string} password
109
148
  * @throws {AppwriteException}
110
149
  * @returns {Promise}
111
- */
150
+ */
112
151
  updatePhone<Preferences extends Models.Preferences>(phone: string, password: string): Promise<Models.User<Preferences>>;
113
152
  /**
114
153
  * Get Account Preferences
115
154
  *
116
- * Get currently logged in user preferences as a key-value object.
155
+ * Get the preferences as a key-value object for the currently logged in user.
117
156
  *
118
157
  * @throws {AppwriteException}
119
158
  * @returns {Promise}
120
- */
159
+ */
121
160
  getPrefs<Preferences extends Models.Preferences>(): Promise<Preferences>;
122
161
  /**
123
162
  * Update Preferences
@@ -129,7 +168,7 @@ export declare class Account extends Service {
129
168
  * @param {Partial<Preferences>} prefs
130
169
  * @throws {AppwriteException}
131
170
  * @returns {Promise}
132
- */
171
+ */
133
172
  updatePrefs<Preferences extends Models.Preferences>(prefs: Partial<Preferences>): Promise<Models.User<Preferences>>;
134
173
  /**
135
174
  * Create Password Recovery
@@ -147,7 +186,7 @@ export declare class Account extends Service {
147
186
  * @param {string} url
148
187
  * @throws {AppwriteException}
149
188
  * @returns {Promise}
150
- */
189
+ */
151
190
  createRecovery(email: string, url: string): Promise<Models.Token>;
152
191
  /**
153
192
  * Create Password Recovery (confirmation)
@@ -168,17 +207,17 @@ export declare class Account extends Service {
168
207
  * @param {string} passwordAgain
169
208
  * @throws {AppwriteException}
170
209
  * @returns {Promise}
171
- */
210
+ */
172
211
  updateRecovery(userId: string, secret: string, password: string, passwordAgain: string): Promise<Models.Token>;
173
212
  /**
174
213
  * List Sessions
175
214
  *
176
- * Get currently logged in user list of active sessions across different
177
- * devices.
215
+ * Get the list of active sessions across different devices for the currently
216
+ * logged in user.
178
217
  *
179
218
  * @throws {AppwriteException}
180
219
  * @returns {Promise}
181
- */
220
+ */
182
221
  listSessions(): Promise<Models.SessionList>;
183
222
  /**
184
223
  * Delete Sessions
@@ -188,7 +227,7 @@ export declare class Account extends Service {
188
227
  *
189
228
  * @throws {AppwriteException}
190
229
  * @returns {Promise}
191
- */
230
+ */
192
231
  deleteSessions(): Promise<{}>;
193
232
  /**
194
233
  * Create Anonymous Session
@@ -202,7 +241,7 @@ export declare class Account extends Service {
202
241
  *
203
242
  * @throws {AppwriteException}
204
243
  * @returns {Promise}
205
- */
244
+ */
206
245
  createAnonymousSession(): Promise<Models.Session>;
207
246
  /**
208
247
  * Create Email Session
@@ -217,13 +256,13 @@ export declare class Account extends Service {
217
256
  * @param {string} password
218
257
  * @throws {AppwriteException}
219
258
  * @returns {Promise}
220
- */
259
+ */
221
260
  createEmailSession(email: string, password: string): Promise<Models.Session>;
222
261
  /**
223
262
  * Create Magic URL session
224
263
  *
225
264
  * Sends the user an email with a secret key for creating a session. If the
226
- * provided user ID has not be registered, a new user will be created. When
265
+ * provided user ID has not been registered, a new user will be created. When
227
266
  * the user clicks the link in the email, the user is redirected back to the
228
267
  * URL you provided with the secret key and userId values attached to the URL
229
268
  * query string. Use the query string parameters to submit a request to the
@@ -237,12 +276,13 @@ export declare class Account extends Service {
237
276
  * A user is limited to 10 active sessions at a time by default. [Learn more
238
277
  * about session limits](/docs/authentication-security#limits).
239
278
  *
279
+ *
240
280
  * @param {string} userId
241
281
  * @param {string} email
242
282
  * @param {string} url
243
283
  * @throws {AppwriteException}
244
284
  * @returns {Promise}
245
- */
285
+ */
246
286
  createMagicURLSession(userId: string, email: string, url?: string): Promise<Models.Token>;
247
287
  /**
248
288
  * Create Magic URL session (confirmation)
@@ -263,7 +303,7 @@ export declare class Account extends Service {
263
303
  * @param {string} secret
264
304
  * @throws {AppwriteException}
265
305
  * @returns {Promise}
266
- */
306
+ */
267
307
  updateMagicURLSession(userId: string, secret: string): Promise<Models.Session>;
268
308
  /**
269
309
  * Create OAuth2 Session
@@ -290,7 +330,7 @@ export declare class Account extends Service {
290
330
  * @param {string[]} scopes
291
331
  * @throws {AppwriteException}
292
332
  * @returns {void|string}
293
- */
333
+ */
294
334
  createOAuth2Session(provider: string, success?: string, failure?: string, scopes?: string[]): void | URL;
295
335
  /**
296
336
  * Create Phone session
@@ -309,7 +349,7 @@ export declare class Account extends Service {
309
349
  * @param {string} phone
310
350
  * @throws {AppwriteException}
311
351
  * @returns {Promise}
312
- */
352
+ */
313
353
  createPhoneSession(userId: string, phone: string): Promise<Models.Token>;
314
354
  /**
315
355
  * Create Phone Session (confirmation)
@@ -324,7 +364,7 @@ export declare class Account extends Service {
324
364
  * @param {string} secret
325
365
  * @throws {AppwriteException}
326
366
  * @returns {Promise}
327
- */
367
+ */
328
368
  updatePhoneSession(userId: string, secret: string): Promise<Models.Session>;
329
369
  /**
330
370
  * Get Session
@@ -335,7 +375,7 @@ export declare class Account extends Service {
335
375
  * @param {string} sessionId
336
376
  * @throws {AppwriteException}
337
377
  * @returns {Promise}
338
- */
378
+ */
339
379
  getSession(sessionId: string): Promise<Models.Session>;
340
380
  /**
341
381
  * Update OAuth Session (Refresh Tokens)
@@ -347,20 +387,20 @@ export declare class Account extends Service {
347
387
  * @param {string} sessionId
348
388
  * @throws {AppwriteException}
349
389
  * @returns {Promise}
350
- */
390
+ */
351
391
  updateSession(sessionId: string): Promise<Models.Session>;
352
392
  /**
353
393
  * Delete Session
354
394
  *
355
- * Use this endpoint to log out the currently logged in user from all their
356
- * account sessions across all of their different devices. When using the
357
- * Session ID argument, only the unique session ID provided is deleted.
358
- *
395
+ * Logout the user. Use 'current' as the session ID to logout on this device,
396
+ * use a session ID to logout on another device. If you're looking to logout
397
+ * the user on all devices, use [Delete
398
+ * Sessions](/docs/client/account#accountDeleteSessions) instead.
359
399
  *
360
400
  * @param {string} sessionId
361
401
  * @throws {AppwriteException}
362
402
  * @returns {Promise}
363
- */
403
+ */
364
404
  deleteSession(sessionId: string): Promise<{}>;
365
405
  /**
366
406
  * Update Status
@@ -371,7 +411,7 @@ export declare class Account extends Service {
371
411
  *
372
412
  * @throws {AppwriteException}
373
413
  * @returns {Promise}
374
- */
414
+ */
375
415
  updateStatus<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
376
416
  /**
377
417
  * Create Email Verification
@@ -395,7 +435,7 @@ export declare class Account extends Service {
395
435
  * @param {string} url
396
436
  * @throws {AppwriteException}
397
437
  * @returns {Promise}
398
- */
438
+ */
399
439
  createVerification(url: string): Promise<Models.Token>;
400
440
  /**
401
441
  * Create Email Verification (confirmation)
@@ -409,7 +449,7 @@ export declare class Account extends Service {
409
449
  * @param {string} secret
410
450
  * @throws {AppwriteException}
411
451
  * @returns {Promise}
412
- */
452
+ */
413
453
  updateVerification(userId: string, secret: string): Promise<Models.Token>;
414
454
  /**
415
455
  * Create Phone Verification
@@ -423,7 +463,7 @@ export declare class Account extends Service {
423
463
  *
424
464
  * @throws {AppwriteException}
425
465
  * @returns {Promise}
426
- */
466
+ */
427
467
  createPhoneVerification(): Promise<Models.Token>;
428
468
  /**
429
469
  * Create Phone Verification (confirmation)
@@ -437,6 +477,6 @@ export declare class Account extends Service {
437
477
  * @param {string} secret
438
478
  * @throws {AppwriteException}
439
479
  * @returns {Promise}
440
- */
480
+ */
441
481
  updatePhoneVerification(userId: string, secret: string): Promise<Models.Token>;
442
482
  }
@@ -0,0 +1,14 @@
1
+ import { Service } from '../service';
2
+ import { Client } from '../client';
3
+ export declare class Assistant extends Service {
4
+ constructor(client: Client);
5
+ /**
6
+ * Ask Query
7
+ *
8
+ *
9
+ * @param {string} prompt
10
+ * @throws {AppwriteException}
11
+ * @returns {Promise}
12
+ */
13
+ chat(prompt: string): Promise<{}>;
14
+ }
@@ -21,7 +21,7 @@ export declare class Avatars extends Service {
21
21
  * @param {number} quality
22
22
  * @throws {AppwriteException}
23
23
  * @returns {URL}
24
- */
24
+ */
25
25
  getBrowser(code: string, width?: number, height?: number, quality?: number): URL;
26
26
  /**
27
27
  * Get Credit Card Icon
@@ -42,7 +42,7 @@ export declare class Avatars extends Service {
42
42
  * @param {number} quality
43
43
  * @throws {AppwriteException}
44
44
  * @returns {URL}
45
- */
45
+ */
46
46
  getCreditCard(code: string, width?: number, height?: number, quality?: number): URL;
47
47
  /**
48
48
  * Get Favicon
@@ -54,7 +54,7 @@ export declare class Avatars extends Service {
54
54
  * @param {string} url
55
55
  * @throws {AppwriteException}
56
56
  * @returns {URL}
57
- */
57
+ */
58
58
  getFavicon(url: string): URL;
59
59
  /**
60
60
  * Get Country Flag
@@ -76,7 +76,7 @@ export declare class Avatars extends Service {
76
76
  * @param {number} quality
77
77
  * @throws {AppwriteException}
78
78
  * @returns {URL}
79
- */
79
+ */
80
80
  getFlag(code: string, width?: number, height?: number, quality?: number): URL;
81
81
  /**
82
82
  * Get Image from URL
@@ -97,7 +97,7 @@ export declare class Avatars extends Service {
97
97
  * @param {number} height
98
98
  * @throws {AppwriteException}
99
99
  * @returns {URL}
100
- */
100
+ */
101
101
  getImage(url: string, width?: number, height?: number): URL;
102
102
  /**
103
103
  * Get User Initials
@@ -125,7 +125,7 @@ export declare class Avatars extends Service {
125
125
  * @param {string} background
126
126
  * @throws {AppwriteException}
127
127
  * @returns {URL}
128
- */
128
+ */
129
129
  getInitials(name?: string, width?: number, height?: number, background?: string): URL;
130
130
  /**
131
131
  * Get QR Code
@@ -140,6 +140,6 @@ export declare class Avatars extends Service {
140
140
  * @param {boolean} download
141
141
  * @throws {AppwriteException}
142
142
  * @returns {URL}
143
- */
143
+ */
144
144
  getQR(text: string, size?: number, margin?: number, download?: boolean): URL;
145
145
  }
@@ -10,6 +10,6 @@ export declare class Console extends Service {
10
10
  *
11
11
  * @throws {AppwriteException}
12
12
  * @returns {Promise}
13
- */
13
+ */
14
14
  variables(): Promise<Models.ConsoleVariables>;
15
15
  }