@appwrite.io/console 0.2.0 → 0.4.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 (322) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/sdk.js +3353 -1497
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +3350 -1498
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +3353 -1497
  7. package/docs/examples/account/create-anonymous-session.md +1 -1
  8. package/docs/examples/account/create-email-session.md +1 -1
  9. package/docs/examples/account/create-j-w-t.md +1 -1
  10. package/docs/examples/account/create-magic-u-r-l-session.md +1 -1
  11. package/docs/examples/account/create-o-auth2session.md +1 -1
  12. package/docs/examples/account/create-phone-session.md +1 -1
  13. package/docs/examples/account/create-phone-verification.md +1 -1
  14. package/docs/examples/account/create-recovery.md +1 -1
  15. package/docs/examples/account/create-verification.md +1 -1
  16. package/docs/examples/account/create.md +1 -1
  17. package/docs/examples/account/{create-with-invite-code.md → delete-identity.md} +2 -2
  18. package/docs/examples/account/delete-session.md +1 -1
  19. package/docs/examples/account/delete-sessions.md +1 -1
  20. package/docs/examples/account/get-prefs.md +1 -1
  21. package/docs/examples/account/get-session.md +1 -1
  22. package/docs/examples/account/get.md +1 -1
  23. package/docs/examples/account/list-identities.md +18 -0
  24. package/docs/examples/account/list-logs.md +1 -1
  25. package/docs/examples/account/list-sessions.md +1 -1
  26. package/docs/examples/account/update-email.md +1 -1
  27. package/docs/examples/account/update-magic-u-r-l-session.md +1 -1
  28. package/docs/examples/account/update-name.md +1 -1
  29. package/docs/examples/account/update-password.md +1 -1
  30. package/docs/examples/account/update-phone-session.md +1 -1
  31. package/docs/examples/account/update-phone-verification.md +1 -1
  32. package/docs/examples/account/update-phone.md +1 -1
  33. package/docs/examples/account/update-prefs.md +1 -1
  34. package/docs/examples/account/update-recovery.md +1 -1
  35. package/docs/examples/account/update-session.md +1 -1
  36. package/docs/examples/account/update-status.md +1 -1
  37. package/docs/examples/account/update-verification.md +1 -1
  38. package/docs/examples/assistant/chat.md +18 -0
  39. package/docs/examples/avatars/get-browser.md +1 -1
  40. package/docs/examples/avatars/get-credit-card.md +1 -1
  41. package/docs/examples/avatars/get-favicon.md +1 -1
  42. package/docs/examples/avatars/get-flag.md +1 -1
  43. package/docs/examples/avatars/get-image.md +1 -1
  44. package/docs/examples/avatars/get-initials.md +1 -1
  45. package/docs/examples/avatars/get-q-r.md +1 -1
  46. package/docs/examples/console/variables.md +1 -1
  47. package/docs/examples/databases/create-boolean-attribute.md +1 -1
  48. package/docs/examples/databases/create-collection.md +1 -1
  49. package/docs/examples/databases/create-datetime-attribute.md +1 -1
  50. package/docs/examples/databases/create-document.md +1 -1
  51. package/docs/examples/databases/create-email-attribute.md +1 -1
  52. package/docs/examples/databases/create-enum-attribute.md +1 -1
  53. package/docs/examples/databases/create-float-attribute.md +1 -1
  54. package/docs/examples/databases/create-index.md +1 -1
  55. package/docs/examples/databases/create-integer-attribute.md +1 -1
  56. package/docs/examples/databases/create-ip-attribute.md +1 -1
  57. package/docs/examples/databases/create-relationship-attribute.md +1 -1
  58. package/docs/examples/databases/create-string-attribute.md +1 -1
  59. package/docs/examples/databases/create-url-attribute.md +1 -1
  60. package/docs/examples/databases/create.md +1 -1
  61. package/docs/examples/databases/delete-attribute.md +1 -1
  62. package/docs/examples/databases/delete-collection.md +1 -1
  63. package/docs/examples/databases/delete-document.md +1 -1
  64. package/docs/examples/databases/delete-index.md +1 -1
  65. package/docs/examples/databases/delete.md +1 -1
  66. package/docs/examples/databases/get-attribute.md +1 -1
  67. package/docs/examples/databases/get-collection-usage.md +1 -1
  68. package/docs/examples/databases/get-collection.md +1 -1
  69. package/docs/examples/databases/get-database-usage.md +1 -1
  70. package/docs/examples/databases/get-document.md +1 -1
  71. package/docs/examples/databases/get-index.md +1 -1
  72. package/docs/examples/databases/get-usage.md +1 -1
  73. package/docs/examples/databases/get.md +1 -1
  74. package/docs/examples/databases/list-attributes.md +1 -1
  75. package/docs/examples/databases/list-collection-logs.md +1 -1
  76. package/docs/examples/databases/list-collections.md +1 -1
  77. package/docs/examples/databases/list-document-logs.md +1 -1
  78. package/docs/examples/databases/list-documents.md +1 -1
  79. package/docs/examples/databases/list-indexes.md +1 -1
  80. package/docs/examples/databases/list-logs.md +1 -1
  81. package/docs/examples/databases/list.md +1 -1
  82. package/docs/examples/databases/update-boolean-attribute.md +1 -1
  83. package/docs/examples/databases/update-collection.md +1 -1
  84. package/docs/examples/databases/update-datetime-attribute.md +1 -1
  85. package/docs/examples/databases/update-document.md +1 -1
  86. package/docs/examples/databases/update-email-attribute.md +1 -1
  87. package/docs/examples/databases/update-enum-attribute.md +1 -1
  88. package/docs/examples/databases/update-float-attribute.md +1 -1
  89. package/docs/examples/databases/update-integer-attribute.md +1 -1
  90. package/docs/examples/databases/update-ip-attribute.md +1 -1
  91. package/docs/examples/databases/update-relationship-attribute.md +1 -1
  92. package/docs/examples/databases/update-string-attribute.md +1 -1
  93. package/docs/examples/databases/update-url-attribute.md +1 -1
  94. package/docs/examples/databases/update.md +1 -1
  95. package/docs/examples/functions/create-build.md +1 -1
  96. package/docs/examples/functions/create-deployment.md +2 -2
  97. package/docs/examples/functions/create-execution.md +1 -1
  98. package/docs/examples/functions/create-variable.md +1 -1
  99. package/docs/examples/functions/create.md +2 -2
  100. package/docs/examples/functions/delete-deployment.md +1 -1
  101. package/docs/examples/functions/delete-variable.md +1 -1
  102. package/docs/examples/functions/delete.md +1 -1
  103. package/docs/examples/functions/download-deployment.md +14 -0
  104. package/docs/examples/functions/get-deployment.md +1 -1
  105. package/docs/examples/functions/get-execution.md +1 -1
  106. package/docs/examples/functions/get-function-usage.md +1 -1
  107. package/docs/examples/functions/get-usage.md +1 -1
  108. package/docs/examples/functions/get-variable.md +1 -1
  109. package/docs/examples/functions/get.md +1 -1
  110. package/docs/examples/functions/list-deployments.md +1 -1
  111. package/docs/examples/functions/list-executions.md +1 -1
  112. package/docs/examples/functions/list-runtimes.md +1 -1
  113. package/docs/examples/functions/list-variables.md +1 -1
  114. package/docs/examples/functions/list.md +1 -1
  115. package/docs/examples/functions/update-deployment.md +1 -1
  116. package/docs/examples/functions/update-variable.md +1 -1
  117. package/docs/examples/functions/update.md +1 -1
  118. package/docs/examples/graphql/mutation.md +1 -1
  119. package/docs/examples/graphql/query.md +1 -1
  120. package/docs/examples/health/get-antivirus.md +1 -1
  121. package/docs/examples/health/get-cache.md +1 -1
  122. package/docs/examples/health/get-d-b.md +1 -1
  123. package/docs/examples/health/get-pub-sub.md +1 -1
  124. package/docs/examples/health/get-queue-builds.md +18 -0
  125. package/docs/examples/health/get-queue-certificates.md +1 -1
  126. package/docs/examples/health/get-queue-databases.md +18 -0
  127. package/docs/examples/health/get-queue-deletes.md +18 -0
  128. package/docs/examples/health/get-queue-functions.md +1 -1
  129. package/docs/examples/health/get-queue-logs.md +1 -1
  130. package/docs/examples/health/get-queue-mails.md +18 -0
  131. package/docs/examples/health/get-queue-messaging.md +18 -0
  132. package/docs/examples/health/get-queue-migrations.md +18 -0
  133. package/docs/examples/health/get-queue-webhooks.md +1 -1
  134. package/docs/examples/health/get-queue.md +1 -1
  135. package/docs/examples/health/get-storage-local.md +1 -1
  136. package/docs/examples/health/get-time.md +1 -1
  137. package/docs/examples/health/get.md +1 -1
  138. package/docs/examples/locale/get.md +1 -1
  139. package/docs/examples/locale/list-codes.md +18 -0
  140. package/docs/examples/locale/list-continents.md +1 -1
  141. package/docs/examples/locale/list-countries-e-u.md +1 -1
  142. package/docs/examples/locale/list-countries-phones.md +1 -1
  143. package/docs/examples/locale/list-countries.md +1 -1
  144. package/docs/examples/locale/list-currencies.md +1 -1
  145. package/docs/examples/locale/list-languages.md +1 -1
  146. package/docs/examples/migrations/create-appwrite-migration.md +18 -0
  147. package/docs/examples/migrations/create-firebase-migration.md +18 -0
  148. package/docs/examples/migrations/create-firebase-o-auth-migration.md +18 -0
  149. package/docs/examples/migrations/create-n-host-migration.md +18 -0
  150. package/docs/examples/migrations/create-supabase-migration.md +18 -0
  151. package/docs/examples/migrations/delete-firebase-auth.md +18 -0
  152. package/docs/examples/migrations/delete.md +18 -0
  153. package/docs/examples/migrations/get-appwrite-report.md +18 -0
  154. package/docs/examples/migrations/get-firebase-report-o-auth.md +18 -0
  155. package/docs/examples/migrations/get-firebase-report.md +18 -0
  156. package/docs/examples/migrations/get-n-host-report.md +18 -0
  157. package/docs/examples/migrations/get-supabase-report.md +18 -0
  158. package/docs/examples/migrations/get.md +18 -0
  159. package/docs/examples/migrations/list-firebase-projects.md +18 -0
  160. package/docs/examples/migrations/list.md +18 -0
  161. package/docs/examples/migrations/retry.md +18 -0
  162. package/docs/examples/project/create-variable.md +18 -0
  163. package/docs/examples/project/delete-variable.md +18 -0
  164. package/docs/examples/project/get-usage.md +2 -2
  165. package/docs/examples/project/get-variable.md +18 -0
  166. package/docs/examples/project/list-variables.md +18 -0
  167. package/docs/examples/project/update-variable.md +18 -0
  168. package/docs/examples/projects/create-key.md +1 -1
  169. package/docs/examples/projects/create-platform.md +1 -1
  170. package/docs/examples/projects/create-webhook.md +1 -1
  171. package/docs/examples/projects/create.md +2 -2
  172. package/docs/examples/projects/delete-email-template.md +18 -0
  173. package/docs/examples/projects/delete-key.md +1 -1
  174. package/docs/examples/projects/delete-platform.md +1 -1
  175. package/docs/examples/projects/delete-sms-template.md +18 -0
  176. package/docs/examples/projects/delete-webhook.md +1 -1
  177. package/docs/examples/projects/delete.md +2 -2
  178. package/docs/examples/projects/get-email-template.md +18 -0
  179. package/docs/examples/projects/get-key.md +1 -1
  180. package/docs/examples/projects/get-platform.md +1 -1
  181. package/docs/examples/projects/get-sms-template.md +18 -0
  182. package/docs/examples/projects/get-webhook.md +1 -1
  183. package/docs/examples/projects/get.md +1 -1
  184. package/docs/examples/projects/list-keys.md +1 -1
  185. package/docs/examples/projects/list-platforms.md +1 -1
  186. package/docs/examples/projects/list-webhooks.md +1 -1
  187. package/docs/examples/projects/list.md +1 -1
  188. package/docs/examples/projects/update-auth-duration.md +1 -1
  189. package/docs/examples/projects/update-auth-limit.md +1 -1
  190. package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
  191. package/docs/examples/projects/update-auth-password-history.md +1 -1
  192. package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
  193. package/docs/examples/projects/update-auth-status.md +1 -1
  194. package/docs/examples/projects/update-email-template.md +18 -0
  195. package/docs/examples/projects/update-key.md +1 -1
  196. package/docs/examples/projects/update-o-auth2.md +1 -1
  197. package/docs/examples/projects/{delete-domain.md → update-personal-data-check.md} +2 -2
  198. package/docs/examples/projects/update-platform.md +1 -1
  199. package/docs/examples/projects/{create-domain.md → update-service-status-all.md} +2 -2
  200. package/docs/examples/projects/update-service-status.md +1 -1
  201. package/docs/examples/projects/update-sms-template.md +18 -0
  202. package/docs/examples/projects/{get-domain.md → update-smtp-configuration.md} +2 -2
  203. package/docs/examples/projects/{list-domains.md → update-team.md} +2 -2
  204. package/docs/examples/projects/update-webhook-signature.md +1 -1
  205. package/docs/examples/projects/update-webhook.md +1 -1
  206. package/docs/examples/projects/update.md +1 -1
  207. package/docs/examples/proxy/create-rule.md +18 -0
  208. package/docs/examples/proxy/delete-rule.md +18 -0
  209. package/docs/examples/proxy/get-rule.md +18 -0
  210. package/docs/examples/proxy/list-rules.md +18 -0
  211. package/docs/examples/proxy/update-rule-verification.md +18 -0
  212. package/docs/examples/storage/create-bucket.md +1 -1
  213. package/docs/examples/storage/create-file.md +1 -1
  214. package/docs/examples/storage/delete-bucket.md +1 -1
  215. package/docs/examples/storage/delete-file.md +1 -1
  216. package/docs/examples/storage/get-bucket-usage.md +1 -1
  217. package/docs/examples/storage/get-bucket.md +1 -1
  218. package/docs/examples/storage/get-file-download.md +1 -1
  219. package/docs/examples/storage/get-file-preview.md +1 -1
  220. package/docs/examples/storage/get-file-view.md +1 -1
  221. package/docs/examples/storage/get-file.md +1 -1
  222. package/docs/examples/storage/get-usage.md +1 -1
  223. package/docs/examples/storage/list-buckets.md +1 -1
  224. package/docs/examples/storage/list-files.md +1 -1
  225. package/docs/examples/storage/update-bucket.md +1 -1
  226. package/docs/examples/storage/update-file.md +1 -1
  227. package/docs/examples/teams/create-membership.md +2 -2
  228. package/docs/examples/teams/create.md +1 -1
  229. package/docs/examples/teams/delete-membership.md +1 -1
  230. package/docs/examples/teams/delete.md +1 -1
  231. package/docs/examples/teams/get-membership.md +1 -1
  232. package/docs/examples/teams/get-prefs.md +1 -1
  233. package/docs/examples/teams/get.md +1 -1
  234. package/docs/examples/teams/list-logs.md +1 -1
  235. package/docs/examples/teams/list-memberships.md +1 -1
  236. package/docs/examples/teams/list.md +1 -1
  237. package/docs/examples/teams/update-membership-status.md +1 -1
  238. package/docs/examples/teams/{update-membership-roles.md → update-membership.md} +2 -2
  239. package/docs/examples/teams/update-name.md +1 -1
  240. package/docs/examples/teams/update-prefs.md +1 -1
  241. package/docs/examples/users/create-argon2user.md +1 -1
  242. package/docs/examples/users/create-bcrypt-user.md +1 -1
  243. package/docs/examples/users/create-m-d5user.md +1 -1
  244. package/docs/examples/users/create-p-h-pass-user.md +1 -1
  245. package/docs/examples/users/create-s-h-a-user.md +1 -1
  246. package/docs/examples/users/create-scrypt-modified-user.md +1 -1
  247. package/docs/examples/users/create-scrypt-user.md +1 -1
  248. package/docs/examples/users/create.md +1 -1
  249. package/docs/examples/users/delete-identity.md +18 -0
  250. package/docs/examples/users/delete-session.md +1 -1
  251. package/docs/examples/users/delete-sessions.md +1 -1
  252. package/docs/examples/users/delete.md +1 -1
  253. package/docs/examples/users/get-prefs.md +1 -1
  254. package/docs/examples/users/get-usage.md +1 -1
  255. package/docs/examples/users/get.md +1 -1
  256. package/docs/examples/users/list-identities.md +18 -0
  257. package/docs/examples/users/list-logs.md +1 -1
  258. package/docs/examples/users/list-memberships.md +1 -1
  259. package/docs/examples/users/list-sessions.md +1 -1
  260. package/docs/examples/users/list.md +1 -1
  261. package/docs/examples/users/update-email-verification.md +1 -1
  262. package/docs/examples/users/update-email.md +1 -1
  263. package/docs/examples/users/update-labels.md +18 -0
  264. package/docs/examples/users/update-name.md +1 -1
  265. package/docs/examples/users/update-password.md +1 -1
  266. package/docs/examples/users/update-phone-verification.md +1 -1
  267. package/docs/examples/users/update-phone.md +1 -1
  268. package/docs/examples/users/update-prefs.md +1 -1
  269. package/docs/examples/users/update-status.md +1 -1
  270. package/docs/examples/vcs/create-repository-detection.md +18 -0
  271. package/docs/examples/vcs/create-repository.md +18 -0
  272. package/docs/examples/vcs/delete-installation.md +18 -0
  273. package/docs/examples/vcs/get-installation.md +18 -0
  274. package/docs/examples/vcs/get-repository.md +18 -0
  275. package/docs/examples/vcs/list-installations.md +18 -0
  276. package/docs/examples/vcs/list-repositories.md +18 -0
  277. package/docs/examples/vcs/list-repository-branches.md +18 -0
  278. package/docs/examples/vcs/update-external-deployments.md +18 -0
  279. package/package.json +3 -2
  280. package/src/client.ts +2 -2
  281. package/src/index.ts +4 -0
  282. package/src/models.ts +863 -233
  283. package/src/query.ts +1 -1
  284. package/src/role.ts +72 -6
  285. package/src/services/account.ts +1052 -1055
  286. package/src/services/assistant.ts +38 -0
  287. package/src/services/avatars.ts +338 -337
  288. package/src/services/console.ts +16 -16
  289. package/src/services/databases.ts +2170 -2140
  290. package/src/services/functions.ts +804 -657
  291. package/src/services/graphql.ts +47 -47
  292. package/src/services/health.ts +373 -204
  293. package/src/services/locale.ts +156 -137
  294. package/src/services/migrations.ts +707 -0
  295. package/src/services/project.ts +178 -20
  296. package/src/services/projects.ts +1511 -1256
  297. package/src/services/proxy.ts +150 -0
  298. package/src/services/storage.ts +572 -577
  299. package/src/services/teams.ts +498 -501
  300. package/src/services/users.ts +1091 -1001
  301. package/src/services/vcs.ts +272 -0
  302. package/types/index.d.ts +4 -0
  303. package/types/models.d.ts +863 -233
  304. package/types/role.d.ts +62 -0
  305. package/types/services/account.d.ts +116 -104
  306. package/types/services/assistant.d.ts +14 -0
  307. package/types/services/avatars.d.ts +18 -17
  308. package/types/services/console.d.ts +2 -2
  309. package/types/services/databases.d.ts +111 -105
  310. package/types/services/functions.d.ts +95 -55
  311. package/types/services/graphql.d.ts +4 -4
  312. package/types/services/health.d.ts +97 -26
  313. package/types/services/locale.d.ts +24 -14
  314. package/types/services/migrations.d.ts +185 -0
  315. package/types/services/project.d.ts +60 -3
  316. package/types/services/projects.d.ts +174 -104
  317. package/types/services/proxy.d.ts +59 -0
  318. package/types/services/storage.d.ts +29 -28
  319. package/types/services/teams.d.ts +36 -35
  320. package/types/services/users.d.ts +105 -66
  321. package/types/services/vcs.d.ts +97 -0
  322. package/docs/examples/projects/update-domain-verification.md +0 -18
