@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
@@ -4,7 +4,7 @@ import type { Models } from '../models';
4
4
  export declare class Databases extends Service {
5
5
  constructor(client: Client);
6
6
  /**
7
- * List Databases
7
+ * List databases
8
8
  *
9
9
  * Get a list of all databases from the current Appwrite project. You can use
10
10
  * the search parameter to filter your results.
@@ -13,20 +13,21 @@ export declare class Databases extends Service {
13
13
  * @param {string} search
14
14
  * @throws {AppwriteException}
15
15
  * @returns {Promise}
16
- */
16
+ */
17
17
  list(queries?: string[], search?: string): Promise<Models.DatabaseList>;
18
18
  /**
19
- * Create Database
19
+ * Create database
20
20
  *
21
21
  * Create a new Database.
22
22
  *
23
23
  *
24
24
  * @param {string} databaseId
25
25
  * @param {string} name
26
+ * @param {boolean} enabled
26
27
  * @throws {AppwriteException}
27
28
  * @returns {Promise}
28
- */
29
- create(databaseId: string, name: string): Promise<Models.Database>;
29
+ */
30
+ create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
30
31
  /**
31
32
  * Get usage stats for the database
32
33
  *
@@ -34,10 +35,10 @@ export declare class Databases extends Service {
34
35
  * @param {string} range
35
36
  * @throws {AppwriteException}
36
37
  * @returns {Promise}
37
- */
38
+ */
38
39
  getUsage(range?: string): Promise<Models.UsageDatabases>;
39
40
  /**
40
- * Get Database
41
+ * Get database
41
42
  *
42
43
  * Get a database by its unique ID. This endpoint response returns a JSON
43
44
  * object with the database metadata.
@@ -45,21 +46,22 @@ export declare class Databases extends Service {
45
46
  * @param {string} databaseId
46
47
  * @throws {AppwriteException}
47
48
  * @returns {Promise}
48
- */
49
+ */
49
50
  get(databaseId: string): Promise<Models.Database>;
50
51
  /**
51
- * Update Database
52
+ * Update database
52
53
  *
53
54
  * Update a database by its unique ID.
54
55
  *
55
56
  * @param {string} databaseId
56
57
  * @param {string} name
58
+ * @param {boolean} enabled
57
59
  * @throws {AppwriteException}
58
60
  * @returns {Promise}
59
- */
60
- update(databaseId: string, name: string): Promise<Models.Database>;
61
+ */
62
+ update(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
61
63
  /**
62
- * Delete Database
64
+ * Delete database
63
65
  *
64
66
  * Delete a database by its unique ID. Only API keys with with databases.write
65
67
  * scope can delete a database.
@@ -67,10 +69,10 @@ export declare class Databases extends Service {
67
69
  * @param {string} databaseId
68
70
  * @throws {AppwriteException}
69
71
  * @returns {Promise}
70
- */
72
+ */
71
73
  delete(databaseId: string): Promise<{}>;
72
74
  /**
73
- * List Collections
75
+ * List collections
74
76
  *
75
77
  * Get a list of all collections that belong to the provided databaseId. You
76
78
  * can use the search parameter to filter your results.
@@ -80,27 +82,28 @@ export declare class Databases extends Service {
80
82
  * @param {string} search
81
83
  * @throws {AppwriteException}
82
84
  * @returns {Promise}
83
- */
85
+ */
84
86
  listCollections(databaseId: string, queries?: string[], search?: string): Promise<Models.CollectionList>;
85
87
  /**
86
- * Create Collection
88
+ * Create collection
87
89
  *
88
90
  * Create a new Collection. Before using this route, you should create a new
89
91
  * database resource using either a [server
90
- * integration](/docs/server/databases#databasesCreateCollection) API or
91
- * directly from your database console.
92
+ * integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
93
+ * API or directly from your database console.
92
94
  *
93
95
  * @param {string} databaseId
94
96
  * @param {string} collectionId
95
97
  * @param {string} name
96
98
  * @param {string[]} permissions
97
99
  * @param {boolean} documentSecurity
100
+ * @param {boolean} enabled
98
101
  * @throws {AppwriteException}
99
102
  * @returns {Promise}
100
- */
101
- createCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean): Promise<Models.Collection>;
103
+ */
104
+ createCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection>;
102
105
  /**
103
- * Get Collection
106
+ * Get collection
104
107
  *
105
108
  * Get a collection by its unique ID. This endpoint response returns a JSON
106
109
  * object with the collection metadata.
@@ -109,10 +112,10 @@ export declare class Databases extends Service {
109
112
  * @param {string} collectionId
110
113
  * @throws {AppwriteException}
111
114
  * @returns {Promise}
112
- */
115
+ */
113
116
  getCollection(databaseId: string, collectionId: string): Promise<Models.Collection>;
114
117
  /**
115
- * Update Collection
118
+ * Update collection
116
119
  *
117
120
  * Update a collection by its unique ID.
118
121
  *
@@ -124,10 +127,10 @@ export declare class Databases extends Service {
124
127
  * @param {boolean} enabled
125
128
  * @throws {AppwriteException}
126
129
  * @returns {Promise}
127
- */
130
+ */
128
131
  updateCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection>;
129
132
  /**
130
- * Delete Collection
133
+ * Delete collection
131
134
  *
132
135
  * Delete a collection by its unique ID. Only users with write permissions
133
136
  * have access to delete this resource.
@@ -136,20 +139,21 @@ export declare class Databases extends Service {
136
139
  * @param {string} collectionId
137
140
  * @throws {AppwriteException}
138
141
  * @returns {Promise}
139
- */
142
+ */
140
143
  deleteCollection(databaseId: string, collectionId: string): Promise<{}>;
141
144
  /**
142
- * List Attributes
145
+ * List attributes
143
146
  *
144
147
  *
145
148
  * @param {string} databaseId
146
149
  * @param {string} collectionId
150
+ * @param {string[]} queries
147
151
  * @throws {AppwriteException}
148
152
  * @returns {Promise}
149
- */
150
- listAttributes(databaseId: string, collectionId: string): Promise<Models.AttributeList>;
153
+ */
154
+ listAttributes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.AttributeList>;
151
155
  /**
152
- * Create Boolean Attribute
156
+ * Create boolean attribute
153
157
  *
154
158
  * Create a boolean attribute.
155
159
  *
@@ -162,10 +166,10 @@ export declare class Databases extends Service {
162
166
  * @param {boolean} array
163
167
  * @throws {AppwriteException}
164
168
  * @returns {Promise}
165
- */
169
+ */
166
170
  createBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, array?: boolean): Promise<Models.AttributeBoolean>;
