node-appwrite 12.0.0-rc.4 → 12.0.1

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 (279) hide show
  1. package/.travis.yml +2 -2
  2. package/README.md +5 -5
  3. package/docs/examples/account/create-anonymous-session.md +1 -1
  4. package/docs/examples/account/create-email-password-session.md +1 -1
  5. package/docs/examples/account/create-email-token.md +2 -2
  6. package/docs/examples/account/create-j-w-t.md +1 -1
  7. package/docs/examples/account/create-magic-u-r-l-token.md +2 -2
  8. package/docs/examples/account/{add-authenticator.md → create-mfa-authenticator.md} +1 -1
  9. package/docs/examples/account/{create2f-a-challenge.md → create-mfa-challenge.md} +2 -2
  10. package/docs/examples/account/create-mfa-recovery-codes.md +10 -0
  11. package/docs/examples/account/{create-o-auth2session.md → create-o-auth2token.md} +1 -2
  12. package/docs/examples/account/create-phone-token.md +2 -2
  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-session.md +3 -3
  16. package/docs/examples/account/create-verification.md +1 -1
  17. package/docs/examples/account/create.md +3 -3
  18. package/docs/examples/account/delete-identity.md +2 -2
  19. package/docs/examples/account/{verify-authenticator.md → delete-mfa-authenticator.md} +2 -2
  20. package/docs/examples/account/delete-session.md +2 -2
  21. package/docs/examples/account/delete-sessions.md +1 -1
  22. package/docs/examples/account/get-mfa-recovery-codes.md +10 -0
  23. package/docs/examples/account/get-prefs.md +1 -1
  24. package/docs/examples/account/get-session.md +2 -2
  25. package/docs/examples/account/get.md +1 -1
  26. package/docs/examples/account/list-identities.md +1 -1
  27. package/docs/examples/account/list-logs.md +1 -1
  28. package/docs/examples/account/{list-factors.md → list-mfa-factors.md} +1 -1
  29. package/docs/examples/account/list-sessions.md +1 -1
  30. package/docs/examples/account/update-email.md +1 -1
  31. package/docs/examples/account/update-m-f-a.md +1 -1
  32. package/docs/examples/account/update-magic-u-r-l-session.md +3 -3
  33. package/docs/examples/account/{delete-authenticator.md → update-mfa-authenticator.md} +2 -2
  34. package/docs/examples/account/{update-challenge.md → update-mfa-challenge.md} +3 -3
  35. package/docs/examples/account/update-mfa-recovery-codes.md +10 -0
  36. package/docs/examples/account/update-name.md +2 -2
  37. package/docs/examples/account/update-password.md +1 -1
  38. package/docs/examples/account/update-phone-session.md +12 -0
  39. package/docs/examples/account/update-phone-verification.md +3 -3
  40. package/docs/examples/account/update-phone.md +1 -1
  41. package/docs/examples/account/update-prefs.md +1 -1
  42. package/docs/examples/account/update-recovery.md +3 -3
  43. package/docs/examples/account/update-session.md +2 -2
  44. package/docs/examples/account/update-status.md +1 -1
  45. package/docs/examples/account/update-verification.md +3 -3
  46. package/docs/examples/avatars/get-browser.md +1 -1
  47. package/docs/examples/avatars/get-credit-card.md +1 -1
  48. package/docs/examples/avatars/get-favicon.md +1 -1
  49. package/docs/examples/avatars/get-flag.md +1 -1
  50. package/docs/examples/avatars/get-image.md +1 -1
  51. package/docs/examples/avatars/get-initials.md +2 -2
  52. package/docs/examples/avatars/get-q-r.md +2 -2
  53. package/docs/examples/databases/create-boolean-attribute.md +3 -3
  54. package/docs/examples/databases/create-collection.md +4 -4
  55. package/docs/examples/databases/create-datetime-attribute.md +3 -3
  56. package/docs/examples/databases/create-document.md +4 -4
  57. package/docs/examples/databases/create-email-attribute.md +3 -3
  58. package/docs/examples/databases/create-enum-attribute.md +4 -4
  59. package/docs/examples/databases/create-float-attribute.md +3 -3
  60. package/docs/examples/databases/create-index.md +3 -3
  61. package/docs/examples/databases/create-integer-attribute.md +3 -3
  62. package/docs/examples/databases/create-ip-attribute.md +3 -3
  63. package/docs/examples/databases/create-relationship-attribute.md +4 -4
  64. package/docs/examples/databases/create-string-attribute.md +4 -4
  65. package/docs/examples/databases/create-url-attribute.md +3 -3
  66. package/docs/examples/databases/create.md +3 -3
  67. package/docs/examples/databases/delete-attribute.md +3 -3
  68. package/docs/examples/databases/delete-collection.md +3 -3
  69. package/docs/examples/databases/delete-document.md +4 -4
  70. package/docs/examples/databases/delete-index.md +3 -3
  71. package/docs/examples/databases/delete.md +2 -2
  72. package/docs/examples/databases/get-attribute.md +3 -3
  73. package/docs/examples/databases/get-collection.md +3 -3
  74. package/docs/examples/databases/get-document.md +4 -4
  75. package/docs/examples/databases/get-index.md +3 -3
  76. package/docs/examples/databases/get.md +2 -2
  77. package/docs/examples/databases/list-attributes.md +3 -3
  78. package/docs/examples/databases/list-collections.md +3 -3
  79. package/docs/examples/databases/list-documents.md +3 -3
  80. package/docs/examples/databases/list-indexes.md +3 -3
  81. package/docs/examples/databases/list.md +2 -2
  82. package/docs/examples/databases/update-boolean-attribute.md +3 -3
  83. package/docs/examples/databases/update-collection.md +4 -4
  84. package/docs/examples/databases/update-datetime-attribute.md +3 -3
  85. package/docs/examples/databases/update-document.md +4 -4
  86. package/docs/examples/databases/update-email-attribute.md +3 -3
  87. package/docs/examples/databases/update-enum-attribute.md +4 -4
  88. package/docs/examples/databases/update-float-attribute.md +3 -3
  89. package/docs/examples/databases/update-integer-attribute.md +3 -3
  90. package/docs/examples/databases/update-ip-attribute.md +3 -3
  91. package/docs/examples/databases/update-relationship-attribute.md +3 -3
  92. package/docs/examples/databases/update-string-attribute.md +4 -4
  93. package/docs/examples/databases/update-url-attribute.md +3 -3
  94. package/docs/examples/databases/update.md +3 -3
  95. package/docs/examples/functions/create-build.md +4 -4
  96. package/docs/examples/functions/create-deployment.md +4 -4
  97. package/docs/examples/functions/create-execution.md +4 -4
  98. package/docs/examples/functions/create-variable.md +4 -4
  99. package/docs/examples/functions/create.md +13 -13
  100. package/docs/examples/functions/delete-deployment.md +3 -3
  101. package/docs/examples/functions/delete-variable.md +3 -3
  102. package/docs/examples/functions/delete.md +2 -2
  103. package/docs/examples/functions/download-deployment.md +3 -3
  104. package/docs/examples/functions/get-deployment.md +3 -3
  105. package/docs/examples/functions/get-execution.md +3 -3
  106. package/docs/examples/functions/get-variable.md +3 -3
  107. package/docs/examples/functions/get.md +2 -2
  108. package/docs/examples/functions/list-deployments.md +3 -3
  109. package/docs/examples/functions/list-executions.md +3 -3
  110. package/docs/examples/functions/list-runtimes.md +1 -1
  111. package/docs/examples/functions/list-variables.md +2 -2
  112. package/docs/examples/functions/list.md +2 -2
  113. package/docs/examples/functions/update-deployment.md +3 -3
  114. package/docs/examples/functions/update-variable.md +5 -5
  115. package/docs/examples/functions/update.md +9 -9
  116. package/docs/examples/graphql/mutation.md +1 -1
  117. package/docs/examples/graphql/query.md +1 -1
  118. package/docs/examples/health/get-antivirus.md +1 -1
  119. package/docs/examples/health/get-cache.md +1 -1
  120. package/docs/examples/health/get-certificate.md +1 -1
  121. package/docs/examples/health/get-d-b.md +1 -1
  122. package/docs/examples/health/get-failed-jobs.md +1 -1
  123. package/docs/examples/health/get-pub-sub.md +1 -1
  124. package/docs/examples/health/get-queue-builds.md +1 -1
  125. package/docs/examples/health/get-queue-certificates.md +1 -1
  126. package/docs/examples/health/get-queue-databases.md +2 -2
  127. package/docs/examples/health/get-queue-deletes.md +1 -1
  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 +1 -1
  131. package/docs/examples/health/get-queue-messaging.md +1 -1
  132. package/docs/examples/health/get-queue-migrations.md +1 -1
  133. package/docs/examples/health/get-queue-usage-dump.md +12 -0
  134. package/docs/examples/health/get-queue-usage.md +12 -0
  135. package/docs/examples/health/get-queue-webhooks.md +1 -1
  136. package/docs/examples/health/get-queue.md +1 -1
  137. package/docs/examples/health/get-storage-local.md +1 -1
  138. package/docs/examples/health/get-storage.md +10 -0
  139. package/docs/examples/health/get-time.md +1 -1
  140. package/docs/examples/health/get.md +1 -1
  141. package/docs/examples/locale/get.md +1 -1
  142. package/docs/examples/locale/list-codes.md +1 -1
  143. package/docs/examples/locale/list-continents.md +1 -1
  144. package/docs/examples/locale/list-countries-e-u.md +1 -1
  145. package/docs/examples/locale/list-countries-phones.md +1 -1
  146. package/docs/examples/locale/list-countries.md +1 -1
  147. package/docs/examples/locale/list-currencies.md +1 -1
  148. package/docs/examples/locale/list-languages.md +1 -1
  149. package/docs/examples/messaging/create-apns-provider.md +8 -7
  150. package/docs/examples/messaging/create-email.md +5 -5
  151. package/docs/examples/messaging/create-fcm-provider.md +3 -3
  152. package/docs/examples/messaging/create-mailgun-provider.md +7 -7
  153. package/docs/examples/messaging/create-msg91provider.md +6 -6
  154. package/docs/examples/messaging/create-push.md +11 -11
  155. package/docs/examples/messaging/create-sendgrid-provider.md +6 -6
  156. package/docs/examples/messaging/create-sms.md +4 -4
  157. package/docs/examples/messaging/create-smtp-provider.md +10 -10
  158. package/docs/examples/messaging/create-subscriber.md +4 -4
  159. package/docs/examples/messaging/create-telesign-provider.md +5 -5
  160. package/docs/examples/messaging/create-textmagic-provider.md +5 -5
  161. package/docs/examples/messaging/create-topic.md +3 -3
  162. package/docs/examples/messaging/create-twilio-provider.md +5 -5
  163. package/docs/examples/messaging/create-vonage-provider.md +5 -5
  164. package/docs/examples/messaging/delete-provider.md +2 -2
  165. package/docs/examples/messaging/delete-subscriber.md +3 -3
  166. package/docs/examples/messaging/delete-topic.md +2 -2
  167. package/docs/examples/messaging/delete.md +2 -2
  168. package/docs/examples/messaging/get-message.md +2 -2
  169. package/docs/examples/messaging/get-provider.md +2 -2
  170. package/docs/examples/messaging/get-subscriber.md +3 -3
  171. package/docs/examples/messaging/get-topic.md +2 -2
  172. package/docs/examples/messaging/list-message-logs.md +2 -2
  173. package/docs/examples/messaging/list-messages.md +2 -2
  174. package/docs/examples/messaging/list-provider-logs.md +2 -2
  175. package/docs/examples/messaging/list-providers.md +2 -2
  176. package/docs/examples/messaging/list-subscriber-logs.md +2 -2
  177. package/docs/examples/messaging/list-subscribers.md +3 -3
  178. package/docs/examples/messaging/list-targets.md +2 -2
  179. package/docs/examples/messaging/list-topic-logs.md +2 -2
  180. package/docs/examples/messaging/list-topics.md +2 -2
  181. package/docs/examples/messaging/{update-a-p-n-s-provider.md → update-apns-provider.md} +8 -7
  182. package/docs/examples/messaging/update-email.md +5 -5
  183. package/docs/examples/messaging/{update-f-c-m-provider.md → update-fcm-provider.md} +3 -3
  184. package/docs/examples/messaging/update-mailgun-provider.md +8 -8
  185. package/docs/examples/messaging/update-msg91provider.md +6 -6
  186. package/docs/examples/messaging/update-push.md +10 -10
  187. package/docs/examples/messaging/update-sendgrid-provider.md +7 -7
  188. package/docs/examples/messaging/update-sms.md +4 -4
  189. package/docs/examples/messaging/update-smtp-provider.md +11 -11
  190. package/docs/examples/messaging/update-telesign-provider.md +6 -6
  191. package/docs/examples/messaging/update-textmagic-provider.md +6 -6
  192. package/docs/examples/messaging/update-topic.md +4 -3
  193. package/docs/examples/messaging/update-twilio-provider.md +6 -6
  194. package/docs/examples/messaging/update-vonage-provider.md +6 -6
  195. package/docs/examples/storage/create-bucket.md +3 -3
  196. package/docs/examples/storage/create-file.md +3 -3
  197. package/docs/examples/storage/delete-bucket.md +2 -2
  198. package/docs/examples/storage/delete-file.md +3 -3
  199. package/docs/examples/storage/get-bucket.md +2 -2
  200. package/docs/examples/storage/get-file-download.md +3 -3
  201. package/docs/examples/storage/get-file-preview.md +3 -3
  202. package/docs/examples/storage/get-file-view.md +3 -3
  203. package/docs/examples/storage/get-file.md +3 -3
  204. package/docs/examples/storage/list-buckets.md +2 -2
  205. package/docs/examples/storage/list-files.md +3 -3
  206. package/docs/examples/storage/update-bucket.md +3 -3
  207. package/docs/examples/storage/update-file.md +4 -4
  208. package/docs/examples/teams/create-membership.md +4 -4
  209. package/docs/examples/teams/create.md +3 -3
  210. package/docs/examples/teams/delete-membership.md +3 -3
  211. package/docs/examples/teams/delete.md +2 -2
  212. package/docs/examples/teams/get-membership.md +3 -3
  213. package/docs/examples/teams/get-prefs.md +2 -2
  214. package/docs/examples/teams/get.md +2 -2
  215. package/docs/examples/teams/list-memberships.md +3 -3
  216. package/docs/examples/teams/list.md +2 -2
  217. package/docs/examples/teams/update-membership-status.md +5 -5
  218. package/docs/examples/teams/update-membership.md +3 -3
  219. package/docs/examples/teams/update-name.md +3 -3
  220. package/docs/examples/teams/update-prefs.md +2 -2
  221. package/docs/examples/users/create-argon2user.md +3 -3
  222. package/docs/examples/users/create-bcrypt-user.md +3 -3
  223. package/docs/examples/users/create-m-d5user.md +3 -3
  224. package/docs/examples/users/{delete-authenticator.md → create-mfa-recovery-codes.md} +2 -4
  225. package/docs/examples/users/create-p-h-pass-user.md +3 -3
  226. package/docs/examples/users/create-s-h-a-user.md +3 -3
  227. package/docs/examples/users/create-scrypt-modified-user.md +6 -6
  228. package/docs/examples/users/create-scrypt-user.md +4 -4
  229. package/docs/examples/users/create-session.md +2 -2
  230. package/docs/examples/users/create-target.md +6 -6
  231. package/docs/examples/users/create-token.md +2 -2
  232. package/docs/examples/users/create.md +3 -3
  233. package/docs/examples/users/delete-identity.md +2 -2
  234. package/docs/examples/users/delete-mfa-authenticator.md +13 -0
  235. package/docs/examples/users/delete-session.md +3 -3
  236. package/docs/examples/users/delete-sessions.md +2 -2
  237. package/docs/examples/users/delete-target.md +3 -3
  238. package/docs/examples/users/delete.md +2 -2
  239. package/docs/examples/users/get-mfa-recovery-codes.md +12 -0
  240. package/docs/examples/users/get-prefs.md +2 -2
  241. package/docs/examples/users/get-target.md +3 -3
  242. package/docs/examples/users/get.md +2 -2
  243. package/docs/examples/users/list-identities.md +2 -2
  244. package/docs/examples/users/list-logs.md +2 -2
  245. package/docs/examples/users/list-memberships.md +2 -2
  246. package/docs/examples/users/{list-factors.md → list-mfa-factors.md} +2 -2
  247. package/docs/examples/users/list-sessions.md +2 -2
  248. package/docs/examples/users/list-targets.md +2 -2
  249. package/docs/examples/users/list.md +2 -2
  250. package/docs/examples/users/update-email-verification.md +2 -2
  251. package/docs/examples/users/update-email.md +2 -2
  252. package/docs/examples/users/update-labels.md +2 -2
  253. package/docs/examples/users/update-mfa-recovery-codes.md +12 -0
  254. package/docs/examples/users/update-mfa.md +2 -2
  255. package/docs/examples/users/update-name.md +3 -3
  256. package/docs/examples/users/update-password.md +2 -2
  257. package/docs/examples/users/update-phone-verification.md +2 -2
  258. package/docs/examples/users/update-phone.md +2 -2
  259. package/docs/examples/users/update-prefs.md +2 -2
  260. package/docs/examples/users/update-status.md +2 -2
  261. package/docs/examples/users/update-target.md +6 -6
  262. package/index.d.ts +311 -116
  263. package/index.js +4 -6
  264. package/lib/client.js +7 -22
  265. package/lib/enums/authentication-factor.js +3 -2
  266. package/lib/enums/flag.js +1 -1
  267. package/lib/enums/index-type.js +1 -2
  268. package/lib/enums/name.js +1 -0
  269. package/lib/enums/runtime.js +8 -0
  270. package/lib/enums/smtp-encryption.js +7 -0
  271. package/lib/id.js +22 -2
  272. package/lib/services/account.js +206 -89
  273. package/lib/services/databases.js +28 -0
  274. package/lib/services/health.js +66 -0
  275. package/lib/services/messaging.js +75 -55
  276. package/lib/services/users.js +96 -14
  277. package/package.json +1 -1
  278. package/lib/enums/encryption.js +0 -7
  279. package/lib/enums/message-status.js +0 -7
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.create(
11
- '[FUNCTION_ID]', // functionId
12
- '[NAME]', // name
10
+ const result = await functions.create(
11
+ '<FUNCTION_ID>', // functionId
12
+ '<NAME>', // name
13
13
  sdk..Node145, // runtime
14
14
  ["any"], // execute (optional)
15
15
  [], // events (optional)
@@ -17,15 +17,15 @@ const response = await functions.create(
17
17
  1, // timeout (optional)
18
18
  false, // enabled (optional)
19
19
  false, // logging (optional)
20
- '[ENTRYPOINT]', // entrypoint (optional)
21
- '[COMMANDS]', // commands (optional)
22
- '[INSTALLATION_ID]', // installationId (optional)
23
- '[PROVIDER_REPOSITORY_ID]', // providerRepositoryId (optional)
24
- '[PROVIDER_BRANCH]', // providerBranch (optional)
20
+ '<ENTRYPOINT>', // entrypoint (optional)
21
+ '<COMMANDS>', // commands (optional)
22
+ '<INSTALLATION_ID>', // installationId (optional)
23
+ '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional)
24
+ '<PROVIDER_BRANCH>', // providerBranch (optional)
25
25
  false, // providerSilentMode (optional)
26
- '[PROVIDER_ROOT_DIRECTORY]', // providerRootDirectory (optional)
27
- '[TEMPLATE_REPOSITORY]', // templateRepository (optional)
28
- '[TEMPLATE_OWNER]', // templateOwner (optional)
29
- '[TEMPLATE_ROOT_DIRECTORY]', // templateRootDirectory (optional)
30
- '[TEMPLATE_BRANCH]' // templateBranch (optional)
26
+ '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional)
27
+ '<TEMPLATE_REPOSITORY>', // templateRepository (optional)
28
+ '<TEMPLATE_OWNER>', // templateOwner (optional)
29
+ '<TEMPLATE_ROOT_DIRECTORY>', // templateRootDirectory (optional)
30
+ '<TEMPLATE_BRANCH>' // templateBranch (optional)
31
31
  );
@@ -7,7 +7,7 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.deleteDeployment(
11
- '[FUNCTION_ID]', // functionId
12
- '[DEPLOYMENT_ID]' // deploymentId
10
+ const result = await functions.deleteDeployment(
11
+ '<FUNCTION_ID>', // functionId
12
+ '<DEPLOYMENT_ID>' // deploymentId
13
13
  );
@@ -7,7 +7,7 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.deleteVariable(
11
- '[FUNCTION_ID]', // functionId
12
- '[VARIABLE_ID]' // variableId
10
+ const result = await functions.deleteVariable(
11
+ '<FUNCTION_ID>', // functionId
12
+ '<VARIABLE_ID>' // variableId
13
13
  );
@@ -7,6 +7,6 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.delete(
11
- '[FUNCTION_ID]' // functionId
10
+ const result = await functions.delete(
11
+ '<FUNCTION_ID>' // functionId
12
12
  );
@@ -7,7 +7,7 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.downloadDeployment(
11
- '[FUNCTION_ID]', // functionId
12
- '[DEPLOYMENT_ID]' // deploymentId
10
+ const result = await functions.downloadDeployment(
11
+ '<FUNCTION_ID>', // functionId
12
+ '<DEPLOYMENT_ID>' // deploymentId
13
13
  );
@@ -7,7 +7,7 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.getDeployment(
11
- '[FUNCTION_ID]', // functionId
12
- '[DEPLOYMENT_ID]' // deploymentId
10
+ const result = await functions.getDeployment(
11
+ '<FUNCTION_ID>', // functionId
12
+ '<DEPLOYMENT_ID>' // deploymentId
13
13
  );
@@ -7,7 +7,7 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.getExecution(
11
- '[FUNCTION_ID]', // functionId
12
- '[EXECUTION_ID]' // executionId
10
+ const result = await functions.getExecution(
11
+ '<FUNCTION_ID>', // functionId
12
+ '<EXECUTION_ID>' // executionId
13
13
  );
@@ -7,7 +7,7 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.getVariable(
11
- '[FUNCTION_ID]', // functionId
12
- '[VARIABLE_ID]' // variableId
10
+ const result = await functions.getVariable(
11
+ '<FUNCTION_ID>', // functionId
12
+ '<VARIABLE_ID>' // variableId
13
13
  );
@@ -7,6 +7,6 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.get(
11
- '[FUNCTION_ID]' // functionId
10
+ const result = await functions.get(
11
+ '<FUNCTION_ID>' // functionId
12
12
  );
@@ -7,8 +7,8 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.listDeployments(
11
- '[FUNCTION_ID]', // functionId
10
+ const result = await functions.listDeployments(
11
+ '<FUNCTION_ID>', // functionId
12
12
  [], // queries (optional)
13
- '[SEARCH]' // search (optional)
13
+ '<SEARCH>' // search (optional)
14
14
  );
@@ -7,8 +7,8 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.listExecutions(
11
- '[FUNCTION_ID]', // functionId
10
+ const result = await functions.listExecutions(
11
+ '<FUNCTION_ID>', // functionId
12
12
  [], // queries (optional)
13
- '[SEARCH]' // search (optional)
13
+ '<SEARCH>' // search (optional)
14
14
  );
@@ -7,4 +7,4 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.listRuntimes();
10
+ const result = await functions.listRuntimes();
@@ -7,6 +7,6 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.listVariables(
11
- '[FUNCTION_ID]' // functionId
10
+ const result = await functions.listVariables(
11
+ '<FUNCTION_ID>' // functionId
12
12
  );
@@ -7,7 +7,7 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.list(
10
+ const result = await functions.list(
11
11
  [], // queries (optional)
12
- '[SEARCH]' // search (optional)
12
+ '<SEARCH>' // search (optional)
13
13
  );
@@ -7,7 +7,7 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.updateDeployment(
11
- '[FUNCTION_ID]', // functionId
12
- '[DEPLOYMENT_ID]' // deploymentId
10
+ const result = await functions.updateDeployment(
11
+ '<FUNCTION_ID>', // functionId
12
+ '<DEPLOYMENT_ID>' // deploymentId
13
13
  );
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.updateVariable(
11
- '[FUNCTION_ID]', // functionId
12
- '[VARIABLE_ID]', // variableId
13
- '[KEY]', // key
14
- '[VALUE]' // value (optional)
10
+ const result = await functions.updateVariable(
11
+ '<FUNCTION_ID>', // functionId
12
+ '<VARIABLE_ID>', // variableId
13
+ '<KEY>', // key
14
+ '<VALUE>' // value (optional)
15
15
  );
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.update(
11
- '[FUNCTION_ID]', // functionId
12
- '[NAME]', // name
10
+ const result = await functions.update(
11
+ '<FUNCTION_ID>', // functionId
12
+ '<NAME>', // name
13
13
  sdk..Node145, // runtime (optional)
14
14
  ["any"], // execute (optional)
15
15
  [], // events (optional)
@@ -17,11 +17,11 @@ const response = await functions.update(
17
17
  1, // timeout (optional)
18
18
  false, // enabled (optional)
19
19
  false, // logging (optional)
20
- '[ENTRYPOINT]', // entrypoint (optional)
21
- '[COMMANDS]', // commands (optional)
22
- '[INSTALLATION_ID]', // installationId (optional)
23
- '[PROVIDER_REPOSITORY_ID]', // providerRepositoryId (optional)
24
- '[PROVIDER_BRANCH]', // providerBranch (optional)
20
+ '<ENTRYPOINT>', // entrypoint (optional)
21
+ '<COMMANDS>', // commands (optional)
22
+ '<INSTALLATION_ID>', // installationId (optional)
23
+ '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional)
24
+ '<PROVIDER_BRANCH>', // providerBranch (optional)
25
25
  false, // providerSilentMode (optional)
26
- '[PROVIDER_ROOT_DIRECTORY]' // providerRootDirectory (optional)
26
+ '<PROVIDER_ROOT_DIRECTORY>' // providerRootDirectory (optional)
27
27
  );
@@ -7,6 +7,6 @@ const client = new sdk.Client()
7
7
 
8
8
  const graphql = new sdk.Graphql(client);
9
9
 
10
- const response = await graphql.mutation(
10
+ const result = await graphql.mutation(
11
11
  {} // query
12
12
  );
@@ -7,6 +7,6 @@ const client = new sdk.Client()
7
7
 
8
8
  const graphql = new sdk.Graphql(client);
9
9
 
10
- const response = await graphql.query(
10
+ const result = await graphql.query(
11
11
  {} // query
12
12
  );
@@ -7,4 +7,4 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getAntivirus();
10
+ const result = await health.getAntivirus();
@@ -7,4 +7,4 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getCache();
10
+ const result = await health.getCache();
@@ -7,6 +7,6 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getCertificate(
10
+ const result = await health.getCertificate(
11
11
  '' // domain (optional)
12
12
  );
@@ -7,4 +7,4 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getDB();
10
+ const result = await health.getDB();
@@ -7,7 +7,7 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getFailedJobs(
10
+ const result = await health.getFailedJobs(
11
11
  sdk..V1Database, // name
12
12
  null // threshold (optional)
13
13
  );
@@ -7,4 +7,4 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getPubSub();
10
+ const result = await health.getPubSub();
@@ -7,6 +7,6 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getQueueBuilds(
10
+ const result = await health.getQueueBuilds(
11
11
  null // threshold (optional)
12
12
  );
@@ -7,6 +7,6 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getQueueCertificates(
10
+ const result = await health.getQueueCertificates(
11
11
  null // threshold (optional)
12
12
  );
@@ -7,7 +7,7 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getQueueDatabases(
11
- '[NAME]', // name (optional)
10
+ const result = await health.getQueueDatabases(
11
+ '<NAME>', // name (optional)
12
12
  null // threshold (optional)
13
13
  );
@@ -7,6 +7,6 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getQueueDeletes(
10
+ const result = await health.getQueueDeletes(
11
11
  null // threshold (optional)
12
12
  );
@@ -7,6 +7,6 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getQueueFunctions(
10
+ const result = await health.getQueueFunctions(
11
11
  null // threshold (optional)
12
12
  );
@@ -7,6 +7,6 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getQueueLogs(
10
+ const result = await health.getQueueLogs(
11
11
  null // threshold (optional)
12
12
  );
@@ -7,6 +7,6 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getQueueMails(
10
+ const result = await health.getQueueMails(
11
11
  null // threshold (optional)
12
12
  );
@@ -7,6 +7,6 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getQueueMessaging(
10
+ const result = await health.getQueueMessaging(
11
11
  null // threshold (optional)
12
12
  );
@@ -7,6 +7,6 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getQueueMigrations(
10
+ const result = await health.getQueueMigrations(
11
11
  null // threshold (optional)
12
12
  );
@@ -0,0 +1,12 @@
1
+ const sdk = require('node-appwrite');
2
+
3
+ const client = new sdk.Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2') // Your project ID
6
+ .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key
7
+
8
+ const health = new sdk.Health(client);
9
+
10
+ const result = await health.getQueueUsageDump(
11
+ null // threshold (optional)
12
+ );
@@ -0,0 +1,12 @@
1
+ const sdk = require('node-appwrite');
2
+
3
+ const client = new sdk.Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2') // Your project ID
6
+ .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key
7
+
8
+ const health = new sdk.Health(client);
9
+
10
+ const result = await health.getQueueUsage(
11
+ null // threshold (optional)
12
+ );
@@ -7,6 +7,6 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getQueueWebhooks(
10
+ const result = await health.getQueueWebhooks(
11
11
  null // threshold (optional)
12
12
  );
@@ -7,4 +7,4 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getQueue();
10
+ const result = await health.getQueue();
@@ -7,4 +7,4 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getStorageLocal();
10
+ const result = await health.getStorageLocal();
@@ -0,0 +1,10 @@
1
+ const sdk = require('node-appwrite');
2
+
3
+ const client = new sdk.Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('5df5acd0d48c2') // Your project ID
6
+ .setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key
7
+
8
+ const health = new sdk.Health(client);
9
+
10
+ const result = await health.getStorage();
@@ -7,4 +7,4 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.getTime();
10
+ const result = await health.getTime();
@@ -7,4 +7,4 @@ const client = new sdk.Client()
7
7
 
8
8
  const health = new sdk.Health(client);
9
9
 
10
- const response = await health.get();
10
+ const result = await health.get();
@@ -7,4 +7,4 @@ const client = new sdk.Client()
7
7
 
8
8
  const locale = new sdk.Locale(client);
9
9
 
10
- const response = await locale.get();
10
+ const result = await locale.get();
@@ -7,4 +7,4 @@ const client = new sdk.Client()
7
7
 
8
8
  const locale = new sdk.Locale(client);
9
9
 
10
- const response = await locale.listCodes();
10
+ const result = await locale.listCodes();
@@ -7,4 +7,4 @@ const client = new sdk.Client()
7
7
 
8
8
  const locale = new sdk.Locale(client);
9
9
 
10
- const response = await locale.listContinents();
10
+ const result = await locale.listContinents();
@@ -7,4 +7,4 @@ const client = new sdk.Client()
7
7
 
8
8
  const locale = new sdk.Locale(client);
9
9
 
10
- const response = await locale.listCountriesEU();
10
+ const result = await locale.listCountriesEU();
@@ -7,4 +7,4 @@ const client = new sdk.Client()
7
7
 
8
8
  const locale = new sdk.Locale(client);
9
9
 
10
- const response = await locale.listCountriesPhones();
10
+ const result = await locale.listCountriesPhones();
@@ -7,4 +7,4 @@ const client = new sdk.Client()
7
7
 
8
8
  const locale = new sdk.Locale(client);
9
9
 
10
- const response = await locale.listCountries();
10
+ const result = await locale.listCountries();
@@ -7,4 +7,4 @@ const client = new sdk.Client()
7
7
 
8
8
  const locale = new sdk.Locale(client);
9
9
 
10
- const response = await locale.listCurrencies();
10
+ const result = await locale.listCurrencies();
@@ -7,4 +7,4 @@ const client = new sdk.Client()
7
7
 
8
8
  const locale = new sdk.Locale(client);
9
9
 
10
- const response = await locale.listLanguages();
10
+ const result = await locale.listLanguages();
@@ -7,12 +7,13 @@ const client = new sdk.Client()
7
7
 
8
8
  const messaging = new sdk.Messaging(client);
9
9
 
10
- const response = await messaging.createApnsProvider(
11
- '[PROVIDER_ID]', // providerId
12
- '[NAME]', // name
13
- '[AUTH_KEY]', // authKey (optional)
14
- '[AUTH_KEY_ID]', // authKeyId (optional)
15
- '[TEAM_ID]', // teamId (optional)
16
- '[BUNDLE_ID]', // bundleId (optional)
10
+ const result = await messaging.createApnsProvider(
11
+ '<PROVIDER_ID>', // providerId
12
+ '<NAME>', // name
13
+ '<AUTH_KEY>', // authKey (optional)
14
+ '<AUTH_KEY_ID>', // authKeyId (optional)
15
+ '<TEAM_ID>', // teamId (optional)
16
+ '<BUNDLE_ID>', // bundleId (optional)
17
+ false, // sandbox (optional)
17
18
  false // enabled (optional)
18
19
  );
@@ -7,17 +7,17 @@ const client = new sdk.Client()
7
7
 
8
8
  const messaging = new sdk.Messaging(client);
9
9
 
10
- const response = await messaging.createEmail(
11
- '[MESSAGE_ID]', // messageId
12
- '[SUBJECT]', // subject
13
- '[CONTENT]', // content
10
+ const result = await messaging.createEmail(
11
+ '<MESSAGE_ID>', // messageId
12
+ '<SUBJECT>', // subject
13
+ '<CONTENT>', // content
14
14
  [], // topics (optional)
15
15
  [], // users (optional)
16
16
  [], // targets (optional)
17
17
  [], // cc (optional)
18
18
  [], // bcc (optional)
19
19
  [], // attachments (optional)
20
- sdk.MessageStatus.Draft, // status (optional)
20
+ false, // draft (optional)
21
21
  false, // html (optional)
22
22
  '' // scheduledAt (optional)
23
23
  );
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const messaging = new sdk.Messaging(client);
9
9
 
10
- const response = await messaging.createFcmProvider(
11
- '[PROVIDER_ID]', // providerId
12
- '[NAME]', // name
10
+ const result = await messaging.createFcmProvider(
11
+ '<PROVIDER_ID>', // providerId
12
+ '<NAME>', // name
13
13
  {}, // serviceAccountJSON (optional)
14
14
  false // enabled (optional)
15
15
  );
@@ -7,15 +7,15 @@ const client = new sdk.Client()
7
7
 
8
8
  const messaging = new sdk.Messaging(client);
9
9
 
10
- const response = await messaging.createMailgunProvider(
11
- '[PROVIDER_ID]', // providerId
12
- '[NAME]', // name
13
- '[API_KEY]', // apiKey (optional)
14
- '[DOMAIN]', // domain (optional)
10
+ const result = await messaging.createMailgunProvider(
11
+ '<PROVIDER_ID>', // providerId
12
+ '<NAME>', // name
13
+ '<API_KEY>', // apiKey (optional)
14
+ '<DOMAIN>', // domain (optional)
15
15
  false, // isEuRegion (optional)
16
- '[FROM_NAME]', // fromName (optional)
16
+ '<FROM_NAME>', // fromName (optional)
17
17
  'email@example.com', // fromEmail (optional)
18
- '[REPLY_TO_NAME]', // replyToName (optional)
18
+ '<REPLY_TO_NAME>', // replyToName (optional)
19
19
  'email@example.com', // replyToEmail (optional)
20
20
  false // enabled (optional)
21
21
  );