package/types/role.d.ts CHANGED
@@ -1,8 +1,70 @@
1
+ /**
2
+ * Helper class to generate role strings for `Permission`.
3
+ */
1
4
  export declare class Role {
5
+ /**
6
+ * Grants access to anyone.
7
+ *
8
+ * This includes authenticated and unauthenticated users.
9
+ *
10
+ * @returns {string}
11
+ */
2
12
  static any(): string;
13
+ /**
14
+ * Grants access to a specific user by user ID.
15
+ *
16
+ * You can optionally pass verified or unverified for
17
+ * `status` to target specific types of users.
18
+ *
19
+ * @param {string} id
20
+ * @param {string} status
21
+ * @returns {string}
22
+ */
3
23
  static user(id: string, status?: string): string;
24
+ /**
25
+ * Grants access to any authenticated or anonymous user.
26
+ *
27
+ * You can optionally pass verified or unverified for
28
+ * `status` to target specific types of users.
29
+ *
30
+ * @param {string} status
31
+ * @returns {string}
32
+ */
4
33
  static users(status?: string): string;
34
+ /**
35
+ * Grants access to any guest user without a session.
36
+ *
37
+ * Authenticated users don't have access to this role.
38
+ *
39
+ * @returns {string}
40
+ */
5
41
  static guests(): string;
42
+ /**
43
+ * Grants access to a team by team ID.
44
+ *
45
+ * You can optionally pass a role for `role` to target
46
+ * team members with the specified role.
47
+ *
48
+ * @param {string} id
49
+ * @param {string} role
50
+ * @returns {string}
51
+ */
6
52
  static team(id: string, role?: string): string;
53
+ /**
54
+ * Grants access to a specific member of a team.
55
+ *
56
+ * When the member is removed from the team, they will
57
+ * no longer have access.
58
+ *
59
+ * @param {string} id
60
+ * @returns {string}
61
+ */
7
62
  static member(id: string): string;
63
+ /**
64
+ * Grants access to a user with the specified label.
65
+ *
66
+ * @param {string} name
67
+ * @returns {string}
68
+ */
69
+ static label(name: string): string;
8
70
  }