167
171
  /**
168
- * Update Boolean Attribute
172
+ * Update boolean attribute
169
173
  *
170
174
  *
171
175
  * @param {string} databaseId
@@ -175,10 +179,10 @@ export declare class Databases extends Service {
175
179
  * @param {boolean} xdefault
176
180
  * @throws {AppwriteException}
177
181
  * @returns {Promise}
178
- */
182
+ */
179
183
  updateBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean): Promise<Models.AttributeBoolean>;
180
184
  /**
181
- * Create DateTime Attribute
185
+ * Create datetime attribute
182
186
  *
183
187
  *
184
188
  * @param {string} databaseId
@@ -189,10 +193,10 @@ export declare class Databases extends Service {
189
193
  * @param {boolean} array
190
194
  * @throws {AppwriteException}
191
195
  * @returns {Promise}
192
- */
196
+ */
193
197
  createDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeDatetime>;
194
198
  /**
195
- * Update DateTime Attribute
199
+ * Update dateTime attribute
196
200
  *
197
201
  *
198
202
  * @param {string} databaseId
@@ -202,10 +206,10 @@ export declare class Databases extends Service {
202
206
  * @param {string} xdefault
203
207
  * @throws {AppwriteException}
204
208
  * @returns {Promise}
205
- */
209
+ */
206
210
  updateDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeDatetime>;
