@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
@@ -10,59 +10,59 @@ export class Graphql extends Service {
10
10
  super(client);
11
11
  }
12
12
 
13
- /**
14
- * GraphQL Endpoint
15
- *
16
- * Execute a GraphQL mutation.
17
- *
18
- * @param {object} query
19
- * @throws {AppwriteException}
20
- * @returns {Promise}
21
- */
22
- async query(query: object): Promise<{}> {
23
- if (typeof query === 'undefined') {
24
- throw new AppwriteException('Missing required parameter: "query"');
25
- }
26
-
27
- let path = '/graphql';
28
- let payload: Payload = {};
13
+ /**
14
+ * GraphQL Endpoint
15
+ *
16
+ * Execute a GraphQL mutation.
17
+ *
18
+ * @param {object} query
19
+ * @throws {AppwriteException}
20
+ * @returns {Promise}
21
+ */
22
+ async query(query: object): Promise<{}> {
23
+ if (typeof query === 'undefined') {
24
+ throw new AppwriteException('Missing required parameter: "query"');
25
+ }
29
26
 
30
- if (typeof query !== 'undefined') {
31
- payload['query'] = query;
32
- }
27
+ let path = '/graphql';
28
+ let payload: Payload = {};
33
29
 
34
- const uri = new URL(this.client.config.endpoint + path);
35
- return await this.client.call('post', uri, {
36
- 'x-sdk-graphql': 'true',
37
- 'content-type': 'application/json',
38
- }, payload);
30
+ if (typeof query !== 'undefined') {
31
+ payload['query'] = query;
39
32
  }
40
33
 
41
- /**
42
- * GraphQL Endpoint
43
- *
44
- * Execute a GraphQL mutation.
45
- *
46
- * @param {object} query
47
- * @throws {AppwriteException}
48
- * @returns {Promise}
49
- */
50
- async mutation(query: object): Promise<{}> {
51
- if (typeof query === 'undefined') {
52
- throw new AppwriteException('Missing required parameter: "query"');
53
- }
34
+ const uri = new URL(this.client.config.endpoint + path);
35
+ return await this.client.call('post', uri, {
36
+ 'x-sdk-graphql': 'true',
37
+ 'content-type': 'application/json',
38
+ }, payload);
39
+ }
54
40
 
55
- let path = '/graphql/mutation';
56
- let payload: Payload = {};
41
+ /**
42
+ * GraphQL Endpoint
43
+ *
44
+ * Execute a GraphQL mutation.
45
+ *
46
+ * @param {object} query
47
+ * @throws {AppwriteException}
48
+ * @returns {Promise}
49
+ */
50
+ async mutation(query: object): Promise<{}> {
51
+ if (typeof query === 'undefined') {
52
+ throw new AppwriteException('Missing required parameter: "query"');
53
+ }
57
54
 
58
- if (typeof query !== 'undefined') {
59
- payload['query'] = query;
60
- }
55
+ let path = '/graphql/mutation';
56
+ let payload: Payload = {};
61
57
 
62
- const uri = new URL(this.client.config.endpoint + path);
63
- return await this.client.call('post', uri, {
64
- 'x-sdk-graphql': 'true',
65
- 'content-type': 'application/json',
66
- }, payload);
58
+ if (typeof query !== 'undefined') {
59
+ payload['query'] = query;
67
60
  }
61
+
62
+ const uri = new URL(this.client.config.endpoint + path);
63
+ return await this.client.call('post', uri, {
64
+ 'x-sdk-graphql': 'true',
65
+ 'content-type': 'application/json',
66
+ }, payload);
67
+ }
68
68
  };
@@ -10,193 +10,230 @@ export class Health extends Service {
10
10
  super(client);
11
11
  }
12
12
 
13
- /**
14
- * Get HTTP
15
- *
16
- * Check the Appwrite HTTP server is up and responsive.
17
- *
18
- * @throws {AppwriteException}
19
- * @returns {Promise}
20
- */
21
- async get(): Promise<Models.HealthStatus> {
22
- let path = '/health';
23
- let payload: Payload = {};
24
-
25
- const uri = new URL(this.client.config.endpoint + path);
26
- return await this.client.call('get', uri, {
27
- 'content-type': 'application/json',
28
- }, payload);
29
- }
30
-
31
- /**
32
- * Get Antivirus
33
- *
34
- * Check the Appwrite Antivirus server is up and connection is successful.
35
- *
36
- * @throws {AppwriteException}
37
- * @returns {Promise}
38
- */
39
- async getAntivirus(): Promise<Models.HealthAntivirus> {
40
- let path = '/health/anti-virus';
41
- let payload: Payload = {};
42
-
43
- const uri = new URL(this.client.config.endpoint + path);
44
- return await this.client.call('get', uri, {
45
- 'content-type': 'application/json',
46
- }, payload);
47
- }
48
-
49
- /**
50
- * Get Cache
51
- *
52
- * Check the Appwrite in-memory cache server is up and connection is
53
- * successful.
54
- *
55
- * @throws {AppwriteException}
56
- * @returns {Promise}
57
- */
58
- async getCache(): Promise<Models.HealthStatus> {
59
- let path = '/health/cache';
60
- let payload: Payload = {};
61
-
62
- const uri = new URL(this.client.config.endpoint + path);
63
- return await this.client.call('get', uri, {
64
- 'content-type': 'application/json',
65
- }, payload);
66
- }
67
-
68
- /**
69
- * Get DB
70
- *
71
- * Check the Appwrite database server is up and connection is successful.
72
- *
73
- * @throws {AppwriteException}
74
- * @returns {Promise}
75
- */
76
- async getDB(): Promise<Models.HealthStatus> {
77
- let path = '/health/db';
78
- let payload: Payload = {};
79
-
80
- const uri = new URL(this.client.config.endpoint + path);
81
- return await this.client.call('get', uri, {
82
- 'content-type': 'application/json',
83
- }, payload);
84
- }
85
-
86
- /**
87
- * Get Certificates Queue
88
- *
89
- * Get the number of certificates that are waiting to be issued against
90
- * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue
91
- * server.
92
- *
93
- * @throws {AppwriteException}
94
- * @returns {Promise}
95
- */
96
- async getQueueCertificates(): Promise<Models.HealthQueue> {
97
- let path = '/health/queue/certificates';
98
- let payload: Payload = {};
99
-
100
- const uri = new URL(this.client.config.endpoint + path);
101
- return await this.client.call('get', uri, {
102
- 'content-type': 'application/json',
103
- }, payload);
104
- }
105
-
106
- /**
107
- * Get Functions Queue
108
- *
109
- *
110
- * @throws {AppwriteException}
111
- * @returns {Promise}
112
- */
113
- async getQueueFunctions(): Promise<Models.HealthQueue> {
114
- let path = '/health/queue/functions';
115
- let payload: Payload = {};
116
-
117
- const uri = new URL(this.client.config.endpoint + path);
118
- return await this.client.call('get', uri, {
119
- 'content-type': 'application/json',
120
- }, payload);
121
- }
122
-
123
- /**
124
- * Get Logs Queue
125
- *
126
- * Get the number of logs that are waiting to be processed in the Appwrite
127
- * internal queue server.
128
- *
129
- * @throws {AppwriteException}
130
- * @returns {Promise}
131
- */
132
- async getQueueLogs(): Promise<Models.HealthQueue> {
133
- let path = '/health/queue/logs';
134
- let payload: Payload = {};
135
-
136
- const uri = new URL(this.client.config.endpoint + path);
137
- return await this.client.call('get', uri, {
138
- 'content-type': 'application/json',
139
- }, payload);
140
- }
141
-
142
- /**
143
- * Get Webhooks Queue
144
- *
145
- * Get the number of webhooks that are waiting to be processed in the Appwrite
146
- * internal queue server.
147
- *
148
- * @throws {AppwriteException}
149
- * @returns {Promise}
150
- */
151
- async getQueueWebhooks(): Promise<Models.HealthQueue> {
152
- let path = '/health/queue/webhooks';
153
- let payload: Payload = {};
154
-
155
- const uri = new URL(this.client.config.endpoint + path);
156
- return await this.client.call('get', uri, {
157
- 'content-type': 'application/json',
158
- }, payload);
159
- }
160
-
161
- /**
162
- * Get Local Storage
163
- *
164
- * Check the Appwrite local storage device is up and connection is successful.
165
- *
166
- * @throws {AppwriteException}
167
- * @returns {Promise}
168
- */
169
- async getStorageLocal(): Promise<Models.HealthStatus> {
170
- let path = '/health/storage/local';
171
- let payload: Payload = {};
172
-
173
- const uri = new URL(this.client.config.endpoint + path);
174
- return await this.client.call('get', uri, {
175
- 'content-type': 'application/json',
176
- }, payload);
177
- }
178
-
179
- /**
180
- * Get Time
181
- *
182
- * Check the Appwrite server time is synced with Google remote NTP server. We
183
- * use this technology to smoothly handle leap seconds with no disruptive
184
- * events. The [Network Time
185
- * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is
186
- * used by hundreds of millions of computers and devices to synchronize their
187
- * clocks over the Internet. If your computer sets its own clock, it likely
188
- * uses NTP.
189
- *
190
- * @throws {AppwriteException}
191
- * @returns {Promise}
192
- */
193
- async getTime(): Promise<Models.HealthTime> {
194
- let path = '/health/time';
195
- let payload: Payload = {};
196
-
197
- const uri = new URL(this.client.config.endpoint + path);
198
- return await this.client.call('get', uri, {
199
- 'content-type': 'application/json',
200
- }, payload);
201
- }
13
+ /**
14
+ * Get HTTP
15
+ *
16
+ * Check the Appwrite HTTP server is up and responsive.
17
+ *
18
+ * @throws {AppwriteException}
19
+ * @returns {Promise}
20
+ */
21
+ async get(): Promise<Models.HealthStatus> {
22
+ let path = '/health';
23
+ let payload: Payload = {};
24
+
25
+ const uri = new URL(this.client.config.endpoint + path);
26
+ return await this.client.call('get', uri, {
27
+ 'content-type': 'application/json',
28
+ }, payload);
29
+ }
30
+
31
+ /**
32
+ * Get Antivirus
33
+ *
34
+ * Check the Appwrite Antivirus server is up and connection is successful.
35
+ *
36
+ * @throws {AppwriteException}
37
+ * @returns {Promise}
38
+ */
39
+ async getAntivirus(): Promise<Models.HealthAntivirus> {
40
+ let path = '/health/anti-virus';
41
+ let payload: Payload = {};
42
+
43
+ const uri = new URL(this.client.config.endpoint + path);
44
+ return await this.client.call('get', uri, {
45
+ 'content-type': 'application/json',
46
+ }, payload);
47
+ }
48
+
49
+ /**
50
+ * Get Cache
51
+ *
52
+ * Check the Appwrite in-memory cache servers are up and connection is
53
+ * successful.
54
+ *
55
+ * @throws {AppwriteException}
56
+ * @returns {Promise}
57
+ */
58
+ async getCache(): Promise<Models.HealthStatus> {
59
+ let path = '/health/cache';
60
+ let payload: Payload = {};
61
+
62
+ const uri = new URL(this.client.config.endpoint + path);
63
+ return await this.client.call('get', uri, {
64
+ 'content-type': 'application/json',
65
+ }, payload);
66
+ }
67
+
68
+ /**
69
+ * Get DB
70
+ *
71
+ * Check the Appwrite database servers are up and connection is successful.
72
+ *
73
+ * @throws {AppwriteException}
74
+ * @returns {Promise}
75
+ */
76
+ async getDB(): Promise<Models.HealthStatus> {
77
+ let path = '/health/db';
78
+ let payload: Payload = {};
79
+
80
+ const uri = new URL(this.client.config.endpoint + path);
81
+ return await this.client.call('get', uri, {
82
+ 'content-type': 'application/json',
83
+ }, payload);
84
+ }
85
+
86
+ /**
87
+ * Get PubSub
88
+ *
89
+ * Check the Appwrite pub-sub servers are up and connection is successful.
90
+ *
91
+ * @throws {AppwriteException}
92
+ * @returns {Promise}
93
+ */
94
+ async getPubSub(): Promise<Models.HealthStatus> {
95
+ let path = '/health/pubsub';
96
+ let payload: Payload = {};
97
+
98
+ const uri = new URL(this.client.config.endpoint + path);
99
+ return await this.client.call('get', uri, {
100
+ 'content-type': 'application/json',
101
+ }, payload);
102
+ }
103
+
104
+ /**
105
+ * Get Queue
106
+ *
107
+ * Check the Appwrite queue messaging servers are up and connection is
108
+ * successful.
109
+ *
110
+ * @throws {AppwriteException}
111
+ * @returns {Promise}
112
+ */
113
+ async getQueue(): Promise<Models.HealthStatus> {
114
+ let path = '/health/queue';
115
+ let payload: Payload = {};
116
+
117
+ const uri = new URL(this.client.config.endpoint + path);
118
+ return await this.client.call('get', uri, {
119
+ 'content-type': 'application/json',
120
+ }, payload);
121
+ }
122
+
123
+ /**
124
+ * Get Certificates Queue
125
+ *
126
+ * Get the number of certificates that are waiting to be issued against
127
+ * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue
128
+ * server.
129
+ *
130
+ * @throws {AppwriteException}
131
+ * @returns {Promise}
132
+ */
133
+ async getQueueCertificates(): Promise<Models.HealthQueue> {
134
+ let path = '/health/queue/certificates';
135
+ let payload: Payload = {};
136
+
137
+ const uri = new URL(this.client.config.endpoint + path);
138
+ return await this.client.call('get', uri, {
139
+ 'content-type': 'application/json',
140
+ }, payload);
141
+ }
142
+
143
+ /**
144
+ * Get Functions Queue
145
+ *
146
+ *
147
+ * @throws {AppwriteException}
148
+ * @returns {Promise}
149
+ */
150
+ async getQueueFunctions(): Promise<Models.HealthQueue> {
151
+ let path = '/health/queue/functions';
152
+ let payload: Payload = {};
153
+
154
+ const uri = new URL(this.client.config.endpoint + path);
155
+ return await this.client.call('get', uri, {
156
+ 'content-type': 'application/json',
157
+ }, payload);
158
+ }
159
+
160
+ /**
161
+ * Get Logs Queue
162
+ *
163
+ * Get the number of logs that are waiting to be processed in the Appwrite
164
+ * internal queue server.
165
+ *
166
+ * @throws {AppwriteException}
167
+ * @returns {Promise}
168
+ */
169
+ async getQueueLogs(): Promise<Models.HealthQueue> {
170
+ let path = '/health/queue/logs';
171
+ let payload: Payload = {};
172
+
173
+ const uri = new URL(this.client.config.endpoint + path);
174
+ return await this.client.call('get', uri, {
175
+ 'content-type': 'application/json',
176
+ }, payload);
177
+ }
178
+
179
+ /**
180
+ * Get Webhooks Queue
181
+ *
182
+ * Get the number of webhooks that are waiting to be processed in the Appwrite
183
+ * internal queue server.
184
+ *
185
+ * @throws {AppwriteException}
186
+ * @returns {Promise}
187
+ */
188
+ async getQueueWebhooks(): Promise<Models.HealthQueue> {
189
+ let path = '/health/queue/webhooks';
190
+ let payload: Payload = {};
191
+
192
+ const uri = new URL(this.client.config.endpoint + path);
193
+ return await this.client.call('get', uri, {
194
+ 'content-type': 'application/json',
195
+ }, payload);
196
+ }
197
+
198
+ /**
199
+ * Get Local Storage
200
+ *
201
+ * Check the Appwrite local storage device is up and connection is successful.
202
+ *
203
+ * @throws {AppwriteException}
204
+ * @returns {Promise}
205
+ */
206
+ async getStorageLocal(): Promise<Models.HealthStatus> {
207
+ let path = '/health/storage/local';
208
+ let payload: Payload = {};
209
+
210
+ const uri = new URL(this.client.config.endpoint + path);
211
+ return await this.client.call('get', uri, {
212
+ 'content-type': 'application/json',
213
+ }, payload);
214
+ }
215
+
216
+ /**
217
+ * Get Time
218
+ *
219
+ * Check the Appwrite server time is synced with Google remote NTP server. We
220
+ * use this technology to smoothly handle leap seconds with no disruptive
221
+ * events. The [Network Time
222
+ * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is
223
+ * used by hundreds of millions of computers and devices to synchronize their
224
+ * clocks over the Internet. If your computer sets its own clock, it likely
225
+ * uses NTP.
226
+ *
227
+ * @throws {AppwriteException}
228
+ * @returns {Promise}
229
+ */
230
+ async getTime(): Promise<Models.HealthTime> {
231
+ let path = '/health/time';
232
+ let payload: Payload = {};
233
+
234
+ const uri = new URL(this.client.config.endpoint + path);
235
+ return await this.client.call('get', uri, {
236
+ 'content-type': 'application/json',
237
+ }, payload);
238
+ }
202
239
  };