@@ -4,23 +4,24 @@ import type { Models } from '../models';
4
4
  export declare class Account extends Service {
5
5
  constructor(client: Client);
6
6
  /**
7
- * Get Account
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
- * Create Account
16
+ * Create account
17
17
  *
18
18
  * Use this endpoint to allow a new user to register a new account in your
19
19
  * project. After the user registration completes successfully, you can use
20
- * the [/account/verfication](/docs/client/account#accountCreateVerification)
20
+ * the
21
+ * [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification)
21
22
  * route to start verifying the user email address. To allow the new user to
22
23
  * login to their new account, you need to create a new [account
23
- * session](/docs/client/account#accountCreateSession).
24
+ * session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).
24
25
  *
25
26
  * @param {string} userId
26
27
  * @param {string} email
@@ -28,10 +29,10 @@ export declare class Account extends Service {
28
29
  * @param {string} name
29
30
  * @throws {AppwriteException}
30
31
  * @returns {Promise}
31
- */
32
+ */
32
33
  create<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
33
34
  /**
34
- * Update Email
35
+ * Update email
35
36
  *
36
37
  * Update currently logged in user account email address. After changing user
37
38
  * address, the user confirmation status will get reset. A new confirmation
@@ -46,27 +47,28 @@ export declare class Account extends Service {
46
47
  * @param {string} password
47
48
  * @throws {AppwriteException}
48
49
  * @returns {Promise}
49
- */
50
+ */
50
51
  updateEmail<Preferences extends Models.Preferences>(email: string, password: string): Promise<Models.User<Preferences>>;
51
52
  /**
52
- * Create account using an invite code
53
+ * List Identities
53
54
  *
54
- * Use this endpoint to allow a new user to register a new account in your
55
- * project. After the user registration completes successfully, you can use
56
- * the [/account/verfication](/docs/client/account#accountCreateVerification)
57
- * route to start verifying the user email address. To allow the new user to
58
- * login to their new account, you need to create a new [account
59
- * session](/docs/client/account#accountCreateSession).
55
+ * Get the list of identities for the currently logged in user.
60
56
  *
61
- * @param {string} userId
62
- * @param {string} email
63
- * @param {string} password
64
- * @param {string} name
65
- * @param {string} code
57
+ * @param {string} queries
66
58
  * @throws {AppwriteException}
67
59
  * @returns {Promise}
68
- */
69
- createWithInviteCode<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string, code?: string): Promise<Models.Account<Preferences>>;
60
+ */
61
+ listIdentities(queries?: string): Promise<Models.IdentityList>;
62
+ /**
63
+ * Delete Identity
64
+ *
65
+ * Delete an identity by its unique ID.
66
+ *
67
+ * @param {string} identityId
68
+ * @throws {AppwriteException}
69
+ * @returns {Promise}
70
+ */
71
+ deleteIdentity(identityId: string): Promise<{}>;
70
72
  /**
71
73
  * Create JWT
72
74
  *
@@ -78,31 +80,31 @@ export declare class Account extends Service {
78
80
  *
79
81
  * @throws {AppwriteException}
80
82
  * @returns {Promise}
81
- */
83
+ */
82
84
  createJWT(): Promise<Models.Jwt>;