207
211
  /**
208
- * Create Email Attribute
212
+ * Create email attribute
209
213
  *
210
214
  * Create an email attribute.
211
215
  *
@@ -218,10 +222,10 @@ export declare class Databases extends Service {
218
222
  * @param {boolean} array
219
223
  * @throws {AppwriteException}
220
224
  * @returns {Promise}
221
- */
225
+ */
222
226
  createEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEmail>;
223
227
  /**
224
- * Update Email Attribute
228
+ * Update email attribute
225
229
  *
226
230
  * Update an email attribute. Changing the `default` value will not update
227
231
  * already existing documents.
@@ -234,10 +238,10 @@ export declare class Databases extends Service {
234
238
  * @param {string} xdefault
235
239
  * @throws {AppwriteException}
236
240
  * @returns {Promise}
237
- */
241
+ */
238
242
  updateEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeEmail>;
239
243
  /**
240
- * Create Enum Attribute
244
+ * Create enum attribute
241
245
  *
242
246
  *
243
247
  * @param {string} databaseId
@@ -249,10 +253,10 @@ export declare class Databases extends Service {
249
253
  * @param {boolean} array
250
254
  * @throws {AppwriteException}
251
255
  * @returns {Promise}
252
- */
256
+ */
253
257
  createEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEnum>;
254
258
  /**
255
- * Update Enum Attribute
259
+ * Update enum attribute
256
260
  *
257
261
  * Update an enum attribute. Changing the `default` value will not update
258
262
  * already existing documents.
@@ -266,10 +270,10 @@ export declare class Databases extends Service {
266
270
  * @param {string} xdefault
267
271
  * @throws {AppwriteException}
268
272
  * @returns {Promise}
269
- */
273
+ */
270
274
  updateEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string): Promise<Models.AttributeEnum>;
271
275
  /**
272
- * Create Float Attribute
276
+ * Create float attribute
273
277
  *
274
278
  * Create a float attribute. Optionally, minimum and maximum values can be
275
279
  * provided.
@@ -285,10 +289,10 @@ export declare class Databases extends Service {
285
289
  * @param {boolean} array
286
290
  * @throws {AppwriteException}
287
291
  * @returns {Promise}
288
- */
292
+ */
289
293
  createFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeFloat>;
290
294
  /**
291
- * Update Float Attribute
295
+ * Update float attribute
292
296
  *
293
297
  * Update a float attribute. Changing the `default` value will not update
294
298
  * already existing documents.
@@ -303,10 +307,10 @@ export declare class Databases extends Service {
303
307
  * @param {number} xdefault
304
308
  * @throws {AppwriteException}
305
309
  * @returns {Promise}
306
- */
310
+ */
307
311
  updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number): Promise<Models.AttributeFloat>;
308
312
  /**
309
- * Create Integer Attribute
313
+ * Create integer attribute
310
314
  *
311
315
  * Create an integer attribute. Optionally, minimum and maximum values can be
312
316
  * provided.
@@ -322,10 +326,10 @@ export declare class Databases extends Service {
322
326
  * @param {boolean} array
323
327
  * @throws {AppwriteException}
324
328
  * @returns {Promise}
325
- */
329
+ */
326
330
  createIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeInteger>;
327
331
  /**
328
- * Update Integer Attribute
332
+ * Update integer attribute
329
333
  *
330
334
  * Update an integer attribute. Changing the `default` value will not update
331
335
  * already existing documents.
@@ -340,10 +344,10 @@ export declare class Databases extends Service {
340
344
  * @param {number} xdefault
341
345
  * @throws {AppwriteException}
342
346
  * @returns {Promise}
343
- */
347
+ */
344
348
  updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number): Promise<Models.AttributeInteger>;
