@appconda/nextjs 1.0.12

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 (597) hide show
  1. package/.github/workflows/autoclose.yml +11 -0
  2. package/.github/workflows/publish.yml +42 -0
  3. package/.travis.yml +32 -0
  4. package/CHANGELOG.md +1 -0
  5. package/LICENSE +12 -0
  6. package/README.md +0 -0
  7. package/dist/cjs/sdk.js +10608 -0
  8. package/dist/cjs/sdk.js.map +1 -0
  9. package/dist/esm/sdk.js +10589 -0
  10. package/dist/esm/sdk.js.map +1 -0
  11. package/dist/iife/sdk.js +10609 -0
  12. package/docs/examples/account/create-anonymous-session.md +11 -0
  13. package/docs/examples/account/create-email-password-session.md +14 -0
  14. package/docs/examples/account/create-email-token.md +15 -0
  15. package/docs/examples/account/create-j-w-t.md +11 -0
  16. package/docs/examples/account/create-magic-u-r-l-token.md +16 -0
  17. package/docs/examples/account/create-mfa-authenticator.md +13 -0
  18. package/docs/examples/account/create-mfa-challenge.md +13 -0
  19. package/docs/examples/account/create-mfa-recovery-codes.md +11 -0
  20. package/docs/examples/account/create-o-auth2session.md +15 -0
  21. package/docs/examples/account/create-o-auth2token.md +15 -0
  22. package/docs/examples/account/create-phone-token.md +14 -0
  23. package/docs/examples/account/create-phone-verification.md +11 -0
  24. package/docs/examples/account/create-push-target.md +15 -0
  25. package/docs/examples/account/create-recovery.md +14 -0
  26. package/docs/examples/account/create-session.md +14 -0
  27. package/docs/examples/account/create-verification.md +13 -0
  28. package/docs/examples/account/create.md +16 -0
  29. package/docs/examples/account/delete-identity.md +13 -0
  30. package/docs/examples/account/delete-mfa-authenticator.md +13 -0
  31. package/docs/examples/account/delete-push-target.md +13 -0
  32. package/docs/examples/account/delete-session.md +13 -0
  33. package/docs/examples/account/delete-sessions.md +11 -0
  34. package/docs/examples/account/delete.md +11 -0
  35. package/docs/examples/account/get-mfa-recovery-codes.md +11 -0
  36. package/docs/examples/account/get-prefs.md +11 -0
  37. package/docs/examples/account/get-session.md +13 -0
  38. package/docs/examples/account/get.md +11 -0
  39. package/docs/examples/account/list-identities.md +13 -0
  40. package/docs/examples/account/list-logs.md +13 -0
  41. package/docs/examples/account/list-mfa-factors.md +11 -0
  42. package/docs/examples/account/list-sessions.md +11 -0
  43. package/docs/examples/account/update-email.md +14 -0
  44. package/docs/examples/account/update-m-f-a.md +13 -0
  45. package/docs/examples/account/update-magic-u-r-l-session.md +14 -0
  46. package/docs/examples/account/update-mfa-authenticator.md +14 -0
  47. package/docs/examples/account/update-mfa-challenge.md +14 -0
  48. package/docs/examples/account/update-mfa-recovery-codes.md +11 -0
  49. package/docs/examples/account/update-name.md +13 -0
  50. package/docs/examples/account/update-password.md +14 -0
  51. package/docs/examples/account/update-phone-session.md +14 -0
  52. package/docs/examples/account/update-phone-verification.md +14 -0
  53. package/docs/examples/account/update-phone.md +14 -0
  54. package/docs/examples/account/update-prefs.md +13 -0
  55. package/docs/examples/account/update-push-target.md +14 -0
  56. package/docs/examples/account/update-recovery.md +15 -0
  57. package/docs/examples/account/update-session.md +13 -0
  58. package/docs/examples/account/update-status.md +11 -0
  59. package/docs/examples/account/update-verification.md +14 -0
  60. package/docs/examples/assistant/chat.md +13 -0
  61. package/docs/examples/avatars/get-browser.md +16 -0
  62. package/docs/examples/avatars/get-credit-card.md +16 -0
  63. package/docs/examples/avatars/get-favicon.md +13 -0
  64. package/docs/examples/avatars/get-flag.md +16 -0
  65. package/docs/examples/avatars/get-image.md +15 -0
  66. package/docs/examples/avatars/get-initials.md +16 -0
  67. package/docs/examples/avatars/get-q-r.md +16 -0
  68. package/docs/examples/console/variables.md +11 -0
  69. package/docs/examples/databases/create-boolean-attribute.md +18 -0
  70. package/docs/examples/databases/create-collection.md +18 -0
  71. package/docs/examples/databases/create-datetime-attribute.md +18 -0
  72. package/docs/examples/databases/create-document.md +17 -0
  73. package/docs/examples/databases/create-email-attribute.md +18 -0
  74. package/docs/examples/databases/create-enum-attribute.md +19 -0
  75. package/docs/examples/databases/create-float-attribute.md +20 -0
  76. package/docs/examples/databases/create-index.md +18 -0
  77. package/docs/examples/databases/create-integer-attribute.md +20 -0
  78. package/docs/examples/databases/create-ip-attribute.md +18 -0
  79. package/docs/examples/databases/create-relationship-attribute.md +20 -0
  80. package/docs/examples/databases/create-string-attribute.md +20 -0
  81. package/docs/examples/databases/create-url-attribute.md +18 -0
  82. package/docs/examples/databases/create.md +15 -0
  83. package/docs/examples/databases/delete-attribute.md +15 -0
  84. package/docs/examples/databases/delete-collection.md +14 -0
  85. package/docs/examples/databases/delete-document.md +15 -0
  86. package/docs/examples/databases/delete-index.md +15 -0
  87. package/docs/examples/databases/delete.md +13 -0
  88. package/docs/examples/databases/get-attribute.md +15 -0
  89. package/docs/examples/databases/get-collection-usage.md +15 -0
  90. package/docs/examples/databases/get-collection.md +14 -0
  91. package/docs/examples/databases/get-database-usage.md +14 -0
  92. package/docs/examples/databases/get-document.md +16 -0
  93. package/docs/examples/databases/get-index.md +15 -0
  94. package/docs/examples/databases/get-usage.md +13 -0
  95. package/docs/examples/databases/get.md +13 -0
  96. package/docs/examples/databases/list-attributes.md +15 -0
  97. package/docs/examples/databases/list-collection-logs.md +15 -0
  98. package/docs/examples/databases/list-collections.md +15 -0
  99. package/docs/examples/databases/list-document-logs.md +16 -0
  100. package/docs/examples/databases/list-documents.md +15 -0
  101. package/docs/examples/databases/list-indexes.md +15 -0
  102. package/docs/examples/databases/list-logs.md +14 -0
  103. package/docs/examples/databases/list.md +14 -0
  104. package/docs/examples/databases/update-boolean-attribute.md +17 -0
  105. package/docs/examples/databases/update-collection.md +18 -0
  106. package/docs/examples/databases/update-datetime-attribute.md +17 -0
  107. package/docs/examples/databases/update-document.md +17 -0
  108. package/docs/examples/databases/update-email-attribute.md +17 -0
  109. package/docs/examples/databases/update-enum-attribute.md +18 -0
  110. package/docs/examples/databases/update-float-attribute.md +19 -0
  111. package/docs/examples/databases/update-integer-attribute.md +19 -0
  112. package/docs/examples/databases/update-ip-attribute.md +17 -0
  113. package/docs/examples/databases/update-relationship-attribute.md +16 -0
  114. package/docs/examples/databases/update-string-attribute.md +17 -0
  115. package/docs/examples/databases/update-url-attribute.md +17 -0
  116. package/docs/examples/databases/update.md +15 -0
  117. package/docs/examples/functions/create-build.md +15 -0
  118. package/docs/examples/functions/create-deployment.md +17 -0
  119. package/docs/examples/functions/create-execution.md +19 -0
  120. package/docs/examples/functions/create-variable.md +15 -0
  121. package/docs/examples/functions/create.md +34 -0
  122. package/docs/examples/functions/delete-deployment.md +14 -0
  123. package/docs/examples/functions/delete-execution.md +14 -0
  124. package/docs/examples/functions/delete-variable.md +14 -0
  125. package/docs/examples/functions/delete.md +13 -0
  126. package/docs/examples/functions/get-deployment-download.md +14 -0
  127. package/docs/examples/functions/get-deployment.md +14 -0
  128. package/docs/examples/functions/get-execution.md +14 -0
  129. package/docs/examples/functions/get-function-usage.md +14 -0
  130. package/docs/examples/functions/get-template.md +13 -0
  131. package/docs/examples/functions/get-usage.md +13 -0
  132. package/docs/examples/functions/get-variable.md +14 -0
  133. package/docs/examples/functions/get.md +13 -0
  134. package/docs/examples/functions/list-deployments.md +15 -0
  135. package/docs/examples/functions/list-executions.md +15 -0
  136. package/docs/examples/functions/list-runtimes.md +11 -0
  137. package/docs/examples/functions/list-specifications.md +11 -0
  138. package/docs/examples/functions/list-templates.md +16 -0
  139. package/docs/examples/functions/list-variables.md +13 -0
  140. package/docs/examples/functions/list.md +14 -0
  141. package/docs/examples/functions/update-deployment-build.md +14 -0
  142. package/docs/examples/functions/update-deployment.md +14 -0
  143. package/docs/examples/functions/update-variable.md +16 -0
  144. package/docs/examples/functions/update.md +30 -0
  145. package/docs/examples/graphql/mutation.md +13 -0
  146. package/docs/examples/graphql/query.md +13 -0
  147. package/docs/examples/health/get-antivirus.md +11 -0
  148. package/docs/examples/health/get-cache.md +11 -0
  149. package/docs/examples/health/get-certificate.md +13 -0
  150. package/docs/examples/health/get-d-b.md +11 -0
  151. package/docs/examples/health/get-failed-jobs.md +14 -0
  152. package/docs/examples/health/get-pub-sub.md +11 -0
  153. package/docs/examples/health/get-queue-builds.md +13 -0
  154. package/docs/examples/health/get-queue-certificates.md +13 -0
  155. package/docs/examples/health/get-queue-databases.md +14 -0
  156. package/docs/examples/health/get-queue-deletes.md +13 -0
  157. package/docs/examples/health/get-queue-functions.md +13 -0
  158. package/docs/examples/health/get-queue-logs.md +13 -0
  159. package/docs/examples/health/get-queue-mails.md +13 -0
  160. package/docs/examples/health/get-queue-messaging.md +13 -0
  161. package/docs/examples/health/get-queue-migrations.md +13 -0
  162. package/docs/examples/health/get-queue-usage-dump.md +13 -0
  163. package/docs/examples/health/get-queue-usage.md +13 -0
  164. package/docs/examples/health/get-queue-webhooks.md +13 -0
  165. package/docs/examples/health/get-queue.md +11 -0
  166. package/docs/examples/health/get-storage-local.md +11 -0
  167. package/docs/examples/health/get-storage.md +11 -0
  168. package/docs/examples/health/get-time.md +11 -0
  169. package/docs/examples/health/get.md +11 -0
  170. package/docs/examples/locale/get.md +11 -0
  171. package/docs/examples/locale/list-codes.md +11 -0
  172. package/docs/examples/locale/list-continents.md +11 -0
  173. package/docs/examples/locale/list-countries-e-u.md +11 -0
  174. package/docs/examples/locale/list-countries-phones.md +11 -0
  175. package/docs/examples/locale/list-countries.md +11 -0
  176. package/docs/examples/locale/list-currencies.md +11 -0
  177. package/docs/examples/locale/list-languages.md +11 -0
  178. package/docs/examples/messaging/create-apns-provider.md +20 -0
  179. package/docs/examples/messaging/create-email.md +24 -0
  180. package/docs/examples/messaging/create-fcm-provider.md +16 -0
  181. package/docs/examples/messaging/create-mailgun-provider.md +22 -0
  182. package/docs/examples/messaging/create-msg91provider.md +18 -0
  183. package/docs/examples/messaging/create-push.md +28 -0
  184. package/docs/examples/messaging/create-sendgrid-provider.md +20 -0
  185. package/docs/examples/messaging/create-sms.md +19 -0
  186. package/docs/examples/messaging/create-smtp-provider.md +26 -0
  187. package/docs/examples/messaging/create-subscriber.md +15 -0
  188. package/docs/examples/messaging/create-telesign-provider.md +18 -0
  189. package/docs/examples/messaging/create-textmagic-provider.md +18 -0
  190. package/docs/examples/messaging/create-topic.md +15 -0
  191. package/docs/examples/messaging/create-twilio-provider.md +18 -0
  192. package/docs/examples/messaging/create-vonage-provider.md +18 -0
  193. package/docs/examples/messaging/delete-provider.md +13 -0
  194. package/docs/examples/messaging/delete-subscriber.md +14 -0
  195. package/docs/examples/messaging/delete-topic.md +13 -0
  196. package/docs/examples/messaging/delete.md +13 -0
  197. package/docs/examples/messaging/get-message.md +13 -0
  198. package/docs/examples/messaging/get-provider.md +13 -0
  199. package/docs/examples/messaging/get-subscriber.md +14 -0
  200. package/docs/examples/messaging/get-topic.md +13 -0
  201. package/docs/examples/messaging/list-message-logs.md +14 -0
  202. package/docs/examples/messaging/list-messages.md +14 -0
  203. package/docs/examples/messaging/list-provider-logs.md +14 -0
  204. package/docs/examples/messaging/list-providers.md +14 -0
  205. package/docs/examples/messaging/list-subscriber-logs.md +14 -0
  206. package/docs/examples/messaging/list-subscribers.md +15 -0
  207. package/docs/examples/messaging/list-targets.md +14 -0
  208. package/docs/examples/messaging/list-topic-logs.md +14 -0
  209. package/docs/examples/messaging/list-topics.md +14 -0
  210. package/docs/examples/messaging/update-apns-provider.md +20 -0
  211. package/docs/examples/messaging/update-email.md +24 -0
  212. package/docs/examples/messaging/update-fcm-provider.md +16 -0
  213. package/docs/examples/messaging/update-mailgun-provider.md +22 -0
  214. package/docs/examples/messaging/update-msg91provider.md +18 -0
  215. package/docs/examples/messaging/update-push.md +28 -0
  216. package/docs/examples/messaging/update-sendgrid-provider.md +20 -0
  217. package/docs/examples/messaging/update-sms.md +19 -0
  218. package/docs/examples/messaging/update-smtp-provider.md +26 -0
  219. package/docs/examples/messaging/update-telesign-provider.md +18 -0
  220. package/docs/examples/messaging/update-textmagic-provider.md +18 -0
  221. package/docs/examples/messaging/update-topic.md +15 -0
  222. package/docs/examples/messaging/update-twilio-provider.md +18 -0
  223. package/docs/examples/messaging/update-vonage-provider.md +18 -0
  224. package/docs/examples/migrations/create-appwrite-migration.md +16 -0
  225. package/docs/examples/migrations/create-firebase-migration.md +14 -0
  226. package/docs/examples/migrations/create-firebase-o-auth-migration.md +14 -0
  227. package/docs/examples/migrations/create-n-host-migration.md +20 -0
  228. package/docs/examples/migrations/create-supabase-migration.md +19 -0
  229. package/docs/examples/migrations/delete-firebase-auth.md +11 -0
  230. package/docs/examples/migrations/delete.md +13 -0
  231. package/docs/examples/migrations/get-appwrite-report.md +16 -0
  232. package/docs/examples/migrations/get-firebase-report-o-auth.md +14 -0
  233. package/docs/examples/migrations/get-firebase-report.md +14 -0
  234. package/docs/examples/migrations/get-n-host-report.md +20 -0
  235. package/docs/examples/migrations/get-supabase-report.md +19 -0
  236. package/docs/examples/migrations/get.md +13 -0
  237. package/docs/examples/migrations/list-firebase-projects.md +11 -0
  238. package/docs/examples/migrations/list.md +14 -0
  239. package/docs/examples/migrations/retry.md +13 -0
  240. package/docs/examples/project/create-variable.md +14 -0
  241. package/docs/examples/project/delete-variable.md +13 -0
  242. package/docs/examples/project/get-usage.md +15 -0
  243. package/docs/examples/project/get-variable.md +13 -0
  244. package/docs/examples/project/list-variables.md +11 -0
  245. package/docs/examples/project/update-variable.md +15 -0
  246. package/docs/examples/projects/create-j-w-t.md +15 -0
  247. package/docs/examples/projects/create-key.md +16 -0
  248. package/docs/examples/projects/create-platform.md +18 -0
  249. package/docs/examples/projects/create-smtp-test.md +22 -0
  250. package/docs/examples/projects/create-webhook.md +20 -0
  251. package/docs/examples/projects/create.md +25 -0
  252. package/docs/examples/projects/delete-email-template.md +15 -0
  253. package/docs/examples/projects/delete-key.md +14 -0
  254. package/docs/examples/projects/delete-platform.md +14 -0
  255. package/docs/examples/projects/delete-sms-template.md +15 -0
  256. package/docs/examples/projects/delete-webhook.md +14 -0
  257. package/docs/examples/projects/delete.md +13 -0
  258. package/docs/examples/projects/get-email-template.md +15 -0
  259. package/docs/examples/projects/get-key.md +14 -0
  260. package/docs/examples/projects/get-platform.md +14 -0
  261. package/docs/examples/projects/get-sms-template.md +15 -0
  262. package/docs/examples/projects/get-webhook.md +14 -0
  263. package/docs/examples/projects/get.md +13 -0
  264. package/docs/examples/projects/list-keys.md +13 -0
  265. package/docs/examples/projects/list-platforms.md +13 -0
  266. package/docs/examples/projects/list-webhooks.md +13 -0
  267. package/docs/examples/projects/list.md +14 -0
  268. package/docs/examples/projects/update-api-status-all.md +14 -0
  269. package/docs/examples/projects/update-api-status.md +15 -0
  270. package/docs/examples/projects/update-auth-duration.md +14 -0
  271. package/docs/examples/projects/update-auth-limit.md +14 -0
  272. package/docs/examples/projects/update-auth-password-dictionary.md +14 -0
  273. package/docs/examples/projects/update-auth-password-history.md +14 -0
  274. package/docs/examples/projects/update-auth-sessions-limit.md +14 -0
  275. package/docs/examples/projects/update-auth-status.md +15 -0
  276. package/docs/examples/projects/update-email-template.md +20 -0
  277. package/docs/examples/projects/update-key.md +17 -0
  278. package/docs/examples/projects/update-mock-numbers.md +14 -0
  279. package/docs/examples/projects/update-o-auth2.md +17 -0
  280. package/docs/examples/projects/update-personal-data-check.md +14 -0
  281. package/docs/examples/projects/update-platform.md +18 -0
  282. package/docs/examples/projects/update-service-status-all.md +14 -0
  283. package/docs/examples/projects/update-service-status.md +15 -0
  284. package/docs/examples/projects/update-session-alerts.md +14 -0
  285. package/docs/examples/projects/update-sms-template.md +16 -0
  286. package/docs/examples/projects/update-smtp.md +22 -0
  287. package/docs/examples/projects/update-team.md +14 -0
  288. package/docs/examples/projects/update-webhook-signature.md +14 -0
  289. package/docs/examples/projects/update-webhook.md +21 -0
  290. package/docs/examples/projects/update.md +23 -0
  291. package/docs/examples/proxy/create-rule.md +15 -0
  292. package/docs/examples/proxy/delete-rule.md +13 -0
  293. package/docs/examples/proxy/get-rule.md +13 -0
  294. package/docs/examples/proxy/list-rules.md +14 -0
  295. package/docs/examples/proxy/update-rule-verification.md +13 -0
  296. package/docs/examples/storage/create-bucket.md +22 -0
  297. package/docs/examples/storage/create-file.md +16 -0
  298. package/docs/examples/storage/delete-bucket.md +13 -0
  299. package/docs/examples/storage/delete-file.md +14 -0
  300. package/docs/examples/storage/get-bucket-usage.md +14 -0
  301. package/docs/examples/storage/get-bucket.md +13 -0
  302. package/docs/examples/storage/get-file-download.md +14 -0
  303. package/docs/examples/storage/get-file-preview.md +25 -0
  304. package/docs/examples/storage/get-file-view.md +14 -0
  305. package/docs/examples/storage/get-file.md +14 -0
  306. package/docs/examples/storage/get-usage.md +13 -0
  307. package/docs/examples/storage/list-buckets.md +14 -0
  308. package/docs/examples/storage/list-files.md +15 -0
  309. package/docs/examples/storage/update-bucket.md +22 -0
  310. package/docs/examples/storage/update-file.md +16 -0
  311. package/docs/examples/teams/create-membership.md +19 -0
  312. package/docs/examples/teams/create.md +15 -0
  313. package/docs/examples/teams/delete-membership.md +14 -0
  314. package/docs/examples/teams/delete.md +13 -0
  315. package/docs/examples/teams/get-membership.md +14 -0
  316. package/docs/examples/teams/get-prefs.md +13 -0
  317. package/docs/examples/teams/get.md +13 -0
  318. package/docs/examples/teams/list-logs.md +14 -0
  319. package/docs/examples/teams/list-memberships.md +15 -0
  320. package/docs/examples/teams/list.md +14 -0
  321. package/docs/examples/teams/update-membership-status.md +16 -0
  322. package/docs/examples/teams/update-membership.md +15 -0
  323. package/docs/examples/teams/update-name.md +14 -0
  324. package/docs/examples/teams/update-prefs.md +14 -0
  325. package/docs/examples/users/create-argon2user.md +16 -0
  326. package/docs/examples/users/create-bcrypt-user.md +16 -0
  327. package/docs/examples/users/create-j-w-t.md +15 -0
  328. package/docs/examples/users/create-m-d5user.md +16 -0
  329. package/docs/examples/users/create-mfa-recovery-codes.md +13 -0
  330. package/docs/examples/users/create-p-h-pass-user.md +16 -0
  331. package/docs/examples/users/create-s-h-a-user.md +17 -0
  332. package/docs/examples/users/create-scrypt-modified-user.md +19 -0
  333. package/docs/examples/users/create-scrypt-user.md +21 -0
  334. package/docs/examples/users/create-session.md +13 -0
  335. package/docs/examples/users/create-target.md +18 -0
  336. package/docs/examples/users/create-token.md +15 -0
  337. package/docs/examples/users/create.md +17 -0
  338. package/docs/examples/users/delete-identity.md +13 -0
  339. package/docs/examples/users/delete-mfa-authenticator.md +14 -0
  340. package/docs/examples/users/delete-session.md +14 -0
  341. package/docs/examples/users/delete-sessions.md +13 -0
  342. package/docs/examples/users/delete-target.md +14 -0
  343. package/docs/examples/users/delete.md +13 -0
  344. package/docs/examples/users/get-mfa-recovery-codes.md +13 -0
  345. package/docs/examples/users/get-prefs.md +13 -0
  346. package/docs/examples/users/get-target.md +14 -0
  347. package/docs/examples/users/get-usage.md +13 -0
  348. package/docs/examples/users/get.md +13 -0
  349. package/docs/examples/users/list-identities.md +14 -0
  350. package/docs/examples/users/list-logs.md +14 -0
  351. package/docs/examples/users/list-memberships.md +13 -0
  352. package/docs/examples/users/list-mfa-factors.md +13 -0
  353. package/docs/examples/users/list-sessions.md +13 -0
  354. package/docs/examples/users/list-targets.md +14 -0
  355. package/docs/examples/users/list.md +14 -0
  356. package/docs/examples/users/update-email-verification.md +14 -0
  357. package/docs/examples/users/update-email.md +14 -0
  358. package/docs/examples/users/update-labels.md +14 -0
  359. package/docs/examples/users/update-mfa-recovery-codes.md +13 -0
  360. package/docs/examples/users/update-mfa.md +14 -0
  361. package/docs/examples/users/update-name.md +14 -0
  362. package/docs/examples/users/update-password.md +14 -0
  363. package/docs/examples/users/update-phone-verification.md +14 -0
  364. package/docs/examples/users/update-phone.md +14 -0
  365. package/docs/examples/users/update-prefs.md +14 -0
  366. package/docs/examples/users/update-status.md +14 -0
  367. package/docs/examples/users/update-target.md +17 -0
  368. package/docs/examples/vcs/create-repository-detection.md +15 -0
  369. package/docs/examples/vcs/create-repository.md +15 -0
  370. package/docs/examples/vcs/delete-installation.md +13 -0
  371. package/docs/examples/vcs/get-installation.md +13 -0
  372. package/docs/examples/vcs/get-repository-contents.md +15 -0
  373. package/docs/examples/vcs/get-repository.md +14 -0
  374. package/docs/examples/vcs/list-installations.md +14 -0
  375. package/docs/examples/vcs/list-repositories.md +14 -0
  376. package/docs/examples/vcs/list-repository-branches.md +14 -0
  377. package/docs/examples/vcs/update-external-deployments.md +15 -0
  378. package/package.json +42 -0
  379. package/publish.sh +4 -0
  380. package/rollup.config.js +27 -0
  381. package/src/Cache/Adapter.ts +11 -0
  382. package/src/Cache/Adapters/Filesystem.ts +126 -0
  383. package/src/Cache/Adapters/Memory.ts +57 -0
  384. package/src/Cache/Adapters/None.ts +36 -0
  385. package/src/Cache/Adapters/Redis.ts +106 -0
  386. package/src/Cache/Adapters/Sharding.ts +87 -0
  387. package/src/Cache/Cache.ts +75 -0
  388. package/src/Cache/index.ts +5 -0
  389. package/src/Cache/test.ts +0 -0
  390. package/src/Services.ts +41 -0
  391. package/src/client.ts +397 -0
  392. package/src/decorators/Cache.ts +102 -0
  393. package/src/decorators/CacheKey.ts +9 -0
  394. package/src/decorators/Invalidate.ts +68 -0
  395. package/src/enums/api-service.ts +13 -0
  396. package/src/enums/api.ts +5 -0
  397. package/src/enums/auth-method.ts +9 -0
  398. package/src/enums/authentication-factor.ts +6 -0
  399. package/src/enums/authenticator-type.ts +3 -0
  400. package/src/enums/browser.ts +16 -0
  401. package/src/enums/compression.ts +5 -0
  402. package/src/enums/credit-card.ts +18 -0
  403. package/src/enums/database-usage-range.ts +5 -0
  404. package/src/enums/email-template-locale.ts +133 -0
  405. package/src/enums/email-template-type.ts +9 -0
  406. package/src/enums/entities/EntityLimitType.ts +4 -0
  407. package/src/enums/entities/PropertyAttributeName.ts +27 -0
  408. package/src/enums/entities/PropertyCondition.ts +8 -0
  409. package/src/enums/entities/PropertyType.ts +16 -0
  410. package/src/enums/entities/PropertyValueType.ts +6 -0
  411. package/src/enums/entities/RowAccess.ts +2 -0
  412. package/src/enums/entities/ViewFilterCondition.ts +12 -0
  413. package/src/enums/execution-method.ts +8 -0
  414. package/src/enums/flag.ts +197 -0
  415. package/src/enums/function-usage-range.ts +5 -0
  416. package/src/enums/image-format.ts +7 -0
  417. package/src/enums/image-gravity.ts +11 -0
  418. package/src/enums/index-type.ts +5 -0
  419. package/src/enums/messaging-provider-type.ts +5 -0
  420. package/src/enums/name.ts +14 -0
  421. package/src/enums/o-auth-provider copy.ts +41 -0
  422. package/src/enums/o-auth-provider.ts +41 -0
  423. package/src/enums/password-hash.ts +13 -0
  424. package/src/enums/platform-type.ts +17 -0
  425. package/src/enums/project-usage-range.ts +4 -0
  426. package/src/enums/region.ts +4 -0
  427. package/src/enums/relation-mutate.ts +5 -0
  428. package/src/enums/relationship-type.ts +6 -0
  429. package/src/enums/resource-type.ts +4 -0
  430. package/src/enums/runtime.ts +48 -0
  431. package/src/enums/s-m-t-p-secure.ts +3 -0
  432. package/src/enums/shared/ApplicationLayout.ts +4 -0
  433. package/src/enums/shared/Colors.ts +24 -0
  434. package/src/enums/shared/InputType.ts +6 -0
  435. package/src/enums/shared/Periodicity.ts +7 -0
  436. package/src/enums/shared/SvgIcon.ts +37 -0
  437. package/src/enums/shared/Theme.ts +4 -0
  438. package/src/enums/sms-template-locale.ts +133 -0
  439. package/src/enums/sms-template-type.ts +6 -0
  440. package/src/enums/smtp-encryption.ts +5 -0
  441. package/src/enums/storage-usage-range.ts +5 -0
  442. package/src/enums/subscriptions/PricingModel.ts +14 -0
  443. package/src/enums/subscriptions/SubscriptionBillingPeriod.ts +15 -0
  444. package/src/enums/subscriptions/SubscriptionFeatureLimitType.ts +16 -0
  445. package/src/enums/subscriptions/SubscriptionPriceType.ts +10 -0
  446. package/src/enums/tenants/LinkedAccountStatus.ts +5 -0
  447. package/src/enums/tenants/TenantUserJoined.ts +6 -0
  448. package/src/enums/tenants/TenantUserStatus.ts +6 -0
  449. package/src/enums/tenants/TenantUserType.ts +5 -0
  450. package/src/enums/user-usage-range.ts +5 -0
  451. package/src/id.ts +47 -0
  452. package/src/index.ts +36 -0
  453. package/src/inputFile.ts +23 -0
  454. package/src/lib/Registry/Registry.ts +66 -0
  455. package/src/lib/Registry/index.ts +1 -0
  456. package/src/models.ts +3339 -0
  457. package/src/permission.ts +57 -0
  458. package/src/query.ts +261 -0
  459. package/src/role.ts +100 -0
  460. package/src/service-client.ts +29 -0
  461. package/src/service.ts +30 -0
  462. package/src/services/account.ts +1643 -0
  463. package/src/services/applets.ts +75 -0
  464. package/src/services/avatars.ts +314 -0
  465. package/src/services/community.ts +102 -0
  466. package/src/services/configuration.ts +15 -0
  467. package/src/services/databases.ts +2037 -0
  468. package/src/services/functions.ts +986 -0
  469. package/src/services/graphql.ts +75 -0
  470. package/src/services/health.ts +629 -0
  471. package/src/services/locale.ts +205 -0
  472. package/src/services/messaging.ts +2247 -0
  473. package/src/services/node.ts +15 -0
  474. package/src/services/permissions.ts +131 -0
  475. package/src/services/pricing.ts +30 -0
  476. package/src/services/projects.ts +1901 -0
  477. package/src/services/roles.ts +101 -0
  478. package/src/services/schema.ts +65 -0
  479. package/src/services/storage.ts +576 -0
  480. package/src/services/subscription.ts +40 -0
  481. package/src/services/teams.ts +490 -0
  482. package/src/services/tenant-subscription.ts +93 -0
  483. package/src/services/tenant.ts +194 -0
  484. package/src/services/users.ts +1584 -0
  485. package/tsconfig.json +29 -0
  486. package/types/Cache/Adapter.d.ts +10 -0
  487. package/types/Cache/Adapters/Filesystem.d.ts +16 -0
  488. package/types/Cache/Adapters/Memory.d.ts +18 -0
  489. package/types/Cache/Adapters/None.d.ts +12 -0
  490. package/types/Cache/Adapters/Redis.d.ts +14 -0
  491. package/types/Cache/Adapters/Sharding.d.ts +17 -0
  492. package/types/Cache/Cache.d.ts +16 -0
  493. package/types/Cache/index.d.ts +5 -0
  494. package/types/Cache/test.d.ts +0 -0
  495. package/types/Services.d.ts +6 -0
  496. package/types/client.d.ts +141 -0
  497. package/types/decorators/Cache.d.ts +1 -0
  498. package/types/decorators/CacheKey.d.ts +1 -0
  499. package/types/decorators/Invalidate.d.ts +1 -0
  500. package/types/enums/api-service.d.ts +13 -0
  501. package/types/enums/api.d.ts +5 -0
  502. package/types/enums/auth-method.d.ts +9 -0
  503. package/types/enums/authentication-factor.d.ts +6 -0
  504. package/types/enums/authenticator-type.d.ts +3 -0
  505. package/types/enums/browser.d.ts +16 -0
  506. package/types/enums/compression.d.ts +5 -0
  507. package/types/enums/credit-card.d.ts +18 -0
  508. package/types/enums/database-usage-range.d.ts +5 -0
  509. package/types/enums/email-template-locale.d.ts +133 -0
  510. package/types/enums/email-template-type.d.ts +9 -0
  511. package/types/enums/entities/EntityLimitType.d.ts +4 -0
  512. package/types/enums/entities/PropertyAttributeName.d.ts +27 -0
  513. package/types/enums/entities/PropertyCondition.d.ts +7 -0
  514. package/types/enums/entities/PropertyType.d.ts +12 -0
  515. package/types/enums/entities/PropertyValueType.d.ts +6 -0
  516. package/types/enums/entities/RowAccess.d.ts +2 -0
  517. package/types/enums/entities/ViewFilterCondition.d.ts +12 -0
  518. package/types/enums/execution-method.d.ts +8 -0
  519. package/types/enums/flag.d.ts +197 -0
  520. package/types/enums/function-usage-range.d.ts +5 -0
  521. package/types/enums/image-format.d.ts +7 -0
  522. package/types/enums/image-gravity.d.ts +11 -0
  523. package/types/enums/index-type.d.ts +5 -0
  524. package/types/enums/messaging-provider-type.d.ts +5 -0
  525. package/types/enums/name.d.ts +14 -0
  526. package/types/enums/o-auth-provider copy.d.ts +41 -0
  527. package/types/enums/o-auth-provider.d.ts +41 -0
  528. package/types/enums/password-hash.d.ts +13 -0
  529. package/types/enums/platform-type.d.ts +17 -0
  530. package/types/enums/project-usage-range.d.ts +4 -0
  531. package/types/enums/region.d.ts +4 -0
  532. package/types/enums/relation-mutate.d.ts +5 -0
  533. package/types/enums/relationship-type.d.ts +6 -0
  534. package/types/enums/resource-type.d.ts +4 -0
  535. package/types/enums/runtime.d.ts +48 -0
  536. package/types/enums/s-m-t-p-secure.d.ts +3 -0
  537. package/types/enums/shared/ApplicationLayout.d.ts +4 -0
  538. package/types/enums/shared/Colors.d.ts +24 -0
  539. package/types/enums/shared/InputType.d.ts +6 -0
  540. package/types/enums/shared/Periodicity.d.ts +7 -0
  541. package/types/enums/shared/SvgIcon.d.ts +37 -0
  542. package/types/enums/shared/Theme.d.ts +4 -0
  543. package/types/enums/sms-template-locale.d.ts +133 -0
  544. package/types/enums/sms-template-type.d.ts +6 -0
  545. package/types/enums/smtp-encryption.d.ts +5 -0
  546. package/types/enums/storage-usage-range.d.ts +5 -0
  547. package/types/enums/subscriptions/PricingModel.d.ts +11 -0
  548. package/types/enums/subscriptions/SubscriptionBillingPeriod.d.ts +10 -0
  549. package/types/enums/subscriptions/SubscriptionFeatureLimitType.d.ts +10 -0
  550. package/types/enums/subscriptions/SubscriptionPriceType.d.ts +7 -0
  551. package/types/enums/tenants/LinkedAccountStatus.d.ts +5 -0
  552. package/types/enums/tenants/TenantUserJoined.d.ts +6 -0
  553. package/types/enums/tenants/TenantUserStatus.d.ts +6 -0
  554. package/types/enums/tenants/TenantUserType.d.ts +5 -0
  555. package/types/enums/user-usage-range.d.ts +5 -0
  556. package/types/id.d.ts +20 -0
  557. package/types/index.d.ts +36 -0
  558. package/types/inputFile.d.ts +6 -0
  559. package/types/lib/Registry/Registry.d.ts +38 -0
  560. package/types/lib/Registry/index.d.ts +1 -0
  561. package/types/models.d.ts +3272 -0
  562. package/types/permission.d.ts +43 -0
  563. package/types/query.d.ts +194 -0
  564. package/types/role.d.ts +70 -0
  565. package/types/service-client.d.ts +7 -0
  566. package/types/service.d.ts +11 -0
  567. package/types/services/account.d.ts +530 -0
  568. package/types/services/acl.d.ts +28 -0
  569. package/types/services/applets.d.ts +9 -0
  570. package/types/services/assistant.d.ts +14 -0
  571. package/types/services/avatars.d.ts +115 -0
  572. package/types/services/community.d.ts +19 -0
  573. package/types/services/configuration.d.ts +5 -0
  574. package/types/services/console.d.ts +15 -0
  575. package/types/services/databases.d.ts +613 -0
  576. package/types/services/functions.d.ts +319 -0
  577. package/types/services/graphql.d.ts +25 -0
  578. package/types/services/health.d.ts +231 -0
  579. package/types/services/locale.d.ts +80 -0
  580. package/types/services/messaging.d.ts +685 -0
  581. package/types/services/migrations.d.ts +185 -0
  582. package/types/services/node.d.ts +5 -0
  583. package/types/services/permissions.d.ts +20 -0
  584. package/types/services/pricing.d.ts +15 -0
  585. package/types/services/project.d.ts +70 -0
  586. package/types/services/projects.d.ts +542 -0
  587. package/types/services/proxy.d.ts +59 -0
  588. package/types/services/roles.d.ts +19 -0
  589. package/types/services/schema.d.ts +17 -0
  590. package/types/services/storage.d.ts +189 -0
  591. package/types/services/subscription-product.d.ts +77 -0
  592. package/types/services/subscription.d.ts +15 -0
  593. package/types/services/teams.d.ts +167 -0
  594. package/types/services/tenant-subscription.d.ts +12 -0
  595. package/types/services/tenant.d.ts +32 -0
  596. package/types/services/users.d.ts +499 -0
  597. package/types/services/vcs.d.ts +108 -0