83
85
  /**
84
- * List Logs
86
+ * List logs
85
87
  *
86
- * Get currently logged in user list of latest security activity logs. Each
87
- * log returns user IP address, location and date and time of log.
88
+ * Get the list of latest security activity logs for the currently logged in
89
+ * user. Each log returns user IP address, location and date and time of log.
88
90
  *
89
91
  * @param {string[]} queries
90
92
  * @throws {AppwriteException}
91
93
  * @returns {Promise}
92
- */
94
+ */
93
95
  listLogs(queries?: string[]): Promise<Models.LogList>;
94
96
  /**
95
- * Update Name
97
+ * Update name
96
98
  *
97
99
  * Update currently logged in user account name.
98
100
  *
99
101
  * @param {string} name
100
102
  * @throws {AppwriteException}
101
103
  * @returns {Promise}
102
- */
104
+ */
103
105
  updateName<Preferences extends Models.Preferences>(name: string): Promise<Models.User<Preferences>>;
104
106
  /**
105
- * Update Password
107
+ * Update password
106
108
  *
107
109
  * Update currently logged in user password. For validation, user is required
108
110
  * to pass in the new password, and the old password. For users created with
@@ -112,34 +114,34 @@ export declare class Account extends Service {
112
114
  * @param {string} oldPassword
113
115
  * @throws {AppwriteException}
114
116
  * @returns {Promise}
115
- */
117
+ */
116
118
  updatePassword<Preferences extends Models.Preferences>(password: string, oldPassword?: string): Promise<Models.User<Preferences>>;