345
349
  /**
346
- * Create IP Address Attribute
350
+ * Create IP address attribute
347
351
  *
348
352
  * Create IP address attribute.
349
353
  *
@@ -356,10 +360,10 @@ export declare class Databases extends Service {
356
360
  * @param {boolean} array
357
361
  * @throws {AppwriteException}
358
362
  * @returns {Promise}
359
- */
363
+ */
360
364
  createIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeIp>;
361
365
  /**
362
- * Update IP Address Attribute
366
+ * Update IP address attribute
363
367
  *
364
368
  * Update an ip attribute. Changing the `default` value will not update
365
369
  * already existing documents.
@@ -372,13 +376,13 @@ export declare class Databases extends Service {
372
376
  * @param {string} xdefault
373
377
  * @throws {AppwriteException}
374
378
  * @returns {Promise}
375
- */
379
+ */
376
380
  updateIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeIp>;
377
381
  /**
378
- * Create Relationship Attribute
382
+ * Create relationship attribute
379
383
  *
380
384
  * Create relationship attribute. [Learn more about relationship
381
- * attributes](/docs/databases-relationships#relationship-attributes).
385
+ * attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
382
386
  *
383
387
  *
384
388
  * @param {string} databaseId
@@ -391,10 +395,10 @@ export declare class Databases extends Service {
391
395
  * @param {string} onDelete
392
396
  * @throws {AppwriteException}
393
397
  * @returns {Promise}
394
- */
398
+ */
395
399
  createRelationshipAttribute(databaseId: string, collectionId: string, relatedCollectionId: string, type: string, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: string): Promise<Models.AttributeRelationship>;
396
400
  /**
397
- * Create String Attribute
401
+ * Create string attribute
398
402
  *
399
403
  * Create a string attribute.
400
404
  *
@@ -406,12 +410,13 @@ export declare class Databases extends Service {
406
410
  * @param {boolean} required
407
411
  * @param {string} xdefault
408
412
  * @param {boolean} array
413
+ * @param {boolean} encrypt
409
414
  * @throws {AppwriteException}
410
415
  * @returns {Promise}
411
- */
412
- createStringAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeString>;
416
+ */
417
+ createStringAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeString>;
413
418
  /**
414
- * Update String Attribute
419
+ * Update string attribute
415
420
  *
416
421
  * Update a string attribute. Changing the `default` value will not update
417
422
  * already existing documents.
@@ -424,10 +429,10 @@ export declare class Databases extends Service {
424
429
  * @param {string} xdefault
425
430
  * @throws {AppwriteException}
426
431
  * @returns {Promise}
427
- */
432
+ */
428
433
  updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeString>;
429
434
  /**
430
- * Create URL Attribute
435
+ * Create URL attribute
431
436
  *
432
437
  * Create a URL attribute.
433
438
  *
@@ -440,10 +445,10 @@ export declare class Databases extends Service {
440
445
  * @param {boolean} array
441
446
  * @throws {AppwriteException}
442
447
  * @returns {Promise}
443
- */
448
+ */
444
449
  createUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeUrl>;
445
450
  /**
446
- * Update URL Attribute
451
+ * Update URL attribute
447
452
  *
448
453
  * Update an url attribute. Changing the `default` value will not update
449
454
  * already existing documents.
@@ -456,10 +461,10 @@ export declare class Databases extends Service {
456
461
  * @param {string} xdefault
457
462
  * @throws {AppwriteException}
458
463
  * @returns {Promise}
459
- */
464
+ */
460
465
  updateUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeUrl>;
461
466
  /**
462
- * Get Attribute
467
+ * Get attribute
463
468
  *
464
469
  *
465
470
  * @param {string} databaseId
@@ -467,10 +472,10 @@ export declare class Databases extends Service {
467
472
  * @param {string} key
468
473
  * @throws {AppwriteException}
469
474
  * @returns {Promise}
470
- */
475
+ */
471
476
  getAttribute(databaseId: string, collectionId: string, key: string): Promise<{}>;
