@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
@@ -13,7 +13,7 @@ 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
19
  * Create Database
@@ -23,10 +23,11 @@ export declare class Databases extends Service {
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,7 +35,7 @@ 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
41
  * Get Database
@@ -45,7 +46,7 @@ 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
52
  * Update Database
@@ -54,10 +55,11 @@ export declare class Databases extends Service {
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
64
  * Delete Database
63
65
  *
@@ -67,7 +69,7 @@ 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
75
  * List Collections
@@ -80,7 +82,7 @@ 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
88
  * Create Collection
@@ -95,10 +97,11 @@ export declare class Databases extends Service {
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
106
  * Get Collection
104
107
  *
@@ -109,7 +112,7 @@ 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
118
  * Update Collection
@@ -124,7 +127,7 @@ 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
133
  * Delete Collection
@@ -136,7 +139,7 @@ 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
145
  * List Attributes
@@ -144,10 +147,11 @@ export declare class Databases extends Service {
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
156
  * Create Boolean Attribute
153
157
  *
@@ -162,7 +166,7 @@ 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
172
  * Update Boolean Attribute
@@ -175,7 +179,7 @@ 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
185
  * Create DateTime Attribute
@@ -189,7 +193,7 @@ 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
199
  * Update DateTime Attribute
@@ -202,7 +206,7 @@ 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
212
  * Create Email Attribute
@@ -218,7 +222,7 @@ 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
228
  * Update Email Attribute
@@ -234,7 +238,7 @@ 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
244
  * Create Enum Attribute
@@ -249,7 +253,7 @@ 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
259
  * Update Enum Attribute
@@ -266,7 +270,7 @@ 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
276
  * Create Float Attribute
@@ -285,7 +289,7 @@ 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
295
  * Update Float Attribute
@@ -303,7 +307,7 @@ 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
313
  * Create Integer Attribute
@@ -322,7 +326,7 @@ 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
332
  * Update Integer Attribute
@@ -340,7 +344,7 @@ 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
350
  * Create IP Address Attribute
@@ -356,7 +360,7 @@ 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
366
  * Update IP Address Attribute
@@ -372,7 +376,7 @@ 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
382
  * Create Relationship Attribute
@@ -391,7 +395,7 @@ 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
401
  * Create String Attribute
@@ -406,10 +410,11 @@ 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
419
  * Update String Attribute
415
420
  *
@@ -424,7 +429,7 @@ 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
435
  * Create URL Attribute
@@ -440,7 +445,7 @@ 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
451
  * Update URL Attribute
@@ -456,7 +461,7 @@ 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
467
  * Get Attribute
@@ -467,7 +472,7 @@ 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
478
  * Delete Attribute
@@ -478,7 +483,7 @@ 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
489
  * Update Relationship Attribute
@@ -493,7 +498,7 @@ 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
504
  * List Documents
@@ -506,7 +511,7 @@ 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
517
  * Create Document
@@ -523,7 +528,7 @@ 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
534
  * Get Document
@@ -537,7 +542,7 @@ 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
548
  * Update Document
@@ -552,7 +557,7 @@ 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
563
  * Delete Document
@@ -564,7 +569,7 @@ 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
575
  * List Document Logs
@@ -577,7 +582,7 @@ 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
588
  * List Indexes
@@ -585,10 +590,11 @@ export declare class Databases extends Service {
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
599
  * Create Index
594
600
  *
@@ -601,7 +607,7 @@ 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
613
  * Get Index
@@ -612,7 +618,7 @@ 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
624
  * Delete Index
@@ -623,7 +629,7 @@ 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
635
  * List Collection Logs
@@ -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,7 +652,7 @@ 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
658
  * List Database Logs
@@ -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
  }