117
119
  /**
118
- * Update Phone
120
+ * Update phone
119
121
  *
120
122
  * Update the currently logged in user's phone number. After updating the
121
123
  * phone number, the phone verification status will be reset. A confirmation
122
124
  * SMS is not sent automatically, however you can use the [POST
123
- * /account/verification/phone](/docs/client/account#accountCreatePhoneVerification)
125
+ * /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification)
124
126
  * endpoint to send a confirmation SMS.
125
127
  *
126
128
  * @param {string} phone
127
129
  * @param {string} password
128
130
  * @throws {AppwriteException}
129
131
  * @returns {Promise}
130
- */
132
+ */
131
133
  updatePhone<Preferences extends Models.Preferences>(phone: string, password: string): Promise<Models.User<Preferences>>;
132
134
  /**
133
- * Get Account Preferences
135
+ * Get account preferences
134
136
  *
135
- * Get currently logged in user preferences as a key-value object.
137
+ * Get the preferences as a key-value object for the currently logged in user.
136
138
  *
137
139
  * @throws {AppwriteException}
138
140
  * @returns {Promise}
139
- */
141
+ */
140
142
  getPrefs<Preferences extends Models.Preferences>(): Promise<Preferences>;
141
143
  /**
142
- * Update Preferences
144
+ * Update preferences
143
145
  *
144
146
  * Update currently logged in user account preferences. The object you pass is
145
147
  * stored as is, and replaces any previous value. The maximum allowed prefs
@@ -148,33 +150,34 @@ export declare class Account extends Service {
148
150
  * @param {Partial<Preferences>} prefs
149
151
  * @throws {AppwriteException}
150
152
  * @returns {Promise}
151
- */
153
+ */
152
154
  updatePrefs<Preferences extends Models.Preferences>(prefs: Partial<Preferences>): Promise<Models.User<Preferences>>;