472
477
  /**
473
- * Delete Attribute
478
+ * Delete attribute
474
479
  *
475
480
  *
476
481
  * @param {string} databaseId
@@ -478,13 +483,13 @@ export declare class Databases extends Service {
478
483
  * @param {string} key
479
484
  * @throws {AppwriteException}
480
485
  * @returns {Promise}
481
- */
486
+ */
482
487
  deleteAttribute(databaseId: string, collectionId: string, key: string): Promise<{}>;
483
488
  /**
484
- * Update Relationship Attribute
489
+ * Update relationship attribute
485
490
  *
486
491
  * Update relationship attribute. [Learn more about relationship
487
- * attributes](/docs/databases-relationships#relationship-attributes).
492
+ * attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
488
493
  *
489
494
  *
490
495
  * @param {string} databaseId
@@ -493,10 +498,10 @@ export declare class Databases extends Service {
493
498
  * @param {string} onDelete
494
499
  * @throws {AppwriteException}
495
500
  * @returns {Promise}
496
- */
501
+ */
497
502
  updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: string): Promise<Models.AttributeRelationship>;
498
503
  /**
499
- * List Documents
504
+ * List documents
500
505
  *
501
506
  * Get a list of all the user's documents in a given collection. You can use
502
507
  * the query params to filter your results.
@@ -506,15 +511,15 @@ export declare class Databases extends Service {
506
511
  * @param {string[]} queries
507
512
  * @throws {AppwriteException}
508
513
  * @returns {Promise}
509
- */
514
+ */
510
515
  listDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>>;
511
516
  /**
512
- * Create Document
517
+ * Create document
513
518
  *
514
519
  * Create a new Document. Before using this route, you should create a new
515
520
  * collection resource using either a [server
516
- * integration](/docs/server/databases#databasesCreateCollection) API or
517
- * directly from your database console.
521
+ * integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
522
+ * API or directly from your database console.
518
523
  *
519
524
  * @param {string} databaseId
520
525
  * @param {string} collectionId
@@ -523,10 +528,10 @@ export declare class Databases extends Service {
523
528
  * @param {string[]} permissions
524
529
  * @throws {AppwriteException}
525
530
  * @returns {Promise}
526
- */
531
+ */
527
532
  createDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data: Omit<Document, keyof Models.Document>, permissions?: string[]): Promise<Document>;
528
533
  /**
529
- * Get Document
534
+ * Get document
530
535
  *
531
536
  * Get a document by its unique ID. This endpoint response returns a JSON
532
537
  * object with the document data.
@@ -537,10 +542,10 @@ export declare class Databases extends Service {
537
542
  * @param {string[]} queries
538
543
  * @throws {AppwriteException}
539
544
  * @returns {Promise}
540
- */
545
+ */
541
546
  getDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Document>;
542
547
  /**
543
- * Update Document
548
+ * Update document
544
549
  *
545
550
  * Update a document by its unique ID. Using the patch method you can pass
546
551
  * only specific fields that will get updated.
@@ -552,10 +557,10 @@ export declare class Databases extends Service {
552
557
  * @param {string[]} permissions
553
558
  * @throws {AppwriteException}
554
559
  * @returns {Promise}
555
- */
560
+ */
556
561
  updateDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data?: Partial<Omit<Document, keyof Models.Document>>, permissions?: string[]): Promise<Document>;
557
562
  /**
558
- * Delete Document
563
+ * Delete document
559
564
  *
560
565
  * Delete a document by its unique ID.
561
566
  *
@@ -564,10 +569,10 @@ export declare class Databases extends Service {
564
569
  * @param {string} documentId
565
570
  * @throws {AppwriteException}
566
571
  * @returns {Promise}
567
- */
572
+ */
568
573
  deleteDocument(databaseId: string, collectionId: string, documentId: string): Promise<{}>;
