@appwrite.io/console 8.1.0 → 8.1.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 (898) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/sdk.js +1 -1
  3. package/dist/cjs/sdk.js.map +1 -0
  4. package/dist/esm/sdk.js +29705 -0
  5. package/dist/esm/sdk.js.map +1 -0
  6. package/dist/iife/sdk.js +33515 -0
  7. package/package.json +5 -1
  8. package/types/channel.d.ts +74 -0
  9. package/types/client.d.ts +302 -0
  10. package/types/enums/adapter.d.ts +4 -0
  11. package/types/enums/api-service.d.ts +15 -0
  12. package/types/enums/api.d.ts +5 -0
  13. package/types/enums/appwrite-migration-resource.d.ts +27 -0
  14. package/types/enums/attribute-status.d.ts +7 -0
  15. package/types/enums/auth-method.d.ts +9 -0
  16. package/types/enums/authentication-factor.d.ts +6 -0
  17. package/types/enums/authenticator-type.d.ts +3 -0
  18. package/types/enums/backup-services.d.ts +8 -0
  19. package/types/enums/billing-plan-group.d.ts +5 -0
  20. package/types/enums/browser-permission.d.ts +22 -0
  21. package/types/enums/browser.d.ts +16 -0
  22. package/types/enums/build-runtime.d.ts +88 -0
  23. package/types/enums/column-status.d.ts +7 -0
  24. package/types/enums/compression.d.ts +5 -0
  25. package/types/enums/console-resource-type.d.ts +3 -0
  26. package/types/enums/credit-card.d.ts +19 -0
  27. package/types/enums/database-type.d.ts +6 -0
  28. package/types/enums/databases-index-type.d.ts +6 -0
  29. package/types/enums/deployment-download-type.d.ts +4 -0
  30. package/types/enums/deployment-status.d.ts +8 -0
  31. package/types/enums/domain-purchase-status.d.ts +6 -0
  32. package/types/enums/domain-transfer-status-enum.d.ts +10 -0
  33. package/types/enums/email-template-locale.d.ts +133 -0
  34. package/types/enums/email-template-type.d.ts +9 -0
  35. package/types/enums/execution-method.d.ts +9 -0
  36. package/types/enums/execution-status.d.ts +7 -0
  37. package/types/enums/execution-trigger.d.ts +5 -0
  38. package/types/enums/filter-type.d.ts +4 -0
  39. package/types/enums/firebase-migration-resource.d.ts +12 -0
  40. package/types/enums/flag.d.ts +197 -0
  41. package/types/enums/framework.d.ts +17 -0
  42. package/types/enums/frameworks.d.ts +17 -0
  43. package/types/enums/health-antivirus-status.d.ts +5 -0
  44. package/types/enums/health-check-status.d.ts +4 -0
  45. package/types/enums/image-format.d.ts +9 -0
  46. package/types/enums/image-gravity.d.ts +11 -0
  47. package/types/enums/index-status.d.ts +7 -0
  48. package/types/enums/message-priority.d.ts +4 -0
  49. package/types/enums/message-status.d.ts +7 -0
  50. package/types/enums/messaging-provider-type.d.ts +5 -0
  51. package/types/enums/n-host-migration-resource.d.ts +13 -0
  52. package/types/enums/name.d.ts +15 -0
  53. package/types/enums/o-auth-provider.d.ts +41 -0
  54. package/types/enums/order-by.d.ts +4 -0
  55. package/types/enums/password-hash.d.ts +13 -0
  56. package/types/enums/platform-type.d.ts +17 -0
  57. package/types/enums/platform.d.ts +4 -0
  58. package/types/enums/project-usage-range.d.ts +4 -0
  59. package/types/enums/proxy-resource-type.d.ts +4 -0
  60. package/types/enums/proxy-rule-deployment-resource-type.d.ts +4 -0
  61. package/types/enums/proxy-rule-status.d.ts +6 -0
  62. package/types/enums/region.d.ts +8 -0
  63. package/types/enums/registration-type.d.ts +6 -0
  64. package/types/enums/relation-mutate.d.ts +5 -0
  65. package/types/enums/relationship-type.d.ts +6 -0
  66. package/types/enums/resource-type.d.ts +6 -0
  67. package/types/enums/runtime.d.ts +88 -0
  68. package/types/enums/runtimes.d.ts +88 -0
  69. package/types/enums/scopes.d.ts +81 -0
  70. package/types/enums/sms-template-locale.d.ts +133 -0
  71. package/types/enums/sms-template-type.d.ts +6 -0
  72. package/types/enums/smtp-encryption.d.ts +5 -0
  73. package/types/enums/smtp-secure.d.ts +4 -0
  74. package/types/enums/status-code.d.ts +6 -0
  75. package/types/enums/status.d.ts +3 -0
  76. package/types/enums/supabase-migration-resource.d.ts +13 -0
  77. package/types/enums/tables-db-index-type.d.ts +6 -0
  78. package/types/enums/template-reference-type.d.ts +5 -0
  79. package/types/enums/theme.d.ts +4 -0
  80. package/types/enums/timezone.d.ts +421 -0
  81. package/types/enums/usage-range.d.ts +5 -0
  82. package/types/enums/use-cases.d.ts +16 -0
  83. package/types/enums/vcs-detection-type.d.ts +4 -0
  84. package/types/enums/vcs-reference-type.d.ts +5 -0
  85. package/types/id.d.ts +20 -0
  86. package/{src/index.ts → types/index.d.ts} +1 -1
  87. package/{src/models.ts → types/models.d.ts} +268 -518
  88. package/types/operator.d.ts +180 -0
  89. package/{src/permission.ts → types/permission.d.ts} +6 -20
  90. package/types/query.d.ts +442 -0
  91. package/{src/role.ts → types/role.d.ts} +28 -58
  92. package/types/service.d.ts +11 -0
  93. package/types/services/account.d.ts +1536 -0
  94. package/types/services/activities.d.ts +46 -0
  95. package/types/services/assistant.d.ts +24 -0
  96. package/{src/services/avatars.ts → types/services/avatars.d.ts} +91 -525
  97. package/types/services/backups.d.ts +277 -0
  98. package/types/services/console.d.ts +248 -0
  99. package/types/services/databases.d.ts +2435 -0
  100. package/types/services/domains.d.ts +1527 -0
  101. package/types/services/functions.d.ts +842 -0
  102. package/types/services/graphql.d.ts +43 -0
  103. package/types/services/health.d.ts +475 -0
  104. package/types/services/locale.d.ts +64 -0
  105. package/types/services/messaging.d.ts +1989 -0
  106. package/types/services/migrations.d.ts +417 -0
  107. package/types/services/organizations.d.ts +1009 -0
  108. package/types/services/project.d.ts +148 -0
  109. package/types/services/projects.d.ts +1626 -0
  110. package/types/services/proxy.d.ts +190 -0
  111. package/types/services/realtime.d.ts +134 -0
  112. package/types/services/sites.d.ts +800 -0
  113. package/types/services/storage.d.ts +467 -0
  114. package/types/services/tables-db.d.ts +2352 -0
  115. package/types/services/teams.d.ts +366 -0
  116. package/types/services/tokens.d.ts +119 -0
  117. package/types/services/users.d.ts +1208 -0
  118. package/types/services/vcs.d.ts +252 -0
  119. package/types/services/webhooks.d.ts +165 -0
  120. package/.github/workflows/autoclose.yml +0 -11
  121. package/.github/workflows/publish.yml +0 -43
  122. package/CHANGELOG.md +0 -169
  123. package/docs/examples/account/create-anonymous-session.md +0 -13
  124. package/docs/examples/account/create-billing-address.md +0 -20
  125. package/docs/examples/account/create-email-password-session.md +0 -16
  126. package/docs/examples/account/create-email-token.md +0 -17
  127. package/docs/examples/account/create-email-verification.md +0 -15
  128. package/docs/examples/account/create-jwt.md +0 -15
  129. package/docs/examples/account/create-key.md +0 -17
  130. package/docs/examples/account/create-magic-url-token.md +0 -18
  131. package/docs/examples/account/create-mfa-authenticator.md +0 -15
  132. package/docs/examples/account/create-mfa-challenge.md +0 -15
  133. package/docs/examples/account/create-mfa-recovery-codes.md +0 -13
  134. package/docs/examples/account/create-o-auth-2-session.md +0 -17
  135. package/docs/examples/account/create-o-auth-2-token.md +0 -17
  136. package/docs/examples/account/create-payment-method.md +0 -13
  137. package/docs/examples/account/create-phone-token.md +0 -16
  138. package/docs/examples/account/create-phone-verification.md +0 -13
  139. package/docs/examples/account/create-push-target.md +0 -17
  140. package/docs/examples/account/create-recovery.md +0 -16
  141. package/docs/examples/account/create-session.md +0 -16
  142. package/docs/examples/account/create-verification.md +0 -15
  143. package/docs/examples/account/create.md +0 -18
  144. package/docs/examples/account/delete-billing-address.md +0 -15
  145. package/docs/examples/account/delete-identity.md +0 -15
  146. package/docs/examples/account/delete-key.md +0 -15
  147. package/docs/examples/account/delete-mfa-authenticator.md +0 -15
  148. package/docs/examples/account/delete-payment-method.md +0 -15
  149. package/docs/examples/account/delete-push-target.md +0 -15
  150. package/docs/examples/account/delete-session.md +0 -15
  151. package/docs/examples/account/delete-sessions.md +0 -13
  152. package/docs/examples/account/delete.md +0 -13
  153. package/docs/examples/account/get-billing-address.md +0 -15
  154. package/docs/examples/account/get-coupon.md +0 -15
  155. package/docs/examples/account/get-key.md +0 -15
  156. package/docs/examples/account/get-mfa-recovery-codes.md +0 -13
  157. package/docs/examples/account/get-payment-method.md +0 -15
  158. package/docs/examples/account/get-prefs.md +0 -13
  159. package/docs/examples/account/get-session.md +0 -15
  160. package/docs/examples/account/get.md +0 -13
  161. package/docs/examples/account/list-billing-addresses.md +0 -15
  162. package/docs/examples/account/list-identities.md +0 -16
  163. package/docs/examples/account/list-invoices.md +0 -15
  164. package/docs/examples/account/list-keys.md +0 -15
  165. package/docs/examples/account/list-logs.md +0 -16
  166. package/docs/examples/account/list-mfa-factors.md +0 -13
  167. package/docs/examples/account/list-payment-methods.md +0 -15
  168. package/docs/examples/account/list-sessions.md +0 -13
  169. package/docs/examples/account/update-billing-address.md +0 -21
  170. package/docs/examples/account/update-email-verification.md +0 -16
  171. package/docs/examples/account/update-email.md +0 -16
  172. package/docs/examples/account/update-key.md +0 -18
  173. package/docs/examples/account/update-magic-url-session.md +0 -16
  174. package/docs/examples/account/update-mfa-authenticator.md +0 -16
  175. package/docs/examples/account/update-mfa-challenge.md +0 -16
  176. package/docs/examples/account/update-mfa-recovery-codes.md +0 -13
  177. package/docs/examples/account/update-mfa.md +0 -15
  178. package/docs/examples/account/update-name.md +0 -15
  179. package/docs/examples/account/update-password.md +0 -16
  180. package/docs/examples/account/update-payment-method-mandate-options.md +0 -15
  181. package/docs/examples/account/update-payment-method-provider.md +0 -18
  182. package/docs/examples/account/update-payment-method.md +0 -18
  183. package/docs/examples/account/update-phone-session.md +0 -16
  184. package/docs/examples/account/update-phone-verification.md +0 -16
  185. package/docs/examples/account/update-phone.md +0 -16
  186. package/docs/examples/account/update-prefs.md +0 -19
  187. package/docs/examples/account/update-push-target.md +0 -16
  188. package/docs/examples/account/update-recovery.md +0 -17
  189. package/docs/examples/account/update-session.md +0 -15
  190. package/docs/examples/account/update-status.md +0 -13
  191. package/docs/examples/account/update-verification.md +0 -16
  192. package/docs/examples/activities/get-event.md +0 -15
  193. package/docs/examples/activities/list-events.md +0 -15
  194. package/docs/examples/assistant/chat.md +0 -15
  195. package/docs/examples/avatars/get-browser.md +0 -18
  196. package/docs/examples/avatars/get-credit-card.md +0 -18
  197. package/docs/examples/avatars/get-favicon.md +0 -15
  198. package/docs/examples/avatars/get-flag.md +0 -18
  199. package/docs/examples/avatars/get-image.md +0 -17
  200. package/docs/examples/avatars/get-initials.md +0 -18
  201. package/docs/examples/avatars/get-qr.md +0 -18
  202. package/docs/examples/avatars/get-screenshot.md +0 -37
  203. package/docs/examples/backups/create-archive.md +0 -16
  204. package/docs/examples/backups/create-policy.md +0 -21
  205. package/docs/examples/backups/create-restoration.md +0 -18
  206. package/docs/examples/backups/delete-archive.md +0 -15
  207. package/docs/examples/backups/delete-policy.md +0 -15
  208. package/docs/examples/backups/get-archive.md +0 -15
  209. package/docs/examples/backups/get-policy.md +0 -15
  210. package/docs/examples/backups/get-restoration.md +0 -15
  211. package/docs/examples/backups/list-archives.md +0 -15
  212. package/docs/examples/backups/list-policies.md +0 -15
  213. package/docs/examples/backups/list-restorations.md +0 -15
  214. package/docs/examples/backups/update-policy.md +0 -19
  215. package/docs/examples/console/create-program-membership.md +0 -15
  216. package/docs/examples/console/create-source.md +0 -19
  217. package/docs/examples/console/get-campaign.md +0 -15
  218. package/docs/examples/console/get-coupon.md +0 -15
  219. package/docs/examples/console/get-plan.md +0 -15
  220. package/docs/examples/console/get-plans.md +0 -15
  221. package/docs/examples/console/get-program.md +0 -15
  222. package/docs/examples/console/get-resource.md +0 -16
  223. package/docs/examples/console/list-regions.md +0 -13
  224. package/docs/examples/console/suggest-columns.md +0 -19
  225. package/docs/examples/console/suggest-indexes.md +0 -18
  226. package/docs/examples/console/variables.md +0 -13
  227. package/docs/examples/databases/create-boolean-attribute.md +0 -20
  228. package/docs/examples/databases/create-collection.md +0 -22
  229. package/docs/examples/databases/create-datetime-attribute.md +0 -20
  230. package/docs/examples/databases/create-document.md +0 -26
  231. package/docs/examples/databases/create-documents.md +0 -18
  232. package/docs/examples/databases/create-email-attribute.md +0 -20
  233. package/docs/examples/databases/create-enum-attribute.md +0 -21
  234. package/docs/examples/databases/create-float-attribute.md +0 -22
  235. package/docs/examples/databases/create-index.md +0 -21
  236. package/docs/examples/databases/create-integer-attribute.md +0 -22
  237. package/docs/examples/databases/create-ip-attribute.md +0 -20
  238. package/docs/examples/databases/create-line-attribute.md +0 -19
  239. package/docs/examples/databases/create-longtext-attribute.md +0 -21
  240. package/docs/examples/databases/create-mediumtext-attribute.md +0 -21
  241. package/docs/examples/databases/create-operations.md +0 -26
  242. package/docs/examples/databases/create-point-attribute.md +0 -19
  243. package/docs/examples/databases/create-polygon-attribute.md +0 -19
  244. package/docs/examples/databases/create-relationship-attribute.md +0 -22
  245. package/docs/examples/databases/create-string-attribute.md +0 -22
  246. package/docs/examples/databases/create-text-attribute.md +0 -21
  247. package/docs/examples/databases/create-transaction.md +0 -15
  248. package/docs/examples/databases/create-url-attribute.md +0 -20
  249. package/docs/examples/databases/create-varchar-attribute.md +0 -22
  250. package/docs/examples/databases/create.md +0 -17
  251. package/docs/examples/databases/decrement-document-attribute.md +0 -21
  252. package/docs/examples/databases/delete-attribute.md +0 -17
  253. package/docs/examples/databases/delete-collection.md +0 -16
  254. package/docs/examples/databases/delete-document.md +0 -18
  255. package/docs/examples/databases/delete-documents.md +0 -18
  256. package/docs/examples/databases/delete-index.md +0 -17
  257. package/docs/examples/databases/delete-transaction.md +0 -15
  258. package/docs/examples/databases/delete.md +0 -15
  259. package/docs/examples/databases/get-attribute.md +0 -17
  260. package/docs/examples/databases/get-collection-usage.md +0 -17
  261. package/docs/examples/databases/get-collection.md +0 -16
  262. package/docs/examples/databases/get-document.md +0 -19
  263. package/docs/examples/databases/get-index.md +0 -17
  264. package/docs/examples/databases/get-transaction.md +0 -15
  265. package/docs/examples/databases/get-usage.md +0 -16
  266. package/docs/examples/databases/get.md +0 -15
  267. package/docs/examples/databases/increment-document-attribute.md +0 -21
  268. package/docs/examples/databases/list-attributes.md +0 -18
  269. package/docs/examples/databases/list-collection-logs.md +0 -17
  270. package/docs/examples/databases/list-collections.md +0 -18
  271. package/docs/examples/databases/list-document-logs.md +0 -18
  272. package/docs/examples/databases/list-documents.md +0 -20
  273. package/docs/examples/databases/list-indexes.md +0 -18
  274. package/docs/examples/databases/list-logs.md +0 -16
  275. package/docs/examples/databases/list-transactions.md +0 -15
  276. package/docs/examples/databases/list-usage.md +0 -15
  277. package/docs/examples/databases/list.md +0 -17
  278. package/docs/examples/databases/update-boolean-attribute.md +0 -20
  279. package/docs/examples/databases/update-collection.md +0 -20
  280. package/docs/examples/databases/update-datetime-attribute.md +0 -20
  281. package/docs/examples/databases/update-document.md +0 -26
  282. package/docs/examples/databases/update-documents.md +0 -25
  283. package/docs/examples/databases/update-email-attribute.md +0 -20
  284. package/docs/examples/databases/update-enum-attribute.md +0 -21
  285. package/docs/examples/databases/update-float-attribute.md +0 -22
  286. package/docs/examples/databases/update-integer-attribute.md +0 -22
  287. package/docs/examples/databases/update-ip-attribute.md +0 -20
  288. package/docs/examples/databases/update-line-attribute.md +0 -20
  289. package/docs/examples/databases/update-longtext-attribute.md +0 -20
  290. package/docs/examples/databases/update-mediumtext-attribute.md +0 -20
  291. package/docs/examples/databases/update-point-attribute.md +0 -20
  292. package/docs/examples/databases/update-polygon-attribute.md +0 -20
  293. package/docs/examples/databases/update-relationship-attribute.md +0 -19
  294. package/docs/examples/databases/update-string-attribute.md +0 -21
  295. package/docs/examples/databases/update-text-attribute.md +0 -20
  296. package/docs/examples/databases/update-transaction.md +0 -17
  297. package/docs/examples/databases/update-url-attribute.md +0 -20
  298. package/docs/examples/databases/update-varchar-attribute.md +0 -21
  299. package/docs/examples/databases/update.md +0 -17
  300. package/docs/examples/databases/upsert-document.md +0 -26
  301. package/docs/examples/databases/upsert-documents.md +0 -18
  302. package/docs/examples/domains/create-preset-google-workspace.md +0 -15
  303. package/docs/examples/domains/create-preset-i-cloud.md +0 -15
  304. package/docs/examples/domains/create-preset-mailgun.md +0 -15
  305. package/docs/examples/domains/create-preset-outlook.md +0 -15
  306. package/docs/examples/domains/create-preset-proton-mail.md +0 -15
  307. package/docs/examples/domains/create-preset-zoho.md +0 -15
  308. package/docs/examples/domains/create-purchase.md +0 -26
  309. package/docs/examples/domains/create-record-a.md +0 -19
  310. package/docs/examples/domains/create-record-aaaa.md +0 -19
  311. package/docs/examples/domains/create-record-alias.md +0 -19
  312. package/docs/examples/domains/create-record-caa.md +0 -19
  313. package/docs/examples/domains/create-record-cname.md +0 -19
  314. package/docs/examples/domains/create-record-https.md +0 -19
  315. package/docs/examples/domains/create-record-mx.md +0 -20
  316. package/docs/examples/domains/create-record-ns.md +0 -19
  317. package/docs/examples/domains/create-record-srv.md +0 -22
  318. package/docs/examples/domains/create-record-txt.md +0 -19
  319. package/docs/examples/domains/create-transfer-in.md +0 -19
  320. package/docs/examples/domains/create-transfer-out.md +0 -16
  321. package/docs/examples/domains/create.md +0 -16
  322. package/docs/examples/domains/delete-record.md +0 -16
  323. package/docs/examples/domains/delete.md +0 -15
  324. package/docs/examples/domains/get-preset-google-workspace.md +0 -15
  325. package/docs/examples/domains/get-preset-i-cloud.md +0 -15
  326. package/docs/examples/domains/get-preset-mailgun.md +0 -15
  327. package/docs/examples/domains/get-preset-outlook.md +0 -15
  328. package/docs/examples/domains/get-preset-proton-mail.md +0 -15
  329. package/docs/examples/domains/get-preset-zoho.md +0 -15
  330. package/docs/examples/domains/get-price.md +0 -17
  331. package/docs/examples/domains/get-record.md +0 -16
  332. package/docs/examples/domains/get-transfer-status.md +0 -15
  333. package/docs/examples/domains/get-zone.md +0 -15
  334. package/docs/examples/domains/get.md +0 -15
  335. package/docs/examples/domains/list-records.md +0 -16
  336. package/docs/examples/domains/list-suggestions.md +0 -20
  337. package/docs/examples/domains/list.md +0 -16
  338. package/docs/examples/domains/update-auto-renewal.md +0 -16
  339. package/docs/examples/domains/update-nameservers.md +0 -15
  340. package/docs/examples/domains/update-purchase.md +0 -16
  341. package/docs/examples/domains/update-record-a.md +0 -20
  342. package/docs/examples/domains/update-record-aaaa.md +0 -20
  343. package/docs/examples/domains/update-record-alias.md +0 -20
  344. package/docs/examples/domains/update-record-caa.md +0 -20
  345. package/docs/examples/domains/update-record-cname.md +0 -20
  346. package/docs/examples/domains/update-record-https.md +0 -20
  347. package/docs/examples/domains/update-record-mx.md +0 -21
  348. package/docs/examples/domains/update-record-ns.md +0 -20
  349. package/docs/examples/domains/update-record-srv.md +0 -23
  350. package/docs/examples/domains/update-record-txt.md +0 -20
  351. package/docs/examples/domains/update-team.md +0 -16
  352. package/docs/examples/domains/update-transfer-in.md +0 -16
  353. package/docs/examples/domains/update-zone.md +0 -16
  354. package/docs/examples/functions/create-deployment.md +0 -19
  355. package/docs/examples/functions/create-duplicate-deployment.md +0 -17
  356. package/docs/examples/functions/create-execution.md +0 -21
  357. package/docs/examples/functions/create-template-deployment.md +0 -21
  358. package/docs/examples/functions/create-variable.md +0 -18
  359. package/docs/examples/functions/create-vcs-deployment.md +0 -18
  360. package/docs/examples/functions/create.md +0 -34
  361. package/docs/examples/functions/delete-deployment.md +0 -16
  362. package/docs/examples/functions/delete-execution.md +0 -16
  363. package/docs/examples/functions/delete-variable.md +0 -16
  364. package/docs/examples/functions/delete.md +0 -15
  365. package/docs/examples/functions/get-deployment-download.md +0 -17
  366. package/docs/examples/functions/get-deployment.md +0 -16
  367. package/docs/examples/functions/get-execution.md +0 -16
  368. package/docs/examples/functions/get-template.md +0 -15
  369. package/docs/examples/functions/get-usage.md +0 -16
  370. package/docs/examples/functions/get-variable.md +0 -16
  371. package/docs/examples/functions/get.md +0 -15
  372. package/docs/examples/functions/list-deployments.md +0 -18
  373. package/docs/examples/functions/list-executions.md +0 -17
  374. package/docs/examples/functions/list-runtimes.md +0 -13
  375. package/docs/examples/functions/list-specifications.md +0 -13
  376. package/docs/examples/functions/list-templates.md +0 -19
  377. package/docs/examples/functions/list-usage.md +0 -15
  378. package/docs/examples/functions/list-variables.md +0 -15
  379. package/docs/examples/functions/list.md +0 -17
  380. package/docs/examples/functions/update-deployment-status.md +0 -16
  381. package/docs/examples/functions/update-function-deployment.md +0 -16
  382. package/docs/examples/functions/update-variable.md +0 -19
  383. package/docs/examples/functions/update.md +0 -34
  384. package/docs/examples/graphql/mutation.md +0 -15
  385. package/docs/examples/graphql/query.md +0 -15
  386. package/docs/examples/health/get-antivirus.md +0 -13
  387. package/docs/examples/health/get-cache.md +0 -13
  388. package/docs/examples/health/get-certificate.md +0 -15
  389. package/docs/examples/health/get-console-pausing.md +0 -16
  390. package/docs/examples/health/get-db.md +0 -13
  391. package/docs/examples/health/get-failed-jobs.md +0 -16
  392. package/docs/examples/health/get-pub-sub.md +0 -13
  393. package/docs/examples/health/get-queue-audits.md +0 -15
  394. package/docs/examples/health/get-queue-billing-project-aggregation.md +0 -15
  395. package/docs/examples/health/get-queue-billing-team-aggregation.md +0 -15
  396. package/docs/examples/health/get-queue-builds.md +0 -15
  397. package/docs/examples/health/get-queue-certificates.md +0 -15
  398. package/docs/examples/health/get-queue-databases.md +0 -16
  399. package/docs/examples/health/get-queue-deletes.md +0 -15
  400. package/docs/examples/health/get-queue-functions.md +0 -15
  401. package/docs/examples/health/get-queue-logs.md +0 -15
  402. package/docs/examples/health/get-queue-mails.md +0 -15
  403. package/docs/examples/health/get-queue-messaging.md +0 -15
  404. package/docs/examples/health/get-queue-migrations.md +0 -15
  405. package/docs/examples/health/get-queue-priority-builds.md +0 -15
  406. package/docs/examples/health/get-queue-region-manager.md +0 -15
  407. package/docs/examples/health/get-queue-stats-resources.md +0 -15
  408. package/docs/examples/health/get-queue-threats.md +0 -15
  409. package/docs/examples/health/get-queue-usage.md +0 -15
  410. package/docs/examples/health/get-queue-webhooks.md +0 -15
  411. package/docs/examples/health/get-storage-local.md +0 -13
  412. package/docs/examples/health/get-storage.md +0 -13
  413. package/docs/examples/health/get-time.md +0 -13
  414. package/docs/examples/health/get.md +0 -13
  415. package/docs/examples/locale/get.md +0 -13
  416. package/docs/examples/locale/list-codes.md +0 -13
  417. package/docs/examples/locale/list-continents.md +0 -13
  418. package/docs/examples/locale/list-countries-eu.md +0 -13
  419. package/docs/examples/locale/list-countries-phones.md +0 -13
  420. package/docs/examples/locale/list-countries.md +0 -13
  421. package/docs/examples/locale/list-currencies.md +0 -13
  422. package/docs/examples/locale/list-languages.md +0 -13
  423. package/docs/examples/messaging/create-apns-provider.md +0 -22
  424. package/docs/examples/messaging/create-email.md +0 -26
  425. package/docs/examples/messaging/create-fcm-provider.md +0 -18
  426. package/docs/examples/messaging/create-mailgun-provider.md +0 -24
  427. package/docs/examples/messaging/create-msg-91-provider.md +0 -20
  428. package/docs/examples/messaging/create-push.md +0 -33
  429. package/docs/examples/messaging/create-resend-provider.md +0 -22
  430. package/docs/examples/messaging/create-sendgrid-provider.md +0 -22
  431. package/docs/examples/messaging/create-sms.md +0 -21
  432. package/docs/examples/messaging/create-smtp-provider.md +0 -28
  433. package/docs/examples/messaging/create-subscriber.md +0 -17
  434. package/docs/examples/messaging/create-telesign-provider.md +0 -20
  435. package/docs/examples/messaging/create-textmagic-provider.md +0 -20
  436. package/docs/examples/messaging/create-topic.md +0 -17
  437. package/docs/examples/messaging/create-twilio-provider.md +0 -20
  438. package/docs/examples/messaging/create-vonage-provider.md +0 -20
  439. package/docs/examples/messaging/delete-provider.md +0 -15
  440. package/docs/examples/messaging/delete-subscriber.md +0 -16
  441. package/docs/examples/messaging/delete-topic.md +0 -15
  442. package/docs/examples/messaging/delete.md +0 -15
  443. package/docs/examples/messaging/get-message.md +0 -15
  444. package/docs/examples/messaging/get-provider.md +0 -15
  445. package/docs/examples/messaging/get-subscriber.md +0 -16
  446. package/docs/examples/messaging/get-topic.md +0 -15
  447. package/docs/examples/messaging/list-message-logs.md +0 -17
  448. package/docs/examples/messaging/list-messages.md +0 -17
  449. package/docs/examples/messaging/list-provider-logs.md +0 -17
  450. package/docs/examples/messaging/list-providers.md +0 -17
  451. package/docs/examples/messaging/list-subscriber-logs.md +0 -17
  452. package/docs/examples/messaging/list-subscribers.md +0 -18
  453. package/docs/examples/messaging/list-targets.md +0 -17
  454. package/docs/examples/messaging/list-topic-logs.md +0 -17
  455. package/docs/examples/messaging/list-topics.md +0 -17
  456. package/docs/examples/messaging/update-apns-provider.md +0 -22
  457. package/docs/examples/messaging/update-email.md +0 -26
  458. package/docs/examples/messaging/update-fcm-provider.md +0 -18
  459. package/docs/examples/messaging/update-mailgun-provider.md +0 -24
  460. package/docs/examples/messaging/update-msg-91-provider.md +0 -20
  461. package/docs/examples/messaging/update-push.md +0 -33
  462. package/docs/examples/messaging/update-resend-provider.md +0 -22
  463. package/docs/examples/messaging/update-sendgrid-provider.md +0 -22
  464. package/docs/examples/messaging/update-sms.md +0 -21
  465. package/docs/examples/messaging/update-smtp-provider.md +0 -28
  466. package/docs/examples/messaging/update-telesign-provider.md +0 -20
  467. package/docs/examples/messaging/update-textmagic-provider.md +0 -20
  468. package/docs/examples/messaging/update-topic.md +0 -17
  469. package/docs/examples/messaging/update-twilio-provider.md +0 -20
  470. package/docs/examples/messaging/update-vonage-provider.md +0 -20
  471. package/docs/examples/migrations/create-appwrite-migration.md +0 -18
  472. package/docs/examples/migrations/create-csv-export.md +0 -23
  473. package/docs/examples/migrations/create-csv-import.md +0 -18
  474. package/docs/examples/migrations/create-firebase-migration.md +0 -16
  475. package/docs/examples/migrations/create-n-host-migration.md +0 -22
  476. package/docs/examples/migrations/create-supabase-migration.md +0 -21
  477. package/docs/examples/migrations/delete.md +0 -15
  478. package/docs/examples/migrations/get-appwrite-report.md +0 -18
  479. package/docs/examples/migrations/get-firebase-report.md +0 -16
  480. package/docs/examples/migrations/get-n-host-report.md +0 -22
  481. package/docs/examples/migrations/get-supabase-report.md +0 -21
  482. package/docs/examples/migrations/get.md +0 -15
  483. package/docs/examples/migrations/list.md +0 -17
  484. package/docs/examples/migrations/retry.md +0 -15
  485. package/docs/examples/organizations/add-credit.md +0 -16
  486. package/docs/examples/organizations/cancel-downgrade.md +0 -15
  487. package/docs/examples/organizations/create-downgrade-feedback.md +0 -19
  488. package/docs/examples/organizations/create-invoice-payment.md +0 -17
  489. package/docs/examples/organizations/create-key.md +0 -18
  490. package/docs/examples/organizations/create.md +0 -24
  491. package/docs/examples/organizations/delete-backup-payment-method.md +0 -15
  492. package/docs/examples/organizations/delete-billing-address.md +0 -15
  493. package/docs/examples/organizations/delete-default-payment-method.md +0 -15
  494. package/docs/examples/organizations/delete-key.md +0 -16
  495. package/docs/examples/organizations/delete.md +0 -15
  496. package/docs/examples/organizations/estimation-create-organization.md +0 -19
  497. package/docs/examples/organizations/estimation-delete-organization.md +0 -15
  498. package/docs/examples/organizations/estimation-update-plan.md +0 -18
  499. package/docs/examples/organizations/get-aggregation.md +0 -18
  500. package/docs/examples/organizations/get-available-credits.md +0 -15
  501. package/docs/examples/organizations/get-billing-address.md +0 -16
  502. package/docs/examples/organizations/get-credit.md +0 -16
  503. package/docs/examples/organizations/get-invoice-download.md +0 -16
  504. package/docs/examples/organizations/get-invoice-view.md +0 -16
  505. package/docs/examples/organizations/get-invoice.md +0 -16
  506. package/docs/examples/organizations/get-key.md +0 -16
  507. package/docs/examples/organizations/get-payment-method.md +0 -16
  508. package/docs/examples/organizations/get-plan.md +0 -15
  509. package/docs/examples/organizations/get-scopes.md +0 -16
  510. package/docs/examples/organizations/get-usage.md +0 -17
  511. package/docs/examples/organizations/list-aggregations.md +0 -16
  512. package/docs/examples/organizations/list-credits.md +0 -16
  513. package/docs/examples/organizations/list-invoices.md +0 -16
  514. package/docs/examples/organizations/list-keys.md +0 -16
  515. package/docs/examples/organizations/list-regions.md +0 -15
  516. package/docs/examples/organizations/list.md +0 -16
  517. package/docs/examples/organizations/set-backup-payment-method.md +0 -16
  518. package/docs/examples/organizations/set-billing-address.md +0 -16
  519. package/docs/examples/organizations/set-billing-email.md +0 -16
  520. package/docs/examples/organizations/set-billing-tax-id.md +0 -16
  521. package/docs/examples/organizations/set-default-payment-method.md +0 -16
  522. package/docs/examples/organizations/update-budget.md +0 -17
  523. package/docs/examples/organizations/update-key.md +0 -19
  524. package/docs/examples/organizations/update-plan.md +0 -22
  525. package/docs/examples/organizations/validate-invoice.md +0 -16
  526. package/docs/examples/organizations/validate-payment.md +0 -16
  527. package/docs/examples/project/create-variable.md +0 -18
  528. package/docs/examples/project/delete-variable.md +0 -15
  529. package/docs/examples/project/get-usage.md +0 -17
  530. package/docs/examples/project/get-variable.md +0 -15
  531. package/docs/examples/project/list-variables.md +0 -16
  532. package/docs/examples/project/update-variable.md +0 -18
  533. package/docs/examples/projects/create-dev-key.md +0 -17
  534. package/docs/examples/projects/create-jwt.md +0 -17
  535. package/docs/examples/projects/create-key.md +0 -19
  536. package/docs/examples/projects/create-platform.md +0 -20
  537. package/docs/examples/projects/create-schedule.md +0 -20
  538. package/docs/examples/projects/create-smtp-test.md +0 -24
  539. package/docs/examples/projects/create.md +0 -27
  540. package/docs/examples/projects/delete-dev-key.md +0 -16
  541. package/docs/examples/projects/delete-email-template.md +0 -17
  542. package/docs/examples/projects/delete-key.md +0 -16
  543. package/docs/examples/projects/delete-platform.md +0 -16
  544. package/docs/examples/projects/delete-sms-template.md +0 -17
  545. package/docs/examples/projects/delete.md +0 -15
  546. package/docs/examples/projects/get-dev-key.md +0 -16
  547. package/docs/examples/projects/get-email-template.md +0 -17
  548. package/docs/examples/projects/get-key.md +0 -16
  549. package/docs/examples/projects/get-platform.md +0 -16
  550. package/docs/examples/projects/get-schedule.md +0 -16
  551. package/docs/examples/projects/get-sms-template.md +0 -17
  552. package/docs/examples/projects/get.md +0 -15
  553. package/docs/examples/projects/list-dev-keys.md +0 -16
  554. package/docs/examples/projects/list-keys.md +0 -17
  555. package/docs/examples/projects/list-platforms.md +0 -16
  556. package/docs/examples/projects/list-schedules.md +0 -17
  557. package/docs/examples/projects/list.md +0 -17
  558. package/docs/examples/projects/update-api-status-all.md +0 -16
  559. package/docs/examples/projects/update-api-status.md +0 -17
  560. package/docs/examples/projects/update-auth-duration.md +0 -16
  561. package/docs/examples/projects/update-auth-limit.md +0 -16
  562. package/docs/examples/projects/update-auth-password-dictionary.md +0 -16
  563. package/docs/examples/projects/update-auth-password-history.md +0 -16
  564. package/docs/examples/projects/update-auth-sessions-limit.md +0 -16
  565. package/docs/examples/projects/update-auth-status.md +0 -17
  566. package/docs/examples/projects/update-console-access.md +0 -15
  567. package/docs/examples/projects/update-dev-key.md +0 -18
  568. package/docs/examples/projects/update-email-template.md +0 -22
  569. package/docs/examples/projects/update-key.md +0 -19
  570. package/docs/examples/projects/update-labels.md +0 -16
  571. package/docs/examples/projects/update-memberships-privacy.md +0 -18
  572. package/docs/examples/projects/update-mock-numbers.md +0 -16
  573. package/docs/examples/projects/update-o-auth-2.md +0 -19
  574. package/docs/examples/projects/update-personal-data-check.md +0 -16
  575. package/docs/examples/projects/update-platform.md +0 -20
  576. package/docs/examples/projects/update-service-status-all.md +0 -16
  577. package/docs/examples/projects/update-service-status.md +0 -17
  578. package/docs/examples/projects/update-session-alerts.md +0 -16
  579. package/docs/examples/projects/update-session-invalidation.md +0 -16
  580. package/docs/examples/projects/update-sms-template.md +0 -18
  581. package/docs/examples/projects/update-smtp.md +0 -24
  582. package/docs/examples/projects/update-status.md +0 -16
  583. package/docs/examples/projects/update-team.md +0 -16
  584. package/docs/examples/projects/update.md +0 -25
  585. package/docs/examples/proxy/create-api-rule.md +0 -15
  586. package/docs/examples/proxy/create-function-rule.md +0 -17
  587. package/docs/examples/proxy/create-redirect-rule.md +0 -19
  588. package/docs/examples/proxy/create-site-rule.md +0 -17
  589. package/docs/examples/proxy/delete-rule.md +0 -15
  590. package/docs/examples/proxy/get-rule.md +0 -15
  591. package/docs/examples/proxy/list-rules.md +0 -17
  592. package/docs/examples/proxy/update-rule-verification.md +0 -15
  593. package/docs/examples/sites/create-deployment.md +0 -20
  594. package/docs/examples/sites/create-duplicate-deployment.md +0 -16
  595. package/docs/examples/sites/create-template-deployment.md +0 -21
  596. package/docs/examples/sites/create-variable.md +0 -18
  597. package/docs/examples/sites/create-vcs-deployment.md +0 -18
  598. package/docs/examples/sites/create.md +0 -35
  599. package/docs/examples/sites/delete-deployment.md +0 -16
  600. package/docs/examples/sites/delete-log.md +0 -16
  601. package/docs/examples/sites/delete-variable.md +0 -16
  602. package/docs/examples/sites/delete.md +0 -15
  603. package/docs/examples/sites/get-deployment-download.md +0 -17
  604. package/docs/examples/sites/get-deployment.md +0 -16
  605. package/docs/examples/sites/get-log.md +0 -16
  606. package/docs/examples/sites/get-template.md +0 -15
  607. package/docs/examples/sites/get-usage.md +0 -16
  608. package/docs/examples/sites/get-variable.md +0 -16
  609. package/docs/examples/sites/get.md +0 -15
  610. package/docs/examples/sites/list-deployments.md +0 -18
  611. package/docs/examples/sites/list-frameworks.md +0 -13
  612. package/docs/examples/sites/list-logs.md +0 -17
  613. package/docs/examples/sites/list-specifications.md +0 -13
  614. package/docs/examples/sites/list-templates.md +0 -18
  615. package/docs/examples/sites/list-usage.md +0 -15
  616. package/docs/examples/sites/list-variables.md +0 -15
  617. package/docs/examples/sites/list.md +0 -17
  618. package/docs/examples/sites/update-deployment-status.md +0 -16
  619. package/docs/examples/sites/update-site-deployment.md +0 -16
  620. package/docs/examples/sites/update-variable.md +0 -19
  621. package/docs/examples/sites/update.md +0 -35
  622. package/docs/examples/storage/create-bucket.md +0 -25
  623. package/docs/examples/storage/create-file.md +0 -18
  624. package/docs/examples/storage/delete-bucket.md +0 -15
  625. package/docs/examples/storage/delete-file.md +0 -16
  626. package/docs/examples/storage/get-bucket-usage.md +0 -16
  627. package/docs/examples/storage/get-bucket.md +0 -15
  628. package/docs/examples/storage/get-file-download.md +0 -17
  629. package/docs/examples/storage/get-file-preview.md +0 -28
  630. package/docs/examples/storage/get-file-view.md +0 -17
  631. package/docs/examples/storage/get-file.md +0 -16
  632. package/docs/examples/storage/get-usage.md +0 -15
  633. package/docs/examples/storage/list-buckets.md +0 -17
  634. package/docs/examples/storage/list-files.md +0 -18
  635. package/docs/examples/storage/update-bucket.md +0 -25
  636. package/docs/examples/storage/update-file.md +0 -18
  637. package/docs/examples/tablesdb/create-boolean-column.md +0 -20
  638. package/docs/examples/tablesdb/create-datetime-column.md +0 -20
  639. package/docs/examples/tablesdb/create-email-column.md +0 -20
  640. package/docs/examples/tablesdb/create-enum-column.md +0 -21
  641. package/docs/examples/tablesdb/create-float-column.md +0 -22
  642. package/docs/examples/tablesdb/create-index.md +0 -21
  643. package/docs/examples/tablesdb/create-integer-column.md +0 -22
  644. package/docs/examples/tablesdb/create-ip-column.md +0 -20
  645. package/docs/examples/tablesdb/create-line-column.md +0 -19
  646. package/docs/examples/tablesdb/create-longtext-column.md +0 -21
  647. package/docs/examples/tablesdb/create-mediumtext-column.md +0 -21
  648. package/docs/examples/tablesdb/create-operations.md +0 -26
  649. package/docs/examples/tablesdb/create-point-column.md +0 -19
  650. package/docs/examples/tablesdb/create-polygon-column.md +0 -19
  651. package/docs/examples/tablesdb/create-relationship-column.md +0 -22
  652. package/docs/examples/tablesdb/create-row.md +0 -26
  653. package/docs/examples/tablesdb/create-rows.md +0 -18
  654. package/docs/examples/tablesdb/create-string-column.md +0 -22
  655. package/docs/examples/tablesdb/create-table.md +0 -22
  656. package/docs/examples/tablesdb/create-text-column.md +0 -21
  657. package/docs/examples/tablesdb/create-transaction.md +0 -15
  658. package/docs/examples/tablesdb/create-url-column.md +0 -20
  659. package/docs/examples/tablesdb/create-varchar-column.md +0 -22
  660. package/docs/examples/tablesdb/create.md +0 -17
  661. package/docs/examples/tablesdb/decrement-row-column.md +0 -21
  662. package/docs/examples/tablesdb/delete-column.md +0 -17
  663. package/docs/examples/tablesdb/delete-index.md +0 -17
  664. package/docs/examples/tablesdb/delete-row.md +0 -18
  665. package/docs/examples/tablesdb/delete-rows.md +0 -18
  666. package/docs/examples/tablesdb/delete-table.md +0 -16
  667. package/docs/examples/tablesdb/delete-transaction.md +0 -15
  668. package/docs/examples/tablesdb/delete.md +0 -15
  669. package/docs/examples/tablesdb/get-column.md +0 -17
  670. package/docs/examples/tablesdb/get-index.md +0 -17
  671. package/docs/examples/tablesdb/get-row.md +0 -19
  672. package/docs/examples/tablesdb/get-table-usage.md +0 -17
  673. package/docs/examples/tablesdb/get-table.md +0 -16
  674. package/docs/examples/tablesdb/get-transaction.md +0 -15
  675. package/docs/examples/tablesdb/get-usage.md +0 -16
  676. package/docs/examples/tablesdb/get.md +0 -15
  677. package/docs/examples/tablesdb/increment-row-column.md +0 -21
  678. package/docs/examples/tablesdb/list-columns.md +0 -18
  679. package/docs/examples/tablesdb/list-indexes.md +0 -18
  680. package/docs/examples/tablesdb/list-row-logs.md +0 -18
  681. package/docs/examples/tablesdb/list-rows.md +0 -20
  682. package/docs/examples/tablesdb/list-table-logs.md +0 -17
  683. package/docs/examples/tablesdb/list-tables.md +0 -18
  684. package/docs/examples/tablesdb/list-transactions.md +0 -15
  685. package/docs/examples/tablesdb/list-usage.md +0 -15
  686. package/docs/examples/tablesdb/list.md +0 -17
  687. package/docs/examples/tablesdb/update-boolean-column.md +0 -20
  688. package/docs/examples/tablesdb/update-datetime-column.md +0 -20
  689. package/docs/examples/tablesdb/update-email-column.md +0 -20
  690. package/docs/examples/tablesdb/update-enum-column.md +0 -21
  691. package/docs/examples/tablesdb/update-float-column.md +0 -22
  692. package/docs/examples/tablesdb/update-integer-column.md +0 -22
  693. package/docs/examples/tablesdb/update-ip-column.md +0 -20
  694. package/docs/examples/tablesdb/update-line-column.md +0 -20
  695. package/docs/examples/tablesdb/update-longtext-column.md +0 -20
  696. package/docs/examples/tablesdb/update-mediumtext-column.md +0 -20
  697. package/docs/examples/tablesdb/update-point-column.md +0 -20
  698. package/docs/examples/tablesdb/update-polygon-column.md +0 -20
  699. package/docs/examples/tablesdb/update-relationship-column.md +0 -19
  700. package/docs/examples/tablesdb/update-row.md +0 -26
  701. package/docs/examples/tablesdb/update-rows.md +0 -25
  702. package/docs/examples/tablesdb/update-string-column.md +0 -21
  703. package/docs/examples/tablesdb/update-table.md +0 -20
  704. package/docs/examples/tablesdb/update-text-column.md +0 -20
  705. package/docs/examples/tablesdb/update-transaction.md +0 -17
  706. package/docs/examples/tablesdb/update-url-column.md +0 -20
  707. package/docs/examples/tablesdb/update-varchar-column.md +0 -21
  708. package/docs/examples/tablesdb/update.md +0 -17
  709. package/docs/examples/tablesdb/upsert-row.md +0 -26
  710. package/docs/examples/tablesdb/upsert-rows.md +0 -18
  711. package/docs/examples/teams/create-membership.md +0 -21
  712. package/docs/examples/teams/create.md +0 -17
  713. package/docs/examples/teams/delete-membership.md +0 -16
  714. package/docs/examples/teams/delete.md +0 -15
  715. package/docs/examples/teams/get-membership.md +0 -16
  716. package/docs/examples/teams/get-prefs.md +0 -15
  717. package/docs/examples/teams/get.md +0 -15
  718. package/docs/examples/teams/list-logs.md +0 -17
  719. package/docs/examples/teams/list-memberships.md +0 -18
  720. package/docs/examples/teams/list.md +0 -17
  721. package/docs/examples/teams/update-membership-status.md +0 -18
  722. package/docs/examples/teams/update-membership.md +0 -17
  723. package/docs/examples/teams/update-name.md +0 -16
  724. package/docs/examples/teams/update-prefs.md +0 -16
  725. package/docs/examples/tokens/create-file-token.md +0 -17
  726. package/docs/examples/tokens/delete.md +0 -15
  727. package/docs/examples/tokens/get.md +0 -15
  728. package/docs/examples/tokens/list.md +0 -18
  729. package/docs/examples/tokens/update.md +0 -16
  730. package/docs/examples/users/create-argon-2-user.md +0 -18
  731. package/docs/examples/users/create-bcrypt-user.md +0 -18
  732. package/docs/examples/users/create-jwt.md +0 -17
  733. package/docs/examples/users/create-md-5-user.md +0 -18
  734. package/docs/examples/users/create-mfa-recovery-codes.md +0 -15
  735. package/docs/examples/users/create-ph-pass-user.md +0 -18
  736. package/docs/examples/users/create-scrypt-modified-user.md +0 -21
  737. package/docs/examples/users/create-scrypt-user.md +0 -23
  738. package/docs/examples/users/create-session.md +0 -15
  739. package/docs/examples/users/create-sha-user.md +0 -19
  740. package/docs/examples/users/create-target.md +0 -20
  741. package/docs/examples/users/create-token.md +0 -17
  742. package/docs/examples/users/create.md +0 -19
  743. package/docs/examples/users/delete-identity.md +0 -15
  744. package/docs/examples/users/delete-mfa-authenticator.md +0 -16
  745. package/docs/examples/users/delete-session.md +0 -16
  746. package/docs/examples/users/delete-sessions.md +0 -15
  747. package/docs/examples/users/delete-target.md +0 -16
  748. package/docs/examples/users/delete.md +0 -15
  749. package/docs/examples/users/get-mfa-recovery-codes.md +0 -15
  750. package/docs/examples/users/get-prefs.md +0 -15
  751. package/docs/examples/users/get-target.md +0 -16
  752. package/docs/examples/users/get-usage.md +0 -15
  753. package/docs/examples/users/get.md +0 -15
  754. package/docs/examples/users/list-identities.md +0 -17
  755. package/docs/examples/users/list-logs.md +0 -17
  756. package/docs/examples/users/list-memberships.md +0 -18
  757. package/docs/examples/users/list-mfa-factors.md +0 -15
  758. package/docs/examples/users/list-sessions.md +0 -16
  759. package/docs/examples/users/list-targets.md +0 -17
  760. package/docs/examples/users/list.md +0 -17
  761. package/docs/examples/users/update-email-verification.md +0 -16
  762. package/docs/examples/users/update-email.md +0 -16
  763. package/docs/examples/users/update-impersonator.md +0 -16
  764. package/docs/examples/users/update-labels.md +0 -16
  765. package/docs/examples/users/update-mfa-recovery-codes.md +0 -15
  766. package/docs/examples/users/update-mfa.md +0 -16
  767. package/docs/examples/users/update-name.md +0 -16
  768. package/docs/examples/users/update-password.md +0 -16
  769. package/docs/examples/users/update-phone-verification.md +0 -16
  770. package/docs/examples/users/update-phone.md +0 -16
  771. package/docs/examples/users/update-prefs.md +0 -16
  772. package/docs/examples/users/update-status.md +0 -16
  773. package/docs/examples/users/update-target.md +0 -19
  774. package/docs/examples/vcs/create-repository-detection.md +0 -18
  775. package/docs/examples/vcs/create-repository.md +0 -17
  776. package/docs/examples/vcs/delete-installation.md +0 -15
  777. package/docs/examples/vcs/get-installation.md +0 -15
  778. package/docs/examples/vcs/get-repository-contents.md +0 -18
  779. package/docs/examples/vcs/get-repository.md +0 -16
  780. package/docs/examples/vcs/list-installations.md +0 -17
  781. package/docs/examples/vcs/list-repositories.md +0 -18
  782. package/docs/examples/vcs/list-repository-branches.md +0 -16
  783. package/docs/examples/vcs/update-external-deployments.md +0 -17
  784. package/docs/examples/webhooks/create.md +0 -22
  785. package/docs/examples/webhooks/delete.md +0 -15
  786. package/docs/examples/webhooks/get.md +0 -15
  787. package/docs/examples/webhooks/list.md +0 -16
  788. package/docs/examples/webhooks/update-signature.md +0 -15
  789. package/docs/examples/webhooks/update.md +0 -22
  790. package/rollup.config.js +0 -44
  791. package/src/channel.ts +0 -158
  792. package/src/client.ts +0 -1085
  793. package/src/enums/adapter.ts +0 -4
  794. package/src/enums/api-service.ts +0 -15
  795. package/src/enums/api.ts +0 -5
  796. package/src/enums/appwrite-migration-resource.ts +0 -27
  797. package/src/enums/attribute-status.ts +0 -7
  798. package/src/enums/auth-method.ts +0 -9
  799. package/src/enums/authentication-factor.ts +0 -6
  800. package/src/enums/authenticator-type.ts +0 -3
  801. package/src/enums/backup-services.ts +0 -8
  802. package/src/enums/billing-plan-group.ts +0 -5
  803. package/src/enums/browser-permission.ts +0 -22
  804. package/src/enums/browser.ts +0 -16
  805. package/src/enums/build-runtime.ts +0 -88
  806. package/src/enums/column-status.ts +0 -7
  807. package/src/enums/compression.ts +0 -5
  808. package/src/enums/console-resource-type.ts +0 -3
  809. package/src/enums/credit-card.ts +0 -19
  810. package/src/enums/database-type.ts +0 -6
  811. package/src/enums/databases-index-type.ts +0 -6
  812. package/src/enums/deployment-download-type.ts +0 -4
  813. package/src/enums/deployment-status.ts +0 -8
  814. package/src/enums/domain-purchase-status.ts +0 -6
  815. package/src/enums/domain-transfer-status-enum.ts +0 -10
  816. package/src/enums/email-template-locale.ts +0 -133
  817. package/src/enums/email-template-type.ts +0 -9
  818. package/src/enums/execution-method.ts +0 -9
  819. package/src/enums/execution-status.ts +0 -7
  820. package/src/enums/execution-trigger.ts +0 -5
  821. package/src/enums/filter-type.ts +0 -4
  822. package/src/enums/firebase-migration-resource.ts +0 -12
  823. package/src/enums/flag.ts +0 -197
  824. package/src/enums/framework.ts +0 -17
  825. package/src/enums/frameworks.ts +0 -17
  826. package/src/enums/health-antivirus-status.ts +0 -5
  827. package/src/enums/health-check-status.ts +0 -4
  828. package/src/enums/image-format.ts +0 -9
  829. package/src/enums/image-gravity.ts +0 -11
  830. package/src/enums/index-status.ts +0 -7
  831. package/src/enums/message-priority.ts +0 -4
  832. package/src/enums/message-status.ts +0 -7
  833. package/src/enums/messaging-provider-type.ts +0 -5
  834. package/src/enums/n-host-migration-resource.ts +0 -13
  835. package/src/enums/name.ts +0 -15
  836. package/src/enums/o-auth-provider.ts +0 -41
  837. package/src/enums/order-by.ts +0 -4
  838. package/src/enums/password-hash.ts +0 -13
  839. package/src/enums/platform-type.ts +0 -17
  840. package/src/enums/platform.ts +0 -4
  841. package/src/enums/project-usage-range.ts +0 -4
  842. package/src/enums/proxy-resource-type.ts +0 -4
  843. package/src/enums/proxy-rule-deployment-resource-type.ts +0 -4
  844. package/src/enums/proxy-rule-status.ts +0 -6
  845. package/src/enums/region.ts +0 -8
  846. package/src/enums/registration-type.ts +0 -6
  847. package/src/enums/relation-mutate.ts +0 -5
  848. package/src/enums/relationship-type.ts +0 -6
  849. package/src/enums/resource-type.ts +0 -6
  850. package/src/enums/runtime.ts +0 -88
  851. package/src/enums/runtimes.ts +0 -88
  852. package/src/enums/scopes.ts +0 -81
  853. package/src/enums/sms-template-locale.ts +0 -133
  854. package/src/enums/sms-template-type.ts +0 -6
  855. package/src/enums/smtp-encryption.ts +0 -5
  856. package/src/enums/smtp-secure.ts +0 -4
  857. package/src/enums/status-code.ts +0 -6
  858. package/src/enums/status.ts +0 -3
  859. package/src/enums/supabase-migration-resource.ts +0 -13
  860. package/src/enums/tables-db-index-type.ts +0 -6
  861. package/src/enums/template-reference-type.ts +0 -5
  862. package/src/enums/theme.ts +0 -4
  863. package/src/enums/timezone.ts +0 -421
  864. package/src/enums/usage-range.ts +0 -5
  865. package/src/enums/use-cases.ts +0 -16
  866. package/src/enums/vcs-detection-type.ts +0 -4
  867. package/src/enums/vcs-reference-type.ts +0 -5
  868. package/src/id.ts +0 -47
  869. package/src/operator.ts +0 -308
  870. package/src/query.ts +0 -576
  871. package/src/service.ts +0 -30
  872. package/src/services/account.ts +0 -4293
  873. package/src/services/activities.ts +0 -116
  874. package/src/services/assistant.ts +0 -67
  875. package/src/services/backups.ts +0 -754
  876. package/src/services/console.ts +0 -678
  877. package/src/services/databases.ts +0 -6376
  878. package/src/services/domains.ts +0 -4064
  879. package/src/services/functions.ts +0 -2224
  880. package/src/services/graphql.ts +0 -124
  881. package/src/services/health.ts +0 -1296
  882. package/src/services/locale.ts +0 -198
  883. package/src/services/messaging.ts +0 -5194
  884. package/src/services/migrations.ts +0 -1207
  885. package/src/services/organizations.ts +0 -2742
  886. package/src/services/project.ts +0 -404
  887. package/src/services/projects.ts +0 -4431
  888. package/src/services/proxy.ts +0 -532
  889. package/src/services/realtime.ts +0 -537
  890. package/src/services/sites.ts +0 -2131
  891. package/src/services/storage.ts +0 -1196
  892. package/src/services/tables-db.ts +0 -6256
  893. package/src/services/teams.ts +0 -959
  894. package/src/services/tokens.ts +0 -315
  895. package/src/services/users.ts +0 -3324
  896. package/src/services/vcs.ts +0 -676
  897. package/src/services/webhooks.ts +0 -451
  898. package/tsconfig.json +0 -24