153
155
  /**
154
- * Create Password Recovery
156
+ * Create password recovery
155
157
  *
156
158
  * Sends the user an email with a temporary secret key for password reset.
157
159
  * When the user clicks the confirmation link he is redirected back to your
158
160
  * app password reset URL with the secret key and email address values
159
161
  * attached to the URL query string. Use the query string params to submit a
160
162
  * request to the [PUT
161
- * /account/recovery](/docs/client/account#accountUpdateRecovery) endpoint to
162
- * complete the process. The verification link sent to the user's email
163
- * address is valid for 1 hour.
163
+ * /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery)
164
+ * endpoint to complete the process. The verification link sent to the user's
165
+ * email address is valid for 1 hour.
164
166
  *
165
167
  * @param {string} email
166
168
  * @param {string} url
167
169
  * @throws {AppwriteException}
168
170
  * @returns {Promise}
169
- */
171
+ */
170
172
  createRecovery(email: string, url: string): Promise<Models.Token>;
171
173
  /**
172
- * Create Password Recovery (confirmation)
174
+ * Create password recovery (confirmation)
173
175
  *
174
176
  * Use this endpoint to complete the user account password reset. Both the
175
177
  * **userId** and **secret** arguments will be passed as query parameters to
176
178
  * the redirect URL you have provided when sending your request to the [POST
177
- * /account/recovery](/docs/client/account#accountCreateRecovery) endpoint.
179
+ * /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery)
180
+ * endpoint.
178
181
  *
179
182
  * Please note that in order to avoid a [Redirect
180
183
  * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
@@ -187,90 +190,94 @@ export declare class Account extends Service {
187
190
  * @param {string} passwordAgain
188
191
  * @throws {AppwriteException}
189
192
  * @returns {Promise}
190
- */
193
+ */
191
194
  updateRecovery(userId: string, secret: string, password: string, passwordAgain: string): Promise<Models.Token>;
192
195
  /**
193
- * List Sessions
196
+ * List sessions
194
197
  *
195
- * Get currently logged in user list of active sessions across different
196
- * devices.
198
+ * Get the list of active sessions across different devices for the currently
199
+ * logged in user.
197
200
  *
198
201
  * @throws {AppwriteException}
199
202
  * @returns {Promise}
200
- */
203
+ */
201
204
  listSessions(): Promise<Models.SessionList>;
202
205
  /**
203
- * Delete Sessions
206
+ * Delete sessions
204
207
  *
205
208
  * Delete all sessions from the user account and remove any sessions cookies
206
209
  * from the end client.
207
210
  *
208
211
  * @throws {AppwriteException}
209
212
  * @returns {Promise}
210
- */
213
+ */
211
214
  deleteSessions(): Promise<{}>;
212
215
  /**
213
- * Create Anonymous Session
216
+ * Create anonymous session
214
217
  *
215
218
  * Use this endpoint to allow a new user to register an anonymous account in
216
219
  * your project. This route will also create a new session for the user. To
217
220
  * allow the new user to convert an anonymous account to a normal account, you
218
221
  * need to update its [email and
219
- * password](/docs/client/account#accountUpdateEmail) or create an [OAuth2
220
- * session](/docs/client/account#accountCreateOAuth2Session).
222
+ * password](https://appwrite.io/docs/references/cloud/client-web/account#updateEmail)
223
+ * or create an [OAuth2
224
+ * session](https://appwrite.io/docs/references/cloud/client-web/account#CreateOAuth2Session).
221
225
  *
222
226
  * @throws {AppwriteException}
223
227
  * @returns {Promise}
224
- */
228
+ */
225
229
  createAnonymousSession(): Promise<Models.Session>;
226
230
  /**
227
- * Create Email Session
231
+ * Create email session
228
232
  *
229
233
  * Allow the user to login into their account by providing a valid email and
230
234
  * password combination. This route will create a new session for the user.
231
235
  *
232
236
  * A user is limited to 10 active sessions at a time by default. [Learn more
233
- * about session limits](/docs/authentication-security#limits).
237
+ * about session
238
+ * limits](https://appwrite.io/docs/authentication-security#limits).
234
239
  *
235
240
  * @param {string} email
236
241
  * @param {string} password
237
242
  * @throws {AppwriteException}
238
243
  * @returns {Promise}
239
- */
244
+ */
240
245
  createEmailSession(email: string, password: string): Promise<Models.Session>;
