node-appwrite 12.0.0-rc.4 → 12.0.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 (278) hide show
  1. package/.travis.yml +2 -2
  2. package/README.md +4 -4
  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 +5 -5
  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 +307 -112
  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/services/account.js +206 -89
  272. package/lib/services/databases.js +28 -0
  273. package/lib/services/health.js +66 -0
  274. package/lib/services/messaging.js +65 -45
  275. package/lib/services/users.js +96 -14
  276. package/package.json +1 -1
  277. package/lib/enums/encryption.js +0 -7
  278. package/lib/enums/message-status.js +0 -7
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.createEmailAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.createEmailAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  false, // required
15
15
  'email@example.com', // default (optional)
@@ -7,12 +7,12 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.createEnumAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.createEnumAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  [], // elements
15
15
  false, // required
16
- '[DEFAULT]', // default (optional)
16
+ '<DEFAULT>', // default (optional)
17
17
  false // array (optional)
18
18
  );
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.createFloatAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.createFloatAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  false, // required
15
15
  null, // min (optional)
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.createIndex(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.createIndex(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  sdk.IndexType.Key, // type
15
15
  [], // attributes
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.createIntegerAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.createIntegerAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  false, // required
15
15
  null, // min (optional)
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.createIpAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.createIpAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  false, // required
15
15
  '', // default (optional)
@@ -7,10 +7,10 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.createRelationshipAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
13
- '[RELATED_COLLECTION_ID]', // relatedCollectionId
10
+ const result = await databases.createRelationshipAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
+ '<RELATED_COLLECTION_ID>', // relatedCollectionId
14
14
  sdk.RelationshipType.OneToOne, // type
15
15
  false, // twoWay (optional)
16
16
  '', // key (optional)
@@ -7,13 +7,13 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.createStringAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.createStringAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  1, // size
15
15
  false, // required
16
- '[DEFAULT]', // default (optional)
16
+ '<DEFAULT>', // default (optional)
17
17
  false, // array (optional)
18
18
  false // encrypt (optional)
19
19
  );
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.createUrlAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.createUrlAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  false, // required
15
15
  'https://example.com', // default (optional)
@@ -7,8 +7,8 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.create(
11
- '[DATABASE_ID]', // databaseId
12
- '[NAME]', // name
10
+ const result = await databases.create(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<NAME>', // name
13
13
  false // enabled (optional)
14
14
  );
@@ -7,8 +7,8 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.deleteAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.deleteAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '' // key
14
14
  );
@@ -7,7 +7,7 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.deleteCollection(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]' // collectionId
10
+ const result = await databases.deleteCollection(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>' // collectionId
13
13
  );
@@ -7,8 +7,8 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.deleteDocument(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
13
- '[DOCUMENT_ID]' // documentId
10
+ const result = await databases.deleteDocument(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
+ '<DOCUMENT_ID>' // documentId
14
14
  );
@@ -7,8 +7,8 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.deleteIndex(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.deleteIndex(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '' // key
14
14
  );
@@ -7,6 +7,6 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.delete(
11
- '[DATABASE_ID]' // databaseId
10
+ const result = await databases.delete(
11
+ '<DATABASE_ID>' // databaseId
12
12
  );
@@ -7,8 +7,8 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.getAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.getAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '' // key
14
14
  );
@@ -7,7 +7,7 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.getCollection(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]' // collectionId
10
+ const result = await databases.getCollection(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>' // collectionId
13
13
  );
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.getDocument(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
13
- '[DOCUMENT_ID]', // documentId
10
+ const result = await databases.getDocument(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
+ '<DOCUMENT_ID>', // documentId
14
14
  [] // queries (optional)
15
15
  );
@@ -7,8 +7,8 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.getIndex(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.getIndex(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '' // key
14
14
  );
@@ -7,6 +7,6 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.get(
11
- '[DATABASE_ID]' // databaseId
10
+ const result = await databases.get(
11
+ '<DATABASE_ID>' // databaseId
12
12
  );
@@ -7,8 +7,8 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.listAttributes(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.listAttributes(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  [] // queries (optional)
14
14
  );
@@ -7,8 +7,8 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.listCollections(
11
- '[DATABASE_ID]', // databaseId
10
+ const result = await databases.listCollections(
11
+ '<DATABASE_ID>', // databaseId
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 databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.listDocuments(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.listDocuments(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  [] // queries (optional)
14
14
  );
@@ -7,8 +7,8 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.listIndexes(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.listIndexes(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  [] // queries (optional)
14
14
  );
@@ -7,7 +7,7 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.list(
10
+ const result = await databases.list(
11
11
  [], // queries (optional)
12
- '[SEARCH]' // search (optional)
12
+ '<SEARCH>' // search (optional)
13
13
  );
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.updateBooleanAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.updateBooleanAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  false, // required
15
15
  false // default
@@ -7,10 +7,10 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.updateCollection(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
13
- '[NAME]', // name
10
+ const result = await databases.updateCollection(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
+ '<NAME>', // name
14
14
  ["read("any")"], // permissions (optional)
15
15
  false, // documentSecurity (optional)
16
16
  false // enabled (optional)
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.updateDatetimeAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.updateDatetimeAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  false, // required
15
15
  '' // default
@@ -7,10 +7,10 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.updateDocument(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
13
- '[DOCUMENT_ID]', // documentId
10
+ const result = await databases.updateDocument(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
+ '<DOCUMENT_ID>', // documentId
14
14
  {}, // data (optional)
15
15
  ["read("any")"] // permissions (optional)
16
16
  );
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.updateEmailAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.updateEmailAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  false, // required
15
15
  'email@example.com' // default
@@ -7,11 +7,11 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.updateEnumAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.updateEnumAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  [], // elements
15
15
  false, // required
16
- '[DEFAULT]' // default
16
+ '<DEFAULT>' // default
17
17
  );
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.updateFloatAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.updateFloatAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  false, // required
15
15
  null, // min
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.updateIntegerAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.updateIntegerAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  false, // required
15
15
  null, // min
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.updateIpAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.updateIpAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  false, // required
15
15
  '' // default
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.updateRelationshipAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.updateRelationshipAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  sdk.RelationMutate.Cascade // onDelete (optional)
15
15
  );
@@ -7,10 +7,10 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.updateStringAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.updateStringAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  false, // required
15
- '[DEFAULT]' // default
15
+ '<DEFAULT>' // default
16
16
  );
@@ -7,9 +7,9 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.updateUrlAttribute(
11
- '[DATABASE_ID]', // databaseId
12
- '[COLLECTION_ID]', // collectionId
10
+ const result = await databases.updateUrlAttribute(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<COLLECTION_ID>', // collectionId
13
13
  '', // key
14
14
  false, // required
15
15
  'https://example.com' // default
@@ -7,8 +7,8 @@ const client = new sdk.Client()
7
7
 
8
8
  const databases = new sdk.Databases(client);
9
9
 
10
- const response = await databases.update(
11
- '[DATABASE_ID]', // databaseId
12
- '[NAME]', // name
10
+ const result = await databases.update(
11
+ '<DATABASE_ID>', // databaseId
12
+ '<NAME>', // name
13
13
  false // enabled (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.createBuild(
11
- '[FUNCTION_ID]', // functionId
12
- '[DEPLOYMENT_ID]', // deploymentId
13
- '[BUILD_ID]' // buildId
10
+ const result = await functions.createBuild(
11
+ '<FUNCTION_ID>', // functionId
12
+ '<DEPLOYMENT_ID>', // deploymentId
13
+ '<BUILD_ID>' // buildId
14
14
  );
@@ -8,10 +8,10 @@ const client = new sdk.Client()
8
8
 
9
9
  const functions = new sdk.Functions(client);
10
10
 
11
- const response = await functions.createDeployment(
12
- '[FUNCTION_ID]', // functionId
11
+ const result = await functions.createDeployment(
12
+ '<FUNCTION_ID>', // functionId
13
13
  InputFile.fromPath('/path/to/file.png', 'file.png'), // code
14
14
  false, // activate
15
- '[ENTRYPOINT]', // entrypoint (optional)
16
- '[COMMANDS]' // commands (optional)
15
+ '<ENTRYPOINT>', // entrypoint (optional)
16
+ '<COMMANDS>' // commands (optional)
17
17
  );
@@ -7,11 +7,11 @@ const client = new sdk.Client()
7
7
 
8
8
  const functions = new sdk.Functions(client);
9
9
 
10
- const response = await functions.createExecution(
11
- '[FUNCTION_ID]', // functionId
12
- '[BODY]', // body (optional)
10
+ const result = await functions.createExecution(
11
+ '<FUNCTION_ID>', // functionId
12
+ '<BODY>', // body (optional)
13
13
  false, // async (optional)
14
- '[PATH]', // path (optional)
14
+ '<PATH>', // path (optional)
15
15
  sdk.ExecutionMethod.GET, // method (optional)
16
16
  {} // headers (optional)
17
17
  );
@@ -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.createVariable(
11
- '[FUNCTION_ID]', // functionId
12
- '[KEY]', // key
13
- '[VALUE]' // value
10
+ const result = await functions.createVariable(
11
+ '<FUNCTION_ID>', // functionId
12
+ '<KEY>', // key
13
+ '<VALUE>' // value
14
14
  );