@@ -1,2742 +0,0 @@
1
- import { Service } from '../service';
2
- import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
3
- import type { Models } from '../models';
4
-
5
- import { Platform } from '../enums/platform';
6
- import { Scopes } from '../enums/scopes';
7
-
8
- export class Organizations {
9
- client: Client;
10
-
11
- constructor(client: Client) {
12
- this.client = client;
13
- }
14
-
15
- /**
16
- * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
17
- *
18
- * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan, paymentMethodId, backupPaymentMethodId, platform
19
- * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
20
- * @throws {AppwriteException}
21
- * @returns {Promise<Models.OrganizationList<Preferences>>}
22
- */
23
- list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: { queries?: string[], search?: string }): Promise<Models.OrganizationList<Preferences>>;
24
- /**
25
- * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
26
- *
27
- * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan, paymentMethodId, backupPaymentMethodId, platform
28
- * @param {string} search - Search term to filter your list results. Max length: 256 chars.
29
- * @throws {AppwriteException}
30
- * @returns {Promise<Models.OrganizationList<Preferences>>}
31
- * @deprecated Use the object parameter style method for a better developer experience.
32
- */
33
- list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string): Promise<Models.OrganizationList<Preferences>>;
34
- list<Preferences extends Models.Preferences = Models.DefaultPreferences>(
35
- paramsOrFirst?: { queries?: string[], search?: string } | string[],
36
- ...rest: [(string)?]
37
- ): Promise<Models.OrganizationList<Preferences>> {
38
- let params: { queries?: string[], search?: string };
39
-
40
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
41
- params = (paramsOrFirst || {}) as { queries?: string[], search?: string };
42
- } else {
43
- params = {
44
- queries: paramsOrFirst as string[],
45
- search: rest[0] as string
46
- };
47
- }
48
-
49
- const queries = params.queries;
50
- const search = params.search;
51
-
52
-
53
- const apiPath = '/organizations';
54
- const payload: Payload = {};
55
- if (typeof queries !== 'undefined') {
56
- payload['queries'] = queries;
57
- }
58
- if (typeof search !== 'undefined') {
59
- payload['search'] = search;
60
- }
61
- const uri = new URL(this.client.config.endpoint + apiPath);
62
-
63
- const apiHeaders: { [header: string]: string } = {
64
- }
65
-
66
- return this.client.call(
67
- 'get',
68
- uri,
69
- apiHeaders,
70
- payload
71
- );
72
- }
73
-
74
- /**
75
- * Create a new organization.
76
- *
77
- *
78
- * @param {string} params.organizationId - Organization ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
79
- * @param {string} params.name - Organization name. Max length: 128 chars.
80
- * @param {string} params.billingPlan - Organization billing plan chosen
81
- * @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
82
- * @param {string} params.billingAddressId - Unique ID of billing address
83
- * @param {string[]} params.invites - Additional member invites
84
- * @param {string} params.couponId - Coupon id
85
- * @param {string} params.taxId - Tax Id associated to billing.
86
- * @param {number} params.budget - Budget limit for additional usage set for the organization
87
- * @param {Platform} params.platform - Platform type
88
- * @throws {AppwriteException}
89
- * @returns {Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>}
90
- */
91
- create<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform }): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>;
92
- /**
93
- * Create a new organization.
94
- *
95
- *
96
- * @param {string} organizationId - Organization ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
97
- * @param {string} name - Organization name. Max length: 128 chars.
98
- * @param {string} billingPlan - Organization billing plan chosen
99
- * @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
100
- * @param {string} billingAddressId - Unique ID of billing address
101
- * @param {string[]} invites - Additional member invites
102
- * @param {string} couponId - Coupon id
103
- * @param {string} taxId - Tax Id associated to billing.
104
- * @param {number} budget - Budget limit for additional usage set for the organization
105
- * @param {Platform} platform - Platform type
106
- * @throws {AppwriteException}
107
- * @returns {Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>}
108
- * @deprecated Use the object parameter style method for a better developer experience.
109
- */
110
- create<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>;
111
- create<Preferences extends Models.Preferences = Models.DefaultPreferences>(
112
- paramsOrFirst: { organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform } | string,
113
- ...rest: [(string)?, (string)?, (string)?, (string)?, (string[])?, (string)?, (string)?, (number)?, (Platform)?]
114
- ): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication> {
115
- let params: { organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform };
116
-
117
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
118
- params = (paramsOrFirst || {}) as { organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform };
119
- } else {
120
- params = {
121
- organizationId: paramsOrFirst as string,
122
- name: rest[0] as string,
123
- billingPlan: rest[1] as string,
124
- paymentMethodId: rest[2] as string,
125
- billingAddressId: rest[3] as string,
126
- invites: rest[4] as string[],
127
- couponId: rest[5] as string,
128
- taxId: rest[6] as string,
129
- budget: rest[7] as number,
130
- platform: rest[8] as Platform
131
- };
132
- }
133
-
134
- const organizationId = params.organizationId;
135
- const name = params.name;
136
- const billingPlan = params.billingPlan;
137
- const paymentMethodId = params.paymentMethodId;
138
- const billingAddressId = params.billingAddressId;
139
- const invites = params.invites;
140
- const couponId = params.couponId;
141
- const taxId = params.taxId;
142
- const budget = params.budget;
143
- const platform = params.platform;
144
-
145
- if (typeof organizationId === 'undefined') {
146
- throw new AppwriteException('Missing required parameter: "organizationId"');
147
- }
148
- if (typeof name === 'undefined') {
149
- throw new AppwriteException('Missing required parameter: "name"');
150
- }
151
- if (typeof billingPlan === 'undefined') {
152
- throw new AppwriteException('Missing required parameter: "billingPlan"');
153
- }
154
-
155
- const apiPath = '/organizations';
156
- const payload: Payload = {};
157
- if (typeof organizationId !== 'undefined') {
158
- payload['organizationId'] = organizationId;
159
- }
160
- if (typeof name !== 'undefined') {
161
- payload['name'] = name;
162
- }
163
- if (typeof billingPlan !== 'undefined') {
164
- payload['billingPlan'] = billingPlan;
165
- }
166
- if (typeof paymentMethodId !== 'undefined') {
167
- payload['paymentMethodId'] = paymentMethodId;
168
- }
169
- if (typeof billingAddressId !== 'undefined') {
170
- payload['billingAddressId'] = billingAddressId;
171
- }
172
- if (typeof invites !== 'undefined') {
173
- payload['invites'] = invites;
174
- }
175
- if (typeof couponId !== 'undefined') {
176
- payload['couponId'] = couponId;
177
- }
178
- if (typeof taxId !== 'undefined') {
179
- payload['taxId'] = taxId;
180
- }
181
- if (typeof budget !== 'undefined') {
182
- payload['budget'] = budget;
183
- }
184
- if (typeof platform !== 'undefined') {
185
- payload['platform'] = platform;
186
- }
187
- const uri = new URL(this.client.config.endpoint + apiPath);
188
-
189
- const apiHeaders: { [header: string]: string } = {
190
- 'content-type': 'application/json',
191
- }
192
-
193
- return this.client.call(
194
- 'post',
195
- uri,
196
- apiHeaders,
197
- payload
198
- );
199
- }
200
-
201
- /**
202
- * Get estimation for creating an organization.
203
- *
204
- * @param {string} params.billingPlan - Organization billing plan chosen
205
- * @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
206
- * @param {string[]} params.invites - Additional member invites
207
- * @param {string} params.couponId - Coupon id
208
- * @param {Platform} params.platform - Platform type
209
- * @throws {AppwriteException}
210
- * @returns {Promise<Models.Estimation>}
211
- */
212
- estimationCreateOrganization(params: { billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform }): Promise<Models.Estimation>;
213
- /**
214
- * Get estimation for creating an organization.
215
- *
216
- * @param {string} billingPlan - Organization billing plan chosen
217
- * @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
218
- * @param {string[]} invites - Additional member invites
219
- * @param {string} couponId - Coupon id
220
- * @param {Platform} platform - Platform type
221
- * @throws {AppwriteException}
222
- * @returns {Promise<Models.Estimation>}
223
- * @deprecated Use the object parameter style method for a better developer experience.
224
- */
225
- estimationCreateOrganization(billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform): Promise<Models.Estimation>;
226
- estimationCreateOrganization(
227
- paramsOrFirst: { billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform } | string,
228
- ...rest: [(string)?, (string[])?, (string)?, (Platform)?]
229
- ): Promise<Models.Estimation> {
230
- let params: { billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform };
231
-
232
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
233
- params = (paramsOrFirst || {}) as { billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform };
234
- } else {
235
- params = {
236
- billingPlan: paramsOrFirst as string,
237
- paymentMethodId: rest[0] as string,
238
- invites: rest[1] as string[],
239
- couponId: rest[2] as string,
240
- platform: rest[3] as Platform
241
- };
242
- }
243
-
244
- const billingPlan = params.billingPlan;
245
- const paymentMethodId = params.paymentMethodId;
246
- const invites = params.invites;
247
- const couponId = params.couponId;
248
- const platform = params.platform;
249
-
250
- if (typeof billingPlan === 'undefined') {
251
- throw new AppwriteException('Missing required parameter: "billingPlan"');
252
- }
253
-
254
- const apiPath = '/organizations/estimations/create-organization';
255
- const payload: Payload = {};
256
- if (typeof billingPlan !== 'undefined') {
257
- payload['billingPlan'] = billingPlan;
258
- }
259
- if (typeof paymentMethodId !== 'undefined') {
260
- payload['paymentMethodId'] = paymentMethodId;
261
- }
262
- if (typeof invites !== 'undefined') {
263
- payload['invites'] = invites;
264
- }
265
- if (typeof couponId !== 'undefined') {
266
- payload['couponId'] = couponId;
267
- }
268
- if (typeof platform !== 'undefined') {
269
- payload['platform'] = platform;
270
- }
271
- const uri = new URL(this.client.config.endpoint + apiPath);
272
-
273
- const apiHeaders: { [header: string]: string } = {
274
- 'content-type': 'application/json',
275
- }
276
-
277
- return this.client.call(
278
- 'patch',
279
- uri,
280
- apiHeaders,
281
- payload
282
- );
283
- }
284
-
285
- /**
286
- * Delete an organization.
287
- *
288
- * @param {string} params.organizationId - Team ID.
289
- * @throws {AppwriteException}
290
- * @returns {Promise<{}>}
291
- */
292
- delete(params: { organizationId: string }): Promise<{}>;
293
- /**
294
- * Delete an organization.
295
- *
296
- * @param {string} organizationId - Team ID.
297
- * @throws {AppwriteException}
298
- * @returns {Promise<{}>}
299
- * @deprecated Use the object parameter style method for a better developer experience.
300
- */
301
- delete(organizationId: string): Promise<{}>;
302
- delete(
303
- paramsOrFirst: { organizationId: string } | string
304
- ): Promise<{}> {
305
- let params: { organizationId: string };
306
-
307
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
308
- params = (paramsOrFirst || {}) as { organizationId: string };
309
- } else {
310
- params = {
311
- organizationId: paramsOrFirst as string
312
- };
313
- }
314
-
315
- const organizationId = params.organizationId;
316
-
317
- if (typeof organizationId === 'undefined') {
318
- throw new AppwriteException('Missing required parameter: "organizationId"');
319
- }
320
-
321
- const apiPath = '/organizations/{organizationId}'.replace('{organizationId}', organizationId);
322
- const payload: Payload = {};
323
- const uri = new URL(this.client.config.endpoint + apiPath);
324
-
325
- const apiHeaders: { [header: string]: string } = {
326
- 'content-type': 'application/json',
327
- }
328
-
329
- return this.client.call(
330
- 'delete',
331
- uri,
332
- apiHeaders,
333
- payload
334
- );
335
- }
336
-
337
- /**
338
- * Get a list of all aggregations for an organization.
339
- *
340
- * @param {string} params.organizationId - Organization ID
341
- * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, from, to
342
- * @throws {AppwriteException}
343
- * @returns {Promise<Models.AggregationTeamList>}
344
- */
345
- listAggregations(params: { organizationId: string, queries?: string[] }): Promise<Models.AggregationTeamList>;
346
- /**
347
- * Get a list of all aggregations for an organization.
348
- *
349
- * @param {string} organizationId - Organization ID
350
- * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, from, to
351
- * @throws {AppwriteException}
352
- * @returns {Promise<Models.AggregationTeamList>}
353
- * @deprecated Use the object parameter style method for a better developer experience.
354
- */
355
- listAggregations(organizationId: string, queries?: string[]): Promise<Models.AggregationTeamList>;
356
- listAggregations(
357
- paramsOrFirst: { organizationId: string, queries?: string[] } | string,
358
- ...rest: [(string[])?]
359
- ): Promise<Models.AggregationTeamList> {
360
- let params: { organizationId: string, queries?: string[] };
361
-
362
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
363
- params = (paramsOrFirst || {}) as { organizationId: string, queries?: string[] };
364
- } else {
365
- params = {
366
- organizationId: paramsOrFirst as string,
367
- queries: rest[0] as string[]
368
- };
369
- }
370
-
371
- const organizationId = params.organizationId;
372
- const queries = params.queries;
373
-
374
- if (typeof organizationId === 'undefined') {
375
- throw new AppwriteException('Missing required parameter: "organizationId"');
376
- }
377
-
378
- const apiPath = '/organizations/{organizationId}/aggregations'.replace('{organizationId}', organizationId);
379
- const payload: Payload = {};
380
- if (typeof queries !== 'undefined') {
381
- payload['queries'] = queries;
382
- }
383
- const uri = new URL(this.client.config.endpoint + apiPath);
384
-
385
- const apiHeaders: { [header: string]: string } = {
386
- }
387
-
388
- return this.client.call(
389
- 'get',
390
- uri,
391
- apiHeaders,
392
- payload
393
- );
394
- }
395
-
396
- /**
397
- * Get a specific aggregation using it's aggregation ID.
398
- *
399
- * @param {string} params.organizationId - Organization ID
400
- * @param {string} params.aggregationId - Invoice unique ID
401
- * @param {number} params.limit - Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.
402
- * @param {number} params.offset - Offset value. The default value is 0. Use this param to manage pagination.
403
- * @throws {AppwriteException}
404
- * @returns {Promise<Models.AggregationTeam>}
405
- */
406
- getAggregation(params: { organizationId: string, aggregationId: string, limit?: number, offset?: number }): Promise<Models.AggregationTeam>;
407
- /**
408
- * Get a specific aggregation using it's aggregation ID.
409
- *
410
- * @param {string} organizationId - Organization ID
411
- * @param {string} aggregationId - Invoice unique ID
412
- * @param {number} limit - Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.
413
- * @param {number} offset - Offset value. The default value is 0. Use this param to manage pagination.
414
- * @throws {AppwriteException}
415
- * @returns {Promise<Models.AggregationTeam>}
416
- * @deprecated Use the object parameter style method for a better developer experience.
417
- */
418
- getAggregation(organizationId: string, aggregationId: string, limit?: number, offset?: number): Promise<Models.AggregationTeam>;
419
- getAggregation(
420
- paramsOrFirst: { organizationId: string, aggregationId: string, limit?: number, offset?: number } | string,
421
- ...rest: [(string)?, (number)?, (number)?]
422
- ): Promise<Models.AggregationTeam> {
423
- let params: { organizationId: string, aggregationId: string, limit?: number, offset?: number };
424
-
425
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
426
- params = (paramsOrFirst || {}) as { organizationId: string, aggregationId: string, limit?: number, offset?: number };
427
- } else {
428
- params = {
429
- organizationId: paramsOrFirst as string,
430
- aggregationId: rest[0] as string,
431
- limit: rest[1] as number,
432
- offset: rest[2] as number
433
- };
434
- }
435
-
436
- const organizationId = params.organizationId;
437
- const aggregationId = params.aggregationId;
438
- const limit = params.limit;
439
- const offset = params.offset;
440
-
441
- if (typeof organizationId === 'undefined') {
442
- throw new AppwriteException('Missing required parameter: "organizationId"');
443
- }
444
- if (typeof aggregationId === 'undefined') {
445
- throw new AppwriteException('Missing required parameter: "aggregationId"');
446
- }
447
-
448
- const apiPath = '/organizations/{organizationId}/aggregations/{aggregationId}'.replace('{organizationId}', organizationId).replace('{aggregationId}', aggregationId);
449
- const payload: Payload = {};
450
- if (typeof limit !== 'undefined') {
451
- payload['limit'] = limit;
452
- }
453
- if (typeof offset !== 'undefined') {
454
- payload['offset'] = offset;
455
- }
456
- const uri = new URL(this.client.config.endpoint + apiPath);
457
-
458
- const apiHeaders: { [header: string]: string } = {
459
- }
460
-
461
- return this.client.call(
462
- 'get',
463
- uri,
464
- apiHeaders,
465
- payload
466
- );
467
- }
468
-
469
- /**
470
- * Set a billing address for an organization.
471
- *
472
- * @param {string} params.organizationId - Organization ID
473
- * @param {string} params.billingAddressId - Unique ID of billing address
474
- * @throws {AppwriteException}
475
- * @returns {Promise<Models.Organization<Preferences>>}
476
- */
477
- setBillingAddress<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, billingAddressId: string }): Promise<Models.Organization<Preferences>>;
478
- /**
479
- * Set a billing address for an organization.
480
- *
481
- * @param {string} organizationId - Organization ID
482
- * @param {string} billingAddressId - Unique ID of billing address
483
- * @throws {AppwriteException}
484
- * @returns {Promise<Models.Organization<Preferences>>}
485
- * @deprecated Use the object parameter style method for a better developer experience.
486
- */
487
- setBillingAddress<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingAddressId: string): Promise<Models.Organization<Preferences>>;
488
- setBillingAddress<Preferences extends Models.Preferences = Models.DefaultPreferences>(
489
- paramsOrFirst: { organizationId: string, billingAddressId: string } | string,
490
- ...rest: [(string)?]
491
- ): Promise<Models.Organization<Preferences>> {
492
- let params: { organizationId: string, billingAddressId: string };
493
-
494
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
495
- params = (paramsOrFirst || {}) as { organizationId: string, billingAddressId: string };
496
- } else {
497
- params = {
498
- organizationId: paramsOrFirst as string,
499
- billingAddressId: rest[0] as string
500
- };
501
- }
502
-
503
- const organizationId = params.organizationId;
504
- const billingAddressId = params.billingAddressId;
505
-
506
- if (typeof organizationId === 'undefined') {
507
- throw new AppwriteException('Missing required parameter: "organizationId"');
508
- }
509
- if (typeof billingAddressId === 'undefined') {
510
- throw new AppwriteException('Missing required parameter: "billingAddressId"');
511
- }
512
-
513
- const apiPath = '/organizations/{organizationId}/billing-address'.replace('{organizationId}', organizationId);
514
- const payload: Payload = {};
515
- if (typeof billingAddressId !== 'undefined') {
516
- payload['billingAddressId'] = billingAddressId;
517
- }
518
- const uri = new URL(this.client.config.endpoint + apiPath);
519
-
520
- const apiHeaders: { [header: string]: string } = {
521
- 'content-type': 'application/json',
522
- }
523
-
524
- return this.client.call(
525
- 'patch',
526
- uri,
527
- apiHeaders,
528
- payload
529
- );
530
- }
531
-
532
- /**
533
- * Delete a team's billing address.
534
- *
535
- * @param {string} params.organizationId - Organization ID
536
- * @throws {AppwriteException}
537
- * @returns {Promise<{}>}
538
- */
539
- deleteBillingAddress(params: { organizationId: string }): Promise<{}>;
540
- /**
541
- * Delete a team's billing address.
542
- *
543
- * @param {string} organizationId - Organization ID
544
- * @throws {AppwriteException}
545
- * @returns {Promise<{}>}
546
- * @deprecated Use the object parameter style method for a better developer experience.
547
- */
548
- deleteBillingAddress(organizationId: string): Promise<{}>;
549
- deleteBillingAddress(
550
- paramsOrFirst: { organizationId: string } | string
551
- ): Promise<{}> {
552
- let params: { organizationId: string };
553
-
554
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
555
- params = (paramsOrFirst || {}) as { organizationId: string };
556
- } else {
557
- params = {
558
- organizationId: paramsOrFirst as string
559
- };
560
- }
561
-
562
- const organizationId = params.organizationId;
563
-
564
- if (typeof organizationId === 'undefined') {
565
- throw new AppwriteException('Missing required parameter: "organizationId"');
566
- }
567
-
568
- const apiPath = '/organizations/{organizationId}/billing-address'.replace('{organizationId}', organizationId);
569
- const payload: Payload = {};
570
- const uri = new URL(this.client.config.endpoint + apiPath);
571
-
572
- const apiHeaders: { [header: string]: string } = {
573
- 'content-type': 'application/json',
574
- }
575
-
576
- return this.client.call(
577
- 'delete',
578
- uri,
579
- apiHeaders,
580
- payload
581
- );
582
- }
583
-
584
- /**
585
- * Get a billing address using it's ID.
586
- *
587
- * @param {string} params.organizationId - Organization ID
588
- * @param {string} params.billingAddressId - Unique ID of billing address
589
- * @throws {AppwriteException}
590
- * @returns {Promise<Models.BillingAddress>}
591
- */
592
- getBillingAddress(params: { organizationId: string, billingAddressId: string }): Promise<Models.BillingAddress>;
593
- /**
594
- * Get a billing address using it's ID.
595
- *
596
- * @param {string} organizationId - Organization ID
597
- * @param {string} billingAddressId - Unique ID of billing address
598
- * @throws {AppwriteException}
599
- * @returns {Promise<Models.BillingAddress>}
600
- * @deprecated Use the object parameter style method for a better developer experience.
601
- */
602
- getBillingAddress(organizationId: string, billingAddressId: string): Promise<Models.BillingAddress>;
603
- getBillingAddress(
604
- paramsOrFirst: { organizationId: string, billingAddressId: string } | string,
605
- ...rest: [(string)?]
606
- ): Promise<Models.BillingAddress> {
607
- let params: { organizationId: string, billingAddressId: string };
608
-
609
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
610
- params = (paramsOrFirst || {}) as { organizationId: string, billingAddressId: string };
611
- } else {
612
- params = {
613
- organizationId: paramsOrFirst as string,
614
- billingAddressId: rest[0] as string
615
- };
616
- }
617
-
618
- const organizationId = params.organizationId;
619
- const billingAddressId = params.billingAddressId;
620
-
621
- if (typeof organizationId === 'undefined') {
622
- throw new AppwriteException('Missing required parameter: "organizationId"');
623
- }
624
- if (typeof billingAddressId === 'undefined') {
625
- throw new AppwriteException('Missing required parameter: "billingAddressId"');
626
- }
627
-
628
- const apiPath = '/organizations/{organizationId}/billing-addresses/{billingAddressId}'.replace('{organizationId}', organizationId).replace('{billingAddressId}', billingAddressId);
629
- const payload: Payload = {};
630
- const uri = new URL(this.client.config.endpoint + apiPath);
631
-
632
- const apiHeaders: { [header: string]: string } = {
633
- }
634
-
635
- return this.client.call(
636
- 'get',
637
- uri,
638
- apiHeaders,
639
- payload
640
- );
641
- }
642
-
643
- /**
644
- * Set the current billing email for the organization.
645
- *
646
- * @param {string} params.organizationId - Organization ID
647
- * @param {string} params.billingEmail - Billing email for the organization.
648
- * @throws {AppwriteException}
649
- * @returns {Promise<Models.Organization<Preferences>>}
650
- */
651
- setBillingEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, billingEmail: string }): Promise<Models.Organization<Preferences>>;
652
- /**
653
- * Set the current billing email for the organization.
654
- *
655
- * @param {string} organizationId - Organization ID
656
- * @param {string} billingEmail - Billing email for the organization.
657
- * @throws {AppwriteException}
658
- * @returns {Promise<Models.Organization<Preferences>>}
659
- * @deprecated Use the object parameter style method for a better developer experience.
660
- */
661
- setBillingEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingEmail: string): Promise<Models.Organization<Preferences>>;
662
- setBillingEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(
663
- paramsOrFirst: { organizationId: string, billingEmail: string } | string,
664
- ...rest: [(string)?]
665
- ): Promise<Models.Organization<Preferences>> {
666
- let params: { organizationId: string, billingEmail: string };
667
-
668
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
669
- params = (paramsOrFirst || {}) as { organizationId: string, billingEmail: string };
670
- } else {
671
- params = {
672
- organizationId: paramsOrFirst as string,
673
- billingEmail: rest[0] as string
674
- };
675
- }
676
-
677
- const organizationId = params.organizationId;
678
- const billingEmail = params.billingEmail;
679
-
680
- if (typeof organizationId === 'undefined') {
681
- throw new AppwriteException('Missing required parameter: "organizationId"');
682
- }
683
- if (typeof billingEmail === 'undefined') {
684
- throw new AppwriteException('Missing required parameter: "billingEmail"');
685
- }
686
-
687
- const apiPath = '/organizations/{organizationId}/billing-email'.replace('{organizationId}', organizationId);
688
- const payload: Payload = {};
689
- if (typeof billingEmail !== 'undefined') {
690
- payload['billingEmail'] = billingEmail;
691
- }
692
- const uri = new URL(this.client.config.endpoint + apiPath);
693
-
694
- const apiHeaders: { [header: string]: string } = {
695
- 'content-type': 'application/json',
696
- }
697
-
698
- return this.client.call(
699
- 'patch',
700
- uri,
701
- apiHeaders,
702
- payload
703
- );
704
- }
705
-
706
- /**
707
- * Update the budget limit for an organization.
708
- *
709
- * @param {string} params.organizationId - Organization Unique ID
710
- * @param {number} params.budget - Budget limit for additional usage set for the organization
711
- * @param {number[]} params.alerts - Budget alert limit percentage
712
- * @throws {AppwriteException}
713
- * @returns {Promise<Models.Organization<Preferences>>}
714
- */
715
- updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, budget?: number, alerts?: number[] }): Promise<Models.Organization<Preferences>>;
716
- /**
717
- * Update the budget limit for an organization.
718
- *
719
- * @param {string} organizationId - Organization Unique ID
720
- * @param {number} budget - Budget limit for additional usage set for the organization
721
- * @param {number[]} alerts - Budget alert limit percentage
722
- * @throws {AppwriteException}
723
- * @returns {Promise<Models.Organization<Preferences>>}
724
- * @deprecated Use the object parameter style method for a better developer experience.
725
- */
726
- updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, budget?: number, alerts?: number[]): Promise<Models.Organization<Preferences>>;
727
- updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(
728
- paramsOrFirst: { organizationId: string, budget?: number, alerts?: number[] } | string,
729
- ...rest: [(number)?, (number[])?]
730
- ): Promise<Models.Organization<Preferences>> {
731
- let params: { organizationId: string, budget?: number, alerts?: number[] };
732
-
733
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
734
- params = (paramsOrFirst || {}) as { organizationId: string, budget?: number, alerts?: number[] };
735
- } else {
736
- params = {
737
- organizationId: paramsOrFirst as string,
738
- budget: rest[0] as number,
739
- alerts: rest[1] as number[]
740
- };
741
- }
742
-
743
- const organizationId = params.organizationId;
744
- const budget = params.budget;
745
- const alerts = params.alerts;
746
-
747
- if (typeof organizationId === 'undefined') {
748
- throw new AppwriteException('Missing required parameter: "organizationId"');
749
- }
750
- if (typeof budget === 'undefined') {
751
- throw new AppwriteException('Missing required parameter: "budget"');
752
- }
753
-
754
- const apiPath = '/organizations/{organizationId}/budget'.replace('{organizationId}', organizationId);
755
- const payload: Payload = {};
756
- if (typeof budget !== 'undefined') {
757
- payload['budget'] = budget;
758
- }
759
- if (typeof alerts !== 'undefined') {
760
- payload['alerts'] = alerts;
761
- }
762
- const uri = new URL(this.client.config.endpoint + apiPath);
763
-
764
- const apiHeaders: { [header: string]: string } = {
765
- 'content-type': 'application/json',
766
- }
767
-
768
- return this.client.call(
769
- 'patch',
770
- uri,
771
- apiHeaders,
772
- payload
773
- );
774
- }
775
-
776
- /**
777
- * List all credits for an organization.
778
- *
779
- *
780
- * @param {string} params.organizationId - Organization ID
781
- * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, couponId, credits, expiration, status
782
- * @throws {AppwriteException}
783
- * @returns {Promise<Models.CreditList>}
784
- */
785
- listCredits(params: { organizationId: string, queries?: string[] }): Promise<Models.CreditList>;
786
- /**
787
- * List all credits for an organization.
788
- *
789
- *
790
- * @param {string} organizationId - Organization ID
791
- * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, couponId, credits, expiration, status
792
- * @throws {AppwriteException}
793
- * @returns {Promise<Models.CreditList>}
794
- * @deprecated Use the object parameter style method for a better developer experience.
795
- */
796
- listCredits(organizationId: string, queries?: string[]): Promise<Models.CreditList>;
797
- listCredits(
798
- paramsOrFirst: { organizationId: string, queries?: string[] } | string,
799
- ...rest: [(string[])?]
800
- ): Promise<Models.CreditList> {
801
- let params: { organizationId: string, queries?: string[] };
802
-
803
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
804
- params = (paramsOrFirst || {}) as { organizationId: string, queries?: string[] };
805
- } else {
806
- params = {
807
- organizationId: paramsOrFirst as string,
808
- queries: rest[0] as string[]
809
- };
810
- }
811
-
812
- const organizationId = params.organizationId;
813
- const queries = params.queries;
814
-
815
- if (typeof organizationId === 'undefined') {
816
- throw new AppwriteException('Missing required parameter: "organizationId"');
817
- }
818
-
819
- const apiPath = '/organizations/{organizationId}/credits'.replace('{organizationId}', organizationId);
820
- const payload: Payload = {};
821
- if (typeof queries !== 'undefined') {
822
- payload['queries'] = queries;
823
- }
824
- const uri = new URL(this.client.config.endpoint + apiPath);
825
-
826
- const apiHeaders: { [header: string]: string } = {
827
- }
828
-
829
- return this.client.call(
830
- 'get',
831
- uri,
832
- apiHeaders,
833
- payload
834
- );
835
- }
836
-
837
- /**
838
- * Add credit to an organization using a coupon.
839
- *
840
- * @param {string} params.organizationId - Organization ID
841
- * @param {string} params.couponId - ID of the coupon
842
- * @throws {AppwriteException}
843
- * @returns {Promise<Models.Credit>}
844
- */
845
- addCredit(params: { organizationId: string, couponId: string }): Promise<Models.Credit>;
846
- /**
847
- * Add credit to an organization using a coupon.
848
- *
849
- * @param {string} organizationId - Organization ID
850
- * @param {string} couponId - ID of the coupon
851
- * @throws {AppwriteException}
852
- * @returns {Promise<Models.Credit>}
853
- * @deprecated Use the object parameter style method for a better developer experience.
854
- */
855
- addCredit(organizationId: string, couponId: string): Promise<Models.Credit>;
856
- addCredit(
857
- paramsOrFirst: { organizationId: string, couponId: string } | string,
858
- ...rest: [(string)?]
859
- ): Promise<Models.Credit> {
860
- let params: { organizationId: string, couponId: string };
861
-
862
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
863
- params = (paramsOrFirst || {}) as { organizationId: string, couponId: string };
864
- } else {
865
- params = {
866
- organizationId: paramsOrFirst as string,
867
- couponId: rest[0] as string
868
- };
869
- }
870
-
871
- const organizationId = params.organizationId;
872
- const couponId = params.couponId;
873
-
874
- if (typeof organizationId === 'undefined') {
875
- throw new AppwriteException('Missing required parameter: "organizationId"');
876
- }
877
- if (typeof couponId === 'undefined') {
878
- throw new AppwriteException('Missing required parameter: "couponId"');
879
- }
880
-
881
- const apiPath = '/organizations/{organizationId}/credits'.replace('{organizationId}', organizationId);
882
- const payload: Payload = {};
883
- if (typeof couponId !== 'undefined') {
884
- payload['couponId'] = couponId;
885
- }
886
- const uri = new URL(this.client.config.endpoint + apiPath);
887
-
888
- const apiHeaders: { [header: string]: string } = {
889
- 'content-type': 'application/json',
890
- }
891
-
892
- return this.client.call(
893
- 'post',
894
- uri,
895
- apiHeaders,
896
- payload
897
- );
898
- }
899
-
900
- /**
901
- * Get total available valid credits for an organization.
902
- *
903
- * @param {string} params.organizationId - Organization ID
904
- * @throws {AppwriteException}
905
- * @returns {Promise<Models.CreditAvailable>}
906
- */
907
- getAvailableCredits(params: { organizationId: string }): Promise<Models.CreditAvailable>;
908
- /**
909
- * Get total available valid credits for an organization.
910
- *
911
- * @param {string} organizationId - Organization ID
912
- * @throws {AppwriteException}
913
- * @returns {Promise<Models.CreditAvailable>}
914
- * @deprecated Use the object parameter style method for a better developer experience.
915
- */
916
- getAvailableCredits(organizationId: string): Promise<Models.CreditAvailable>;
917
- getAvailableCredits(
918
- paramsOrFirst: { organizationId: string } | string
919
- ): Promise<Models.CreditAvailable> {
920
- let params: { organizationId: string };
921
-
922
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
923
- params = (paramsOrFirst || {}) as { organizationId: string };
924
- } else {
925
- params = {
926
- organizationId: paramsOrFirst as string
927
- };
928
- }
929
-
930
- const organizationId = params.organizationId;
931
-
932
- if (typeof organizationId === 'undefined') {
933
- throw new AppwriteException('Missing required parameter: "organizationId"');
934
- }
935
-
936
- const apiPath = '/organizations/{organizationId}/credits/available'.replace('{organizationId}', organizationId);
937
- const payload: Payload = {};
938
- const uri = new URL(this.client.config.endpoint + apiPath);
939
-
940
- const apiHeaders: { [header: string]: string } = {
941
- }
942
-
943
- return this.client.call(
944
- 'get',
945
- uri,
946
- apiHeaders,
947
- payload
948
- );
949
- }
950
-
951
- /**
952
- * Get credit details.
953
- *
954
- * @param {string} params.organizationId - Organization ID
955
- * @param {string} params.creditId - Credit Unique ID
956
- * @throws {AppwriteException}
957
- * @returns {Promise<Models.Credit>}
958
- */
959
- getCredit(params: { organizationId: string, creditId: string }): Promise<Models.Credit>;
960
- /**
961
- * Get credit details.
962
- *
963
- * @param {string} organizationId - Organization ID
964
- * @param {string} creditId - Credit Unique ID
965
- * @throws {AppwriteException}
966
- * @returns {Promise<Models.Credit>}
967
- * @deprecated Use the object parameter style method for a better developer experience.
968
- */
969
- getCredit(organizationId: string, creditId: string): Promise<Models.Credit>;
970
- getCredit(
971
- paramsOrFirst: { organizationId: string, creditId: string } | string,
972
- ...rest: [(string)?]
973
- ): Promise<Models.Credit> {
974
- let params: { organizationId: string, creditId: string };
975
-
976
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
977
- params = (paramsOrFirst || {}) as { organizationId: string, creditId: string };
978
- } else {
979
- params = {
980
- organizationId: paramsOrFirst as string,
981
- creditId: rest[0] as string
982
- };
983
- }
984
-
985
- const organizationId = params.organizationId;
986
- const creditId = params.creditId;
987
-
988
- if (typeof organizationId === 'undefined') {
989
- throw new AppwriteException('Missing required parameter: "organizationId"');
990
- }
991
- if (typeof creditId === 'undefined') {
992
- throw new AppwriteException('Missing required parameter: "creditId"');
993
- }
994
-
995
- const apiPath = '/organizations/{organizationId}/credits/{creditId}'.replace('{organizationId}', organizationId).replace('{creditId}', creditId);
996
- const payload: Payload = {};
997
- const uri = new URL(this.client.config.endpoint + apiPath);
998
-
999
- const apiHeaders: { [header: string]: string } = {
1000
- }
1001
-
1002
- return this.client.call(
1003
- 'get',
1004
- uri,
1005
- apiHeaders,
1006
- payload
1007
- );
1008
- }
1009
-
1010
- /**
1011
- * Get estimation for deleting an organization.
1012
- *
1013
- * @param {string} params.organizationId - Team ID.
1014
- * @throws {AppwriteException}
1015
- * @returns {Promise<Models.EstimationDeleteOrganization>}
1016
- */
1017
- estimationDeleteOrganization(params: { organizationId: string }): Promise<Models.EstimationDeleteOrganization>;
1018
- /**
1019
- * Get estimation for deleting an organization.
1020
- *
1021
- * @param {string} organizationId - Team ID.
1022
- * @throws {AppwriteException}
1023
- * @returns {Promise<Models.EstimationDeleteOrganization>}
1024
- * @deprecated Use the object parameter style method for a better developer experience.
1025
- */
1026
- estimationDeleteOrganization(organizationId: string): Promise<Models.EstimationDeleteOrganization>;
1027
- estimationDeleteOrganization(
1028
- paramsOrFirst: { organizationId: string } | string
1029
- ): Promise<Models.EstimationDeleteOrganization> {
1030
- let params: { organizationId: string };
1031
-
1032
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1033
- params = (paramsOrFirst || {}) as { organizationId: string };
1034
- } else {
1035
- params = {
1036
- organizationId: paramsOrFirst as string
1037
- };
1038
- }
1039
-
1040
- const organizationId = params.organizationId;
1041
-
1042
- if (typeof organizationId === 'undefined') {
1043
- throw new AppwriteException('Missing required parameter: "organizationId"');
1044
- }
1045
-
1046
- const apiPath = '/organizations/{organizationId}/estimations/delete-organization'.replace('{organizationId}', organizationId);
1047
- const payload: Payload = {};
1048
- const uri = new URL(this.client.config.endpoint + apiPath);
1049
-
1050
- const apiHeaders: { [header: string]: string } = {
1051
- 'content-type': 'application/json',
1052
- }
1053
-
1054
- return this.client.call(
1055
- 'patch',
1056
- uri,
1057
- apiHeaders,
1058
- payload
1059
- );
1060
- }
1061
-
1062
- /**
1063
- * Get estimation for updating the organization plan.
1064
- *
1065
- * @param {string} params.organizationId - Organization ID
1066
- * @param {string} params.billingPlan - Organization billing plan chosen
1067
- * @param {string[]} params.invites - Additional member invites
1068
- * @param {string} params.couponId - Coupon id
1069
- * @throws {AppwriteException}
1070
- * @returns {Promise<Models.EstimationUpdatePlan>}
1071
- */
1072
- estimationUpdatePlan(params: { organizationId: string, billingPlan: string, invites?: string[], couponId?: string }): Promise<Models.EstimationUpdatePlan>;
1073
- /**
1074
- * Get estimation for updating the organization plan.
1075
- *
1076
- * @param {string} organizationId - Organization ID
1077
- * @param {string} billingPlan - Organization billing plan chosen
1078
- * @param {string[]} invites - Additional member invites
1079
- * @param {string} couponId - Coupon id
1080
- * @throws {AppwriteException}
1081
- * @returns {Promise<Models.EstimationUpdatePlan>}
1082
- * @deprecated Use the object parameter style method for a better developer experience.
1083
- */
1084
- estimationUpdatePlan(organizationId: string, billingPlan: string, invites?: string[], couponId?: string): Promise<Models.EstimationUpdatePlan>;
1085
- estimationUpdatePlan(
1086
- paramsOrFirst: { organizationId: string, billingPlan: string, invites?: string[], couponId?: string } | string,
1087
- ...rest: [(string)?, (string[])?, (string)?]
1088
- ): Promise<Models.EstimationUpdatePlan> {
1089
- let params: { organizationId: string, billingPlan: string, invites?: string[], couponId?: string };
1090
-
1091
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1092
- params = (paramsOrFirst || {}) as { organizationId: string, billingPlan: string, invites?: string[], couponId?: string };
1093
- } else {
1094
- params = {
1095
- organizationId: paramsOrFirst as string,
1096
- billingPlan: rest[0] as string,
1097
- invites: rest[1] as string[],
1098
- couponId: rest[2] as string
1099
- };
1100
- }
1101
-
1102
- const organizationId = params.organizationId;
1103
- const billingPlan = params.billingPlan;
1104
- const invites = params.invites;
1105
- const couponId = params.couponId;
1106
-
1107
- if (typeof organizationId === 'undefined') {
1108
- throw new AppwriteException('Missing required parameter: "organizationId"');
1109
- }
1110
- if (typeof billingPlan === 'undefined') {
1111
- throw new AppwriteException('Missing required parameter: "billingPlan"');
1112
- }
1113
-
1114
- const apiPath = '/organizations/{organizationId}/estimations/update-plan'.replace('{organizationId}', organizationId);
1115
- const payload: Payload = {};
1116
- if (typeof billingPlan !== 'undefined') {
1117
- payload['billingPlan'] = billingPlan;
1118
- }
1119
- if (typeof invites !== 'undefined') {
1120
- payload['invites'] = invites;
1121
- }
1122
- if (typeof couponId !== 'undefined') {
1123
- payload['couponId'] = couponId;
1124
- }
1125
- const uri = new URL(this.client.config.endpoint + apiPath);
1126
-
1127
- const apiHeaders: { [header: string]: string } = {
1128
- 'content-type': 'application/json',
1129
- }
1130
-
1131
- return this.client.call(
1132
- 'patch',
1133
- uri,
1134
- apiHeaders,
1135
- payload
1136
- );
1137
- }
1138
-
1139
- /**
1140
- * Submit feedback about downgrading from a paid plan to a lower tier. This helps the team understand user experience and improve the platform.
1141
- *
1142
- *
1143
- * @param {string} params.organizationId - Organization Unique ID
1144
- * @param {string} params.reason - Feedback reason
1145
- * @param {string} params.message - Feedback message
1146
- * @param {string} params.fromPlanId - Plan downgrading from
1147
- * @param {string} params.toPlanId - Plan downgrading to
1148
- * @throws {AppwriteException}
1149
- * @returns {Promise<Models.DowngradeFeedback>}
1150
- */
1151
- createDowngradeFeedback(params: { organizationId: string, reason: string, message: string, fromPlanId: string, toPlanId: string }): Promise<Models.DowngradeFeedback>;
1152
- /**
1153
- * Submit feedback about downgrading from a paid plan to a lower tier. This helps the team understand user experience and improve the platform.
1154
- *
1155
- *
1156
- * @param {string} organizationId - Organization Unique ID
1157
- * @param {string} reason - Feedback reason
1158
- * @param {string} message - Feedback message
1159
- * @param {string} fromPlanId - Plan downgrading from
1160
- * @param {string} toPlanId - Plan downgrading to
1161
- * @throws {AppwriteException}
1162
- * @returns {Promise<Models.DowngradeFeedback>}
1163
- * @deprecated Use the object parameter style method for a better developer experience.
1164
- */
1165
- createDowngradeFeedback(organizationId: string, reason: string, message: string, fromPlanId: string, toPlanId: string): Promise<Models.DowngradeFeedback>;
1166
- createDowngradeFeedback(
1167
- paramsOrFirst: { organizationId: string, reason: string, message: string, fromPlanId: string, toPlanId: string } | string,
1168
- ...rest: [(string)?, (string)?, (string)?, (string)?]
1169
- ): Promise<Models.DowngradeFeedback> {
1170
- let params: { organizationId: string, reason: string, message: string, fromPlanId: string, toPlanId: string };
1171
-
1172
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1173
- params = (paramsOrFirst || {}) as { organizationId: string, reason: string, message: string, fromPlanId: string, toPlanId: string };
1174
- } else {
1175
- params = {
1176
- organizationId: paramsOrFirst as string,
1177
- reason: rest[0] as string,
1178
- message: rest[1] as string,
1179
- fromPlanId: rest[2] as string,
1180
- toPlanId: rest[3] as string
1181
- };
1182
- }
1183
-
1184
- const organizationId = params.organizationId;
1185
- const reason = params.reason;
1186
- const message = params.message;
1187
- const fromPlanId = params.fromPlanId;
1188
- const toPlanId = params.toPlanId;
1189
-
1190
- if (typeof organizationId === 'undefined') {
1191
- throw new AppwriteException('Missing required parameter: "organizationId"');
1192
- }
1193
- if (typeof reason === 'undefined') {
1194
- throw new AppwriteException('Missing required parameter: "reason"');
1195
- }
1196
- if (typeof message === 'undefined') {
1197
- throw new AppwriteException('Missing required parameter: "message"');
1198
- }
1199
- if (typeof fromPlanId === 'undefined') {
1200
- throw new AppwriteException('Missing required parameter: "fromPlanId"');
1201
- }
1202
- if (typeof toPlanId === 'undefined') {
1203
- throw new AppwriteException('Missing required parameter: "toPlanId"');
1204
- }
1205
-
1206
- const apiPath = '/organizations/{organizationId}/feedbacks/downgrade'.replace('{organizationId}', organizationId);
1207
- const payload: Payload = {};
1208
- if (typeof reason !== 'undefined') {
1209
- payload['reason'] = reason;
1210
- }
1211
- if (typeof message !== 'undefined') {
1212
- payload['message'] = message;
1213
- }
1214
- if (typeof fromPlanId !== 'undefined') {
1215
- payload['fromPlanId'] = fromPlanId;
1216
- }
1217
- if (typeof toPlanId !== 'undefined') {
1218
- payload['toPlanId'] = toPlanId;
1219
- }
1220
- const uri = new URL(this.client.config.endpoint + apiPath);
1221
-
1222
- const apiHeaders: { [header: string]: string } = {
1223
- 'content-type': 'application/json',
1224
- }
1225
-
1226
- return this.client.call(
1227
- 'post',
1228
- uri,
1229
- apiHeaders,
1230
- payload
1231
- );
1232
- }
1233
-
1234
- /**
1235
- * List all invoices for an organization.
1236
- *
1237
- * @param {string} params.organizationId - Organization ID
1238
- * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount
1239
- * @throws {AppwriteException}
1240
- * @returns {Promise<Models.InvoiceList>}
1241
- */
1242
- listInvoices(params: { organizationId: string, queries?: string[] }): Promise<Models.InvoiceList>;
1243
- /**
1244
- * List all invoices for an organization.
1245
- *
1246
- * @param {string} organizationId - Organization ID
1247
- * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount
1248
- * @throws {AppwriteException}
1249
- * @returns {Promise<Models.InvoiceList>}
1250
- * @deprecated Use the object parameter style method for a better developer experience.
1251
- */
1252
- listInvoices(organizationId: string, queries?: string[]): Promise<Models.InvoiceList>;
1253
- listInvoices(
1254
- paramsOrFirst: { organizationId: string, queries?: string[] } | string,
1255
- ...rest: [(string[])?]
1256
- ): Promise<Models.InvoiceList> {
1257
- let params: { organizationId: string, queries?: string[] };
1258
-
1259
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1260
- params = (paramsOrFirst || {}) as { organizationId: string, queries?: string[] };
1261
- } else {
1262
- params = {
1263
- organizationId: paramsOrFirst as string,
1264
- queries: rest[0] as string[]
1265
- };
1266
- }
1267
-
1268
- const organizationId = params.organizationId;
1269
- const queries = params.queries;
1270
-
1271
- if (typeof organizationId === 'undefined') {
1272
- throw new AppwriteException('Missing required parameter: "organizationId"');
1273
- }
1274
-
1275
- const apiPath = '/organizations/{organizationId}/invoices'.replace('{organizationId}', organizationId);
1276
- const payload: Payload = {};
1277
- if (typeof queries !== 'undefined') {
1278
- payload['queries'] = queries;
1279
- }
1280
- const uri = new URL(this.client.config.endpoint + apiPath);
1281
-
1282
- const apiHeaders: { [header: string]: string } = {
1283
- }
1284
-
1285
- return this.client.call(
1286
- 'get',
1287
- uri,
1288
- apiHeaders,
1289
- payload
1290
- );
1291
- }
1292
-
1293
- /**
1294
- * Get an invoice by its unique ID.
1295
- *
1296
- * @param {string} params.organizationId - Organization ID
1297
- * @param {string} params.invoiceId - Invoice unique ID
1298
- * @throws {AppwriteException}
1299
- * @returns {Promise<Models.Invoice>}
1300
- */
1301
- getInvoice(params: { organizationId: string, invoiceId: string }): Promise<Models.Invoice>;
1302
- /**
1303
- * Get an invoice by its unique ID.
1304
- *
1305
- * @param {string} organizationId - Organization ID
1306
- * @param {string} invoiceId - Invoice unique ID
1307
- * @throws {AppwriteException}
1308
- * @returns {Promise<Models.Invoice>}
1309
- * @deprecated Use the object parameter style method for a better developer experience.
1310
- */
1311
- getInvoice(organizationId: string, invoiceId: string): Promise<Models.Invoice>;
1312
- getInvoice(
1313
- paramsOrFirst: { organizationId: string, invoiceId: string } | string,
1314
- ...rest: [(string)?]
1315
- ): Promise<Models.Invoice> {
1316
- let params: { organizationId: string, invoiceId: string };
1317
-
1318
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1319
- params = (paramsOrFirst || {}) as { organizationId: string, invoiceId: string };
1320
- } else {
1321
- params = {
1322
- organizationId: paramsOrFirst as string,
1323
- invoiceId: rest[0] as string
1324
- };
1325
- }
1326
-
1327
- const organizationId = params.organizationId;
1328
- const invoiceId = params.invoiceId;
1329
-
1330
- if (typeof organizationId === 'undefined') {
1331
- throw new AppwriteException('Missing required parameter: "organizationId"');
1332
- }
1333
- if (typeof invoiceId === 'undefined') {
1334
- throw new AppwriteException('Missing required parameter: "invoiceId"');
1335
- }
1336
-
1337
- const apiPath = '/organizations/{organizationId}/invoices/{invoiceId}'.replace('{organizationId}', organizationId).replace('{invoiceId}', invoiceId);
1338
- const payload: Payload = {};
1339
- const uri = new URL(this.client.config.endpoint + apiPath);
1340
-
1341
- const apiHeaders: { [header: string]: string } = {
1342
- }
1343
-
1344
- return this.client.call(
1345
- 'get',
1346
- uri,
1347
- apiHeaders,
1348
- payload
1349
- );
1350
- }
1351
-
1352
- /**
1353
- * Download invoice in PDF
1354
- *
1355
- * @param {string} params.organizationId - Organization ID
1356
- * @param {string} params.invoiceId - Invoice unique ID
1357
- * @throws {AppwriteException}
1358
- * @returns {Promise<Models.PaymentMethod>}
1359
- */
1360
- getInvoiceDownload(params: { organizationId: string, invoiceId: string }): Promise<Models.PaymentMethod>;
1361
- /**
1362
- * Download invoice in PDF
1363
- *
1364
- * @param {string} organizationId - Organization ID
1365
- * @param {string} invoiceId - Invoice unique ID
1366
- * @throws {AppwriteException}
1367
- * @returns {Promise<Models.PaymentMethod>}
1368
- * @deprecated Use the object parameter style method for a better developer experience.
1369
- */
1370
- getInvoiceDownload(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod>;
1371
- getInvoiceDownload(
1372
- paramsOrFirst: { organizationId: string, invoiceId: string } | string,
1373
- ...rest: [(string)?]
1374
- ): Promise<Models.PaymentMethod> {
1375
- let params: { organizationId: string, invoiceId: string };
1376
-
1377
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1378
- params = (paramsOrFirst || {}) as { organizationId: string, invoiceId: string };
1379
- } else {
1380
- params = {
1381
- organizationId: paramsOrFirst as string,
1382
- invoiceId: rest[0] as string
1383
- };
1384
- }
1385
-
1386
- const organizationId = params.organizationId;
1387
- const invoiceId = params.invoiceId;
1388
-
1389
- if (typeof organizationId === 'undefined') {
1390
- throw new AppwriteException('Missing required parameter: "organizationId"');
1391
- }
1392
- if (typeof invoiceId === 'undefined') {
1393
- throw new AppwriteException('Missing required parameter: "invoiceId"');
1394
- }
1395
-
1396
- const apiPath = '/organizations/{organizationId}/invoices/{invoiceId}/download'.replace('{organizationId}', organizationId).replace('{invoiceId}', invoiceId);
1397
- const payload: Payload = {};
1398
- const uri = new URL(this.client.config.endpoint + apiPath);
1399
-
1400
- const apiHeaders: { [header: string]: string } = {
1401
- }
1402
-
1403
- return this.client.call(
1404
- 'get',
1405
- uri,
1406
- apiHeaders,
1407
- payload
1408
- );
1409
- }
1410
-
1411
- /**
1412
- * Initiate payment for failed invoice to pay live from console
1413
- *
1414
- * @param {string} params.organizationId - Organization ID
1415
- * @param {string} params.invoiceId - Invoice unique ID
1416
- * @param {string} params.paymentMethodId - Payment method ID
1417
- * @throws {AppwriteException}
1418
- * @returns {Promise<Models.Invoice>}
1419
- */
1420
- createInvoicePayment(params: { organizationId: string, invoiceId: string, paymentMethodId: string }): Promise<Models.Invoice>;
1421
- /**
1422
- * Initiate payment for failed invoice to pay live from console
1423
- *
1424
- * @param {string} organizationId - Organization ID
1425
- * @param {string} invoiceId - Invoice unique ID
1426
- * @param {string} paymentMethodId - Payment method ID
1427
- * @throws {AppwriteException}
1428
- * @returns {Promise<Models.Invoice>}
1429
- * @deprecated Use the object parameter style method for a better developer experience.
1430
- */
1431
- createInvoicePayment(organizationId: string, invoiceId: string, paymentMethodId: string): Promise<Models.Invoice>;
1432
- createInvoicePayment(
1433
- paramsOrFirst: { organizationId: string, invoiceId: string, paymentMethodId: string } | string,
1434
- ...rest: [(string)?, (string)?]
1435
- ): Promise<Models.Invoice> {
1436
- let params: { organizationId: string, invoiceId: string, paymentMethodId: string };
1437
-
1438
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1439
- params = (paramsOrFirst || {}) as { organizationId: string, invoiceId: string, paymentMethodId: string };
1440
- } else {
1441
- params = {
1442
- organizationId: paramsOrFirst as string,
1443
- invoiceId: rest[0] as string,
1444
- paymentMethodId: rest[1] as string
1445
- };
1446
- }
1447
-
1448
- const organizationId = params.organizationId;
1449
- const invoiceId = params.invoiceId;
1450
- const paymentMethodId = params.paymentMethodId;
1451
-
1452
- if (typeof organizationId === 'undefined') {
1453
- throw new AppwriteException('Missing required parameter: "organizationId"');
1454
- }
1455
- if (typeof invoiceId === 'undefined') {
1456
- throw new AppwriteException('Missing required parameter: "invoiceId"');
1457
- }
1458
- if (typeof paymentMethodId === 'undefined') {
1459
- throw new AppwriteException('Missing required parameter: "paymentMethodId"');
1460
- }
1461
-
1462
- const apiPath = '/organizations/{organizationId}/invoices/{invoiceId}/payments'.replace('{organizationId}', organizationId).replace('{invoiceId}', invoiceId);
1463
- const payload: Payload = {};
1464
- if (typeof paymentMethodId !== 'undefined') {
1465
- payload['paymentMethodId'] = paymentMethodId;
1466
- }
1467
- const uri = new URL(this.client.config.endpoint + apiPath);
1468
-
1469
- const apiHeaders: { [header: string]: string } = {
1470
- 'content-type': 'application/json',
1471
- }
1472
-
1473
- return this.client.call(
1474
- 'post',
1475
- uri,
1476
- apiHeaders,
1477
- payload
1478
- );
1479
- }
1480
-
1481
- /**
1482
- * Validates the payment linked with the invoice and updates the invoice status if the payment status is changed.
1483
- *
1484
- * @param {string} params.organizationId - Organization ID
1485
- * @param {string} params.invoiceId - Invoice unique ID
1486
- * @throws {AppwriteException}
1487
- * @returns {Promise<Models.Invoice>}
1488
- */
1489
- validateInvoice(params: { organizationId: string, invoiceId: string }): Promise<Models.Invoice>;
1490
- /**
1491
- * Validates the payment linked with the invoice and updates the invoice status if the payment status is changed.
1492
- *
1493
- * @param {string} organizationId - Organization ID
1494
- * @param {string} invoiceId - Invoice unique ID
1495
- * @throws {AppwriteException}
1496
- * @returns {Promise<Models.Invoice>}
1497
- * @deprecated Use the object parameter style method for a better developer experience.
1498
- */
1499
- validateInvoice(organizationId: string, invoiceId: string): Promise<Models.Invoice>;
1500
- validateInvoice(
1501
- paramsOrFirst: { organizationId: string, invoiceId: string } | string,
1502
- ...rest: [(string)?]
1503
- ): Promise<Models.Invoice> {
1504
- let params: { organizationId: string, invoiceId: string };
1505
-
1506
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1507
- params = (paramsOrFirst || {}) as { organizationId: string, invoiceId: string };
1508
- } else {
1509
- params = {
1510
- organizationId: paramsOrFirst as string,
1511
- invoiceId: rest[0] as string
1512
- };
1513
- }
1514
-
1515
- const organizationId = params.organizationId;
1516
- const invoiceId = params.invoiceId;
1517
-
1518
- if (typeof organizationId === 'undefined') {
1519
- throw new AppwriteException('Missing required parameter: "organizationId"');
1520
- }
1521
- if (typeof invoiceId === 'undefined') {
1522
- throw new AppwriteException('Missing required parameter: "invoiceId"');
1523
- }
1524
-
1525
- const apiPath = '/organizations/{organizationId}/invoices/{invoiceId}/status'.replace('{organizationId}', organizationId).replace('{invoiceId}', invoiceId);
1526
- const payload: Payload = {};
1527
- const uri = new URL(this.client.config.endpoint + apiPath);
1528
-
1529
- const apiHeaders: { [header: string]: string } = {
1530
- 'content-type': 'application/json',
1531
- }
1532
-
1533
- return this.client.call(
1534
- 'patch',
1535
- uri,
1536
- apiHeaders,
1537
- payload
1538
- );
1539
- }
1540
-
1541
- /**
1542
- * View invoice in PDF
1543
- *
1544
- * @param {string} params.organizationId - Organization ID
1545
- * @param {string} params.invoiceId - Invoice unique ID
1546
- * @throws {AppwriteException}
1547
- * @returns {Promise<Models.PaymentMethod>}
1548
- */
1549
- getInvoiceView(params: { organizationId: string, invoiceId: string }): Promise<Models.PaymentMethod>;
1550
- /**
1551
- * View invoice in PDF
1552
- *
1553
- * @param {string} organizationId - Organization ID
1554
- * @param {string} invoiceId - Invoice unique ID
1555
- * @throws {AppwriteException}
1556
- * @returns {Promise<Models.PaymentMethod>}
1557
- * @deprecated Use the object parameter style method for a better developer experience.
1558
- */
1559
- getInvoiceView(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod>;
1560
- getInvoiceView(
1561
- paramsOrFirst: { organizationId: string, invoiceId: string } | string,
1562
- ...rest: [(string)?]
1563
- ): Promise<Models.PaymentMethod> {
1564
- let params: { organizationId: string, invoiceId: string };
1565
-
1566
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1567
- params = (paramsOrFirst || {}) as { organizationId: string, invoiceId: string };
1568
- } else {
1569
- params = {
1570
- organizationId: paramsOrFirst as string,
1571
- invoiceId: rest[0] as string
1572
- };
1573
- }
1574
-
1575
- const organizationId = params.organizationId;
1576
- const invoiceId = params.invoiceId;
1577
-
1578
- if (typeof organizationId === 'undefined') {
1579
- throw new AppwriteException('Missing required parameter: "organizationId"');
1580
- }
1581
- if (typeof invoiceId === 'undefined') {
1582
- throw new AppwriteException('Missing required parameter: "invoiceId"');
1583
- }
1584
-
1585
- const apiPath = '/organizations/{organizationId}/invoices/{invoiceId}/view'.replace('{organizationId}', organizationId).replace('{invoiceId}', invoiceId);
1586
- const payload: Payload = {};
1587
- const uri = new URL(this.client.config.endpoint + apiPath);
1588
-
1589
- const apiHeaders: { [header: string]: string } = {
1590
- }
1591
-
1592
- return this.client.call(
1593
- 'get',
1594
- uri,
1595
- apiHeaders,
1596
- payload
1597
- );
1598
- }
1599
-
1600
- /**
1601
- * Get a list of all API keys from the current organization.
1602
- *
1603
- * @param {string} params.organizationId - Organization Unique ID
1604
- * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1605
- * @throws {AppwriteException}
1606
- * @returns {Promise<Models.KeyList>}
1607
- */
1608
- listKeys(params: { organizationId: string, total?: boolean }): Promise<Models.KeyList>;
1609
- /**
1610
- * Get a list of all API keys from the current organization.
1611
- *
1612
- * @param {string} organizationId - Organization Unique ID
1613
- * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1614
- * @throws {AppwriteException}
1615
- * @returns {Promise<Models.KeyList>}
1616
- * @deprecated Use the object parameter style method for a better developer experience.
1617
- */
1618
- listKeys(organizationId: string, total?: boolean): Promise<Models.KeyList>;
1619
- listKeys(
1620
- paramsOrFirst: { organizationId: string, total?: boolean } | string,
1621
- ...rest: [(boolean)?]
1622
- ): Promise<Models.KeyList> {
1623
- let params: { organizationId: string, total?: boolean };
1624
-
1625
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1626
- params = (paramsOrFirst || {}) as { organizationId: string, total?: boolean };
1627
- } else {
1628
- params = {
1629
- organizationId: paramsOrFirst as string,
1630
- total: rest[0] as boolean
1631
- };
1632
- }
1633
-
1634
- const organizationId = params.organizationId;
1635
- const total = params.total;
1636
-
1637
- if (typeof organizationId === 'undefined') {
1638
- throw new AppwriteException('Missing required parameter: "organizationId"');
1639
- }
1640
-
1641
- const apiPath = '/organizations/{organizationId}/keys'.replace('{organizationId}', organizationId);
1642
- const payload: Payload = {};
1643
- if (typeof total !== 'undefined') {
1644
- payload['total'] = total;
1645
- }
1646
- const uri = new URL(this.client.config.endpoint + apiPath);
1647
-
1648
- const apiHeaders: { [header: string]: string } = {
1649
- }
1650
-
1651
- return this.client.call(
1652
- 'get',
1653
- uri,
1654
- apiHeaders,
1655
- payload
1656
- );
1657
- }
1658
-
1659
- /**
1660
- * Create a new organization API key.
1661
- *
1662
- * @param {string} params.organizationId - Organization Unique ID
1663
- * @param {string} params.name - Key name. Max length: 128 chars.
1664
- * @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
1665
- * @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
1666
- * @throws {AppwriteException}
1667
- * @returns {Promise<Models.Key>}
1668
- */
1669
- createKey(params: { organizationId: string, name: string, scopes: Scopes[], expire?: string }): Promise<Models.Key>;
1670
- /**
1671
- * Create a new organization API key.
1672
- *
1673
- * @param {string} organizationId - Organization Unique ID
1674
- * @param {string} name - Key name. Max length: 128 chars.
1675
- * @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
1676
- * @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
1677
- * @throws {AppwriteException}
1678
- * @returns {Promise<Models.Key>}
1679
- * @deprecated Use the object parameter style method for a better developer experience.
1680
- */
1681
- createKey(organizationId: string, name: string, scopes: Scopes[], expire?: string): Promise<Models.Key>;
1682
- createKey(
1683
- paramsOrFirst: { organizationId: string, name: string, scopes: Scopes[], expire?: string } | string,
1684
- ...rest: [(string)?, (Scopes[])?, (string)?]
1685
- ): Promise<Models.Key> {
1686
- let params: { organizationId: string, name: string, scopes: Scopes[], expire?: string };
1687
-
1688
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1689
- params = (paramsOrFirst || {}) as { organizationId: string, name: string, scopes: Scopes[], expire?: string };
1690
- } else {
1691
- params = {
1692
- organizationId: paramsOrFirst as string,
1693
- name: rest[0] as string,
1694
- scopes: rest[1] as Scopes[],
1695
- expire: rest[2] as string
1696
- };
1697
- }
1698
-
1699
- const organizationId = params.organizationId;
1700
- const name = params.name;
1701
- const scopes = params.scopes;
1702
- const expire = params.expire;
1703
-
1704
- if (typeof organizationId === 'undefined') {
1705
- throw new AppwriteException('Missing required parameter: "organizationId"');
1706
- }
1707
- if (typeof name === 'undefined') {
1708
- throw new AppwriteException('Missing required parameter: "name"');
1709
- }
1710
- if (typeof scopes === 'undefined') {
1711
- throw new AppwriteException('Missing required parameter: "scopes"');
1712
- }
1713
-
1714
- const apiPath = '/organizations/{organizationId}/keys'.replace('{organizationId}', organizationId);
1715
- const payload: Payload = {};
1716
- if (typeof name !== 'undefined') {
1717
- payload['name'] = name;
1718
- }
1719
- if (typeof scopes !== 'undefined') {
1720
- payload['scopes'] = scopes;
1721
- }
1722
- if (typeof expire !== 'undefined') {
1723
- payload['expire'] = expire;
1724
- }
1725
- const uri = new URL(this.client.config.endpoint + apiPath);
1726
-
1727
- const apiHeaders: { [header: string]: string } = {
1728
- 'content-type': 'application/json',
1729
- }
1730
-
1731
- return this.client.call(
1732
- 'post',
1733
- uri,
1734
- apiHeaders,
1735
- payload
1736
- );
1737
- }
1738
-
1739
- /**
1740
- * Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including it's scopes.
1741
- *
1742
- * @param {string} params.organizationId - Organization Unique ID
1743
- * @param {string} params.keyId - Key unique ID.
1744
- * @throws {AppwriteException}
1745
- * @returns {Promise<Models.Key>}
1746
- */
1747
- getKey(params: { organizationId: string, keyId: string }): Promise<Models.Key>;
1748
- /**
1749
- * Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including it's scopes.
1750
- *
1751
- * @param {string} organizationId - Organization Unique ID
1752
- * @param {string} keyId - Key unique ID.
1753
- * @throws {AppwriteException}
1754
- * @returns {Promise<Models.Key>}
1755
- * @deprecated Use the object parameter style method for a better developer experience.
1756
- */
1757
- getKey(organizationId: string, keyId: string): Promise<Models.Key>;
1758
- getKey(
1759
- paramsOrFirst: { organizationId: string, keyId: string } | string,
1760
- ...rest: [(string)?]
1761
- ): Promise<Models.Key> {
1762
- let params: { organizationId: string, keyId: string };
1763
-
1764
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1765
- params = (paramsOrFirst || {}) as { organizationId: string, keyId: string };
1766
- } else {
1767
- params = {
1768
- organizationId: paramsOrFirst as string,
1769
- keyId: rest[0] as string
1770
- };
1771
- }
1772
-
1773
- const organizationId = params.organizationId;
1774
- const keyId = params.keyId;
1775
-
1776
- if (typeof organizationId === 'undefined') {
1777
- throw new AppwriteException('Missing required parameter: "organizationId"');
1778
- }
1779
- if (typeof keyId === 'undefined') {
1780
- throw new AppwriteException('Missing required parameter: "keyId"');
1781
- }
1782
-
1783
- const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
1784
- const payload: Payload = {};
1785
- const uri = new URL(this.client.config.endpoint + apiPath);
1786
-
1787
- const apiHeaders: { [header: string]: string } = {
1788
- }
1789
-
1790
- return this.client.call(
1791
- 'get',
1792
- uri,
1793
- apiHeaders,
1794
- payload
1795
- );
1796
- }
1797
-
1798
- /**
1799
- * Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
1800
- *
1801
- * @param {string} params.organizationId - Organization Unique ID
1802
- * @param {string} params.keyId - Key unique ID.
1803
- * @param {string} params.name - Key name. Max length: 128 chars.
1804
- * @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
1805
- * @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
1806
- * @throws {AppwriteException}
1807
- * @returns {Promise<Models.Key>}
1808
- */
1809
- updateKey(params: { organizationId: string, keyId: string, name: string, scopes: Scopes[], expire?: string }): Promise<Models.Key>;
1810
- /**
1811
- * Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
1812
- *
1813
- * @param {string} organizationId - Organization Unique ID
1814
- * @param {string} keyId - Key unique ID.
1815
- * @param {string} name - Key name. Max length: 128 chars.
1816
- * @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
1817
- * @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
1818
- * @throws {AppwriteException}
1819
- * @returns {Promise<Models.Key>}
1820
- * @deprecated Use the object parameter style method for a better developer experience.
1821
- */
1822
- updateKey(organizationId: string, keyId: string, name: string, scopes: Scopes[], expire?: string): Promise<Models.Key>;
1823
- updateKey(
1824
- paramsOrFirst: { organizationId: string, keyId: string, name: string, scopes: Scopes[], expire?: string } | string,
1825
- ...rest: [(string)?, (string)?, (Scopes[])?, (string)?]
1826
- ): Promise<Models.Key> {
1827
- let params: { organizationId: string, keyId: string, name: string, scopes: Scopes[], expire?: string };
1828
-
1829
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1830
- params = (paramsOrFirst || {}) as { organizationId: string, keyId: string, name: string, scopes: Scopes[], expire?: string };
1831
- } else {
1832
- params = {
1833
- organizationId: paramsOrFirst as string,
1834
- keyId: rest[0] as string,
1835
- name: rest[1] as string,
1836
- scopes: rest[2] as Scopes[],
1837
- expire: rest[3] as string
1838
- };
1839
- }
1840
-
1841
- const organizationId = params.organizationId;
1842
- const keyId = params.keyId;
1843
- const name = params.name;
1844
- const scopes = params.scopes;
1845
- const expire = params.expire;
1846
-
1847
- if (typeof organizationId === 'undefined') {
1848
- throw new AppwriteException('Missing required parameter: "organizationId"');
1849
- }
1850
- if (typeof keyId === 'undefined') {
1851
- throw new AppwriteException('Missing required parameter: "keyId"');
1852
- }
1853
- if (typeof name === 'undefined') {
1854
- throw new AppwriteException('Missing required parameter: "name"');
1855
- }
1856
- if (typeof scopes === 'undefined') {
1857
- throw new AppwriteException('Missing required parameter: "scopes"');
1858
- }
1859
-
1860
- const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
1861
- const payload: Payload = {};
1862
- if (typeof name !== 'undefined') {
1863
- payload['name'] = name;
1864
- }
1865
- if (typeof scopes !== 'undefined') {
1866
- payload['scopes'] = scopes;
1867
- }
1868
- if (typeof expire !== 'undefined') {
1869
- payload['expire'] = expire;
1870
- }
1871
- const uri = new URL(this.client.config.endpoint + apiPath);
1872
-
1873
- const apiHeaders: { [header: string]: string } = {
1874
- 'content-type': 'application/json',
1875
- }
1876
-
1877
- return this.client.call(
1878
- 'put',
1879
- uri,
1880
- apiHeaders,
1881
- payload
1882
- );
1883
- }
1884
-
1885
- /**
1886
- * Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
1887
- *
1888
- * @param {string} params.organizationId - Organization Unique ID
1889
- * @param {string} params.keyId - Key unique ID.
1890
- * @throws {AppwriteException}
1891
- * @returns {Promise<{}>}
1892
- */
1893
- deleteKey(params: { organizationId: string, keyId: string }): Promise<{}>;
1894
- /**
1895
- * Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
1896
- *
1897
- * @param {string} organizationId - Organization Unique ID
1898
- * @param {string} keyId - Key unique ID.
1899
- * @throws {AppwriteException}
1900
- * @returns {Promise<{}>}
1901
- * @deprecated Use the object parameter style method for a better developer experience.
1902
- */
1903
- deleteKey(organizationId: string, keyId: string): Promise<{}>;
1904
- deleteKey(
1905
- paramsOrFirst: { organizationId: string, keyId: string } | string,
1906
- ...rest: [(string)?]
1907
- ): Promise<{}> {
1908
- let params: { organizationId: string, keyId: string };
1909
-
1910
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1911
- params = (paramsOrFirst || {}) as { organizationId: string, keyId: string };
1912
- } else {
1913
- params = {
1914
- organizationId: paramsOrFirst as string,
1915
- keyId: rest[0] as string
1916
- };
1917
- }
1918
-
1919
- const organizationId = params.organizationId;
1920
- const keyId = params.keyId;
1921
-
1922
- if (typeof organizationId === 'undefined') {
1923
- throw new AppwriteException('Missing required parameter: "organizationId"');
1924
- }
1925
- if (typeof keyId === 'undefined') {
1926
- throw new AppwriteException('Missing required parameter: "keyId"');
1927
- }
1928
-
1929
- const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
1930
- const payload: Payload = {};
1931
- const uri = new URL(this.client.config.endpoint + apiPath);
1932
-
1933
- const apiHeaders: { [header: string]: string } = {
1934
- 'content-type': 'application/json',
1935
- }
1936
-
1937
- return this.client.call(
1938
- 'delete',
1939
- uri,
1940
- apiHeaders,
1941
- payload
1942
- );
1943
- }
1944
-
1945
- /**
1946
- * Set a organization's default payment method.
1947
- *
1948
- * @param {string} params.organizationId - Organization ID
1949
- * @param {string} params.paymentMethodId - Unique ID of payment method
1950
- * @throws {AppwriteException}
1951
- * @returns {Promise<Models.Organization<Preferences>>}
1952
- */
1953
- setDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, paymentMethodId: string }): Promise<Models.Organization<Preferences>>;
1954
- /**
1955
- * Set a organization's default payment method.
1956
- *
1957
- * @param {string} organizationId - Organization ID
1958
- * @param {string} paymentMethodId - Unique ID of payment method
1959
- * @throws {AppwriteException}
1960
- * @returns {Promise<Models.Organization<Preferences>>}
1961
- * @deprecated Use the object parameter style method for a better developer experience.
1962
- */
1963
- setDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, paymentMethodId: string): Promise<Models.Organization<Preferences>>;
1964
- setDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(
1965
- paramsOrFirst: { organizationId: string, paymentMethodId: string } | string,
1966
- ...rest: [(string)?]
1967
- ): Promise<Models.Organization<Preferences>> {
1968
- let params: { organizationId: string, paymentMethodId: string };
1969
-
1970
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1971
- params = (paramsOrFirst || {}) as { organizationId: string, paymentMethodId: string };
1972
- } else {
1973
- params = {
1974
- organizationId: paramsOrFirst as string,
1975
- paymentMethodId: rest[0] as string
1976
- };
1977
- }
1978
-
1979
- const organizationId = params.organizationId;
1980
- const paymentMethodId = params.paymentMethodId;
1981
-
1982
- if (typeof organizationId === 'undefined') {
1983
- throw new AppwriteException('Missing required parameter: "organizationId"');
1984
- }
1985
- if (typeof paymentMethodId === 'undefined') {
1986
- throw new AppwriteException('Missing required parameter: "paymentMethodId"');
1987
- }
1988
-
1989
- const apiPath = '/organizations/{organizationId}/payment-method'.replace('{organizationId}', organizationId);
1990
- const payload: Payload = {};
1991
- if (typeof paymentMethodId !== 'undefined') {
1992
- payload['paymentMethodId'] = paymentMethodId;
1993
- }
1994
- const uri = new URL(this.client.config.endpoint + apiPath);
1995
-
1996
- const apiHeaders: { [header: string]: string } = {
1997
- 'content-type': 'application/json',
1998
- }
1999
-
2000
- return this.client.call(
2001
- 'patch',
2002
- uri,
2003
- apiHeaders,
2004
- payload
2005
- );
2006
- }
2007
-
2008
- /**
2009
- * Delete the default payment method for an organization.
2010
- *
2011
- * @param {string} params.organizationId - Organization ID
2012
- * @throws {AppwriteException}
2013
- * @returns {Promise<Models.Organization<Preferences>>}
2014
- */
2015
- deleteDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string }): Promise<Models.Organization<Preferences>>;
2016
- /**
2017
- * Delete the default payment method for an organization.
2018
- *
2019
- * @param {string} organizationId - Organization ID
2020
- * @throws {AppwriteException}
2021
- * @returns {Promise<Models.Organization<Preferences>>}
2022
- * @deprecated Use the object parameter style method for a better developer experience.
2023
- */
2024
- deleteDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string): Promise<Models.Organization<Preferences>>;
2025
- deleteDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(
2026
- paramsOrFirst: { organizationId: string } | string
2027
- ): Promise<Models.Organization<Preferences>> {
2028
- let params: { organizationId: string };
2029
-
2030
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2031
- params = (paramsOrFirst || {}) as { organizationId: string };
2032
- } else {
2033
- params = {
2034
- organizationId: paramsOrFirst as string
2035
- };
2036
- }
2037
-
2038
- const organizationId = params.organizationId;
2039
-
2040
- if (typeof organizationId === 'undefined') {
2041
- throw new AppwriteException('Missing required parameter: "organizationId"');
2042
- }
2043
-
2044
- const apiPath = '/organizations/{organizationId}/payment-method'.replace('{organizationId}', organizationId);
2045
- const payload: Payload = {};
2046
- const uri = new URL(this.client.config.endpoint + apiPath);
2047
-
2048
- const apiHeaders: { [header: string]: string } = {
2049
- 'content-type': 'application/json',
2050
- }
2051
-
2052
- return this.client.call(
2053
- 'delete',
2054
- uri,
2055
- apiHeaders,
2056
- payload
2057
- );
2058
- }
2059
-
2060
- /**
2061
- * Set an organization's backup payment method.
2062
- *
2063
- *
2064
- * @param {string} params.organizationId - Organization ID
2065
- * @param {string} params.paymentMethodId - Unique ID of payment method
2066
- * @throws {AppwriteException}
2067
- * @returns {Promise<Models.Organization<Preferences>>}
2068
- */
2069
- setBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, paymentMethodId: string }): Promise<Models.Organization<Preferences>>;
2070
- /**
2071
- * Set an organization's backup payment method.
2072
- *
2073
- *
2074
- * @param {string} organizationId - Organization ID
2075
- * @param {string} paymentMethodId - Unique ID of payment method
2076
- * @throws {AppwriteException}
2077
- * @returns {Promise<Models.Organization<Preferences>>}
2078
- * @deprecated Use the object parameter style method for a better developer experience.
2079
- */
2080
- setBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, paymentMethodId: string): Promise<Models.Organization<Preferences>>;
2081
- setBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(
2082
- paramsOrFirst: { organizationId: string, paymentMethodId: string } | string,
2083
- ...rest: [(string)?]
2084
- ): Promise<Models.Organization<Preferences>> {
2085
- let params: { organizationId: string, paymentMethodId: string };
2086
-
2087
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2088
- params = (paramsOrFirst || {}) as { organizationId: string, paymentMethodId: string };
2089
- } else {
2090
- params = {
2091
- organizationId: paramsOrFirst as string,
2092
- paymentMethodId: rest[0] as string
2093
- };
2094
- }
2095
-
2096
- const organizationId = params.organizationId;
2097
- const paymentMethodId = params.paymentMethodId;
2098
-
2099
- if (typeof organizationId === 'undefined') {
2100
- throw new AppwriteException('Missing required parameter: "organizationId"');
2101
- }
2102
- if (typeof paymentMethodId === 'undefined') {
2103
- throw new AppwriteException('Missing required parameter: "paymentMethodId"');
2104
- }
2105
-
2106
- const apiPath = '/organizations/{organizationId}/payment-method/backup'.replace('{organizationId}', organizationId);
2107
- const payload: Payload = {};
2108
- if (typeof paymentMethodId !== 'undefined') {
2109
- payload['paymentMethodId'] = paymentMethodId;
2110
- }
2111
- const uri = new URL(this.client.config.endpoint + apiPath);
2112
-
2113
- const apiHeaders: { [header: string]: string } = {
2114
- 'content-type': 'application/json',
2115
- }
2116
-
2117
- return this.client.call(
2118
- 'patch',
2119
- uri,
2120
- apiHeaders,
2121
- payload
2122
- );
2123
- }
2124
-
2125
- /**
2126
- * Delete a backup payment method for an organization.
2127
- *
2128
- * @param {string} params.organizationId - Organization ID
2129
- * @throws {AppwriteException}
2130
- * @returns {Promise<Models.Organization<Preferences>>}
2131
- */
2132
- deleteBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string }): Promise<Models.Organization<Preferences>>;
2133
- /**
2134
- * Delete a backup payment method for an organization.
2135
- *
2136
- * @param {string} organizationId - Organization ID
2137
- * @throws {AppwriteException}
2138
- * @returns {Promise<Models.Organization<Preferences>>}
2139
- * @deprecated Use the object parameter style method for a better developer experience.
2140
- */
2141
- deleteBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string): Promise<Models.Organization<Preferences>>;
2142
- deleteBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(
2143
- paramsOrFirst: { organizationId: string } | string
2144
- ): Promise<Models.Organization<Preferences>> {
2145
- let params: { organizationId: string };
2146
-
2147
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2148
- params = (paramsOrFirst || {}) as { organizationId: string };
2149
- } else {
2150
- params = {
2151
- organizationId: paramsOrFirst as string
2152
- };
2153
- }
2154
-
2155
- const organizationId = params.organizationId;
2156
-
2157
- if (typeof organizationId === 'undefined') {
2158
- throw new AppwriteException('Missing required parameter: "organizationId"');
2159
- }
2160
-
2161
- const apiPath = '/organizations/{organizationId}/payment-method/backup'.replace('{organizationId}', organizationId);
2162
- const payload: Payload = {};
2163
- const uri = new URL(this.client.config.endpoint + apiPath);
2164
-
2165
- const apiHeaders: { [header: string]: string } = {
2166
- 'content-type': 'application/json',
2167
- }
2168
-
2169
- return this.client.call(
2170
- 'delete',
2171
- uri,
2172
- apiHeaders,
2173
- payload
2174
- );
2175
- }
2176
-
2177
- /**
2178
- * Get an organization's payment method using it's payment method ID.
2179
- *
2180
- * @param {string} params.organizationId - Organization ID
2181
- * @param {string} params.paymentMethodId - Unique ID of payment method
2182
- * @throws {AppwriteException}
2183
- * @returns {Promise<Models.PaymentMethod>}
2184
- */
2185
- getPaymentMethod(params: { organizationId: string, paymentMethodId: string }): Promise<Models.PaymentMethod>;
2186
- /**
2187
- * Get an organization's payment method using it's payment method ID.
2188
- *
2189
- * @param {string} organizationId - Organization ID
2190
- * @param {string} paymentMethodId - Unique ID of payment method
2191
- * @throws {AppwriteException}
2192
- * @returns {Promise<Models.PaymentMethod>}
2193
- * @deprecated Use the object parameter style method for a better developer experience.
2194
- */
2195
- getPaymentMethod(organizationId: string, paymentMethodId: string): Promise<Models.PaymentMethod>;
2196
- getPaymentMethod(
2197
- paramsOrFirst: { organizationId: string, paymentMethodId: string } | string,
2198
- ...rest: [(string)?]
2199
- ): Promise<Models.PaymentMethod> {
2200
- let params: { organizationId: string, paymentMethodId: string };
2201
-
2202
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2203
- params = (paramsOrFirst || {}) as { organizationId: string, paymentMethodId: string };
2204
- } else {
2205
- params = {
2206
- organizationId: paramsOrFirst as string,
2207
- paymentMethodId: rest[0] as string
2208
- };
2209
- }
2210
-
2211
- const organizationId = params.organizationId;
2212
- const paymentMethodId = params.paymentMethodId;
2213
-
2214
- if (typeof organizationId === 'undefined') {
2215
- throw new AppwriteException('Missing required parameter: "organizationId"');
2216
- }
2217
- if (typeof paymentMethodId === 'undefined') {
2218
- throw new AppwriteException('Missing required parameter: "paymentMethodId"');
2219
- }
2220
-
2221
- const apiPath = '/organizations/{organizationId}/payment-methods/{paymentMethodId}'.replace('{organizationId}', organizationId).replace('{paymentMethodId}', paymentMethodId);
2222
- const payload: Payload = {};
2223
- const uri = new URL(this.client.config.endpoint + apiPath);
2224
-
2225
- const apiHeaders: { [header: string]: string } = {
2226
- }
2227
-
2228
- return this.client.call(
2229
- 'get',
2230
- uri,
2231
- apiHeaders,
2232
- payload
2233
- );
2234
- }
2235
-
2236
- /**
2237
- * Get the details of the current billing plan for an organization.
2238
- *
2239
- * @param {string} params.organizationId - Organization Unique ID
2240
- * @throws {AppwriteException}
2241
- * @returns {Promise<Models.BillingPlan>}
2242
- */
2243
- getPlan(params: { organizationId: string }): Promise<Models.BillingPlan>;
2244
- /**
2245
- * Get the details of the current billing plan for an organization.
2246
- *
2247
- * @param {string} organizationId - Organization Unique ID
2248
- * @throws {AppwriteException}
2249
- * @returns {Promise<Models.BillingPlan>}
2250
- * @deprecated Use the object parameter style method for a better developer experience.
2251
- */
2252
- getPlan(organizationId: string): Promise<Models.BillingPlan>;
2253
- getPlan(
2254
- paramsOrFirst: { organizationId: string } | string
2255
- ): Promise<Models.BillingPlan> {
2256
- let params: { organizationId: string };
2257
-
2258
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2259
- params = (paramsOrFirst || {}) as { organizationId: string };
2260
- } else {
2261
- params = {
2262
- organizationId: paramsOrFirst as string
2263
- };
2264
- }
2265
-
2266
- const organizationId = params.organizationId;
2267
-
2268
- if (typeof organizationId === 'undefined') {
2269
- throw new AppwriteException('Missing required parameter: "organizationId"');
2270
- }
2271
-
2272
- const apiPath = '/organizations/{organizationId}/plan'.replace('{organizationId}', organizationId);
2273
- const payload: Payload = {};
2274
- const uri = new URL(this.client.config.endpoint + apiPath);
2275
-
2276
- const apiHeaders: { [header: string]: string } = {
2277
- }
2278
-
2279
- return this.client.call(
2280
- 'get',
2281
- uri,
2282
- apiHeaders,
2283
- payload
2284
- );
2285
- }
2286
-
2287
- /**
2288
- * Update the billing plan for an organization.
2289
- *
2290
- * @param {string} params.organizationId - Organization Unique ID
2291
- * @param {string} params.billingPlan - Organization billing plan chosen
2292
- * @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
2293
- * @param {string} params.billingAddressId - Unique ID of billing address
2294
- * @param {string[]} params.invites - Additional member invites
2295
- * @param {string} params.couponId - Coupon id
2296
- * @param {string} params.taxId - Tax Id associated to billing.
2297
- * @param {number} params.budget - Budget limit for additional usage set for the organization
2298
- * @throws {AppwriteException}
2299
- * @returns {Promise<Models.Organization<Preferences>>}
2300
- */
2301
- updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number }): Promise<Models.Organization<Preferences>>;
2302
- /**
2303
- * Update the billing plan for an organization.
2304
- *
2305
- * @param {string} organizationId - Organization Unique ID
2306
- * @param {string} billingPlan - Organization billing plan chosen
2307
- * @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
2308
- * @param {string} billingAddressId - Unique ID of billing address
2309
- * @param {string[]} invites - Additional member invites
2310
- * @param {string} couponId - Coupon id
2311
- * @param {string} taxId - Tax Id associated to billing.
2312
- * @param {number} budget - Budget limit for additional usage set for the organization
2313
- * @throws {AppwriteException}
2314
- * @returns {Promise<Models.Organization<Preferences>>}
2315
- * @deprecated Use the object parameter style method for a better developer experience.
2316
- */
2317
- updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number): Promise<Models.Organization<Preferences>>;
2318
- updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(
2319
- paramsOrFirst: { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number } | string,
2320
- ...rest: [(string)?, (string)?, (string)?, (string[])?, (string)?, (string)?, (number)?]
2321
- ): Promise<Models.Organization<Preferences>> {
2322
- let params: { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number };
2323
-
2324
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2325
- params = (paramsOrFirst || {}) as { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number };
2326
- } else {
2327
- params = {
2328
- organizationId: paramsOrFirst as string,
2329
- billingPlan: rest[0] as string,
2330
- paymentMethodId: rest[1] as string,
2331
- billingAddressId: rest[2] as string,
2332
- invites: rest[3] as string[],
2333
- couponId: rest[4] as string,
2334
- taxId: rest[5] as string,
2335
- budget: rest[6] as number
2336
- };
2337
- }
2338
-
2339
- const organizationId = params.organizationId;
2340
- const billingPlan = params.billingPlan;
2341
- const paymentMethodId = params.paymentMethodId;
2342
- const billingAddressId = params.billingAddressId;
2343
- const invites = params.invites;
2344
- const couponId = params.couponId;
2345
- const taxId = params.taxId;
2346
- const budget = params.budget;
2347
-
2348
- if (typeof organizationId === 'undefined') {
2349
- throw new AppwriteException('Missing required parameter: "organizationId"');
2350
- }
2351
- if (typeof billingPlan === 'undefined') {
2352
- throw new AppwriteException('Missing required parameter: "billingPlan"');
2353
- }
2354
-
2355
- const apiPath = '/organizations/{organizationId}/plan'.replace('{organizationId}', organizationId);
2356
- const payload: Payload = {};
2357
- if (typeof billingPlan !== 'undefined') {
2358
- payload['billingPlan'] = billingPlan;
2359
- }
2360
- if (typeof paymentMethodId !== 'undefined') {
2361
- payload['paymentMethodId'] = paymentMethodId;
2362
- }
2363
- if (typeof billingAddressId !== 'undefined') {
2364
- payload['billingAddressId'] = billingAddressId;
2365
- }
2366
- if (typeof invites !== 'undefined') {
2367
- payload['invites'] = invites;
2368
- }
2369
- if (typeof couponId !== 'undefined') {
2370
- payload['couponId'] = couponId;
2371
- }
2372
- if (typeof taxId !== 'undefined') {
2373
- payload['taxId'] = taxId;
2374
- }
2375
- if (typeof budget !== 'undefined') {
2376
- payload['budget'] = budget;
2377
- }
2378
- const uri = new URL(this.client.config.endpoint + apiPath);
2379
-
2380
- const apiHeaders: { [header: string]: string } = {
2381
- 'content-type': 'application/json',
2382
- }
2383
-
2384
- return this.client.call(
2385
- 'patch',
2386
- uri,
2387
- apiHeaders,
2388
- payload
2389
- );
2390
- }
2391
-
2392
- /**
2393
- * Cancel the downgrade initiated for an organization.
2394
- *
2395
- * @param {string} params.organizationId - Organization Unique ID
2396
- * @throws {AppwriteException}
2397
- * @returns {Promise<Models.Organization<Preferences>>}
2398
- */
2399
- cancelDowngrade<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string }): Promise<Models.Organization<Preferences>>;
2400
- /**
2401
- * Cancel the downgrade initiated for an organization.
2402
- *
2403
- * @param {string} organizationId - Organization Unique ID
2404
- * @throws {AppwriteException}
2405
- * @returns {Promise<Models.Organization<Preferences>>}
2406
- * @deprecated Use the object parameter style method for a better developer experience.
2407
- */
2408
- cancelDowngrade<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string): Promise<Models.Organization<Preferences>>;
2409
- cancelDowngrade<Preferences extends Models.Preferences = Models.DefaultPreferences>(
2410
- paramsOrFirst: { organizationId: string } | string
2411
- ): Promise<Models.Organization<Preferences>> {
2412
- let params: { organizationId: string };
2413
-
2414
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2415
- params = (paramsOrFirst || {}) as { organizationId: string };
2416
- } else {
2417
- params = {
2418
- organizationId: paramsOrFirst as string
2419
- };
2420
- }
2421
-
2422
- const organizationId = params.organizationId;
2423
-
2424
- if (typeof organizationId === 'undefined') {
2425
- throw new AppwriteException('Missing required parameter: "organizationId"');
2426
- }
2427
-
2428
- const apiPath = '/organizations/{organizationId}/plan/cancel'.replace('{organizationId}', organizationId);
2429
- const payload: Payload = {};
2430
- const uri = new URL(this.client.config.endpoint + apiPath);
2431
-
2432
- const apiHeaders: { [header: string]: string } = {
2433
- 'content-type': 'application/json',
2434
- }
2435
-
2436
- return this.client.call(
2437
- 'patch',
2438
- uri,
2439
- apiHeaders,
2440
- payload
2441
- );
2442
- }
2443
-
2444
- /**
2445
- * Get all available regions for an organization.
2446
- *
2447
- * @param {string} params.organizationId - Team ID.
2448
- * @throws {AppwriteException}
2449
- * @returns {Promise<Models.ConsoleRegionList>}
2450
- */
2451
- listRegions(params: { organizationId: string }): Promise<Models.ConsoleRegionList>;
2452
- /**
2453
- * Get all available regions for an organization.
2454
- *
2455
- * @param {string} organizationId - Team ID.
2456
- * @throws {AppwriteException}
2457
- * @returns {Promise<Models.ConsoleRegionList>}
2458
- * @deprecated Use the object parameter style method for a better developer experience.
2459
- */
2460
- listRegions(organizationId: string): Promise<Models.ConsoleRegionList>;
2461
- listRegions(
2462
- paramsOrFirst: { organizationId: string } | string
2463
- ): Promise<Models.ConsoleRegionList> {
2464
- let params: { organizationId: string };
2465
-
2466
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2467
- params = (paramsOrFirst || {}) as { organizationId: string };
2468
- } else {
2469
- params = {
2470
- organizationId: paramsOrFirst as string
2471
- };
2472
- }
2473
-
2474
- const organizationId = params.organizationId;
2475
-
2476
- if (typeof organizationId === 'undefined') {
2477
- throw new AppwriteException('Missing required parameter: "organizationId"');
2478
- }
2479
-
2480
- const apiPath = '/organizations/{organizationId}/regions'.replace('{organizationId}', organizationId);
2481
- const payload: Payload = {};
2482
- const uri = new URL(this.client.config.endpoint + apiPath);
2483
-
2484
- const apiHeaders: { [header: string]: string } = {
2485
- }
2486
-
2487
- return this.client.call(
2488
- 'get',
2489
- uri,
2490
- apiHeaders,
2491
- payload
2492
- );
2493
- }
2494
-
2495
- /**
2496
- * Get Scopes
2497
- *
2498
- * @param {string} params.organizationId - Organization id
2499
- * @param {string} params.projectId - Project id
2500
- * @throws {AppwriteException}
2501
- * @returns {Promise<Models.Roles>}
2502
- */
2503
- getScopes(params: { organizationId: string, projectId?: string }): Promise<Models.Roles>;
2504
- /**
2505
- * Get Scopes
2506
- *
2507
- * @param {string} organizationId - Organization id
2508
- * @param {string} projectId - Project id
2509
- * @throws {AppwriteException}
2510
- * @returns {Promise<Models.Roles>}
2511
- * @deprecated Use the object parameter style method for a better developer experience.
2512
- */
2513
- getScopes(organizationId: string, projectId?: string): Promise<Models.Roles>;
2514
- getScopes(
2515
- paramsOrFirst: { organizationId: string, projectId?: string } | string,
2516
- ...rest: [(string)?]
2517
- ): Promise<Models.Roles> {
2518
- let params: { organizationId: string, projectId?: string };
2519
-
2520
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2521
- params = (paramsOrFirst || {}) as { organizationId: string, projectId?: string };
2522
- } else {
2523
- params = {
2524
- organizationId: paramsOrFirst as string,
2525
- projectId: rest[0] as string
2526
- };
2527
- }
2528
-
2529
- const organizationId = params.organizationId;
2530
- const projectId = params.projectId;
2531
-
2532
- if (typeof organizationId === 'undefined') {
2533
- throw new AppwriteException('Missing required parameter: "organizationId"');
2534
- }
2535
-
2536
- const apiPath = '/organizations/{organizationId}/roles'.replace('{organizationId}', organizationId);
2537
- const payload: Payload = {};
2538
- if (typeof projectId !== 'undefined') {
2539
- payload['projectId'] = projectId;
2540
- }
2541
- const uri = new URL(this.client.config.endpoint + apiPath);
2542
-
2543
- const apiHeaders: { [header: string]: string } = {
2544
- }
2545
-
2546
- return this.client.call(
2547
- 'get',
2548
- uri,
2549
- apiHeaders,
2550
- payload
2551
- );
2552
- }
2553
-
2554
- /**
2555
- * Set an organization's billing tax ID.
2556
- *
2557
- * @param {string} params.organizationId - Organization ID
2558
- * @param {string} params.taxId - Tax Id associated to billing.
2559
- * @throws {AppwriteException}
2560
- * @returns {Promise<Models.Organization<Preferences>>}
2561
- */
2562
- setBillingTaxId<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, taxId: string }): Promise<Models.Organization<Preferences>>;
2563
- /**
2564
- * Set an organization's billing tax ID.
2565
- *
2566
- * @param {string} organizationId - Organization ID
2567
- * @param {string} taxId - Tax Id associated to billing.
2568
- * @throws {AppwriteException}
2569
- * @returns {Promise<Models.Organization<Preferences>>}
2570
- * @deprecated Use the object parameter style method for a better developer experience.
2571
- */
2572
- setBillingTaxId<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, taxId: string): Promise<Models.Organization<Preferences>>;
2573
- setBillingTaxId<Preferences extends Models.Preferences = Models.DefaultPreferences>(
2574
- paramsOrFirst: { organizationId: string, taxId: string } | string,
2575
- ...rest: [(string)?]
2576
- ): Promise<Models.Organization<Preferences>> {
2577
- let params: { organizationId: string, taxId: string };
2578
-
2579
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2580
- params = (paramsOrFirst || {}) as { organizationId: string, taxId: string };
2581
- } else {
2582
- params = {
2583
- organizationId: paramsOrFirst as string,
2584
- taxId: rest[0] as string
2585
- };
2586
- }
2587
-
2588
- const organizationId = params.organizationId;
2589
- const taxId = params.taxId;
2590
-
2591
- if (typeof organizationId === 'undefined') {
2592
- throw new AppwriteException('Missing required parameter: "organizationId"');
2593
- }
2594
- if (typeof taxId === 'undefined') {
2595
- throw new AppwriteException('Missing required parameter: "taxId"');
2596
- }
2597
-
2598
- const apiPath = '/organizations/{organizationId}/taxId'.replace('{organizationId}', organizationId);
2599
- const payload: Payload = {};
2600
- if (typeof taxId !== 'undefined') {
2601
- payload['taxId'] = taxId;
2602
- }
2603
- const uri = new URL(this.client.config.endpoint + apiPath);
2604
-
2605
- const apiHeaders: { [header: string]: string } = {
2606
- 'content-type': 'application/json',
2607
- }
2608
-
2609
- return this.client.call(
2610
- 'patch',
2611
- uri,
2612
- apiHeaders,
2613
- payload
2614
- );
2615
- }
2616
-
2617
- /**
2618
- * Get the usage data for an organization.
2619
- *
2620
- * @param {string} params.organizationId - Organization ID
2621
- * @param {string} params.startDate - Starting date for the usage
2622
- * @param {string} params.endDate - End date for the usage
2623
- * @throws {AppwriteException}
2624
- * @returns {Promise<Models.UsageOrganization>}
2625
- */
2626
- getUsage(params: { organizationId: string, startDate?: string, endDate?: string }): Promise<Models.UsageOrganization>;
2627
- /**
2628
- * Get the usage data for an organization.
2629
- *
2630
- * @param {string} organizationId - Organization ID
2631
- * @param {string} startDate - Starting date for the usage
2632
- * @param {string} endDate - End date for the usage
2633
- * @throws {AppwriteException}
2634
- * @returns {Promise<Models.UsageOrganization>}
2635
- * @deprecated Use the object parameter style method for a better developer experience.
2636
- */
2637
- getUsage(organizationId: string, startDate?: string, endDate?: string): Promise<Models.UsageOrganization>;
2638
- getUsage(
2639
- paramsOrFirst: { organizationId: string, startDate?: string, endDate?: string } | string,
2640
- ...rest: [(string)?, (string)?]
2641
- ): Promise<Models.UsageOrganization> {
2642
- let params: { organizationId: string, startDate?: string, endDate?: string };
2643
-
2644
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2645
- params = (paramsOrFirst || {}) as { organizationId: string, startDate?: string, endDate?: string };
2646
- } else {
2647
- params = {
2648
- organizationId: paramsOrFirst as string,
2649
- startDate: rest[0] as string,
2650
- endDate: rest[1] as string
2651
- };
2652
- }
2653
-
2654
- const organizationId = params.organizationId;
2655
- const startDate = params.startDate;
2656
- const endDate = params.endDate;
2657
-
2658
- if (typeof organizationId === 'undefined') {
2659
- throw new AppwriteException('Missing required parameter: "organizationId"');
2660
- }
2661
-
2662
- const apiPath = '/organizations/{organizationId}/usage'.replace('{organizationId}', organizationId);
2663
- const payload: Payload = {};
2664
- if (typeof startDate !== 'undefined') {
2665
- payload['startDate'] = startDate;
2666
- }
2667
- if (typeof endDate !== 'undefined') {
2668
- payload['endDate'] = endDate;
2669
- }
2670
- const uri = new URL(this.client.config.endpoint + apiPath);
2671
-
2672
- const apiHeaders: { [header: string]: string } = {
2673
- }
2674
-
2675
- return this.client.call(
2676
- 'get',
2677
- uri,
2678
- apiHeaders,
2679
- payload
2680
- );
2681
- }
2682
-
2683
- /**
2684
- * Validate payment for team after creation or upgrade.
2685
- *
2686
- * @param {string} params.organizationId - Organization ID
2687
- * @param {string[]} params.invites - Additional member invites
2688
- * @throws {AppwriteException}
2689
- * @returns {Promise<Models.Organization<Preferences>>}
2690
- */
2691
- validatePayment<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, invites?: string[] }): Promise<Models.Organization<Preferences>>;
2692
- /**
2693
- * Validate payment for team after creation or upgrade.
2694
- *
2695
- * @param {string} organizationId - Organization ID
2696
- * @param {string[]} invites - Additional member invites
2697
- * @throws {AppwriteException}
2698
- * @returns {Promise<Models.Organization<Preferences>>}
2699
- * @deprecated Use the object parameter style method for a better developer experience.
2700
- */
2701
- validatePayment<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, invites?: string[]): Promise<Models.Organization<Preferences>>;
2702
- validatePayment<Preferences extends Models.Preferences = Models.DefaultPreferences>(
2703
- paramsOrFirst: { organizationId: string, invites?: string[] } | string,
2704
- ...rest: [(string[])?]
2705
- ): Promise<Models.Organization<Preferences>> {
2706
- let params: { organizationId: string, invites?: string[] };
2707
-
2708
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2709
- params = (paramsOrFirst || {}) as { organizationId: string, invites?: string[] };
2710
- } else {
2711
- params = {
2712
- organizationId: paramsOrFirst as string,
2713
- invites: rest[0] as string[]
2714
- };
2715
- }
2716
-
2717
- const organizationId = params.organizationId;
2718
- const invites = params.invites;
2719
-
2720
- if (typeof organizationId === 'undefined') {
2721
- throw new AppwriteException('Missing required parameter: "organizationId"');
2722
- }
2723
-
2724
- const apiPath = '/organizations/{organizationId}/validate'.replace('{organizationId}', organizationId);
2725
- const payload: Payload = {};
2726
- if (typeof invites !== 'undefined') {
2727
- payload['invites'] = invites;
2728
- }
2729
- const uri = new URL(this.client.config.endpoint + apiPath);
2730
-
2731
- const apiHeaders: { [header: string]: string } = {
2732
- 'content-type': 'application/json',
2733
- }
2734
-
2735
- return this.client.call(
2736
- 'patch',
2737
- uri,
2738
- apiHeaders,
2739
- payload
2740
- );
2741
- }
2742
- }