241
246
  /**
242
- * Create Magic URL session
247
+ * Create magic URL session
243
248
  *
244
249
  * Sends the user an email with a secret key for creating a session. If the
245
- * provided user ID has not be registered, a new user will be created. When
250
+ * provided user ID has not been registered, a new user will be created. When
246
251
  * the user clicks the link in the email, the user is redirected back to the
247
252
  * URL you provided with the secret key and userId values attached to the URL
248
253
  * query string. Use the query string parameters to submit a request to the
249
254
  * [PUT
250
- * /account/sessions/magic-url](/docs/client/account#accountUpdateMagicURLSession)
255
+ * /account/sessions/magic-url](https://appwrite.io/docs/references/cloud/client-web/account#updateMagicURLSession)
251
256
  * endpoint to complete the login process. The link sent to the user's email
252
257
  * address is valid for 1 hour. If you are on a mobile device you can leave
253
258
  * the URL parameter empty, so that the login completion will be handled by
254
259
  * your Appwrite instance by default.
255
260
  *
256
261
  * A user is limited to 10 active sessions at a time by default. [Learn more
257
- * about session limits](/docs/authentication-security#limits).
262
+ * about session
263
+ * limits](https://appwrite.io/docs/authentication-security#limits).
264
+ *
258
265
  *
259
266
  * @param {string} userId
260
267
  * @param {string} email
261
268
  * @param {string} url
262
269
  * @throws {AppwriteException}
263
270
  * @returns {Promise}
264
- */
271
+ */
265
272
  createMagicURLSession(userId: string, email: string, url?: string): Promise<Models.Token>;
266
273
  /**
267
- * Create Magic URL session (confirmation)
274
+ * Create magic URL session (confirmation)
268
275
  *
269
276
  * Use this endpoint to complete creating the session with the Magic URL. Both
270
277
  * the **userId** and **secret** arguments will be passed as query parameters
271
278
  * to the redirect URL you have provided when sending your request to the
272
279
  * [POST
273
- * /account/sessions/magic-url](/docs/client/account#accountCreateMagicURLSession)
280
+ * /account/sessions/magic-url](https://appwrite.io/docs/references/cloud/client-web/account#createMagicURLSession)
274
281
  * endpoint.
275
282
  *
276
283
  * Please note that in order to avoid a [Redirect
@@ -282,10 +289,10 @@ export declare class Account extends Service {
282
289
  * @param {string} secret
283
290
  * @throws {AppwriteException}
284
291
  * @returns {Promise}
285
- */
292
+ */
286
293
  updateMagicURLSession(userId: string, secret: string): Promise<Models.Session>;
287
294
  /**
288
- * Create OAuth2 Session
295
+ * Create OAuth2 session
289
296
  *
290
297
  * Allow the user to login to their account using the OAuth2 provider of their
291
298
  * choice. Each OAuth2 provider should be enabled from the Appwrite console
@@ -300,7 +307,8 @@ export declare class Account extends Service {
300
307
  * user.
301
308
  *
302
309
  * A user is limited to 10 active sessions at a time by default. [Learn more
303
- * about session limits](/docs/authentication-security#limits).
310
+ * about session
311
+ * limits](https://appwrite.io/docs/authentication-security#limits).
304
312
  *
305
313
  *
306
314
  * @param {string} provider
@@ -309,33 +317,34 @@ export declare class Account extends Service {
309
317
  * @param {string[]} scopes
310
318
  * @throws {AppwriteException}
311
319
  * @returns {void|string}
312
- */
320
+ */
313
321
  createOAuth2Session(provider: string, success?: string, failure?: string, scopes?: string[]): void | URL;
314
322
  /**
315
- * Create Phone session
323
+ * Create phone session
316
324
  *
317
325
  * Sends the user an SMS with a secret key for creating a session. If the
318
326
  * provided user ID has not be registered, a new user will be created. Use the
319
327
  * returned user ID and secret and submit a request to the [PUT
320
- * /account/sessions/phone](/docs/client/account#accountUpdatePhoneSession)
328
+ * /account/sessions/phone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneSession)
321
329
  * endpoint to complete the login process. The secret sent to the user's phone
322
330
  * is valid for 15 minutes.
323
331
  *
324
332
  * A user is limited to 10 active sessions at a time by default. [Learn more
325
- * about session limits](/docs/authentication-security#limits).
333
+ * about session
334
+ * limits](https://appwrite.io/docs/authentication-security#limits).
326
335
  *
327
336
  * @param {string} userId
328
337
  * @param {string} phone
329
338
  * @throws {AppwriteException}
330
339
  * @returns {Promise}
331
- */
340
+ */
332
341
  createPhoneSession(userId: string, phone: string): Promise<Models.Token>;
333
342
  /**
334
- * Create Phone Session (confirmation)
343
+ * Create phone session (confirmation)
335
344
  *
336
345
  * Use this endpoint to complete creating a session with SMS. Use the
337
346
  * **userId** from the
338
- * [createPhoneSession](/docs/client/account#accountCreatePhoneSession)
347
+ * [createPhoneSession](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneSession)
339
348
  * endpoint and the **secret** received via SMS to successfully update and
340
349
  * confirm the phone session.
341
350
  *
@@ -343,10 +352,10 @@ export declare class Account extends Service {
343
352
  * @param {string} secret
344
353
  * @throws {AppwriteException}
345
354
  * @returns {Promise}
346
- */
355
+ */
347
356
  updatePhoneSession(userId: string, secret: string): Promise<Models.Session>;