@@ -0,0 +1,1901 @@
1
+ import { AppcondaException, Client, Models, Payload } from "../client";
2
+ import { Api } from "../enums/api";
3
+ import { ApiService } from "../enums/api-service";
4
+ import { AuthMethod } from "../enums/auth-method";
5
+ import { EmailTemplateLocale } from "../enums/email-template-locale";
6
+ import { EmailTemplateType } from "../enums/email-template-type";
7
+ import { OAuthProvider } from "../enums/o-auth-provider";
8
+ import { PlatformType } from "../enums/platform-type";
9
+ import { Region } from "../enums/region";
10
+ import { SMTPSecure } from "../enums/s-m-t-p-secure";
11
+ import { SmsTemplateLocale } from "../enums/sms-template-locale";
12
+ import { SmsTemplateType } from "../enums/sms-template-type";
13
+
14
+
15
+ export class Projects {
16
+ client: Client;
17
+
18
+ constructor(client: Client) {
19
+ this.client = client;
20
+ }
21
+
22
+ /**
23
+ * List projects
24
+ *
25
+ *
26
+ * @param {string[]} queries
27
+ * @param {string} search
28
+ * @throws {AppcondaException}
29
+ * @returns {Promise<Models.ProjectList>}
30
+ */
31
+ async list(queries?: string[], search?: string): Promise<Models.ProjectList> {
32
+ const apiPath = '/projects';
33
+ const payload: Payload = {};
34
+ if (typeof queries !== 'undefined') {
35
+ payload['queries'] = queries;
36
+ }
37
+ if (typeof search !== 'undefined') {
38
+ payload['search'] = search;
39
+ }
40
+ const uri = new URL(this.client.config.endpoint + apiPath);
41
+
42
+ const apiHeaders: { [header: string]: string } = {
43
+ 'content-type': 'application/json',
44
+ }
45
+
46
+
47
+ return await this.client.call(
48
+ 'get',
49
+ uri,
50
+ apiHeaders,
51
+ payload
52
+ );
53
+ }
54
+ /**
55
+ * Create project
56
+ *
57
+ *
58
+ * @param {string} projectId
59
+ * @param {string} name
60
+ * @param {string} teamId
61
+ * @param {Region} region
62
+ * @param {string} description
63
+ * @param {string} logo
64
+ * @param {string} url
65
+ * @param {string} legalName
66
+ * @param {string} legalCountry
67
+ * @param {string} legalState
68
+ * @param {string} legalCity
69
+ * @param {string} legalAddress
70
+ * @param {string} legalTaxId
71
+ * @throws {AppcondaException}
72
+ * @returns {Promise<Models.Project>}
73
+ */
74
+ async create(projectId: string, name: string, teamId: string, region?: Region, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string): Promise<Models.Project> {
75
+ if (typeof projectId === 'undefined') {
76
+ throw new AppcondaException('Missing required parameter: "projectId"');
77
+ }
78
+ if (typeof name === 'undefined') {
79
+ throw new AppcondaException('Missing required parameter: "name"');
80
+ }
81
+ if (typeof teamId === 'undefined') {
82
+ throw new AppcondaException('Missing required parameter: "teamId"');
83
+ }
84
+ const apiPath = '/projects';
85
+ const payload: Payload = {};
86
+ if (typeof projectId !== 'undefined') {
87
+ payload['projectId'] = projectId;
88
+ }
89
+ if (typeof name !== 'undefined') {
90
+ payload['name'] = name;
91
+ }
92
+ if (typeof teamId !== 'undefined') {
93
+ payload['teamId'] = teamId;
94
+ }
95
+ if (typeof region !== 'undefined') {
96
+ payload['region'] = region;
97
+ }
98
+ if (typeof description !== 'undefined') {
99
+ payload['description'] = description;
100
+ }
101
+ if (typeof logo !== 'undefined') {
102
+ payload['logo'] = logo;
103
+ }
104
+ if (typeof url !== 'undefined') {
105
+ payload['url'] = url;
106
+ }
107
+ if (typeof legalName !== 'undefined') {
108
+ payload['legalName'] = legalName;
109
+ }
110
+ if (typeof legalCountry !== 'undefined') {
111
+ payload['legalCountry'] = legalCountry;
112
+ }
113
+ if (typeof legalState !== 'undefined') {
114
+ payload['legalState'] = legalState;
115
+ }
116
+ if (typeof legalCity !== 'undefined') {
117
+ payload['legalCity'] = legalCity;
118
+ }
119
+ if (typeof legalAddress !== 'undefined') {
120
+ payload['legalAddress'] = legalAddress;
121
+ }
122
+ if (typeof legalTaxId !== 'undefined') {
123
+ payload['legalTaxId'] = legalTaxId;
124
+ }
125
+ const uri = new URL(this.client.config.endpoint + apiPath);
126
+
127
+ const apiHeaders: { [header: string]: string } = {
128
+ 'content-type': 'application/json',
129
+ }
130
+
131
+
132
+ return await this.client.call(
133
+ 'post',
134
+ uri,
135
+ apiHeaders,
136
+ payload
137
+ );
138
+ }
139
+ /**
140
+ * Get project
141
+ *
142
+ *
143
+ * @param {string} projectId
144
+ * @throws {AppcondaException}
145
+ * @returns {Promise<Models.Project>}
146
+ */
147
+ async get(projectId: string): Promise<Models.Project> {
148
+ if (typeof projectId === 'undefined') {
149
+ throw new AppcondaException('Missing required parameter: "projectId"');
150
+ }
151
+ const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
152
+ const payload: Payload = {};
153
+ const uri = new URL(this.client.config.endpoint + apiPath);
154
+
155
+ const apiHeaders: { [header: string]: string } = {
156
+ 'content-type': 'application/json',
157
+ }
158
+
159
+
160
+ return await this.client.call(
161
+ 'get',
162
+ uri,
163
+ apiHeaders,
164
+ payload
165
+ );
166
+ }
167
+ /**
168
+ * Update project
169
+ *
170
+ *
171
+ * @param {string} projectId
172
+ * @param {string} name
173
+ * @param {string} description
174
+ * @param {string} logo
175
+ * @param {string} url
176
+ * @param {string} legalName
177
+ * @param {string} legalCountry
178
+ * @param {string} legalState
179
+ * @param {string} legalCity
180
+ * @param {string} legalAddress
181
+ * @param {string} legalTaxId
182
+ * @throws {AppcondaException}
183
+ * @returns {Promise<Models.Project>}
184
+ */
185
+ async update(projectId: string, name: string, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string): Promise<Models.Project> {
186
+ if (typeof projectId === 'undefined') {
187
+ throw new AppcondaException('Missing required parameter: "projectId"');
188
+ }
189
+ if (typeof name === 'undefined') {
190
+ throw new AppcondaException('Missing required parameter: "name"');
191
+ }
192
+ const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
193
+ const payload: Payload = {};
194
+ if (typeof name !== 'undefined') {
195
+ payload['name'] = name;
196
+ }
197
+ if (typeof description !== 'undefined') {
198
+ payload['description'] = description;
199
+ }
200
+ if (typeof logo !== 'undefined') {
201
+ payload['logo'] = logo;
202
+ }
203
+ if (typeof url !== 'undefined') {
204
+ payload['url'] = url;
205
+ }
206
+ if (typeof legalName !== 'undefined') {
207
+ payload['legalName'] = legalName;
208
+ }
209
+ if (typeof legalCountry !== 'undefined') {
210
+ payload['legalCountry'] = legalCountry;
211
+ }
212
+ if (typeof legalState !== 'undefined') {
213
+ payload['legalState'] = legalState;
214
+ }
215
+ if (typeof legalCity !== 'undefined') {
216
+ payload['legalCity'] = legalCity;
217
+ }
218
+ if (typeof legalAddress !== 'undefined') {
219
+ payload['legalAddress'] = legalAddress;
220
+ }
221
+ if (typeof legalTaxId !== 'undefined') {
222
+ payload['legalTaxId'] = legalTaxId;
223
+ }
224
+ const uri = new URL(this.client.config.endpoint + apiPath);
225
+
226
+ const apiHeaders: { [header: string]: string } = {
227
+ 'content-type': 'application/json',
228
+ }
229
+
230
+
231
+ return await this.client.call(
232
+ 'patch',
233
+ uri,
234
+ apiHeaders,
235
+ payload
236
+ );
237
+ }
238
+ /**
239
+ * Delete project
240
+ *
241
+ *
242
+ * @param {string} projectId
243
+ * @throws {AppcondaException}
244
+ * @returns {Promise<{}>}
245
+ */
246
+ async delete(projectId: string): Promise<{}> {
247
+ if (typeof projectId === 'undefined') {
248
+ throw new AppcondaException('Missing required parameter: "projectId"');
249
+ }
250
+ const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
251
+ const payload: Payload = {};
252
+ const uri = new URL(this.client.config.endpoint + apiPath);
253
+
254
+ const apiHeaders: { [header: string]: string } = {
255
+ 'content-type': 'application/json',
256
+ }
257
+
258
+
259
+ return await this.client.call(
260
+ 'delete',
261
+ uri,
262
+ apiHeaders,
263
+ payload
264
+ );
265
+ }
266
+ /**
267
+ * Update API status
268
+ *
269
+ *
270
+ * @param {string} projectId
271
+ * @param {Api} api
272
+ * @param {boolean} status
273
+ * @throws {AppcondaException}
274
+ * @returns {Promise<Models.Project>}
275
+ */
276
+ async updateApiStatus(projectId: string, api: Api, status: boolean): Promise<Models.Project> {
277
+ if (typeof projectId === 'undefined') {
278
+ throw new AppcondaException('Missing required parameter: "projectId"');
279
+ }
280
+ if (typeof api === 'undefined') {
281
+ throw new AppcondaException('Missing required parameter: "api"');
282
+ }
283
+ if (typeof status === 'undefined') {
284
+ throw new AppcondaException('Missing required parameter: "status"');
285
+ }
286
+ const apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
287
+ const payload: Payload = {};
288
+ if (typeof api !== 'undefined') {
289
+ payload['api'] = api;
290
+ }
291
+ if (typeof status !== 'undefined') {
292
+ payload['status'] = status;
293
+ }
294
+ const uri = new URL(this.client.config.endpoint + apiPath);
295
+
296
+ const apiHeaders: { [header: string]: string } = {
297
+ 'content-type': 'application/json',
298
+ }
299
+
300
+
301
+ return await this.client.call(
302
+ 'patch',
303
+ uri,
304
+ apiHeaders,
305
+ payload
306
+ );
307
+ }
308
+ /**
309
+ * Update all API status
310
+ *
311
+ *
312
+ * @param {string} projectId
313
+ * @param {boolean} status
314
+ * @throws {AppcondaException}
315
+ * @returns {Promise<Models.Project>}
316
+ */
317
+ async updateApiStatusAll(projectId: string, status: boolean): Promise<Models.Project> {
318
+ if (typeof projectId === 'undefined') {
319
+ throw new AppcondaException('Missing required parameter: "projectId"');
320
+ }
321
+ if (typeof status === 'undefined') {
322
+ throw new AppcondaException('Missing required parameter: "status"');
323
+ }
324
+ const apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
325
+ const payload: Payload = {};
326
+ if (typeof status !== 'undefined') {
327
+ payload['status'] = status;
328
+ }
329
+ const uri = new URL(this.client.config.endpoint + apiPath);
330
+
331
+ const apiHeaders: { [header: string]: string } = {
332
+ 'content-type': 'application/json',
333
+ }
334
+
335
+
336
+ return await this.client.call(
337
+ 'patch',
338
+ uri,
339
+ apiHeaders,
340
+ payload
341
+ );
342
+ }
343
+ /**
344
+ * Update project authentication duration
345
+ *
346
+ *
347
+ * @param {string} projectId
348
+ * @param {number} duration
349
+ * @throws {AppcondaException}
350
+ * @returns {Promise<Models.Project>}
351
+ */
352
+ async updateAuthDuration(projectId: string, duration: number): Promise<Models.Project> {
353
+ if (typeof projectId === 'undefined') {
354
+ throw new AppcondaException('Missing required parameter: "projectId"');
355
+ }
356
+ if (typeof duration === 'undefined') {
357
+ throw new AppcondaException('Missing required parameter: "duration"');
358
+ }
359
+ const apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
360
+ const payload: Payload = {};
361
+ if (typeof duration !== 'undefined') {
362
+ payload['duration'] = duration;
363
+ }
364
+ const uri = new URL(this.client.config.endpoint + apiPath);
365
+
366
+ const apiHeaders: { [header: string]: string } = {
367
+ 'content-type': 'application/json',
368
+ }
369
+
370
+
371
+ return await this.client.call(
372
+ 'patch',
373
+ uri,
374
+ apiHeaders,
375
+ payload
376
+ );
377
+ }
378
+ /**
379
+ * Update project users limit
380
+ *
381
+ *
382
+ * @param {string} projectId
383
+ * @param {number} limit
384
+ * @throws {AppcondaException}
385
+ * @returns {Promise<Models.Project>}
386
+ */
387
+ async updateAuthLimit(projectId: string, limit: number): Promise<Models.Project> {
388
+ if (typeof projectId === 'undefined') {
389
+ throw new AppcondaException('Missing required parameter: "projectId"');
390
+ }
391
+ if (typeof limit === 'undefined') {
392
+ throw new AppcondaException('Missing required parameter: "limit"');
393
+ }
394
+ const apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
395
+ const payload: Payload = {};
396
+ if (typeof limit !== 'undefined') {
397
+ payload['limit'] = limit;
398
+ }
399
+ const uri = new URL(this.client.config.endpoint + apiPath);
400
+
401
+ const apiHeaders: { [header: string]: string } = {
402
+ 'content-type': 'application/json',
403
+ }
404
+
405
+
406
+ return await this.client.call(
407
+ 'patch',
408
+ uri,
409
+ apiHeaders,
410
+ payload
411
+ );
412
+ }
413
+ /**
414
+ * Update project user sessions limit
415
+ *
416
+ *
417
+ * @param {string} projectId
418
+ * @param {number} limit
419
+ * @throws {AppcondaException}
420
+ * @returns {Promise<Models.Project>}
421
+ */
422
+ async updateAuthSessionsLimit(projectId: string, limit: number): Promise<Models.Project> {
423
+ if (typeof projectId === 'undefined') {
424
+ throw new AppcondaException('Missing required parameter: "projectId"');
425
+ }
426
+ if (typeof limit === 'undefined') {
427
+ throw new AppcondaException('Missing required parameter: "limit"');
428
+ }
429
+ const apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
430
+ const payload: Payload = {};
431
+ if (typeof limit !== 'undefined') {
432
+ payload['limit'] = limit;
433
+ }
434
+ const uri = new URL(this.client.config.endpoint + apiPath);
435
+
436
+ const apiHeaders: { [header: string]: string } = {
437
+ 'content-type': 'application/json',
438
+ }
439
+
440
+
441
+ return await this.client.call(
442
+ 'patch',
443
+ uri,
444
+ apiHeaders,
445
+ payload
446
+ );
447
+ }
448
+ /**
449
+ * Update the mock numbers for the project
450
+ *
451
+ *
452
+ * @param {string} projectId
453
+ * @param {object[]} numbers
454
+ * @throws {AppcondaException}
455
+ * @returns {Promise<Models.Project>}
456
+ */
457
+ async updateMockNumbers(projectId: string, numbers: object[]): Promise<Models.Project> {
458
+ if (typeof projectId === 'undefined') {
459
+ throw new AppcondaException('Missing required parameter: "projectId"');
460
+ }
461
+ if (typeof numbers === 'undefined') {
462
+ throw new AppcondaException('Missing required parameter: "numbers"');
463
+ }
464
+ const apiPath = '/projects/{projectId}/auth/mock-numbers'.replace('{projectId}', projectId);
465
+ const payload: Payload = {};
466
+ if (typeof numbers !== 'undefined') {
467
+ payload['numbers'] = numbers;
468
+ }
469
+ const uri = new URL(this.client.config.endpoint + apiPath);
470
+
471
+ const apiHeaders: { [header: string]: string } = {
472
+ 'content-type': 'application/json',
473
+ }
474
+
475
+
476
+ return await this.client.call(
477
+ 'patch',
478
+ uri,
479
+ apiHeaders,
480
+ payload
481
+ );
482
+ }
483
+ /**
484
+ * Update authentication password dictionary status. Use this endpoint to enable or disable the dicitonary check for user password
485
+ *
486
+ *
487
+ * @param {string} projectId
488
+ * @param {boolean} enabled
489
+ * @throws {AppcondaException}
490
+ * @returns {Promise<Models.Project>}
491
+ */
492
+ async updateAuthPasswordDictionary(projectId: string, enabled: boolean): Promise<Models.Project> {
493
+ if (typeof projectId === 'undefined') {
494
+ throw new AppcondaException('Missing required parameter: "projectId"');
495
+ }
496
+ if (typeof enabled === 'undefined') {
497
+ throw new AppcondaException('Missing required parameter: "enabled"');
498
+ }
499
+ const apiPath = '/projects/{projectId}/auth/password-dictionary'.replace('{projectId}', projectId);
500
+ const payload: Payload = {};
501
+ if (typeof enabled !== 'undefined') {
502
+ payload['enabled'] = enabled;
503
+ }
504
+ const uri = new URL(this.client.config.endpoint + apiPath);
505
+
506
+ const apiHeaders: { [header: string]: string } = {
507
+ 'content-type': 'application/json',
508
+ }
509
+
510
+
511
+ return await this.client.call(
512
+ 'patch',
513
+ uri,
514
+ apiHeaders,
515
+ payload
516
+ );
517
+ }
518
+ /**
519
+ * Update authentication password history. Use this endpoint to set the number of password history to save and 0 to disable password history.
520
+ *
521
+ *
522
+ * @param {string} projectId
523
+ * @param {number} limit
524
+ * @throws {AppcondaException}
525
+ * @returns {Promise<Models.Project>}
526
+ */
527
+ async updateAuthPasswordHistory(projectId: string, limit: number): Promise<Models.Project> {
528
+ if (typeof projectId === 'undefined') {
529
+ throw new AppcondaException('Missing required parameter: "projectId"');
530
+ }
531
+ if (typeof limit === 'undefined') {
532
+ throw new AppcondaException('Missing required parameter: "limit"');
533
+ }
534
+ const apiPath = '/projects/{projectId}/auth/password-history'.replace('{projectId}', projectId);
535
+ const payload: Payload = {};
536
+ if (typeof limit !== 'undefined') {
537
+ payload['limit'] = limit;
538
+ }
539
+ const uri = new URL(this.client.config.endpoint + apiPath);
540
+
541
+ const apiHeaders: { [header: string]: string } = {
542
+ 'content-type': 'application/json',
543
+ }
544
+
545
+
546
+ return await this.client.call(
547
+ 'patch',
548
+ uri,
549
+ apiHeaders,
550
+ payload
551
+ );
552
+ }
553
+ /**
554
+ * Enable or disable checking user passwords for similarity with their personal data.
555
+ *
556
+ *
557
+ * @param {string} projectId
558
+ * @param {boolean} enabled
559
+ * @throws {AppcondaException}
560
+ * @returns {Promise<Models.Project>}
561
+ */
562
+ async updatePersonalDataCheck(projectId: string, enabled: boolean): Promise<Models.Project> {
563
+ if (typeof projectId === 'undefined') {
564
+ throw new AppcondaException('Missing required parameter: "projectId"');
565
+ }
566
+ if (typeof enabled === 'undefined') {
567
+ throw new AppcondaException('Missing required parameter: "enabled"');
568
+ }
569
+ const apiPath = '/projects/{projectId}/auth/personal-data'.replace('{projectId}', projectId);
570
+ const payload: Payload = {};
571
+ if (typeof enabled !== 'undefined') {
572
+ payload['enabled'] = enabled;
573
+ }
574
+ const uri = new URL(this.client.config.endpoint + apiPath);
575
+
576
+ const apiHeaders: { [header: string]: string } = {
577
+ 'content-type': 'application/json',
578
+ }
579
+
580
+
581
+ return await this.client.call(
582
+ 'patch',
583
+ uri,
584
+ apiHeaders,
585
+ payload
586
+ );
587
+ }
588
+ /**
589
+ * Update project sessions emails
590
+ *
591
+ *
592
+ * @param {string} projectId
593
+ * @param {boolean} alerts
594
+ * @throws {AppcondaException}
595
+ * @returns {Promise<Models.Project>}
596
+ */
597
+ async updateSessionAlerts(projectId: string, alerts: boolean): Promise<Models.Project> {
598
+ if (typeof projectId === 'undefined') {
599
+ throw new AppcondaException('Missing required parameter: "projectId"');
600
+ }
601
+ if (typeof alerts === 'undefined') {
602
+ throw new AppcondaException('Missing required parameter: "alerts"');
603
+ }
604
+ const apiPath = '/projects/{projectId}/auth/session-alerts'.replace('{projectId}', projectId);
605
+ const payload: Payload = {};
606
+ if (typeof alerts !== 'undefined') {
607
+ payload['alerts'] = alerts;
608
+ }
609
+ const uri = new URL(this.client.config.endpoint + apiPath);
610
+
611
+ const apiHeaders: { [header: string]: string } = {
612
+ 'content-type': 'application/json',
613
+ }
614
+
615
+
616
+ return await this.client.call(
617
+ 'patch',
618
+ uri,
619
+ apiHeaders,
620
+ payload
621
+ );
622
+ }
623
+ /**
624
+ * Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.
625
+ *
626
+ *
627
+ * @param {string} projectId
628
+ * @param {AuthMethod} method
629
+ * @param {boolean} status
630
+ * @throws {AppcondaException}
631
+ * @returns {Promise<Models.Project>}
632
+ */
633
+ async updateAuthStatus(projectId: string, method: AuthMethod, status: boolean): Promise<Models.Project> {
634
+ if (typeof projectId === 'undefined') {
635
+ throw new AppcondaException('Missing required parameter: "projectId"');
636
+ }
637
+ if (typeof method === 'undefined') {
638
+ throw new AppcondaException('Missing required parameter: "method"');
639
+ }
640
+ if (typeof status === 'undefined') {
641
+ throw new AppcondaException('Missing required parameter: "status"');
642
+ }
643
+ const apiPath = '/projects/{projectId}/auth/{method}'.replace('{projectId}', projectId).replace('{method}', method);
644
+ const payload: Payload = {};
645
+ if (typeof status !== 'undefined') {
646
+ payload['status'] = status;
647
+ }
648
+ const uri = new URL(this.client.config.endpoint + apiPath);
649
+
650
+ const apiHeaders: { [header: string]: string } = {
651
+ 'content-type': 'application/json',
652
+ }
653
+
654
+
655
+ return await this.client.call(
656
+ 'patch',
657
+ uri,
658
+ apiHeaders,
659
+ payload
660
+ );
661
+ }
662
+ /**
663
+ * Create JWT
664
+ *
665
+ *
666
+ * @param {string} projectId
667
+ * @param {string[]} scopes
668
+ * @param {number} duration
669
+ * @throws {AppcondaException}
670
+ * @returns {Promise<Models.Jwt>}
671
+ */
672
+ async createJWT(projectId: string, scopes: string[], duration?: number): Promise<Models.Jwt> {
673
+ if (typeof projectId === 'undefined') {
674
+ throw new AppcondaException('Missing required parameter: "projectId"');
675
+ }
676
+ if (typeof scopes === 'undefined') {
677
+ throw new AppcondaException('Missing required parameter: "scopes"');
678
+ }
679
+ const apiPath = '/projects/{projectId}/jwts'.replace('{projectId}', projectId);
680
+ const payload: Payload = {};
681
+ if (typeof scopes !== 'undefined') {
682
+ payload['scopes'] = scopes;
683
+ }
684
+ if (typeof duration !== 'undefined') {
685
+ payload['duration'] = duration;
686
+ }
687
+ const uri = new URL(this.client.config.endpoint + apiPath);
688
+
689
+ const apiHeaders: { [header: string]: string } = {
690
+ 'content-type': 'application/json',
691
+ }
692
+
693
+
694
+ return await this.client.call(
695
+ 'post',
696
+ uri,
697
+ apiHeaders,
698
+ payload
699
+ );
700
+ }
701
+ /**
702
+ * List keys
703
+ *
704
+ *
705
+ * @param {string} projectId
706
+ * @throws {AppcondaException}
707
+ * @returns {Promise<Models.KeyList>}
708
+ */
709
+ async listKeys(projectId: string): Promise<Models.KeyList> {
710
+ if (typeof projectId === 'undefined') {
711
+ throw new AppcondaException('Missing required parameter: "projectId"');
712
+ }
713
+ const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
714
+ const payload: Payload = {};
715
+ const uri = new URL(this.client.config.endpoint + apiPath);
716
+
717
+ const apiHeaders: { [header: string]: string } = {
718
+ 'content-type': 'application/json',
719
+ }
720
+
721
+
722
+ return await this.client.call(
723
+ 'get',
724
+ uri,
725
+ apiHeaders,
726
+ payload
727
+ );
728
+ }
729
+ /**
730
+ * Create key
731
+ *
732
+ *
733
+ * @param {string} projectId
734
+ * @param {string} name
735
+ * @param {string[]} scopes
736
+ * @param {string} expire
737
+ * @throws {AppcondaException}
738
+ * @returns {Promise<Models.Key>}
739
+ */
740
+ async createKey(projectId: string, name: string, scopes: string[], expire?: string): Promise<Models.Key> {
741
+ if (typeof projectId === 'undefined') {
742
+ throw new AppcondaException('Missing required parameter: "projectId"');
743
+ }
744
+ if (typeof name === 'undefined') {
745
+ throw new AppcondaException('Missing required parameter: "name"');
746
+ }
747
+ if (typeof scopes === 'undefined') {
748
+ throw new AppcondaException('Missing required parameter: "scopes"');
749
+ }
750
+ const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
751
+ const payload: Payload = {};
752
+ if (typeof name !== 'undefined') {
753
+ payload['name'] = name;
754
+ }
755
+ if (typeof scopes !== 'undefined') {
756
+ payload['scopes'] = scopes;
757
+ }
758
+ if (typeof expire !== 'undefined') {
759
+ payload['expire'] = expire;
760
+ }
761
+ const uri = new URL(this.client.config.endpoint + apiPath);
762
+
763
+ const apiHeaders: { [header: string]: string } = {
764
+ 'content-type': 'application/json',
765
+ }
766
+
767
+
768
+ return await this.client.call(
769
+ 'post',
770
+ uri,
771
+ apiHeaders,
772
+ payload
773
+ );
774
+ }
775
+ /**
776
+ * Get key
777
+ *
778
+ *
779
+ * @param {string} projectId
780
+ * @param {string} keyId
781
+ * @throws {AppcondaException}
782
+ * @returns {Promise<Models.Key>}
783
+ */
784
+ async getKey(projectId: string, keyId: string): Promise<Models.Key> {
785
+ if (typeof projectId === 'undefined') {
786
+ throw new AppcondaException('Missing required parameter: "projectId"');
787
+ }
788
+ if (typeof keyId === 'undefined') {
789
+ throw new AppcondaException('Missing required parameter: "keyId"');
790
+ }
791
+ const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
792
+ const payload: Payload = {};
793
+ const uri = new URL(this.client.config.endpoint + apiPath);
794
+
795
+ const apiHeaders: { [header: string]: string } = {
796
+ 'content-type': 'application/json',
797
+ }
798
+
799
+
800
+ return await this.client.call(
801
+ 'get',
802
+ uri,
803
+ apiHeaders,
804
+ payload
805
+ );
806
+ }
807
+ /**
808
+ * Update key
809
+ *
810
+ *
811
+ * @param {string} projectId
812
+ * @param {string} keyId
813
+ * @param {string} name
814
+ * @param {string[]} scopes
815
+ * @param {string} expire
816
+ * @throws {AppcondaException}
817
+ * @returns {Promise<Models.Key>}
818
+ */
819
+ async updateKey(projectId: string, keyId: string, name: string, scopes: string[], expire?: string): Promise<Models.Key> {
820
+ if (typeof projectId === 'undefined') {
821
+ throw new AppcondaException('Missing required parameter: "projectId"');
822
+ }
823
+ if (typeof keyId === 'undefined') {
824
+ throw new AppcondaException('Missing required parameter: "keyId"');
825
+ }
826
+ if (typeof name === 'undefined') {
827
+ throw new AppcondaException('Missing required parameter: "name"');
828
+ }
829
+ if (typeof scopes === 'undefined') {
830
+ throw new AppcondaException('Missing required parameter: "scopes"');
831
+ }
832
+ const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
833
+ const payload: Payload = {};
834
+ if (typeof name !== 'undefined') {
835
+ payload['name'] = name;
836
+ }
837
+ if (typeof scopes !== 'undefined') {
838
+ payload['scopes'] = scopes;
839
+ }
840
+ if (typeof expire !== 'undefined') {
841
+ payload['expire'] = expire;
842
+ }
843
+ const uri = new URL(this.client.config.endpoint + apiPath);
844
+
845
+ const apiHeaders: { [header: string]: string } = {
846
+ 'content-type': 'application/json',
847
+ }
848
+
849
+
850
+ return await this.client.call(
851
+ 'put',
852
+ uri,
853
+ apiHeaders,
854
+ payload
855
+ );
856
+ }
857
+ /**
858
+ * Delete key
859
+ *
860
+ *
861
+ * @param {string} projectId
862
+ * @param {string} keyId
863
+ * @throws {AppcondaException}
864
+ * @returns {Promise<{}>}
865
+ */
866
+ async deleteKey(projectId: string, keyId: string): Promise<{}> {
867
+ if (typeof projectId === 'undefined') {
868
+ throw new AppcondaException('Missing required parameter: "projectId"');
869
+ }
870
+ if (typeof keyId === 'undefined') {
871
+ throw new AppcondaException('Missing required parameter: "keyId"');
872
+ }
873
+ const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
874
+ const payload: Payload = {};
875
+ const uri = new URL(this.client.config.endpoint + apiPath);
876
+
877
+ const apiHeaders: { [header: string]: string } = {
878
+ 'content-type': 'application/json',
879
+ }
880
+
881
+
882
+ return await this.client.call(
883
+ 'delete',
884
+ uri,
885
+ apiHeaders,
886
+ payload
887
+ );
888
+ }
889
+ /**
890
+ * Update project OAuth2
891
+ *
892
+ *
893
+ * @param {string} projectId
894
+ * @param {OAuthProvider} provider
895
+ * @param {string} appId
896
+ * @param {string} secret
897
+ * @param {boolean} enabled
898
+ * @throws {AppcondaException}
899
+ * @returns {Promise<Models.Project>}
900
+ */
901
+ async updateOAuth2(projectId: string, provider: OAuthProvider, appId?: string, secret?: string, enabled?: boolean): Promise<Models.Project> {
902
+ if (typeof projectId === 'undefined') {
903
+ throw new AppcondaException('Missing required parameter: "projectId"');
904
+ }
905
+ if (typeof provider === 'undefined') {
906
+ throw new AppcondaException('Missing required parameter: "provider"');
907
+ }
908
+ const apiPath = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
909
+ const payload: Payload = {};
910
+ if (typeof provider !== 'undefined') {
911
+ payload['provider'] = provider;
912
+ }
913
+ if (typeof appId !== 'undefined') {
914
+ payload['appId'] = appId;
915
+ }
916
+ if (typeof secret !== 'undefined') {
917
+ payload['secret'] = secret;
918
+ }
919
+ if (typeof enabled !== 'undefined') {
920
+ payload['enabled'] = enabled;
921
+ }
922
+ const uri = new URL(this.client.config.endpoint + apiPath);
923
+
924
+ const apiHeaders: { [header: string]: string } = {
925
+ 'content-type': 'application/json',
926
+ }
927
+
928
+
929
+ return await this.client.call(
930
+ 'patch',
931
+ uri,
932
+ apiHeaders,
933
+ payload
934
+ );
935
+ }
936
+ /**
937
+ * List platforms
938
+ *
939
+ *
940
+ * @param {string} projectId
941
+ * @throws {AppcondaException}
942
+ * @returns {Promise<Models.PlatformList>}
943
+ */
944
+ async listPlatforms(projectId: string): Promise<Models.PlatformList> {
945
+ if (typeof projectId === 'undefined') {
946
+ throw new AppcondaException('Missing required parameter: "projectId"');
947
+ }
948
+ const apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
949
+ const payload: Payload = {};
950
+ const uri = new URL(this.client.config.endpoint + apiPath);
951
+
952
+ const apiHeaders: { [header: string]: string } = {
953
+ 'content-type': 'application/json',
954
+ }
955
+
956
+
957
+ return await this.client.call(
958
+ 'get',
959
+ uri,
960
+ apiHeaders,
961
+ payload
962
+ );
963
+ }
964
+ /**
965
+ * Create platform
966
+ *
967
+ *
968
+ * @param {string} projectId
969
+ * @param {PlatformType} type
970
+ * @param {string} name
971
+ * @param {string} key
972
+ * @param {string} store
973
+ * @param {string} hostname
974
+ * @throws {AppcondaException}
975
+ * @returns {Promise<Models.Platform>}
976
+ */
977
+ async createPlatform(projectId: string, type: PlatformType, name: string, key?: string, store?: string, hostname?: string): Promise<Models.Platform> {
978
+ if (typeof projectId === 'undefined') {
979
+ throw new AppcondaException('Missing required parameter: "projectId"');
980
+ }
981
+ if (typeof type === 'undefined') {
982
+ throw new AppcondaException('Missing required parameter: "type"');
983
+ }
984
+ if (typeof name === 'undefined') {
985
+ throw new AppcondaException('Missing required parameter: "name"');
986
+ }
987
+ const apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
988
+ const payload: Payload = {};
989
+ if (typeof type !== 'undefined') {
990
+ payload['type'] = type;
991
+ }
992
+ if (typeof name !== 'undefined') {
993
+ payload['name'] = name;
994
+ }
995
+ if (typeof key !== 'undefined') {
996
+ payload['key'] = key;
997
+ }
998
+ if (typeof store !== 'undefined') {
999
+ payload['store'] = store;
1000
+ }
1001
+ if (typeof hostname !== 'undefined') {
1002
+ payload['hostname'] = hostname;
1003
+ }
1004
+ const uri = new URL(this.client.config.endpoint + apiPath);
1005
+
1006
+ const apiHeaders: { [header: string]: string } = {
1007
+ 'content-type': 'application/json',
1008
+ }
1009
+
1010
+
1011
+ return await this.client.call(
1012
+ 'post',
1013
+ uri,
1014
+ apiHeaders,
1015
+ payload
1016
+ );
1017
+ }
1018
+ /**
1019
+ * Get platform
1020
+ *
1021
+ *
1022
+ * @param {string} projectId
1023
+ * @param {string} platformId
1024
+ * @throws {AppcondaException}
1025
+ * @returns {Promise<Models.Platform>}
1026
+ */
1027
+ async getPlatform(projectId: string, platformId: string): Promise<Models.Platform> {
1028
+ if (typeof projectId === 'undefined') {
1029
+ throw new AppcondaException('Missing required parameter: "projectId"');
1030
+ }
1031
+ if (typeof platformId === 'undefined') {
1032
+ throw new AppcondaException('Missing required parameter: "platformId"');
1033
+ }
1034
+ const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
1035
+ const payload: Payload = {};
1036
+ const uri = new URL(this.client.config.endpoint + apiPath);
1037
+
1038
+ const apiHeaders: { [header: string]: string } = {
1039
+ 'content-type': 'application/json',
1040
+ }
1041
+
1042
+
1043
+ return await this.client.call(
1044
+ 'get',
1045
+ uri,
1046
+ apiHeaders,
1047
+ payload
1048
+ );
1049
+ }
1050
+ /**
1051
+ * Update platform
1052
+ *
1053
+ *
1054
+ * @param {string} projectId
1055
+ * @param {string} platformId
1056
+ * @param {string} name
1057
+ * @param {string} key
1058
+ * @param {string} store
1059
+ * @param {string} hostname
1060
+ * @throws {AppcondaException}
1061
+ * @returns {Promise<Models.Platform>}
1062
+ */
1063
+ async updatePlatform(projectId: string, platformId: string, name: string, key?: string, store?: string, hostname?: string): Promise<Models.Platform> {
1064
+ if (typeof projectId === 'undefined') {
1065
+ throw new AppcondaException('Missing required parameter: "projectId"');
1066
+ }
1067
+ if (typeof platformId === 'undefined') {
1068
+ throw new AppcondaException('Missing required parameter: "platformId"');
1069
+ }
1070
+ if (typeof name === 'undefined') {
1071
+ throw new AppcondaException('Missing required parameter: "name"');
1072
+ }
1073
+ const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
1074
+ const payload: Payload = {};
1075
+ if (typeof name !== 'undefined') {
1076
+ payload['name'] = name;
1077
+ }
1078
+ if (typeof key !== 'undefined') {
1079
+ payload['key'] = key;
1080
+ }
1081
+ if (typeof store !== 'undefined') {
1082
+ payload['store'] = store;
1083
+ }
1084
+ if (typeof hostname !== 'undefined') {
1085
+ payload['hostname'] = hostname;
1086
+ }
1087
+ const uri = new URL(this.client.config.endpoint + apiPath);
1088
+
1089
+ const apiHeaders: { [header: string]: string } = {
1090
+ 'content-type': 'application/json',
1091
+ }
1092
+
1093
+
1094
+ return await this.client.call(
1095
+ 'put',
1096
+ uri,
1097
+ apiHeaders,
1098
+ payload
1099
+ );
1100
+ }
1101
+ /**
1102
+ * Delete platform
1103
+ *
1104
+ *
1105
+ * @param {string} projectId
1106
+ * @param {string} platformId
1107
+ * @throws {AppcondaException}
1108
+ * @returns {Promise<{}>}
1109
+ */
1110
+ async deletePlatform(projectId: string, platformId: string): Promise<{}> {
1111
+ if (typeof projectId === 'undefined') {
1112
+ throw new AppcondaException('Missing required parameter: "projectId"');
1113
+ }
1114
+ if (typeof platformId === 'undefined') {
1115
+ throw new AppcondaException('Missing required parameter: "platformId"');
1116
+ }
1117
+ const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
1118
+ const payload: Payload = {};
1119
+ const uri = new URL(this.client.config.endpoint + apiPath);
1120
+
1121
+ const apiHeaders: { [header: string]: string } = {
1122
+ 'content-type': 'application/json',
1123
+ }
1124
+
1125
+
1126
+ return await this.client.call(
1127
+ 'delete',
1128
+ uri,
1129
+ apiHeaders,
1130
+ payload
1131
+ );
1132
+ }
1133
+ /**
1134
+ * Update service status
1135
+ *
1136
+ *
1137
+ * @param {string} projectId
1138
+ * @param {ApiService} service
1139
+ * @param {boolean} status
1140
+ * @throws {AppcondaException}
1141
+ * @returns {Promise<Models.Project>}
1142
+ */
1143
+ async updateServiceStatus(projectId: string, service: ApiService, status: boolean): Promise<Models.Project> {
1144
+ if (typeof projectId === 'undefined') {
1145
+ throw new AppcondaException('Missing required parameter: "projectId"');
1146
+ }
1147
+ if (typeof service === 'undefined') {
1148
+ throw new AppcondaException('Missing required parameter: "service"');
1149
+ }
1150
+ if (typeof status === 'undefined') {
1151
+ throw new AppcondaException('Missing required parameter: "status"');
1152
+ }
1153
+ const apiPath = '/projects/{projectId}/service'.replace('{projectId}', projectId);
1154
+ const payload: Payload = {};
1155
+ if (typeof service !== 'undefined') {
1156
+ payload['service'] = service;
1157
+ }
1158
+ if (typeof status !== 'undefined') {
1159
+ payload['status'] = status;
1160
+ }
1161
+ const uri = new URL(this.client.config.endpoint + apiPath);
1162
+
1163
+ const apiHeaders: { [header: string]: string } = {
1164
+ 'content-type': 'application/json',
1165
+ }
1166
+
1167
+
1168
+ return await this.client.call(
1169
+ 'patch',
1170
+ uri,
1171
+ apiHeaders,
1172
+ payload
1173
+ );
1174
+ }
1175
+ /**
1176
+ * Update all service status
1177
+ *
1178
+ *
1179
+ * @param {string} projectId
1180
+ * @param {boolean} status
1181
+ * @throws {AppcondaException}
1182
+ * @returns {Promise<Models.Project>}
1183
+ */
1184
+ async updateServiceStatusAll(projectId: string, status: boolean): Promise<Models.Project> {
1185
+ if (typeof projectId === 'undefined') {
1186
+ throw new AppcondaException('Missing required parameter: "projectId"');
1187
+ }
1188
+ if (typeof status === 'undefined') {
1189
+ throw new AppcondaException('Missing required parameter: "status"');
1190
+ }
1191
+ const apiPath = '/projects/{projectId}/service/all'.replace('{projectId}', projectId);
1192
+ const payload: Payload = {};
1193
+ if (typeof status !== 'undefined') {
1194
+ payload['status'] = status;
1195
+ }
1196
+ const uri = new URL(this.client.config.endpoint + apiPath);
1197
+
1198
+ const apiHeaders: { [header: string]: string } = {
1199
+ 'content-type': 'application/json',
1200
+ }
1201
+
1202
+
1203
+ return await this.client.call(
1204
+ 'patch',
1205
+ uri,
1206
+ apiHeaders,
1207
+ payload
1208
+ );
1209
+ }
1210
+ /**
1211
+ * Update SMTP
1212
+ *
1213
+ *
1214
+ * @param {string} projectId
1215
+ * @param {boolean} enabled
1216
+ * @param {string} senderName
1217
+ * @param {string} senderEmail
1218
+ * @param {string} replyTo
1219
+ * @param {string} host
1220
+ * @param {number} port
1221
+ * @param {string} username
1222
+ * @param {string} password
1223
+ * @param {SMTPSecure} secure
1224
+ * @throws {AppcondaException}
1225
+ * @returns {Promise<Models.Project>}
1226
+ */
1227
+ async updateSmtp(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project> {
1228
+ if (typeof projectId === 'undefined') {
1229
+ throw new AppcondaException('Missing required parameter: "projectId"');
1230
+ }
1231
+ if (typeof enabled === 'undefined') {
1232
+ throw new AppcondaException('Missing required parameter: "enabled"');
1233
+ }
1234
+ const apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
1235
+ const payload: Payload = {};
1236
+ if (typeof enabled !== 'undefined') {
1237
+ payload['enabled'] = enabled;
1238
+ }
1239
+ if (typeof senderName !== 'undefined') {
1240
+ payload['senderName'] = senderName;
1241
+ }
1242
+ if (typeof senderEmail !== 'undefined') {
1243
+ payload['senderEmail'] = senderEmail;
1244
+ }
1245
+ if (typeof replyTo !== 'undefined') {
1246
+ payload['replyTo'] = replyTo;
1247
+ }
1248
+ if (typeof host !== 'undefined') {
1249
+ payload['host'] = host;
1250
+ }
1251
+ if (typeof port !== 'undefined') {
1252
+ payload['port'] = port;
1253
+ }
1254
+ if (typeof username !== 'undefined') {
1255
+ payload['username'] = username;
1256
+ }
1257
+ if (typeof password !== 'undefined') {
1258
+ payload['password'] = password;
1259
+ }
1260
+ if (typeof secure !== 'undefined') {
1261
+ payload['secure'] = secure;
1262
+ }
1263
+ const uri = new URL(this.client.config.endpoint + apiPath);
1264
+
1265
+ const apiHeaders: { [header: string]: string } = {
1266
+ 'content-type': 'application/json',
1267
+ }
1268
+
1269
+
1270
+ return await this.client.call(
1271
+ 'patch',
1272
+ uri,
1273
+ apiHeaders,
1274
+ payload
1275
+ );
1276
+ }
1277
+ /**
1278
+ * Create SMTP test
1279
+ *
1280
+ *
1281
+ * @param {string} projectId
1282
+ * @param {string[]} emails
1283
+ * @param {string} senderName
1284
+ * @param {string} senderEmail
1285
+ * @param {string} host
1286
+ * @param {string} replyTo
1287
+ * @param {number} port
1288
+ * @param {string} username
1289
+ * @param {string} password
1290
+ * @param {SMTPSecure} secure
1291
+ * @throws {AppcondaException}
1292
+ * @returns {Promise<{}>}
1293
+ */
1294
+ async createSmtpTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}> {
1295
+ if (typeof projectId === 'undefined') {
1296
+ throw new AppcondaException('Missing required parameter: "projectId"');
1297
+ }
1298
+ if (typeof emails === 'undefined') {
1299
+ throw new AppcondaException('Missing required parameter: "emails"');
1300
+ }
1301
+ if (typeof senderName === 'undefined') {
1302
+ throw new AppcondaException('Missing required parameter: "senderName"');
1303
+ }
1304
+ if (typeof senderEmail === 'undefined') {
1305
+ throw new AppcondaException('Missing required parameter: "senderEmail"');
1306
+ }
1307
+ if (typeof host === 'undefined') {
1308
+ throw new AppcondaException('Missing required parameter: "host"');
1309
+ }
1310
+ const apiPath = '/projects/{projectId}/smtp/tests'.replace('{projectId}', projectId);
1311
+ const payload: Payload = {};
1312
+ if (typeof emails !== 'undefined') {
1313
+ payload['emails'] = emails;
1314
+ }
1315
+ if (typeof senderName !== 'undefined') {
1316
+ payload['senderName'] = senderName;
1317
+ }
1318
+ if (typeof senderEmail !== 'undefined') {
1319
+ payload['senderEmail'] = senderEmail;
1320
+ }
1321
+ if (typeof replyTo !== 'undefined') {
1322
+ payload['replyTo'] = replyTo;
1323
+ }
1324
+ if (typeof host !== 'undefined') {
1325
+ payload['host'] = host;
1326
+ }
1327
+ if (typeof port !== 'undefined') {
1328
+ payload['port'] = port;
1329
+ }
1330
+ if (typeof username !== 'undefined') {
1331
+ payload['username'] = username;
1332
+ }
1333
+ if (typeof password !== 'undefined') {
1334
+ payload['password'] = password;
1335
+ }
1336
+ if (typeof secure !== 'undefined') {
1337
+ payload['secure'] = secure;
1338
+ }
1339
+ const uri = new URL(this.client.config.endpoint + apiPath);
1340
+
1341
+ const apiHeaders: { [header: string]: string } = {
1342
+ 'content-type': 'application/json',
1343
+ }
1344
+
1345
+
1346
+ return await this.client.call(
1347
+ 'post',
1348
+ uri,
1349
+ apiHeaders,
1350
+ payload
1351
+ );
1352
+ }
1353
+ /**
1354
+ * Update project team
1355
+ *
1356
+ *
1357
+ * @param {string} projectId
1358
+ * @param {string} teamId
1359
+ * @throws {AppcondaException}
1360
+ * @returns {Promise<Models.Project>}
1361
+ */
1362
+ async updateTeam(projectId: string, teamId: string): Promise<Models.Project> {
1363
+ if (typeof projectId === 'undefined') {
1364
+ throw new AppcondaException('Missing required parameter: "projectId"');
1365
+ }
1366
+ if (typeof teamId === 'undefined') {
1367
+ throw new AppcondaException('Missing required parameter: "teamId"');
1368
+ }
1369
+ const apiPath = '/projects/{projectId}/team'.replace('{projectId}', projectId);
1370
+ const payload: Payload = {};
1371
+ if (typeof teamId !== 'undefined') {
1372
+ payload['teamId'] = teamId;
1373
+ }
1374
+ const uri = new URL(this.client.config.endpoint + apiPath);
1375
+
1376
+ const apiHeaders: { [header: string]: string } = {
1377
+ 'content-type': 'application/json',
1378
+ }
1379
+
1380
+
1381
+ return await this.client.call(
1382
+ 'patch',
1383
+ uri,
1384
+ apiHeaders,
1385
+ payload
1386
+ );
1387
+ }
1388
+ /**
1389
+ * Get custom email template
1390
+ *
1391
+ *
1392
+ * @param {string} projectId
1393
+ * @param {EmailTemplateType} type
1394
+ * @param {EmailTemplateLocale} locale
1395
+ * @throws {AppcondaException}
1396
+ * @returns {Promise<Models.EmailTemplate>}
1397
+ */
1398
+ async getEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate> {
1399
+ if (typeof projectId === 'undefined') {
1400
+ throw new AppcondaException('Missing required parameter: "projectId"');
1401
+ }
1402
+ if (typeof type === 'undefined') {
1403
+ throw new AppcondaException('Missing required parameter: "type"');
1404
+ }
1405
+ if (typeof locale === 'undefined') {
1406
+ throw new AppcondaException('Missing required parameter: "locale"');
1407
+ }
1408
+ const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1409
+ const payload: Payload = {};
1410
+ const uri = new URL(this.client.config.endpoint + apiPath);
1411
+
1412
+ const apiHeaders: { [header: string]: string } = {
1413
+ 'content-type': 'application/json',
1414
+ }
1415
+
1416
+
1417
+ return await this.client.call(
1418
+ 'get',
1419
+ uri,
1420
+ apiHeaders,
1421
+ payload
1422
+ );
1423
+ }
1424
+ /**
1425
+ * Update custom email templates
1426
+ *
1427
+ *
1428
+ * @param {string} projectId
1429
+ * @param {EmailTemplateType} type
1430
+ * @param {EmailTemplateLocale} locale
1431
+ * @param {string} subject
1432
+ * @param {string} message
1433
+ * @param {string} senderName
1434
+ * @param {string} senderEmail
1435
+ * @param {string} replyTo
1436
+ * @throws {AppcondaException}
1437
+ * @returns {Promise<Models.Project>}
1438
+ */
1439
+ async updateEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale, subject: string, message: string, senderName?: string, senderEmail?: string, replyTo?: string): Promise<Models.Project> {
1440
+ if (typeof projectId === 'undefined') {
1441
+ throw new AppcondaException('Missing required parameter: "projectId"');
1442
+ }
1443
+ if (typeof type === 'undefined') {
1444
+ throw new AppcondaException('Missing required parameter: "type"');
1445
+ }
1446
+ if (typeof locale === 'undefined') {
1447
+ throw new AppcondaException('Missing required parameter: "locale"');
1448
+ }
1449
+ if (typeof subject === 'undefined') {
1450
+ throw new AppcondaException('Missing required parameter: "subject"');
1451
+ }
1452
+ if (typeof message === 'undefined') {
1453
+ throw new AppcondaException('Missing required parameter: "message"');
1454
+ }
1455
+ const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1456
+ const payload: Payload = {};
1457
+ if (typeof subject !== 'undefined') {
1458
+ payload['subject'] = subject;
1459
+ }
1460
+ if (typeof message !== 'undefined') {
1461
+ payload['message'] = message;
1462
+ }
1463
+ if (typeof senderName !== 'undefined') {
1464
+ payload['senderName'] = senderName;
1465
+ }
1466
+ if (typeof senderEmail !== 'undefined') {
1467
+ payload['senderEmail'] = senderEmail;
1468
+ }
1469
+ if (typeof replyTo !== 'undefined') {
1470
+ payload['replyTo'] = replyTo;
1471
+ }
1472
+ const uri = new URL(this.client.config.endpoint + apiPath);
1473
+
1474
+ const apiHeaders: { [header: string]: string } = {
1475
+ 'content-type': 'application/json',
1476
+ }
1477
+
1478
+
1479
+ return await this.client.call(
1480
+ 'patch',
1481
+ uri,
1482
+ apiHeaders,
1483
+ payload
1484
+ );
1485
+ }
1486
+ /**
1487
+ * Reset custom email template
1488
+ *
1489
+ *
1490
+ * @param {string} projectId
1491
+ * @param {EmailTemplateType} type
1492
+ * @param {EmailTemplateLocale} locale
1493
+ * @throws {AppcondaException}
1494
+ * @returns {Promise<Models.EmailTemplate>}
1495
+ */
1496
+ async deleteEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate> {
1497
+ if (typeof projectId === 'undefined') {
1498
+ throw new AppcondaException('Missing required parameter: "projectId"');
1499
+ }
1500
+ if (typeof type === 'undefined') {
1501
+ throw new AppcondaException('Missing required parameter: "type"');
1502
+ }
1503
+ if (typeof locale === 'undefined') {
1504
+ throw new AppcondaException('Missing required parameter: "locale"');
1505
+ }
1506
+ const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1507
+ const payload: Payload = {};
1508
+ const uri = new URL(this.client.config.endpoint + apiPath);
1509
+
1510
+ const apiHeaders: { [header: string]: string } = {
1511
+ 'content-type': 'application/json',
1512
+ }
1513
+
1514
+
1515
+ return await this.client.call(
1516
+ 'delete',
1517
+ uri,
1518
+ apiHeaders,
1519
+ payload
1520
+ );
1521
+ }
1522
+ /**
1523
+ * Get custom SMS template
1524
+ *
1525
+ *
1526
+ * @param {string} projectId
1527
+ * @param {SmsTemplateType} type
1528
+ * @param {SmsTemplateLocale} locale
1529
+ * @throws {AppcondaException}
1530
+ * @returns {Promise<Models.SmsTemplate>}
1531
+ */
1532
+ async getSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate> {
1533
+ if (typeof projectId === 'undefined') {
1534
+ throw new AppcondaException('Missing required parameter: "projectId"');
1535
+ }
1536
+ if (typeof type === 'undefined') {
1537
+ throw new AppcondaException('Missing required parameter: "type"');
1538
+ }
1539
+ if (typeof locale === 'undefined') {
1540
+ throw new AppcondaException('Missing required parameter: "locale"');
1541
+ }
1542
+ const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1543
+ const payload: Payload = {};
1544
+ const uri = new URL(this.client.config.endpoint + apiPath);
1545
+
1546
+ const apiHeaders: { [header: string]: string } = {
1547
+ 'content-type': 'application/json',
1548
+ }
1549
+
1550
+
1551
+ return await this.client.call(
1552
+ 'get',
1553
+ uri,
1554
+ apiHeaders,
1555
+ payload
1556
+ );
1557
+ }
1558
+ /**
1559
+ * Update custom SMS template
1560
+ *
1561
+ *
1562
+ * @param {string} projectId
1563
+ * @param {SmsTemplateType} type
1564
+ * @param {SmsTemplateLocale} locale
1565
+ * @param {string} message
1566
+ * @throws {AppcondaException}
1567
+ * @returns {Promise<Models.SmsTemplate>}
1568
+ */
1569
+ async updateSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string): Promise<Models.SmsTemplate> {
1570
+ if (typeof projectId === 'undefined') {
1571
+ throw new AppcondaException('Missing required parameter: "projectId"');
1572
+ }
1573
+ if (typeof type === 'undefined') {
1574
+ throw new AppcondaException('Missing required parameter: "type"');
1575
+ }
1576
+ if (typeof locale === 'undefined') {
1577
+ throw new AppcondaException('Missing required parameter: "locale"');
1578
+ }
1579
+ if (typeof message === 'undefined') {
1580
+ throw new AppcondaException('Missing required parameter: "message"');
1581
+ }
1582
+ const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1583
+ const payload: Payload = {};
1584
+ if (typeof message !== 'undefined') {
1585
+ payload['message'] = message;
1586
+ }
1587
+ const uri = new URL(this.client.config.endpoint + apiPath);
1588
+
1589
+ const apiHeaders: { [header: string]: string } = {
1590
+ 'content-type': 'application/json',
1591
+ }
1592
+
1593
+
1594
+ return await this.client.call(
1595
+ 'patch',
1596
+ uri,
1597
+ apiHeaders,
1598
+ payload
1599
+ );
1600
+ }
1601
+ /**
1602
+ * Reset custom SMS template
1603
+ *
1604
+ *
1605
+ * @param {string} projectId
1606
+ * @param {SmsTemplateType} type
1607
+ * @param {SmsTemplateLocale} locale
1608
+ * @throws {AppcondaException}
1609
+ * @returns {Promise<Models.SmsTemplate>}
1610
+ */
1611
+ async deleteSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate> {
1612
+ if (typeof projectId === 'undefined') {
1613
+ throw new AppcondaException('Missing required parameter: "projectId"');
1614
+ }
1615
+ if (typeof type === 'undefined') {
1616
+ throw new AppcondaException('Missing required parameter: "type"');
1617
+ }
1618
+ if (typeof locale === 'undefined') {
1619
+ throw new AppcondaException('Missing required parameter: "locale"');
1620
+ }
1621
+ const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1622
+ const payload: Payload = {};
1623
+ const uri = new URL(this.client.config.endpoint + apiPath);
1624
+
1625
+ const apiHeaders: { [header: string]: string } = {
1626
+ 'content-type': 'application/json',
1627
+ }
1628
+
1629
+
1630
+ return await this.client.call(
1631
+ 'delete',
1632
+ uri,
1633
+ apiHeaders,
1634
+ payload
1635
+ );
1636
+ }
1637
+ /**
1638
+ * List webhooks
1639
+ *
1640
+ *
1641
+ * @param {string} projectId
1642
+ * @throws {AppcondaException}
1643
+ * @returns {Promise<Models.WebhookList>}
1644
+ */
1645
+ async listWebhooks(projectId: string): Promise<Models.WebhookList> {
1646
+ if (typeof projectId === 'undefined') {
1647
+ throw new AppcondaException('Missing required parameter: "projectId"');
1648
+ }
1649
+ const apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
1650
+ const payload: Payload = {};
1651
+ const uri = new URL(this.client.config.endpoint + apiPath);
1652
+
1653
+ const apiHeaders: { [header: string]: string } = {
1654
+ 'content-type': 'application/json',
1655
+ }
1656
+
1657
+
1658
+ return await this.client.call(
1659
+ 'get',
1660
+ uri,
1661
+ apiHeaders,
1662
+ payload
1663
+ );
1664
+ }
1665
+ /**
1666
+ * Create webhook
1667
+ *
1668
+ *
1669
+ * @param {string} projectId
1670
+ * @param {string} name
1671
+ * @param {string[]} events
1672
+ * @param {string} url
1673
+ * @param {boolean} security
1674
+ * @param {boolean} enabled
1675
+ * @param {string} httpUser
1676
+ * @param {string} httpPass
1677
+ * @throws {AppcondaException}
1678
+ * @returns {Promise<Models.Webhook>}
1679
+ */
1680
+ async createWebhook(projectId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook> {
1681
+ if (typeof projectId === 'undefined') {
1682
+ throw new AppcondaException('Missing required parameter: "projectId"');
1683
+ }
1684
+ if (typeof name === 'undefined') {
1685
+ throw new AppcondaException('Missing required parameter: "name"');
1686
+ }
1687
+ if (typeof events === 'undefined') {
1688
+ throw new AppcondaException('Missing required parameter: "events"');
1689
+ }
1690
+ if (typeof url === 'undefined') {
1691
+ throw new AppcondaException('Missing required parameter: "url"');
1692
+ }
1693
+ if (typeof security === 'undefined') {
1694
+ throw new AppcondaException('Missing required parameter: "security"');
1695
+ }
1696
+ const apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
1697
+ const payload: Payload = {};
1698
+ if (typeof name !== 'undefined') {
1699
+ payload['name'] = name;
1700
+ }
1701
+ if (typeof enabled !== 'undefined') {
1702
+ payload['enabled'] = enabled;
1703
+ }
1704
+ if (typeof events !== 'undefined') {
1705
+ payload['events'] = events;
1706
+ }
1707
+ if (typeof url !== 'undefined') {
1708
+ payload['url'] = url;
1709
+ }
1710
+ if (typeof security !== 'undefined') {
1711
+ payload['security'] = security;
1712
+ }
1713
+ if (typeof httpUser !== 'undefined') {
1714
+ payload['httpUser'] = httpUser;
1715
+ }
1716
+ if (typeof httpPass !== 'undefined') {
1717
+ payload['httpPass'] = httpPass;
1718
+ }
1719
+ const uri = new URL(this.client.config.endpoint + apiPath);
1720
+
1721
+ const apiHeaders: { [header: string]: string } = {
1722
+ 'content-type': 'application/json',
1723
+ }
1724
+
1725
+
1726
+ return await this.client.call(
1727
+ 'post',
1728
+ uri,
1729
+ apiHeaders,
1730
+ payload
1731
+ );
1732
+ }
1733
+ /**
1734
+ * Get webhook
1735
+ *
1736
+ *
1737
+ * @param {string} projectId
1738
+ * @param {string} webhookId
1739
+ * @throws {AppcondaException}
1740
+ * @returns {Promise<Models.Webhook>}
1741
+ */
1742
+ async getWebhook(projectId: string, webhookId: string): Promise<Models.Webhook> {
1743
+ if (typeof projectId === 'undefined') {
1744
+ throw new AppcondaException('Missing required parameter: "projectId"');
1745
+ }
1746
+ if (typeof webhookId === 'undefined') {
1747
+ throw new AppcondaException('Missing required parameter: "webhookId"');
1748
+ }
1749
+ const apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1750
+ const payload: Payload = {};
1751
+ const uri = new URL(this.client.config.endpoint + apiPath);
1752
+
1753
+ const apiHeaders: { [header: string]: string } = {
1754
+ 'content-type': 'application/json',
1755
+ }
1756
+
1757
+
1758
+ return await this.client.call(
1759
+ 'get',
1760
+ uri,
1761
+ apiHeaders,
1762
+ payload
1763
+ );
1764
+ }
1765
+ /**
1766
+ * Update webhook
1767
+ *
1768
+ *
1769
+ * @param {string} projectId
1770
+ * @param {string} webhookId
1771
+ * @param {string} name
1772
+ * @param {string[]} events
1773
+ * @param {string} url
1774
+ * @param {boolean} security
1775
+ * @param {boolean} enabled
1776
+ * @param {string} httpUser
1777
+ * @param {string} httpPass
1778
+ * @throws {AppcondaException}
1779
+ * @returns {Promise<Models.Webhook>}
1780
+ */
1781
+ async updateWebhook(projectId: string, webhookId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook> {
1782
+ if (typeof projectId === 'undefined') {
1783
+ throw new AppcondaException('Missing required parameter: "projectId"');
1784
+ }
1785
+ if (typeof webhookId === 'undefined') {
1786
+ throw new AppcondaException('Missing required parameter: "webhookId"');
1787
+ }
1788
+ if (typeof name === 'undefined') {
1789
+ throw new AppcondaException('Missing required parameter: "name"');
1790
+ }
1791
+ if (typeof events === 'undefined') {
1792
+ throw new AppcondaException('Missing required parameter: "events"');
1793
+ }
1794
+ if (typeof url === 'undefined') {
1795
+ throw new AppcondaException('Missing required parameter: "url"');
1796
+ }
1797
+ if (typeof security === 'undefined') {
1798
+ throw new AppcondaException('Missing required parameter: "security"');
1799
+ }
1800
+ const apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1801
+ const payload: Payload = {};
1802
+ if (typeof name !== 'undefined') {
1803
+ payload['name'] = name;
1804
+ }
1805
+ if (typeof enabled !== 'undefined') {
1806
+ payload['enabled'] = enabled;
1807
+ }
1808
+ if (typeof events !== 'undefined') {
1809
+ payload['events'] = events;
1810
+ }
1811
+ if (typeof url !== 'undefined') {
1812
+ payload['url'] = url;
1813
+ }
1814
+ if (typeof security !== 'undefined') {
1815
+ payload['security'] = security;
1816
+ }
1817
+ if (typeof httpUser !== 'undefined') {
1818
+ payload['httpUser'] = httpUser;
1819
+ }
1820
+ if (typeof httpPass !== 'undefined') {
1821
+ payload['httpPass'] = httpPass;
1822
+ }
1823
+ const uri = new URL(this.client.config.endpoint + apiPath);
1824
+
1825
+ const apiHeaders: { [header: string]: string } = {
1826
+ 'content-type': 'application/json',
1827
+ }
1828
+
1829
+
1830
+ return await this.client.call(
1831
+ 'put',
1832
+ uri,
1833
+ apiHeaders,
1834
+ payload
1835
+ );
1836
+ }
1837
+ /**
1838
+ * Delete webhook
1839
+ *
1840
+ *
1841
+ * @param {string} projectId
1842
+ * @param {string} webhookId
1843
+ * @throws {AppcondaException}
1844
+ * @returns {Promise<{}>}
1845
+ */
1846
+ async deleteWebhook(projectId: string, webhookId: string): Promise<{}> {
1847
+ if (typeof projectId === 'undefined') {
1848
+ throw new AppcondaException('Missing required parameter: "projectId"');
1849
+ }
1850
+ if (typeof webhookId === 'undefined') {
1851
+ throw new AppcondaException('Missing required parameter: "webhookId"');
1852
+ }
1853
+ const apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1854
+ const payload: Payload = {};
1855
+ const uri = new URL(this.client.config.endpoint + apiPath);
1856
+
1857
+ const apiHeaders: { [header: string]: string } = {
1858
+ 'content-type': 'application/json',
1859
+ }
1860
+
1861
+
1862
+ return await this.client.call(
1863
+ 'delete',
1864
+ uri,
1865
+ apiHeaders,
1866
+ payload
1867
+ );
1868
+ }
1869
+ /**
1870
+ * Update webhook signature key
1871
+ *
1872
+ *
1873
+ * @param {string} projectId
1874
+ * @param {string} webhookId
1875
+ * @throws {AppcondaException}
1876
+ * @returns {Promise<Models.Webhook>}
1877
+ */
1878
+ async updateWebhookSignature(projectId: string, webhookId: string): Promise<Models.Webhook> {
1879
+ if (typeof projectId === 'undefined') {
1880
+ throw new AppcondaException('Missing required parameter: "projectId"');
1881
+ }
1882
+ if (typeof webhookId === 'undefined') {
1883
+ throw new AppcondaException('Missing required parameter: "webhookId"');
1884
+ }
1885
+ const apiPath = '/projects/{projectId}/webhooks/{webhookId}/signature'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1886
+ const payload: Payload = {};
1887
+ const uri = new URL(this.client.config.endpoint + apiPath);
1888
+
1889
+ const apiHeaders: { [header: string]: string } = {
1890
+ 'content-type': 'application/json',
1891
+ }
1892
+
1893
+
1894
+ return await this.client.call(
1895
+ 'patch',
1896
+ uri,
1897
+ apiHeaders,
1898
+ payload
1899
+ );
1900
+ }
1901
+ }