569
574
  /**
570
- * List Document Logs
575
+ * List document logs
571
576
  *
572
577
  * Get the document activity logs list by its unique ID.
573
578
  *
@@ -577,20 +582,21 @@ export declare class Databases extends Service {
577
582
  * @param {string[]} queries
578
583
  * @throws {AppwriteException}
579
584
  * @returns {Promise}
580
- */
585
+ */
581
586
  listDocumentLogs(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Models.LogList>;
582
587
  /**
583
- * List Indexes
588
+ * List indexes
584
589
  *
585
590
  *
586
591
  * @param {string} databaseId
587
592
  * @param {string} collectionId
593
+ * @param {string[]} queries
588
594
  * @throws {AppwriteException}
589
595
  * @returns {Promise}
590
- */
591
- listIndexes(databaseId: string, collectionId: string): Promise<Models.IndexList>;
596
+ */
597
+ listIndexes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.IndexList>;
592
598
  /**
593
- * Create Index
599
+ * Create index
594
600
  *
595
601
  *
596
602
  * @param {string} databaseId
@@ -601,10 +607,10 @@ export declare class Databases extends Service {
601
607
  * @param {string[]} orders
602
608
  * @throws {AppwriteException}
603
609
  * @returns {Promise}
604
- */
610
+ */
605
611
  createIndex(databaseId: string, collectionId: string, key: string, type: string, attributes: string[], orders?: string[]): Promise<Models.Index>;
606
612
  /**
607
- * Get Index
613
+ * Get index
608
614
  *
609
615
  *
610
616
  * @param {string} databaseId
@@ -612,10 +618,10 @@ export declare class Databases extends Service {
612
618
  * @param {string} key
613
619
  * @throws {AppwriteException}
614
620
  * @returns {Promise}
615
- */
621
+ */
616
622
  getIndex(databaseId: string, collectionId: string, key: string): Promise<Models.Index>;
617
623
  /**
618
- * Delete Index
624
+ * Delete index
619
625
  *
620
626
  *
621
627
  * @param {string} databaseId
@@ -623,10 +629,10 @@ export declare class Databases extends Service {
623
629
  * @param {string} key
624
630
  * @throws {AppwriteException}
625
631
  * @returns {Promise}
626
- */
632
+ */
627
633
  deleteIndex(databaseId: string, collectionId: string, key: string): Promise<{}>;
628
634
  /**
629
- * List Collection Logs
635
+ * List collection logs
630
636
  *
631
637
  * Get the collection activity logs list by its unique ID.
632
638
  *
@@ -635,7 +641,7 @@ export declare class Databases extends Service {
635
641
  * @param {string[]} queries
636
642
  * @throws {AppwriteException}
637
643
  * @returns {Promise}
638
- */
644
+ */
639
645
  listCollectionLogs(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.LogList>;
640
646
  /**
641
647
  * Get usage stats for a collection
@@ -646,10 +652,10 @@ export declare class Databases extends Service {
646
652
  * @param {string} range
647
653
  * @throws {AppwriteException}
648
654
  * @returns {Promise}
649
- */
655
+ */
650
656
  getCollectionUsage(databaseId: string, collectionId: string, range?: string): Promise<Models.UsageCollection>;
651
657
  /**
652
- * List Database Logs
658
+ * List database logs
653
659
  *
654
660
  * Get the database activity logs list by its unique ID.
655
661
  *
@@ -657,7 +663,7 @@ export declare class Databases extends Service {
657
663
  * @param {string[]} queries
658
664
  * @throws {AppwriteException}
659
665
  * @returns {Promise}
660
- */
666
+ */
661
667
  listLogs(databaseId: string, queries?: string[]): Promise<Models.LogList>;
662
668
  /**
663
669
  * Get usage stats for the database
@@ -667,6 +673,6 @@ export declare class Databases extends Service {
667
673
  * @param {string} range
668
674
  * @throws {AppwriteException}
669
675
  * @returns {Promise}
670
- */
676
+ */
671
677
  getDatabaseUsage(databaseId: string, range?: string): Promise<Models.UsageDatabase>;
672
678
  }