348
357
  /**
349
- * Get Session
358
+ * Get session
350
359
  *
351
360
  * Use this endpoint to get a logged in user's session using a Session ID.
352
361
  * Inputting 'current' will return the current session being used.
@@ -354,10 +363,10 @@ export declare class Account extends Service {
354
363
  * @param {string} sessionId
355
364
  * @throws {AppwriteException}
356
365
  * @returns {Promise}
357
- */
366
+ */
358
367
  getSession(sessionId: string): Promise<Models.Session>;
359
368
  /**
360
- * Update OAuth Session (Refresh Tokens)
369
+ * Update OAuth session (refresh tokens)
361
370
  *
362
371
  * Access tokens have limited lifespan and expire to mitigate security risks.
363
372
  * If session was created using an OAuth provider, this route can be used to
@@ -366,23 +375,24 @@ export declare class Account extends Service {
366
375
  * @param {string} sessionId
367
376
  * @throws {AppwriteException}
368
377
  * @returns {Promise}
369
- */
378
+ */
370
379
  updateSession(sessionId: string): Promise<Models.Session>;
371
380
  /**
372
- * Delete Session
373
- *
374
- * Use this endpoint to log out the currently logged in user from all their
375
- * account sessions across all of their different devices. When using the
376
- * Session ID argument, only the unique session ID provided is deleted.
381
+ * Delete session
377
382
  *
383
+ * Logout the user. Use 'current' as the session ID to logout on this device,
384
+ * use a session ID to logout on another device. If you're looking to logout
385
+ * the user on all devices, use [Delete
386
+ * Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions)
387
+ * instead.
378
388
  *
379
389
  * @param {string} sessionId
380
390
  * @throws {AppwriteException}
381
391
  * @returns {Promise}
382
- */
392
+ */
383
393
  deleteSession(sessionId: string): Promise<{}>;
384
394
  /**
385
- * Update Status
395
+ * Update status
386
396
  *
387
397
  * Block the currently logged in user account. Behind the scene, the user
388
398
  * record is not deleted but permanently blocked from any access. To
@@ -390,10 +400,10 @@ export declare class Account extends Service {
390
400
  *
391
401
  * @throws {AppwriteException}
392
402
  * @returns {Promise}
393
- */
403
+ */
394
404
  updateStatus<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
395
405
  /**
396
- * Create Email Verification
406
+ * Create email verification
397
407
  *
398
408
  * Use this endpoint to send a verification message to your user email address
399
409
  * to confirm they are the valid owners of that address. Both the **userId**
@@ -402,8 +412,8 @@ export declare class Account extends Service {
402
412
  * should redirect the user back to your app and allow you to complete the
403
413
  * verification process by verifying both the **userId** and **secret**
404
414
  * parameters. Learn more about how to [complete the verification
405
- * process](/docs/client/account#accountUpdateEmailVerification). The
406
- * verification link sent to the user's email address is valid for 7 days.
415
+ * process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification).
416
+ * The verification link sent to the user's email address is valid for 7 days.
407
417
  *
408
418
  * Please note that in order to avoid a [Redirect
409
419
  * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md),
@@ -414,10 +424,10 @@ export declare class Account extends Service {
414
424
  * @param {string} url
415
425
  * @throws {AppwriteException}
416
426
  * @returns {Promise}
417
- */
427
+ */
418
428
  createVerification(url: string): Promise<Models.Token>;
419
429
  /**
420
- * Create Email Verification (confirmation)
430
+ * Create email verification (confirmation)
421
431
  *
422
432
  * Use this endpoint to complete the user email verification process. Use both
423
433
  * the **userId** and **secret** parameters that were attached to your app URL
@@ -428,24 +438,26 @@ export declare class Account extends Service {
428
438
  * @param {string} secret
429
439
  * @throws {AppwriteException}
430
440
  * @returns {Promise}
431
- */
441
+ */
432
442
  updateVerification(userId: string, secret: string): Promise<Models.Token>;
433
443
  /**
434
- * Create Phone Verification
444
+ * Create phone verification
435
445
  *
436
446
  * Use this endpoint to send a verification SMS to the currently logged in
437
447
  * user. This endpoint is meant for use after updating a user's phone number
438
- * using the [accountUpdatePhone](/docs/client/account#accountUpdatePhone)
448
+ * using the
449
+ * [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone)
439
450
  * endpoint. Learn more about how to [complete the verification
440
- * process](/docs/client/account#accountUpdatePhoneVerification). The
441
- * verification code sent to the user's phone number is valid for 15 minutes.
451
+ * process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification).
452
+ * The verification code sent to the user's phone number is valid for 15
453
+ * minutes.
442
454
  *
443
455
  * @throws {AppwriteException}
444
456
  * @returns {Promise}
445
- */
457
+ */
446
458
  createPhoneVerification(): Promise<Models.Token>;
447
459
  /**
448
- * Create Phone Verification (confirmation)
460
+ * Create phone verification (confirmation)
449
461
  *
450
462
  * Use this endpoint to complete the user phone verification process. Use the
451
463
  * **userId** and **secret** that were sent to your user's phone number to
@@ -456,6 +468,6 @@ export declare class Account extends Service {
456
468
  * @param {string} secret
457
469
  * @throws {AppwriteException}
458
470
  * @returns {Promise}
459
- */
471
+ */
460
472
  updatePhoneVerification(userId: string, secret: string): Promise<Models.Token>;
461
473
  }
@@ -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
+ }