@synteq/cli 0.1.6 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/run.js +61 -2
- package/dist/api/client.d.ts +363 -5
- package/dist/api/client.js +559 -44
- package/dist/api/client.js.map +1 -1
- package/dist/api/factory.d.ts +3 -0
- package/dist/api/factory.js +6 -3
- package/dist/api/factory.js.map +1 -1
- package/dist/api/types.d.ts +896 -4
- package/dist/apps-support/deploy.d.ts +197 -0
- package/dist/apps-support/deploy.js +639 -0
- package/dist/apps-support/deploy.js.map +1 -0
- package/dist/apps-support/dotenv.d.ts +67 -0
- package/dist/apps-support/dotenv.js +136 -0
- package/dist/apps-support/dotenv.js.map +1 -0
- package/dist/apps-support/env-rollout.d.ts +18 -0
- package/dist/apps-support/env-rollout.js +52 -0
- package/dist/apps-support/env-rollout.js.map +1 -0
- package/dist/apps-support/git.d.ts +14 -0
- package/dist/apps-support/git.js +25 -0
- package/dist/apps-support/git.js.map +1 -0
- package/dist/apps-support/link.d.ts +25 -0
- package/dist/apps-support/link.js +39 -0
- package/dist/apps-support/link.js.map +1 -0
- package/dist/apps-support/log-stream.d.ts +25 -0
- package/dist/apps-support/log-stream.js +85 -0
- package/dist/apps-support/log-stream.js.map +1 -0
- package/dist/apps-support/paid-app.d.ts +64 -0
- package/dist/apps-support/paid-app.js +195 -0
- package/dist/apps-support/paid-app.js.map +1 -0
- package/dist/apps-support/plans.d.ts +44 -0
- package/dist/apps-support/plans.js +43 -0
- package/dist/apps-support/plans.js.map +1 -0
- package/dist/apps-support/resolve.d.ts +10 -0
- package/dist/apps-support/resolve.js +53 -0
- package/dist/apps-support/resolve.js.map +1 -0
- package/dist/apps-support/time.d.ts +20 -0
- package/dist/apps-support/time.js +82 -0
- package/dist/apps-support/time.js.map +1 -0
- package/dist/auth/scope.d.ts +19 -0
- package/dist/auth/scope.js +69 -0
- package/dist/auth/scope.js.map +1 -0
- package/dist/auth/tokens.d.ts +3 -0
- package/dist/auth/tokens.js +6 -4
- package/dist/auth/tokens.js.map +1 -1
- package/dist/base/command.d.ts +36 -1
- package/dist/base/command.js +132 -0
- package/dist/base/command.js.map +1 -1
- package/dist/commands/account/index.d.ts +1 -0
- package/dist/commands/account/index.js +1 -0
- package/dist/commands/account/index.js.map +1 -1
- package/dist/commands/account/show.d.ts +1 -0
- package/dist/commands/account/show.js +1 -0
- package/dist/commands/account/show.js.map +1 -1
- package/dist/commands/agents.d.ts +10 -0
- package/dist/commands/agents.js +53 -0
- package/dist/commands/agents.js.map +1 -0
- package/dist/commands/api.d.ts +1 -1
- package/dist/commands/api.js +6 -4
- package/dist/commands/api.js.map +1 -1
- package/dist/commands/app/deployment/list.d.ts +14 -0
- package/dist/commands/app/deployment/list.js +45 -0
- package/dist/commands/app/deployment/list.js.map +1 -0
- package/dist/commands/app/deployment/rollback.d.ts +18 -0
- package/dist/commands/app/deployment/rollback.js +57 -0
- package/dist/commands/app/deployment/rollback.js.map +1 -0
- package/dist/commands/app/deployment/show.d.ts +26 -0
- package/dist/commands/app/deployment/show.js +98 -0
- package/dist/commands/app/deployment/show.js.map +1 -0
- package/dist/commands/app/domain/add.d.ts +17 -0
- package/dist/commands/app/domain/add.js +59 -0
- package/dist/commands/app/domain/add.js.map +1 -0
- package/dist/commands/app/domain/list.d.ts +14 -0
- package/dist/commands/app/domain/list.js +42 -0
- package/dist/commands/app/domain/list.js.map +1 -0
- package/dist/commands/app/domain/remove.d.ts +16 -0
- package/dist/commands/app/domain/remove.js +51 -0
- package/dist/commands/app/domain/remove.js.map +1 -0
- package/dist/commands/app/domain/verify.d.ts +15 -0
- package/dist/commands/app/domain/verify.js +39 -0
- package/dist/commands/app/domain/verify.js.map +1 -0
- package/dist/commands/app/env/add.d.ts +22 -0
- package/dist/commands/app/env/add.js +103 -0
- package/dist/commands/app/env/add.js.map +1 -0
- package/dist/commands/app/env/list.d.ts +17 -0
- package/dist/commands/app/env/list.js +40 -0
- package/dist/commands/app/env/list.js.map +1 -0
- package/dist/commands/app/env/reveal.d.ts +17 -0
- package/dist/commands/app/env/reveal.js +40 -0
- package/dist/commands/app/env/reveal.js.map +1 -0
- package/dist/commands/app/env/rm.d.ts +16 -0
- package/dist/commands/app/env/rm.js +48 -0
- package/dist/commands/app/env/rm.js.map +1 -0
- package/dist/commands/app/health.d.ts +14 -0
- package/dist/commands/app/health.js +40 -0
- package/dist/commands/app/health.js.map +1 -0
- package/dist/commands/app/index.d.ts +6 -0
- package/dist/commands/app/index.js +7 -0
- package/dist/commands/app/index.js.map +1 -0
- package/dist/commands/app/link.d.ts +22 -0
- package/dist/commands/app/link.js +31 -0
- package/dist/commands/app/link.js.map +1 -0
- package/dist/commands/app/logs.d.ts +25 -0
- package/dist/commands/app/logs.js +121 -0
- package/dist/commands/app/logs.js.map +1 -0
- package/dist/commands/app/metrics.d.ts +21 -0
- package/dist/commands/app/metrics.js +123 -0
- package/dist/commands/app/metrics.js.map +1 -0
- package/dist/commands/app/plan/change.d.ts +18 -0
- package/dist/commands/app/plan/change.js +79 -0
- package/dist/commands/app/plan/change.js.map +1 -0
- package/dist/commands/app/plan/show.d.ts +14 -0
- package/dist/commands/app/plan/show.js +40 -0
- package/dist/commands/app/plan/show.js.map +1 -0
- package/dist/commands/app/settings/set.d.ts +25 -0
- package/dist/commands/app/settings/set.js +96 -0
- package/dist/commands/app/settings/set.js.map +1 -0
- package/dist/commands/app/settings/show.d.ts +14 -0
- package/dist/commands/app/settings/show.js +48 -0
- package/dist/commands/app/settings/show.js.map +1 -0
- package/dist/commands/app/unlink.d.ts +8 -0
- package/dist/commands/app/unlink.js +25 -0
- package/dist/commands/app/unlink.js.map +1 -0
- package/dist/commands/apps/create.d.ts +26 -0
- package/dist/commands/apps/create.js +91 -0
- package/dist/commands/apps/create.js.map +1 -0
- package/dist/commands/apps/list.d.ts +16 -0
- package/dist/commands/apps/list.js +54 -0
- package/dist/commands/apps/list.js.map +1 -0
- package/dist/commands/baremetal/activity.d.ts +14 -0
- package/dist/commands/baremetal/activity.js +53 -0
- package/dist/commands/baremetal/activity.js.map +1 -0
- package/dist/commands/baremetal/bandwidth.d.ts +10 -0
- package/dist/commands/baremetal/bandwidth.js +86 -0
- package/dist/commands/baremetal/bandwidth.js.map +1 -0
- package/dist/commands/baremetal/console.d.ts +20 -0
- package/dist/commands/baremetal/console.js +72 -0
- package/dist/commands/baremetal/console.js.map +1 -0
- package/dist/commands/baremetal/details.d.ts +11 -0
- package/dist/commands/baremetal/details.js +116 -0
- package/dist/commands/baremetal/details.js.map +1 -0
- package/dist/commands/baremetal/index.d.ts +5 -0
- package/dist/commands/baremetal/index.js +6 -0
- package/dist/commands/baremetal/index.js.map +1 -0
- package/dist/commands/baremetal/install-password.d.ts +14 -0
- package/dist/commands/baremetal/install-password.js +80 -0
- package/dist/commands/baremetal/install-password.js.map +1 -0
- package/dist/commands/baremetal/list.d.ts +11 -0
- package/dist/commands/baremetal/list.js +59 -0
- package/dist/commands/baremetal/list.js.map +1 -0
- package/dist/commands/baremetal/order.d.ts +34 -0
- package/dist/commands/baremetal/order.js +394 -0
- package/dist/commands/baremetal/order.js.map +1 -0
- package/dist/commands/baremetal/power.d.ts +18 -0
- package/dist/commands/baremetal/power.js +168 -0
- package/dist/commands/baremetal/power.js.map +1 -0
- package/dist/commands/baremetal/reinstall.d.ts +21 -0
- package/dist/commands/baremetal/reinstall.js +168 -0
- package/dist/commands/baremetal/reinstall.js.map +1 -0
- package/dist/commands/catalog.d.ts +1 -0
- package/dist/commands/catalog.js +5 -0
- package/dist/commands/catalog.js.map +1 -1
- package/dist/commands/config/index.d.ts +1 -0
- package/dist/commands/config/index.js +1 -0
- package/dist/commands/config/index.js.map +1 -1
- package/dist/commands/config/profile/add.d.ts +11 -0
- package/dist/commands/config/profile/add.js +51 -0
- package/dist/commands/config/profile/add.js.map +1 -0
- package/dist/commands/config/profile/list.d.ts +7 -0
- package/dist/commands/config/profile/list.js +29 -0
- package/dist/commands/config/profile/list.js.map +1 -0
- package/dist/commands/config/profile/remove.d.ts +11 -0
- package/dist/commands/config/profile/remove.js +35 -0
- package/dist/commands/config/profile/remove.js.map +1 -0
- package/dist/commands/config/profile/use.d.ts +10 -0
- package/dist/commands/config/profile/use.js +44 -0
- package/dist/commands/config/profile/use.js.map +1 -0
- package/dist/commands/config/set-api-url.d.ts +1 -0
- package/dist/commands/config/set-api-url.js +1 -0
- package/dist/commands/config/set-api-url.js.map +1 -1
- package/dist/commands/config/show.d.ts +1 -0
- package/dist/commands/config/show.js +5 -1
- package/dist/commands/config/show.js.map +1 -1
- package/dist/commands/credits/add.d.ts +1 -0
- package/dist/commands/credits/add.js +3 -2
- package/dist/commands/credits/add.js.map +1 -1
- package/dist/commands/credits/index.d.ts +1 -0
- package/dist/commands/credits/index.js +6 -1
- package/dist/commands/credits/index.js.map +1 -1
- package/dist/commands/credits/list.d.ts +1 -0
- package/dist/commands/credits/list.js +1 -0
- package/dist/commands/credits/list.js.map +1 -1
- package/dist/commands/deploy.d.ts +51 -0
- package/dist/commands/deploy.js +515 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/function/create.d.ts +29 -0
- package/dist/commands/function/create.js +113 -0
- package/dist/commands/function/create.js.map +1 -0
- package/dist/commands/function/credits/add.d.ts +29 -0
- package/dist/commands/function/credits/add.js +209 -0
- package/dist/commands/function/credits/add.js.map +1 -0
- package/dist/commands/function/credits/auto-reload.d.ts +27 -0
- package/dist/commands/function/credits/auto-reload.js +107 -0
- package/dist/commands/function/credits/auto-reload.js.map +1 -0
- package/dist/commands/function/credits/index.d.ts +22 -0
- package/dist/commands/function/credits/index.js +80 -0
- package/dist/commands/function/credits/index.js.map +1 -0
- package/dist/commands/function/cron/add.d.ts +19 -0
- package/dist/commands/function/cron/add.js +74 -0
- package/dist/commands/function/cron/add.js.map +1 -0
- package/dist/commands/function/cron/list.d.ts +12 -0
- package/dist/commands/function/cron/list.js +55 -0
- package/dist/commands/function/cron/list.js.map +1 -0
- package/dist/commands/function/cron/rm.d.ts +17 -0
- package/dist/commands/function/cron/rm.js +73 -0
- package/dist/commands/function/cron/rm.js.map +1 -0
- package/dist/commands/function/cron/run.d.ts +16 -0
- package/dist/commands/function/cron/run.js +59 -0
- package/dist/commands/function/cron/run.js.map +1 -0
- package/dist/commands/function/cron/update.d.ts +21 -0
- package/dist/commands/function/cron/update.js +87 -0
- package/dist/commands/function/cron/update.js.map +1 -0
- package/dist/commands/function/delete.d.ts +23 -0
- package/dist/commands/function/delete.js +90 -0
- package/dist/commands/function/delete.js.map +1 -0
- package/dist/commands/function/deploy.d.ts +64 -0
- package/dist/commands/function/deploy.js +608 -0
- package/dist/commands/function/deploy.js.map +1 -0
- package/dist/commands/function/env/list.d.ts +12 -0
- package/dist/commands/function/env/list.js +46 -0
- package/dist/commands/function/env/list.js.map +1 -0
- package/dist/commands/function/env/reveal.d.ts +21 -0
- package/dist/commands/function/env/reveal.js +54 -0
- package/dist/commands/function/env/reveal.js.map +1 -0
- package/dist/commands/function/env/rm.d.ts +17 -0
- package/dist/commands/function/env/rm.js +62 -0
- package/dist/commands/function/env/rm.js.map +1 -0
- package/dist/commands/function/env/set.d.ts +28 -0
- package/dist/commands/function/env/set.js +124 -0
- package/dist/commands/function/env/set.js.map +1 -0
- package/dist/commands/function/index.d.ts +14 -0
- package/dist/commands/function/index.js +11 -0
- package/dist/commands/function/index.js.map +1 -0
- package/dist/commands/function/init.d.ts +47 -0
- package/dist/commands/function/init.js +269 -0
- package/dist/commands/function/init.js.map +1 -0
- package/dist/commands/function/invoke.d.ts +29 -0
- package/dist/commands/function/invoke.js +138 -0
- package/dist/commands/function/invoke.js.map +1 -0
- package/dist/commands/function/link.d.ts +23 -0
- package/dist/commands/function/link.js +80 -0
- package/dist/commands/function/link.js.map +1 -0
- package/dist/commands/function/list.d.ts +16 -0
- package/dist/commands/function/list.js +55 -0
- package/dist/commands/function/list.js.map +1 -0
- package/dist/commands/function/logs.d.ts +29 -0
- package/dist/commands/function/logs.js +171 -0
- package/dist/commands/function/logs.js.map +1 -0
- package/dist/commands/function/pause.d.ts +19 -0
- package/dist/commands/function/pause.js +50 -0
- package/dist/commands/function/pause.js.map +1 -0
- package/dist/commands/function/releases.d.ts +15 -0
- package/dist/commands/function/releases.js +62 -0
- package/dist/commands/function/releases.js.map +1 -0
- package/dist/commands/function/resume.d.ts +16 -0
- package/dist/commands/function/resume.js +47 -0
- package/dist/commands/function/resume.js.map +1 -0
- package/dist/commands/function/rollback.d.ts +18 -0
- package/dist/commands/function/rollback.js +69 -0
- package/dist/commands/function/rollback.js.map +1 -0
- package/dist/commands/function/settings/set.d.ts +23 -0
- package/dist/commands/function/settings/set.js +119 -0
- package/dist/commands/function/settings/set.js.map +1 -0
- package/dist/commands/function/show.d.ts +15 -0
- package/dist/commands/function/show.js +80 -0
- package/dist/commands/function/show.js.map +1 -0
- package/dist/commands/function/unlink.d.ts +9 -0
- package/dist/commands/function/unlink.js +34 -0
- package/dist/commands/function/unlink.js.map +1 -0
- package/dist/commands/gpu/activity.d.ts +1 -0
- package/dist/commands/gpu/activity.js +1 -0
- package/dist/commands/gpu/activity.js.map +1 -1
- package/dist/commands/gpu/bandwidth.d.ts +1 -0
- package/dist/commands/gpu/bandwidth.js +1 -0
- package/dist/commands/gpu/bandwidth.js.map +1 -1
- package/dist/commands/gpu/boot-order.d.ts +1 -0
- package/dist/commands/gpu/boot-order.js +1 -0
- package/dist/commands/gpu/boot-order.js.map +1 -1
- package/dist/commands/gpu/console.d.ts +1 -0
- package/dist/commands/gpu/console.js +1 -0
- package/dist/commands/gpu/console.js.map +1 -1
- package/dist/commands/gpu/details.d.ts +1 -0
- package/dist/commands/gpu/details.js +1 -0
- package/dist/commands/gpu/details.js.map +1 -1
- package/dist/commands/gpu/index.d.ts +1 -0
- package/dist/commands/gpu/index.js +1 -0
- package/dist/commands/gpu/index.js.map +1 -1
- package/dist/commands/gpu/ip/add.d.ts +1 -0
- package/dist/commands/gpu/ip/add.js +1 -0
- package/dist/commands/gpu/ip/add.js.map +1 -1
- package/dist/commands/gpu/ip/list.d.ts +1 -0
- package/dist/commands/gpu/ip/list.js +1 -0
- package/dist/commands/gpu/ip/list.js.map +1 -1
- package/dist/commands/gpu/list.d.ts +1 -0
- package/dist/commands/gpu/list.js +1 -0
- package/dist/commands/gpu/list.js.map +1 -1
- package/dist/commands/gpu/order.d.ts +1 -0
- package/dist/commands/gpu/order.js +1 -0
- package/dist/commands/gpu/order.js.map +1 -1
- package/dist/commands/gpu/power.d.ts +1 -0
- package/dist/commands/gpu/power.js +1 -0
- package/dist/commands/gpu/power.js.map +1 -1
- package/dist/commands/gpu/reinstall.d.ts +1 -0
- package/dist/commands/gpu/reinstall.js +1 -0
- package/dist/commands/gpu/reinstall.js.map +1 -1
- package/dist/commands/gpu/resize.d.ts +1 -0
- package/dist/commands/gpu/resize.js +1 -0
- package/dist/commands/gpu/resize.js.map +1 -1
- package/dist/commands/gpu/stats.d.ts +1 -0
- package/dist/commands/gpu/stats.js +1 -0
- package/dist/commands/gpu/stats.js.map +1 -1
- package/dist/commands/help.d.ts +2 -0
- package/dist/commands/help.js +5 -0
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/instant-metal/activity.d.ts +1 -0
- package/dist/commands/instant-metal/activity.js +1 -0
- package/dist/commands/instant-metal/activity.js.map +1 -1
- package/dist/commands/instant-metal/bandwidth.d.ts +1 -0
- package/dist/commands/instant-metal/bandwidth.js +1 -0
- package/dist/commands/instant-metal/bandwidth.js.map +1 -1
- package/dist/commands/instant-metal/boot-order.d.ts +1 -0
- package/dist/commands/instant-metal/boot-order.js +1 -0
- package/dist/commands/instant-metal/boot-order.js.map +1 -1
- package/dist/commands/instant-metal/console.d.ts +1 -0
- package/dist/commands/instant-metal/console.js +1 -0
- package/dist/commands/instant-metal/console.js.map +1 -1
- package/dist/commands/instant-metal/details.d.ts +1 -0
- package/dist/commands/instant-metal/details.js +1 -0
- package/dist/commands/instant-metal/details.js.map +1 -1
- package/dist/commands/instant-metal/index.d.ts +1 -0
- package/dist/commands/instant-metal/index.js +1 -0
- package/dist/commands/instant-metal/index.js.map +1 -1
- package/dist/commands/instant-metal/ip/add.d.ts +1 -0
- package/dist/commands/instant-metal/ip/add.js +1 -0
- package/dist/commands/instant-metal/ip/add.js.map +1 -1
- package/dist/commands/instant-metal/ip/list.d.ts +1 -0
- package/dist/commands/instant-metal/ip/list.js +1 -0
- package/dist/commands/instant-metal/ip/list.js.map +1 -1
- package/dist/commands/instant-metal/list.d.ts +1 -0
- package/dist/commands/instant-metal/list.js +1 -0
- package/dist/commands/instant-metal/list.js.map +1 -1
- package/dist/commands/instant-metal/order.d.ts +1 -0
- package/dist/commands/instant-metal/order.js +1 -0
- package/dist/commands/instant-metal/order.js.map +1 -1
- package/dist/commands/instant-metal/power.d.ts +1 -0
- package/dist/commands/instant-metal/power.js +1 -0
- package/dist/commands/instant-metal/power.js.map +1 -1
- package/dist/commands/instant-metal/reinstall.d.ts +1 -0
- package/dist/commands/instant-metal/reinstall.js +1 -0
- package/dist/commands/instant-metal/reinstall.js.map +1 -1
- package/dist/commands/instant-metal/resize.d.ts +1 -0
- package/dist/commands/instant-metal/resize.js +1 -0
- package/dist/commands/instant-metal/resize.js.map +1 -1
- package/dist/commands/instant-metal/stats.d.ts +1 -0
- package/dist/commands/instant-metal/stats.js +1 -0
- package/dist/commands/instant-metal/stats.js.map +1 -1
- package/dist/commands/link.d.ts +77 -0
- package/dist/commands/link.js +530 -0
- package/dist/commands/link.js.map +1 -0
- package/dist/commands/login.d.ts +1 -0
- package/dist/commands/login.js +10 -0
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.d.ts +1 -0
- package/dist/commands/logout.js +1 -0
- package/dist/commands/logout.js.map +1 -1
- package/dist/commands/order/gpu.d.ts +1 -0
- package/dist/commands/order/gpu.js +1 -0
- package/dist/commands/order/gpu.js.map +1 -1
- package/dist/commands/order/instant-metal.d.ts +1 -0
- package/dist/commands/order/instant-metal.js +1 -0
- package/dist/commands/order/instant-metal.js.map +1 -1
- package/dist/commands/order/storage.d.ts +1 -0
- package/dist/commands/order/storage.js +1 -0
- package/dist/commands/order/storage.js.map +1 -1
- package/dist/commands/order/vps.d.ts +1 -0
- package/dist/commands/order/vps.js +1 -0
- package/dist/commands/order/vps.js.map +1 -1
- package/dist/commands/order.d.ts +1 -0
- package/dist/commands/order.js +4 -1
- package/dist/commands/order.js.map +1 -1
- package/dist/commands/os-images.d.ts +1 -0
- package/dist/commands/os-images.js +3 -0
- package/dist/commands/os-images.js.map +1 -1
- package/dist/commands/payments/index.d.ts +1 -0
- package/dist/commands/payments/index.js +1 -0
- package/dist/commands/payments/index.js.map +1 -1
- package/dist/commands/payments/methods/add.d.ts +1 -0
- package/dist/commands/payments/methods/add.js +1 -0
- package/dist/commands/payments/methods/add.js.map +1 -1
- package/dist/commands/payments/methods/delete.d.ts +1 -0
- package/dist/commands/payments/methods/delete.js +3 -2
- package/dist/commands/payments/methods/delete.js.map +1 -1
- package/dist/commands/payments/methods/index.d.ts +1 -0
- package/dist/commands/payments/methods/index.js +1 -0
- package/dist/commands/payments/methods/index.js.map +1 -1
- package/dist/commands/payments/methods/list.d.ts +1 -0
- package/dist/commands/payments/methods/list.js +1 -0
- package/dist/commands/payments/methods/list.js.map +1 -1
- package/dist/commands/payments/methods/set-default.d.ts +1 -0
- package/dist/commands/payments/methods/set-default.js +1 -0
- package/dist/commands/payments/methods/set-default.js.map +1 -1
- package/dist/commands/projects/index.d.ts +1 -0
- package/dist/commands/projects/index.js +1 -0
- package/dist/commands/projects/index.js.map +1 -1
- package/dist/commands/projects/list.d.ts +1 -0
- package/dist/commands/projects/list.js +1 -0
- package/dist/commands/projects/list.js.map +1 -1
- package/dist/commands/resources.d.ts +1 -0
- package/dist/commands/resources.js +61 -7
- package/dist/commands/resources.js.map +1 -1
- package/dist/commands/settings/index.d.ts +1 -0
- package/dist/commands/settings/index.js +1 -0
- package/dist/commands/settings/index.js.map +1 -1
- package/dist/commands/settings/render-mode.d.ts +1 -0
- package/dist/commands/settings/render-mode.js +1 -0
- package/dist/commands/settings/render-mode.js.map +1 -1
- package/dist/commands/ssh-key/add.d.ts +1 -0
- package/dist/commands/ssh-key/add.js +1 -0
- package/dist/commands/ssh-key/add.js.map +1 -1
- package/dist/commands/ssh-key/delete.d.ts +1 -0
- package/dist/commands/ssh-key/delete.js +1 -0
- package/dist/commands/ssh-key/delete.js.map +1 -1
- package/dist/commands/ssh-key/list.d.ts +1 -0
- package/dist/commands/ssh-key/list.js +1 -0
- package/dist/commands/ssh-key/list.js.map +1 -1
- package/dist/commands/status.d.ts +12 -0
- package/dist/commands/status.js +71 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/storage/attach.d.ts +1 -0
- package/dist/commands/storage/attach.js +1 -0
- package/dist/commands/storage/attach.js.map +1 -1
- package/dist/commands/storage/detach.d.ts +1 -0
- package/dist/commands/storage/detach.js +2 -1
- package/dist/commands/storage/detach.js.map +1 -1
- package/dist/commands/storage/list.d.ts +1 -0
- package/dist/commands/storage/list.js +7 -2
- package/dist/commands/storage/list.js.map +1 -1
- package/dist/commands/storage/order.d.ts +3 -0
- package/dist/commands/storage/order.js +101 -18
- package/dist/commands/storage/order.js.map +1 -1
- package/dist/commands/storage/resize.d.ts +1 -0
- package/dist/commands/storage/resize.js +20 -6
- package/dist/commands/storage/resize.js.map +1 -1
- package/dist/commands/team/details.d.ts +1 -0
- package/dist/commands/team/details.js +1 -0
- package/dist/commands/team/details.js.map +1 -1
- package/dist/commands/team/invite.d.ts +1 -0
- package/dist/commands/team/invite.js +1 -0
- package/dist/commands/team/invite.js.map +1 -1
- package/dist/commands/team.d.ts +1 -0
- package/dist/commands/team.js +1 -0
- package/dist/commands/team.js.map +1 -1
- package/dist/commands/tickets/close.d.ts +1 -0
- package/dist/commands/tickets/close.js +1 -0
- package/dist/commands/tickets/close.js.map +1 -1
- package/dist/commands/tickets/create.d.ts +3 -0
- package/dist/commands/tickets/create.js +41 -1
- package/dist/commands/tickets/create.js.map +1 -1
- package/dist/commands/tickets/departments.d.ts +1 -0
- package/dist/commands/tickets/departments.js +1 -0
- package/dist/commands/tickets/departments.js.map +1 -1
- package/dist/commands/tickets/download.d.ts +18 -0
- package/dist/commands/tickets/download.js +138 -0
- package/dist/commands/tickets/download.js.map +1 -0
- package/dist/commands/tickets/list.d.ts +1 -0
- package/dist/commands/tickets/list.js +14 -7
- package/dist/commands/tickets/list.js.map +1 -1
- package/dist/commands/tickets/open.d.ts +1 -0
- package/dist/commands/tickets/open.js +1 -0
- package/dist/commands/tickets/open.js.map +1 -1
- package/dist/commands/tickets/reopen.d.ts +11 -0
- package/dist/commands/tickets/reopen.js +34 -0
- package/dist/commands/tickets/reopen.js.map +1 -0
- package/dist/commands/tickets/reply.d.ts +3 -0
- package/dist/commands/tickets/reply.js +34 -4
- package/dist/commands/tickets/reply.js.map +1 -1
- package/dist/commands/transit.d.ts +1 -0
- package/dist/commands/transit.js +1 -0
- package/dist/commands/transit.js.map +1 -1
- package/dist/commands/tui/index.d.ts +1 -0
- package/dist/commands/tui/index.js +21 -0
- package/dist/commands/tui/index.js.map +1 -1
- package/dist/commands/vds/activity.d.ts +1 -0
- package/dist/commands/vds/activity.js +1 -0
- package/dist/commands/vds/activity.js.map +1 -1
- package/dist/commands/vds/bandwidth.d.ts +1 -0
- package/dist/commands/vds/bandwidth.js +1 -0
- package/dist/commands/vds/bandwidth.js.map +1 -1
- package/dist/commands/vds/boot-order.d.ts +1 -0
- package/dist/commands/vds/boot-order.js +1 -0
- package/dist/commands/vds/boot-order.js.map +1 -1
- package/dist/commands/vds/console.d.ts +1 -0
- package/dist/commands/vds/console.js +1 -0
- package/dist/commands/vds/console.js.map +1 -1
- package/dist/commands/vds/details.d.ts +1 -0
- package/dist/commands/vds/details.js +1 -0
- package/dist/commands/vds/details.js.map +1 -1
- package/dist/commands/vds/index.d.ts +1 -0
- package/dist/commands/vds/index.js +1 -0
- package/dist/commands/vds/index.js.map +1 -1
- package/dist/commands/vds/ip/add.d.ts +1 -0
- package/dist/commands/vds/ip/add.js +1 -0
- package/dist/commands/vds/ip/add.js.map +1 -1
- package/dist/commands/vds/ip/list.d.ts +1 -0
- package/dist/commands/vds/ip/list.js +1 -0
- package/dist/commands/vds/ip/list.js.map +1 -1
- package/dist/commands/vds/list.d.ts +1 -0
- package/dist/commands/vds/list.js +1 -0
- package/dist/commands/vds/list.js.map +1 -1
- package/dist/commands/vds/order.d.ts +1 -0
- package/dist/commands/vds/order.js +73 -7
- package/dist/commands/vds/order.js.map +1 -1
- package/dist/commands/vds/power.d.ts +1 -0
- package/dist/commands/vds/power.js +1 -0
- package/dist/commands/vds/power.js.map +1 -1
- package/dist/commands/vds/reinstall.d.ts +1 -0
- package/dist/commands/vds/reinstall.js +1 -0
- package/dist/commands/vds/reinstall.js.map +1 -1
- package/dist/commands/vds/resize.d.ts +1 -0
- package/dist/commands/vds/resize.js +1 -0
- package/dist/commands/vds/resize.js.map +1 -1
- package/dist/commands/vds/stats.d.ts +1 -0
- package/dist/commands/vds/stats.js +1 -0
- package/dist/commands/vds/stats.js.map +1 -1
- package/dist/commands/vps/activity.d.ts +1 -0
- package/dist/commands/vps/activity.js +1 -0
- package/dist/commands/vps/activity.js.map +1 -1
- package/dist/commands/vps/bandwidth.d.ts +1 -0
- package/dist/commands/vps/bandwidth.js +1 -0
- package/dist/commands/vps/bandwidth.js.map +1 -1
- package/dist/commands/vps/boot-order.d.ts +1 -0
- package/dist/commands/vps/boot-order.js +1 -0
- package/dist/commands/vps/boot-order.js.map +1 -1
- package/dist/commands/vps/console.d.ts +1 -0
- package/dist/commands/vps/console.js +15 -6
- package/dist/commands/vps/console.js.map +1 -1
- package/dist/commands/vps/details.d.ts +1 -0
- package/dist/commands/vps/details.js +8 -1
- package/dist/commands/vps/details.js.map +1 -1
- package/dist/commands/vps/ip/add.d.ts +1 -0
- package/dist/commands/vps/ip/add.js +77 -9
- package/dist/commands/vps/ip/add.js.map +1 -1
- package/dist/commands/vps/ip/list.d.ts +1 -0
- package/dist/commands/vps/ip/list.js +1 -0
- package/dist/commands/vps/ip/list.js.map +1 -1
- package/dist/commands/vps/list.d.ts +1 -0
- package/dist/commands/vps/list.js +14 -4
- package/dist/commands/vps/list.js.map +1 -1
- package/dist/commands/vps/order.d.ts +20 -0
- package/dist/commands/vps/order.js +180 -23
- package/dist/commands/vps/order.js.map +1 -1
- package/dist/commands/vps/power.d.ts +1 -0
- package/dist/commands/vps/power.js +3 -2
- package/dist/commands/vps/power.js.map +1 -1
- package/dist/commands/vps/reinstall.d.ts +1 -0
- package/dist/commands/vps/reinstall.js +3 -2
- package/dist/commands/vps/reinstall.js.map +1 -1
- package/dist/commands/vps/resize.d.ts +1 -0
- package/dist/commands/vps/resize.js +37 -13
- package/dist/commands/vps/resize.js.map +1 -1
- package/dist/commands/vps/stats.d.ts +1 -0
- package/dist/commands/vps/stats.js +1 -0
- package/dist/commands/vps/stats.js.map +1 -1
- package/dist/commands/whoami.d.ts +6 -0
- package/dist/commands/whoami.js +8 -2
- package/dist/commands/whoami.js.map +1 -1
- package/dist/config/paths.d.ts +1 -1
- package/dist/config/paths.js +6 -1
- package/dist/config/paths.js.map +1 -1
- package/dist/config/store.d.ts +58 -0
- package/dist/config/store.js +84 -2
- package/dist/config/store.js.map +1 -1
- package/dist/functions-support/credits.d.ts +64 -0
- package/dist/functions-support/credits.js +181 -0
- package/dist/functions-support/credits.js.map +1 -0
- package/dist/functions-support/cron.d.ts +17 -0
- package/dist/functions-support/cron.js +99 -0
- package/dist/functions-support/cron.js.map +1 -0
- package/dist/functions-support/env.d.ts +23 -0
- package/dist/functions-support/env.js +44 -0
- package/dist/functions-support/env.js.map +1 -0
- package/dist/functions-support/link.d.ts +25 -0
- package/dist/functions-support/link.js +51 -0
- package/dist/functions-support/link.js.map +1 -0
- package/dist/functions-support/poll.d.ts +40 -0
- package/dist/functions-support/poll.js +109 -0
- package/dist/functions-support/poll.js.map +1 -0
- package/dist/functions-support/resolve.d.ts +3 -0
- package/dist/functions-support/resolve.js +31 -0
- package/dist/functions-support/resolve.js.map +1 -0
- package/dist/functions-support/runtime.d.ts +30 -0
- package/dist/functions-support/runtime.js +52 -0
- package/dist/functions-support/runtime.js.map +1 -0
- package/dist/functions-support/source.d.ts +92 -0
- package/dist/functions-support/source.js +343 -0
- package/dist/functions-support/source.js.map +1 -0
- package/dist/help/help-filter.d.ts +10 -0
- package/dist/help/help-filter.js +9 -0
- package/dist/help/help-filter.js.map +1 -0
- package/dist/help/scope-aware-help.d.ts +30 -0
- package/dist/help/scope-aware-help.js +80 -0
- package/dist/help/scope-aware-help.js.map +1 -0
- package/dist/tui/App.js +11 -26
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/components/Menu.d.ts +3 -1
- package/dist/tui/components/Menu.js +7 -3
- package/dist/tui/components/Menu.js.map +1 -1
- package/dist/tui/components/NumberInput.js +1 -1
- package/dist/tui/components/Sparkline.js +1 -1
- package/dist/tui/router.d.ts +1 -1
- package/dist/tui/router.js.map +1 -1
- package/dist/tui/screens/Billing.js +66 -14
- package/dist/tui/screens/Billing.js.map +1 -1
- package/dist/tui/screens/Dashboard.js +8 -7
- package/dist/tui/screens/Dashboard.js.map +1 -1
- package/dist/tui/screens/Deploy.d.ts +2 -0
- package/dist/tui/screens/Deploy.js +912 -0
- package/dist/tui/screens/Deploy.js.map +1 -0
- package/dist/tui/screens/Order.js +385 -52
- package/dist/tui/screens/Order.js.map +1 -1
- package/dist/tui/screens/Resources.js +277 -35
- package/dist/tui/screens/Resources.js.map +1 -1
- package/dist/tui/screens/Tickets.js +47 -26
- package/dist/tui/screens/Tickets.js.map +1 -1
- package/dist/tui/screens/deployPreset.d.ts +20 -0
- package/dist/tui/screens/deployPreset.js +11 -0
- package/dist/tui/screens/deployPreset.js.map +1 -0
- package/dist/tui/screens/resources/AppDetail.d.ts +7 -0
- package/dist/tui/screens/resources/AppDetail.js +810 -0
- package/dist/tui/screens/resources/AppDetail.js.map +1 -0
- package/dist/tui/screens/resources/FunctionDetail.d.ts +7 -0
- package/dist/tui/screens/resources/FunctionDetail.js +751 -0
- package/dist/tui/screens/resources/FunctionDetail.js.map +1 -0
- package/dist/ui/attach.d.ts +15 -0
- package/dist/ui/attach.js +63 -0
- package/dist/ui/attach.js.map +1 -0
- package/dist/ui/baremetal-resolve.d.ts +10 -0
- package/dist/ui/baremetal-resolve.js +50 -0
- package/dist/ui/baremetal-resolve.js.map +1 -0
- package/dist/ui/confirm.js +1 -1
- package/dist/ui/confirm.js.map +1 -1
- package/dist/ui/cycle.d.ts +66 -0
- package/dist/ui/cycle.js +96 -0
- package/dist/ui/cycle.js.map +1 -0
- package/dist/ui/deploy-ui.d.ts +75 -0
- package/dist/ui/deploy-ui.js +243 -0
- package/dist/ui/deploy-ui.js.map +1 -0
- package/dist/ui/order-result.d.ts +4 -0
- package/dist/ui/order-result.js +32 -0
- package/dist/ui/order-result.js.map +1 -0
- package/dist/ui/payment-gate.d.ts +26 -0
- package/dist/ui/payment-gate.js +70 -0
- package/dist/ui/payment-gate.js.map +1 -0
- package/dist/ui/payment.js +10 -3
- package/dist/ui/payment.js.map +1 -1
- package/dist/ui/portal.d.ts +1 -1
- package/dist/ui/portal.js +7 -2
- package/dist/ui/portal.js.map +1 -1
- package/dist/ui/project-resolve.d.ts +25 -0
- package/dist/ui/project-resolve.js +31 -0
- package/dist/ui/project-resolve.js.map +1 -0
- package/dist/ui/render-mode.d.ts +5 -0
- package/dist/ui/render-mode.js +1 -1
- package/dist/ui/render-mode.js.map +1 -1
- package/dist/ui/resource-detail.js +0 -3
- package/dist/ui/resource-detail.js.map +1 -1
- package/dist/ui/resource-resolve.d.ts +9 -2
- package/dist/ui/resource-resolve.js +11 -4
- package/dist/ui/resource-resolve.js.map +1 -1
- package/dist/ui/spinner.d.ts +10 -1
- package/dist/ui/spinner.js +12 -3
- package/dist/ui/spinner.js.map +1 -1
- package/dist/ui/table.d.ts +7 -0
- package/dist/ui/table.js +11 -0
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/tax.d.ts +10 -0
- package/dist/ui/tax.js +31 -0
- package/dist/ui/tax.js.map +1 -0
- package/dist/ui/ticket-resolve.d.ts +9 -1
- package/dist/ui/ticket-resolve.js +13 -2
- package/dist/ui/ticket-resolve.js.map +1 -1
- package/dist/ui/volume-resolve.js +4 -1
- package/dist/ui/volume-resolve.js.map +1 -1
- package/dist/ui/wait.d.ts +4 -0
- package/dist/ui/wait.js +7 -2
- package/dist/ui/wait.js.map +1 -1
- package/dist/ui/wizard.d.ts +2 -1
- package/dist/ui/wizard.js +1 -1
- package/dist/ui/wizard.js.map +1 -1
- package/dist/version-check-bin.d.ts +35 -0
- package/dist/version-check-bin.js +123 -0
- package/dist/version-check-bin.js.map +1 -0
- package/dist/version-check.d.ts +44 -0
- package/dist/version-check.js +153 -0
- package/dist/version-check.js.map +1 -0
- package/package.json +59 -4
package/bin/run.js
CHANGED
|
@@ -1,9 +1,68 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { execute } from "@oclif/core";
|
|
3
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
4
|
+
import { homedir } from "node:os";
|
|
5
|
+
import { join } from "node:path";
|
|
3
6
|
|
|
4
|
-
//
|
|
5
|
-
//
|
|
7
|
+
// bin/ is a sibling of dist/ under cli/. package.json's oclif.commands /
|
|
8
|
+
// oclif.helpClass already point at ./dist/*, so dist/ existing is already a
|
|
9
|
+
// hard requirement for this CLI to run at all — importing the shim from
|
|
10
|
+
// dist/ here doesn't add a new constraint. The dev path (bin/dev.js,
|
|
11
|
+
// ts-node against src/) is separate and unaffected.
|
|
12
|
+
import { checkOutdatedFromCacheForBin } from "../dist/version-check-bin.js";
|
|
13
|
+
|
|
14
|
+
function isApiKeyMode() {
|
|
15
|
+
const envToken = (process.env.SYNTEQ_API_TOKEN ?? "").trim();
|
|
16
|
+
if (envToken) return true;
|
|
17
|
+
// TokenStore (src/auth/tokens.ts) prefers the OS keychain and only
|
|
18
|
+
// falls back to a file on disk when the keychain write fails (e.g. no
|
|
19
|
+
// keychain daemon on Linux/CI). So this file-backed check is
|
|
20
|
+
// best-effort: it catches the fallback case but can't see a
|
|
21
|
+
// keychain-stored api_key. That's fine — this bin-level short-circuit
|
|
22
|
+
// exists mainly for the env-var path; the keychain-backed case is
|
|
23
|
+
// still caught by the guard inside src/commands/tui/index.ts, which
|
|
24
|
+
// runs after oclif boots and can read the real TokenStore.
|
|
25
|
+
const cfgDir = process.env.XDG_CONFIG_HOME ?? join(homedir(), ".config");
|
|
26
|
+
const tokensPath = join(cfgDir, "synteq", "tokens.json");
|
|
27
|
+
if (!existsSync(tokensPath)) return false;
|
|
28
|
+
try {
|
|
29
|
+
const parsed = JSON.parse(readFileSync(tokensPath, "utf8"));
|
|
30
|
+
return parsed?.kind === "api_key";
|
|
31
|
+
} catch {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Version check FIRST — before the bare-TTY api-key short-circuit and
|
|
37
|
+
// before `tui` gets pushed onto argv. An outdated bare `synteq` invocation
|
|
38
|
+
// (TTY or not, api-key mode or not) must exit 4, not silently proceed.
|
|
39
|
+
// (F3 — the old ordering let a bare-TTY api-key invocation call
|
|
40
|
+
// process.exit(0) before this ran, swallowing the version check entirely.)
|
|
41
|
+
//
|
|
42
|
+
// Unconditional (not just bare-TTY) — scripted/CI invocations also need to
|
|
43
|
+
// fail fast on outdated, before oclif spins up. Cache-only, no network.
|
|
44
|
+
// checkOutdatedFromCacheForBin already skips SYNTEQ_SKIP_VERSION_CHECK=1
|
|
45
|
+
// and exempt commands (login/logout/settings*, colon or space form) so a
|
|
46
|
+
// locked-out user can still recover.
|
|
47
|
+
{
|
|
48
|
+
const outdatedMsg = checkOutdatedFromCacheForBin(process.argv);
|
|
49
|
+
if (outdatedMsg) {
|
|
50
|
+
process.stderr.write(outdatedMsg + "\n");
|
|
51
|
+
process.exit(4);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Bare `synteq` on a TTY → launch the interactive app, unless the caller
|
|
56
|
+
// is in API-key mode, in which case the TUI has no meaningful state to
|
|
57
|
+
// show and we exit 0 with a hint.
|
|
6
58
|
if (process.argv.length === 2 && process.stdout.isTTY) {
|
|
59
|
+
if (isApiKeyMode()) {
|
|
60
|
+
process.stderr.write(
|
|
61
|
+
"The interactive TUI requires a user session — API keys are for scripted commands only.\n" +
|
|
62
|
+
"Run 'synteq login' for a session, or 'synteq --help' to see commands this key can call.\n",
|
|
63
|
+
);
|
|
64
|
+
process.exit(0);
|
|
65
|
+
}
|
|
7
66
|
process.argv.push("tui");
|
|
8
67
|
}
|
|
9
68
|
|
package/dist/api/client.d.ts
CHANGED
|
@@ -1,13 +1,52 @@
|
|
|
1
1
|
import type { TokenStore } from "../auth/tokens.js";
|
|
2
|
-
import type { Project, Resource, WhoAmI, Team, TokenPair, DeviceCodeOut, TransitService, StorageVolume, CreditEntry, BalanceOut, CreditTopupIn, CreditTopupOut, PaymentMethod, ReinstallIn, HypervisorTask, BootOrderOut, ActivityList, OrderCatalog, VirtualizedOrderIn, OrderResultOut, StorageCatalog, BlockVolumeCreateIn, BlockVolumeCreateOut, AttachOut, DetachOut, TeamInviteIn, OrgDetails, SSHKey, ApiKeyWhoami, ResourceOrderStatusOut, ReinstallStatusOut, ResourceAddon, PendingResourceAddon, AddonAttachIn, AddonAttachOut, ResourceResizeIn, ResourceResizeQuoteOut, ResourceResizeOut, ConsoleTokenOut, BlockVolumeResizeQuoteIn, BlockVolumeResizeQuoteOut, BlockVolumeResizeIn, BlockVolumeResizeOut, BandwidthSummary, SetDefaultMethodOut, TicketDepartment, TicketListItem, Ticket, TicketMessage, TicketCreateIn, TicketMessageIn, TicketStatus } from "./types.js";
|
|
3
|
-
export declare const CLI_VERSION = "
|
|
2
|
+
import type { Project, Resource, WhoAmI, Team, TokenPair, DeviceCodeOut, TransitService, StorageVolume, CreditEntry, BalanceOut, CreditTopupIn, CreditTopupOut, PaymentMethod, PaymentMethodEligibility, ReinstallIn, HypervisorTask, BootOrderOut, ActivityList, OrderCatalog, VirtualizedOrderIn, OrderResultOut, PreviewOrderOut, StorageCatalog, BlockVolumeCreateIn, BlockVolumeCreateOut, AttachOut, DetachOut, TeamInviteIn, OrgDetails, SSHKey, ApiKeyWhoami, ResourceOrderStatusOut, ReinstallStatusOut, ResourceAddon, PendingResourceAddon, AddonAttachIn, AddonAttachOut, AddonQuoteIn, AddonQuoteOut, ResourceResizeIn, ResourceResizeQuoteOut, ResourceResizeOut, ConsoleTokenOut, BlockVolumeResizeQuoteIn, BlockVolumeResizeQuoteOut, BlockVolumeResizeIn, BlockVolumeResizeOut, BandwidthSummary, SetDefaultMethodOut, TicketDepartment, TicketListItem, Ticket, TicketMessage, TicketAttachment, TicketCreateIn, TicketMessageIn, TicketStatus, BaremetalService, BaremetalInvoice, BaremetalPowerState, BaremetalPowerAction, BaremetalJobResult, BaremetalInstallProfile, BaremetalJob, BaremetalJobEvent, BaremetalInstallPasswordStatus, BaremetalInstallPasswordOut, BaremetalReinstallIn, BaremetalCatalogOut, BaremetalOrderSpec, App, AppCreateIn, AppNameCheck, AppPlan, AppLocation, Build, BuildDetail, SourceUploadUrlOut, LogHistory, AppUsage, AppHealth, AppDomain, PlanChangePreview, PlanChange, AppSettings, AppSettingsPatch, Release, EnvVar, EnvVarSetIn, DeployIn, GithubLink, GithubLinkIn, WsTicket, Fn, FnCreateIn, FnPlan, FnLocation, FnNameCheck, FnSourceFile, FnSource, FnBuild, FnRelease, FnRollbackOut, FnRunListOut, FnEnvVar, FnEnvVarSetIn, FnEnvReveal, FnCronTrigger, FnCronTriggerCreateIn, FnCronTriggerUpdateIn, FnUpdateIn, FnBilling, FnTeamBilling, FnAutoReloadIn, FnAutoReloadState, FnCreditsPurchaseIn, FnCreditsQuote, FnCreditsPurchaseOut, AppByRepo } from "./types.js";
|
|
3
|
+
export declare const CLI_VERSION = "1.1.1";
|
|
4
4
|
type FetchLike = (input: string, init: Record<string, unknown>) => Promise<Response>;
|
|
5
5
|
interface RequestOpts {
|
|
6
6
|
body?: unknown;
|
|
7
|
+
formData?: FormData;
|
|
8
|
+
/** Raw bytes to send verbatim (skips JSON serialization). Sets no default
|
|
9
|
+
* Content-Type — pass one in `headers`. Used for tarball uploads. */
|
|
10
|
+
rawBody?: Uint8Array;
|
|
7
11
|
query?: Record<string, string | number | undefined>;
|
|
8
12
|
headers?: Record<string, string>;
|
|
9
13
|
auth?: boolean;
|
|
10
14
|
}
|
|
15
|
+
/** The numeric twin of PAGE_MAX for the routes that take `query:` params. */
|
|
16
|
+
export declare const LIST_PAGE_MAX = 200;
|
|
17
|
+
/** /tickets caps per_page at 100 and 422s on a larger value (never clamps). */
|
|
18
|
+
export declare const TICKET_PAGE_MAX = 100;
|
|
19
|
+
export declare function listItems<T>(r: T[] | {
|
|
20
|
+
items?: T[] | null;
|
|
21
|
+
} | null | undefined): T[];
|
|
22
|
+
/** One page of a paginated list route (portal #419): the rows, how many
|
|
23
|
+
* rows match in total, and where this page sits. */
|
|
24
|
+
export interface Page<T> {
|
|
25
|
+
items: T[];
|
|
26
|
+
total: number;
|
|
27
|
+
page: number;
|
|
28
|
+
per_page: number;
|
|
29
|
+
pages: number;
|
|
30
|
+
}
|
|
31
|
+
/** Normalise a list response to a `Page` whether the portal answered the
|
|
32
|
+
* `{items,total,page,per_page,pages}` envelope or (an older portal) a bare
|
|
33
|
+
* array — a bare array is the whole list, so it is one page of itself. */
|
|
34
|
+
export declare function asPage<T>(r: T[] | Partial<Page<T>> | null | undefined): Page<T>;
|
|
35
|
+
/** Query params the paginated list routes share. `q` is a server-side
|
|
36
|
+
* search (what it matches differs per route — see each `listPage`). */
|
|
37
|
+
export interface ListQuery {
|
|
38
|
+
q?: string;
|
|
39
|
+
page?: number;
|
|
40
|
+
per_page?: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Walk a paginated route from page 1 until the last page, an empty page, or
|
|
44
|
+
* `stop(page)` says the caller has what it came for. THE one paging loop in
|
|
45
|
+
* the CLI: the name resolvers (an id prefix `q=` cannot search, a ticket #
|
|
46
|
+
* whose `q=` page is still full, a release number past the first 200) all
|
|
47
|
+
* go through here rather than each carrying its own `while` loop.
|
|
48
|
+
*/
|
|
49
|
+
export declare function pageThrough<T>(fetchPage: (page: number) => Promise<Page<T>>, stop?: (page: Page<T>) => boolean): Promise<T[]>;
|
|
11
50
|
export declare class ApiClient {
|
|
12
51
|
private opts;
|
|
13
52
|
constructor(opts: {
|
|
@@ -19,6 +58,18 @@ export declare class ApiClient {
|
|
|
19
58
|
apiToken?: string;
|
|
20
59
|
});
|
|
21
60
|
private get fetchImpl();
|
|
61
|
+
/** The token refresh in flight, if any. Requests that 401 together (a
|
|
62
|
+
* `Promise.all` of list calls on an expired access token) coalesce onto
|
|
63
|
+
* it: a refresh token is single-use, so a second POST /auth/refresh with
|
|
64
|
+
* the same one is refused and would turn a recoverable expiry into a
|
|
65
|
+
* spurious "session expired". */
|
|
66
|
+
private refreshing;
|
|
67
|
+
/** Whether this client was configured to skip TLS verification
|
|
68
|
+
* (--insecure / SYNTEQ_INSECURE_TLS). Read by the direct-upload PUT
|
|
69
|
+
* (apps-support/deploy.ts's uploadSource), which goes over node:http(s)
|
|
70
|
+
* rather than through dispatch()/makeInit() and needs to honour the same
|
|
71
|
+
* setting for local-dev self-signed certs. */
|
|
72
|
+
get insecureTls(): boolean;
|
|
22
73
|
private makeInit;
|
|
23
74
|
request<T>(method: string, path: string, opts?: RequestOpts): Promise<T>;
|
|
24
75
|
rawRequest(method: string, path: string, opts?: RequestOpts & {
|
|
@@ -29,7 +80,36 @@ export declare class ApiClient {
|
|
|
29
80
|
body: unknown;
|
|
30
81
|
text: string;
|
|
31
82
|
}>;
|
|
83
|
+
/**
|
|
84
|
+
* POST a single file as multipart/form-data. Reuses request()/dispatch() for
|
|
85
|
+
* auth and error handling; the FormData body makes fetch pick the boundary
|
|
86
|
+
* and Content-Type, so it bypasses the JSON envelope applied by default.
|
|
87
|
+
*/
|
|
88
|
+
uploadMultipart<T>(path: string, file: {
|
|
89
|
+
path: string;
|
|
90
|
+
filename: string;
|
|
91
|
+
contentType: string;
|
|
92
|
+
}, field?: string): Promise<T>;
|
|
93
|
+
/**
|
|
94
|
+
* GET a binary resource (e.g. a ticket attachment). Unlike request(), this
|
|
95
|
+
* reads the raw bytes instead of JSON-decoding, and returns the server's
|
|
96
|
+
* Content-Type and suggested filename from the response headers.
|
|
97
|
+
*/
|
|
98
|
+
download(path: string): Promise<{
|
|
99
|
+
bytes: Buffer;
|
|
100
|
+
contentType: string | null;
|
|
101
|
+
filename: string | null;
|
|
102
|
+
}>;
|
|
32
103
|
private dispatch;
|
|
104
|
+
/**
|
|
105
|
+
* Single-flight wrapper around `tryRefresh`. `used` is the pair the 401'd
|
|
106
|
+
* request was sent with. One refresh runs at a time; everyone who 401s
|
|
107
|
+
* while it is in flight gets its result. A request that 401s AFTER a
|
|
108
|
+
* refresh already finished (it was sent with the old access token, the
|
|
109
|
+
* store now holds the new pair) takes the stored pair as-is rather than
|
|
110
|
+
* spending a refresh token that no longer exists.
|
|
111
|
+
*/
|
|
112
|
+
private refreshTokens;
|
|
33
113
|
private tryRefresh;
|
|
34
114
|
private buildUrl;
|
|
35
115
|
private parseResponse;
|
|
@@ -38,6 +118,7 @@ export declare class ApiClient {
|
|
|
38
118
|
deviceToken: (device_code: string, client_id?: string) => Promise<TokenPair>;
|
|
39
119
|
minCliVersion: () => Promise<{
|
|
40
120
|
min_cli_version: string;
|
|
121
|
+
deprecated_message: string | null;
|
|
41
122
|
}>;
|
|
42
123
|
logout: (refresh_token: string) => Promise<{
|
|
43
124
|
message: string;
|
|
@@ -45,6 +126,14 @@ export declare class ApiClient {
|
|
|
45
126
|
whoami: () => Promise<WhoAmI>;
|
|
46
127
|
apiKeyWhoami: () => Promise<ApiKeyWhoami>;
|
|
47
128
|
teams: () => Promise<Team[]>;
|
|
129
|
+
/**
|
|
130
|
+
* Mint a single-use, 60s WebSocket ticket. Browsers can't attach the
|
|
131
|
+
* session cookie to a `ws://` handshake; the CLI carries a bearer token
|
|
132
|
+
* but the log WS reuses the same ticket contract for parity, so we fetch
|
|
133
|
+
* a throwaway ticket and pass it as `?token=` on the ws URL. The ticket
|
|
134
|
+
* is consumed exactly once server-side.
|
|
135
|
+
*/
|
|
136
|
+
wsTicket: () => Promise<WsTicket>;
|
|
48
137
|
};
|
|
49
138
|
projects: {
|
|
50
139
|
list: () => Promise<Project[]>;
|
|
@@ -58,7 +147,14 @@ export declare class ApiClient {
|
|
|
58
147
|
remove: (keyId: string) => Promise<void>;
|
|
59
148
|
};
|
|
60
149
|
virtualized: {
|
|
61
|
-
|
|
150
|
+
/** GET /resources (50/200): `q` matches hostname / id / IP / location,
|
|
151
|
+
* `kind` narrows to one virtualized kind server-side. */
|
|
152
|
+
listPage: (projectId?: string, query?: ListQuery & {
|
|
153
|
+
kind?: string;
|
|
154
|
+
}) => Promise<Page<Resource>>;
|
|
155
|
+
list: (projectId?: string, query?: ListQuery & {
|
|
156
|
+
kind?: string;
|
|
157
|
+
}) => Promise<Resource[]>;
|
|
62
158
|
get: (resourceId: string) => Promise<Resource>;
|
|
63
159
|
stats: (resourceId: string, timeframe?: "hour" | "day" | "week" | "month" | "year") => Promise<Record<string, unknown> | Record<string, unknown>[]>;
|
|
64
160
|
rrd: (resourceId: string, timeframe?: "hour" | "day" | "week" | "month" | "year") => Promise<{
|
|
@@ -76,7 +172,10 @@ export declare class ApiClient {
|
|
|
76
172
|
list: (projectId?: string) => Promise<TransitService[]>;
|
|
77
173
|
};
|
|
78
174
|
storage: {
|
|
79
|
-
|
|
175
|
+
/** GET /resources/block_volume (50/200): `q` matches name / id /
|
|
176
|
+
* attached VM hostname. */
|
|
177
|
+
listPage: (projectId?: string, query?: ListQuery) => Promise<Page<StorageVolume>>;
|
|
178
|
+
list: (projectId?: string, query?: ListQuery) => Promise<StorageVolume[]>;
|
|
80
179
|
catalog: () => Promise<StorageCatalog>;
|
|
81
180
|
order: (body: BlockVolumeCreateIn, projectId?: string) => Promise<BlockVolumeCreateOut>;
|
|
82
181
|
attach: (volumeId: string, resourceId: string) => Promise<AttachOut>;
|
|
@@ -100,6 +199,10 @@ export declare class ApiClient {
|
|
|
100
199
|
};
|
|
101
200
|
payments: {
|
|
102
201
|
methods: () => Promise<PaymentMethod[]>;
|
|
202
|
+
/** Every active team method annotated with whether THIS touchpoint may
|
|
203
|
+
* charge it (the backend owns the allowlist; the web's pickers read the
|
|
204
|
+
* same route). */
|
|
205
|
+
methodsForTouchpoint: (touchpoint: string) => Promise<PaymentMethodEligibility[]>;
|
|
103
206
|
topup: (body: CreditTopupIn) => Promise<CreditTopupOut>;
|
|
104
207
|
setDefaultMethod: (methodId: string) => Promise<SetDefaultMethodOut>;
|
|
105
208
|
deleteMethod: (methodId: string) => Promise<void>;
|
|
@@ -120,6 +223,7 @@ export declare class ApiClient {
|
|
|
120
223
|
list: (resourceId: string) => Promise<ResourceAddon[]>;
|
|
121
224
|
pending: (resourceId: string) => Promise<PendingResourceAddon[]>;
|
|
122
225
|
attach: (resourceId: string, body: AddonAttachIn) => Promise<AddonAttachOut>;
|
|
226
|
+
quote: (resourceId: string, body: AddonQuoteIn) => Promise<AddonQuoteOut>;
|
|
123
227
|
};
|
|
124
228
|
projectActivity: {
|
|
125
229
|
list: (projectId: string, limit?: number, offset?: number) => Promise<ActivityList>;
|
|
@@ -140,6 +244,45 @@ export declare class ApiClient {
|
|
|
140
244
|
}>;
|
|
141
245
|
create: (body: VirtualizedOrderIn) => Promise<OrderResultOut>;
|
|
142
246
|
status: (orderId: string) => Promise<ResourceOrderStatusOut>;
|
|
247
|
+
preview: (body: {
|
|
248
|
+
kind: "virtualized" | "block_volume" | "baremetal" | "addon" | "resize" | "app";
|
|
249
|
+
spec: Record<string, unknown>;
|
|
250
|
+
quantity?: number;
|
|
251
|
+
}) => Promise<PreviewOrderOut>;
|
|
252
|
+
/** A paid app is an ORDER: the first month is invoiced and charged, and
|
|
253
|
+
* provisioning runs off the settled order (the web's NewAppPayModal
|
|
254
|
+
* does the same). POST /apps only creates free-tier apps. */
|
|
255
|
+
createApp: (spec: AppOrderSpec, payment: GenericPaymentIn) => Promise<GenericCreateOrderOut>;
|
|
256
|
+
};
|
|
257
|
+
baremetal: {
|
|
258
|
+
/** GET /baremetal (50/200): `q` matches hostname / reference / primary
|
|
259
|
+
* IP / id. */
|
|
260
|
+
listPage: (query?: ListQuery) => Promise<Page<BaremetalService>>;
|
|
261
|
+
list: (query?: ListQuery) => Promise<BaremetalService[]>;
|
|
262
|
+
get: (serviceId: string) => Promise<BaremetalService>;
|
|
263
|
+
invoices: (serviceId: string) => Promise<BaremetalInvoice[]>;
|
|
264
|
+
activity: (serviceId: string, limit?: number, offset?: number) => Promise<ActivityList>;
|
|
265
|
+
bandwidth: (serviceId: string) => Promise<BandwidthSummary>;
|
|
266
|
+
powerState: (serviceId: string) => Promise<BaremetalPowerState>;
|
|
267
|
+
power: (serviceId: string, action: BaremetalPowerAction) => Promise<BaremetalJobResult>;
|
|
268
|
+
installProfiles: (serviceId: string) => Promise<{
|
|
269
|
+
profiles: BaremetalInstallProfile[];
|
|
270
|
+
}>;
|
|
271
|
+
jobs: (serviceId: string) => Promise<{
|
|
272
|
+
jobs: BaremetalJob[];
|
|
273
|
+
}>;
|
|
274
|
+
jobEvents: (serviceId: string, jobId: string) => Promise<{
|
|
275
|
+
events: BaremetalJobEvent[];
|
|
276
|
+
}>;
|
|
277
|
+
cancelJob: (serviceId: string, jobId: string) => Promise<BaremetalJobResult>;
|
|
278
|
+
reinstall: (serviceId: string, body: BaremetalReinstallIn) => Promise<BaremetalJobResult>;
|
|
279
|
+
installPasswordStatus: (serviceId: string) => Promise<BaremetalInstallPasswordStatus>;
|
|
280
|
+
revealInstallPassword: (serviceId: string) => Promise<BaremetalInstallPasswordOut>;
|
|
281
|
+
catalog: () => Promise<BaremetalCatalogOut>;
|
|
282
|
+
installProfilesForOffering: (offeringId: string) => Promise<{
|
|
283
|
+
profiles: BaremetalInstallProfile[];
|
|
284
|
+
}>;
|
|
285
|
+
order: (spec: BaremetalOrderSpec, payment: GenericPaymentIn, projectId?: string) => Promise<OrderResultOut>;
|
|
143
286
|
};
|
|
144
287
|
teams: {
|
|
145
288
|
details: (teamId: string) => Promise<OrgDetails>;
|
|
@@ -147,12 +290,227 @@ export declare class ApiClient {
|
|
|
147
290
|
};
|
|
148
291
|
tickets: {
|
|
149
292
|
departments: () => Promise<TicketDepartment[]>;
|
|
150
|
-
|
|
293
|
+
/** GET /tickets (25/100): `q` matches `display_id == int(q)` OR a
|
|
294
|
+
* subject / body substring (so a `#` lookup still exact-matches
|
|
295
|
+
* client-side); `status` filters server-side. Its cap is 100, not
|
|
296
|
+
* 200 — a larger per_page is a 422, never clamped. */
|
|
297
|
+
listPage: (query?: ListQuery & {
|
|
298
|
+
status?: TicketStatus;
|
|
299
|
+
}) => Promise<Page<TicketListItem>>;
|
|
300
|
+
list: (query?: ListQuery & {
|
|
301
|
+
status?: TicketStatus;
|
|
302
|
+
}) => Promise<TicketListItem[]>;
|
|
151
303
|
get: (ticketId: string) => Promise<Ticket>;
|
|
152
304
|
messages: (ticketId: string) => Promise<TicketMessage[]>;
|
|
153
305
|
create: (body: TicketCreateIn) => Promise<Ticket>;
|
|
154
306
|
reply: (ticketId: string, body: TicketMessageIn) => Promise<TicketMessage>;
|
|
307
|
+
uploadAttachment: (ticketId: string, messageId: string, file: {
|
|
308
|
+
path: string;
|
|
309
|
+
filename: string;
|
|
310
|
+
contentType: string;
|
|
311
|
+
}) => Promise<TicketAttachment>;
|
|
312
|
+
downloadAttachment: (ticketId: string, messageId: string, attachmentId: string) => Promise<{
|
|
313
|
+
bytes: Buffer;
|
|
314
|
+
contentType: string | null;
|
|
315
|
+
filename: string | null;
|
|
316
|
+
}>;
|
|
155
317
|
setStatus: (ticketId: string, status: TicketStatus) => Promise<Ticket>;
|
|
156
318
|
};
|
|
319
|
+
/**
|
|
320
|
+
* Managed containers (apps). Like `vps`, list/create are scoped to the
|
|
321
|
+
* active project by the `X-Project-Id` header, not a query param — the
|
|
322
|
+
* backend resolves the active project from it (falling back to the team's
|
|
323
|
+
* first project when unset). Responses are camelCase (`_CamelOut`).
|
|
324
|
+
*/
|
|
325
|
+
apps: {
|
|
326
|
+
plans: () => Promise<AppPlan[]>;
|
|
327
|
+
/** Placeable clusters for this environment — what the web onboarding's
|
|
328
|
+
* location picker reads, so the CLI never offers a location that has
|
|
329
|
+
* no cluster behind it. */
|
|
330
|
+
locations: () => Promise<AppLocation[]>;
|
|
331
|
+
/** GET /apps (50/200): `q` matches name / slug / hostname. */
|
|
332
|
+
listPage: (projectId?: string, query?: ListQuery) => Promise<Page<App>>;
|
|
333
|
+
list: (projectId?: string, query?: ListQuery) => Promise<App[]>;
|
|
334
|
+
get: (appId: string) => Promise<App>;
|
|
335
|
+
/** Apps deploying from a GitHub repo, across every team the user is in. */
|
|
336
|
+
findByRepo: (repo: string) => Promise<AppByRepo[]>;
|
|
337
|
+
checkName: (slug: string) => Promise<AppNameCheck>;
|
|
338
|
+
create: (body: AppCreateIn, projectId?: string) => Promise<App>;
|
|
339
|
+
deploy: (appId: string, body: DeployIn) => Promise<Build>;
|
|
340
|
+
/** Deploy from a local source tarball (gzipped tar as the raw body). The
|
|
341
|
+
* portal stores it + the cluster builds it — no external URL needed.
|
|
342
|
+
* Fallback path (loads the whole tarball into memory) — kept for
|
|
343
|
+
* clusters that don't support direct upload; use `uploadSource()`
|
|
344
|
+
* (apps-support/deploy.ts) for the streamed path, which tries this
|
|
345
|
+
* automatically when direct upload isn't available and the pack fits
|
|
346
|
+
* the proxy's body-size limit. */
|
|
347
|
+
deploySource: (appId: string, tarball: Uint8Array) => Promise<Build>;
|
|
348
|
+
/** Mint a presigned PUT for the object store, so the CLI can upload the
|
|
349
|
+
* (possibly ~1 GB) source tarball directly instead of through the API —
|
|
350
|
+
* the proxy in front of the API rejects bodies over 100 MB. A used or
|
|
351
|
+
* expired URL must not be reused: call this again for every retry, with
|
|
352
|
+
* `replaces` set to the previous attempt's `objectKey` so the API frees
|
|
353
|
+
* that attempt's pending-upload slot (an older API 422s the field). */
|
|
354
|
+
sourceUploadUrl: (appId: string, body: {
|
|
355
|
+
sizeBytes: number;
|
|
356
|
+
sha256: string;
|
|
357
|
+
replaces?: string;
|
|
358
|
+
}) => Promise<SourceUploadUrlOut>;
|
|
359
|
+
/** Trigger the build from an object already PUT to the URL
|
|
360
|
+
* `sourceUploadUrl` minted — the counterpart to `deploySource` for the
|
|
361
|
+
* direct-upload path. */
|
|
362
|
+
deploySourceObject: (appId: string, objectKey: string) => Promise<Build>;
|
|
363
|
+
builds: (appId: string) => Promise<Build[]>;
|
|
364
|
+
/** GET /apps/{id}/releases (50/200), ordered by number desc. */
|
|
365
|
+
releasesPage: (appId: string, query?: ListQuery) => Promise<Page<Release>>;
|
|
366
|
+
releases: (appId: string) => Promise<Release[]>;
|
|
367
|
+
env: (appId: string) => Promise<EnvVar[]>;
|
|
368
|
+
setEnv: (appId: string, body: EnvVarSetIn) => Promise<EnvVar>;
|
|
369
|
+
/** "Roll out now": push the saved env and redeploy the current release. */
|
|
370
|
+
rolloutEnv: (appId: string) => Promise<void>;
|
|
371
|
+
/** GitHub push-to-deploy link. GET returns null when nothing is linked. */
|
|
372
|
+
githubLink: (appId: string) => Promise<GithubLink | null>;
|
|
373
|
+
linkGithub: (appId: string, body: GithubLinkIn) => Promise<GithubLink>;
|
|
374
|
+
unlinkGithub: (appId: string) => Promise<void>;
|
|
375
|
+
revealEnv: (appId: string, key: string) => Promise<{
|
|
376
|
+
key: string;
|
|
377
|
+
value: string;
|
|
378
|
+
}>;
|
|
379
|
+
deleteEnv: (appId: string, key: string) => Promise<void>;
|
|
380
|
+
buildDetail: (appId: string, buildId: string) => Promise<BuildDetail>;
|
|
381
|
+
/** `since` is a relative window (15m … 4320h). `from` / `until` (ISO
|
|
382
|
+
* instants) name an absolute timeframe instead — `from` replaces
|
|
383
|
+
* `since`, `until` bounds the top (2026-09-12). */
|
|
384
|
+
logHistory: (appId: string, opts?: {
|
|
385
|
+
since?: string;
|
|
386
|
+
from?: string;
|
|
387
|
+
until?: string;
|
|
388
|
+
container?: string;
|
|
389
|
+
search?: string;
|
|
390
|
+
limit?: number;
|
|
391
|
+
}) => Promise<LogHistory>;
|
|
392
|
+
/** `range` (15m/1h/6h/24h/72h/168h) shapes the series; `since`+`until`
|
|
393
|
+
* (ISO, together) pick an explicit window instead. */
|
|
394
|
+
usage: (appId: string, opts?: {
|
|
395
|
+
range?: string;
|
|
396
|
+
since?: string;
|
|
397
|
+
until?: string;
|
|
398
|
+
}) => Promise<AppUsage>;
|
|
399
|
+
rollback: (appId: string, toRelease: number) => Promise<Build>;
|
|
400
|
+
health: (appId: string) => Promise<AppHealth>;
|
|
401
|
+
domains: (appId: string) => Promise<AppDomain[]>;
|
|
402
|
+
addDomain: (appId: string, domain: string, opts?: {
|
|
403
|
+
acceptFee?: boolean;
|
|
404
|
+
}) => Promise<AppDomain>;
|
|
405
|
+
verifyDomain: (appId: string, domainId: string) => Promise<AppDomain>;
|
|
406
|
+
removeDomain: (appId: string, domainId: string) => Promise<void>;
|
|
407
|
+
planPreview: (appId: string, planTier: string, schedule?: string) => Promise<PlanChangePreview>;
|
|
408
|
+
changePlan: (appId: string, body: {
|
|
409
|
+
planTier: string;
|
|
410
|
+
schedule?: string;
|
|
411
|
+
}) => Promise<PlanChange>;
|
|
412
|
+
settings: (appId: string) => Promise<AppSettings>;
|
|
413
|
+
patchSettings: (appId: string, body: AppSettingsPatch) => Promise<AppSettings>;
|
|
414
|
+
};
|
|
415
|
+
/**
|
|
416
|
+
* Functions (serverless). Same shape discipline as `apps` above, against
|
|
417
|
+
* portal/backend/app/routers/functions*.py. Project scoping rides the
|
|
418
|
+
* X-Project-Id header exactly as apps does. Nothing here names a build
|
|
419
|
+
* frontend: how a function builds is decided server-side from the bundle
|
|
420
|
+
* and the function's runtime, never by the caller.
|
|
421
|
+
*/
|
|
422
|
+
functions: {
|
|
423
|
+
plans: () => Promise<FnPlan[]>;
|
|
424
|
+
locations: () => Promise<FnLocation[]>;
|
|
425
|
+
/** GET /functions (100/200): `q` matches name / slug / hostname. Until
|
|
426
|
+
* #419 this read the 100-row default page and unwrapped it by hand,
|
|
427
|
+
* so the 101st function was invisible to every resolver. */
|
|
428
|
+
listPage: (projectId?: string, query?: ListQuery) => Promise<Page<Fn>>;
|
|
429
|
+
list: (projectId?: string, query?: ListQuery) => Promise<Fn[]>;
|
|
430
|
+
get: (fnId: string) => Promise<Fn>;
|
|
431
|
+
checkName: (name: string) => Promise<FnNameCheck>;
|
|
432
|
+
create: (body: FnCreateIn, projectId?: string) => Promise<Fn>;
|
|
433
|
+
update: (fnId: string, body: FnUpdateIn) => Promise<Fn>;
|
|
434
|
+
delete: (fnId: string, passwordChallenge: string) => Promise<void>;
|
|
435
|
+
/** Deploy pasted files. The backend tars them, keeps them on the build row
|
|
436
|
+
* (so `source` can reopen them) and picks the build path itself. */
|
|
437
|
+
deployFiles: (fnId: string, files: FnSourceFile[]) => Promise<FnBuild>;
|
|
438
|
+
/** The same endpoint's tarball shape: no 32-file editor limit, only the
|
|
439
|
+
* function's source caps. */
|
|
440
|
+
deployTarball: (fnId: string, tarball: Uint8Array) => Promise<FnBuild>;
|
|
441
|
+
/** Deploy a pre-built image: the apps `deploy --image` route, function-owned
|
|
442
|
+
* (POST /functions/{id}/deploys — a pull Build; the status cron mints the
|
|
443
|
+
* release off the build's own digest). */
|
|
444
|
+
deployImage: (fnId: string, imageRef: string) => Promise<FnBuild>;
|
|
445
|
+
source: (fnId: string) => Promise<FnSource>;
|
|
446
|
+
builds: (fnId: string) => Promise<FnBuild[]>;
|
|
447
|
+
build: (fnId: string, buildId: string) => Promise<FnBuild>;
|
|
448
|
+
/** GET /functions/{id}/releases (50/200), ordered by number desc. */
|
|
449
|
+
releasesPage: (fnId: string, query?: ListQuery) => Promise<Page<FnRelease>>;
|
|
450
|
+
releases: (fnId: string) => Promise<FnRelease[]>;
|
|
451
|
+
rollback: (fnId: string, toRelease: number) => Promise<FnRollbackOut>;
|
|
452
|
+
/** Per-invocation records, newest first. `before` is the opaque cursor
|
|
453
|
+
* from the previous page's `nextBefore`. */
|
|
454
|
+
runs: (fnId: string, opts?: {
|
|
455
|
+
limit?: number;
|
|
456
|
+
before?: string;
|
|
457
|
+
status?: string;
|
|
458
|
+
release?: number;
|
|
459
|
+
q?: string;
|
|
460
|
+
}) => Promise<FnRunListOut>;
|
|
461
|
+
env: (fnId: string) => Promise<FnEnvVar[]>;
|
|
462
|
+
setEnv: (fnId: string, body: FnEnvVarSetIn) => Promise<FnEnvVar>;
|
|
463
|
+
/** "Roll out now": push the saved env and redeploy the current release. */
|
|
464
|
+
rolloutEnv: (fnId: string) => Promise<void>;
|
|
465
|
+
deleteEnv: (fnId: string, key: string) => Promise<void>;
|
|
466
|
+
revealEnv: (fnId: string, key: string) => Promise<FnEnvReveal>;
|
|
467
|
+
cronTriggers: (fnId: string) => Promise<FnCronTrigger[]>;
|
|
468
|
+
createCronTrigger: (fnId: string, body: FnCronTriggerCreateIn) => Promise<FnCronTrigger>;
|
|
469
|
+
updateCronTrigger: (fnId: string, triggerId: string, body: FnCronTriggerUpdateIn) => Promise<FnCronTrigger>;
|
|
470
|
+
deleteCronTrigger: (fnId: string, triggerId: string) => Promise<void>;
|
|
471
|
+
runCronTrigger: (fnId: string, triggerId: string) => Promise<FnCronTrigger>;
|
|
472
|
+
billing: (fnId: string) => Promise<FnBilling>;
|
|
473
|
+
setCreditAutoReload: (fnId: string, body: FnAutoReloadIn) => Promise<FnAutoReloadState>;
|
|
474
|
+
/** No per-function quote route exists: price from the billing view's
|
|
475
|
+
* `creditRateUsd` (an estimate; tax lands on the invoice). */
|
|
476
|
+
purchaseCredits: (fnId: string, body: FnCreditsPurchaseIn) => Promise<FnCreditsPurchaseOut>;
|
|
477
|
+
teamBilling: () => Promise<FnTeamBilling>;
|
|
478
|
+
setTeamCreditAutoReload: (body: FnAutoReloadIn) => Promise<FnAutoReloadState>;
|
|
479
|
+
quoteTeamCredits: (body: FnCreditsPurchaseIn) => Promise<FnCreditsQuote>;
|
|
480
|
+
purchaseTeamCredits: (body: FnCreditsPurchaseIn) => Promise<FnCreditsPurchaseOut>;
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
type GenericPaymentMethod = "saved" | "bitpay" | "credit_only" | "invoice_only";
|
|
484
|
+
/** POST /orders kind=app spec — what AppProvider.validate_spec reads. */
|
|
485
|
+
export interface AppOrderSpec {
|
|
486
|
+
slug: string;
|
|
487
|
+
plan_tier: string;
|
|
488
|
+
region: string;
|
|
489
|
+
project_id?: string;
|
|
490
|
+
}
|
|
491
|
+
export interface GenericPaymentIn {
|
|
492
|
+
method: GenericPaymentMethod;
|
|
493
|
+
payment_method_id?: string;
|
|
494
|
+
apply_credits?: boolean;
|
|
495
|
+
bitpay_redirect_url?: string;
|
|
496
|
+
}
|
|
497
|
+
interface GenericCreateOrderOut {
|
|
498
|
+
order_id: string;
|
|
499
|
+
status: string;
|
|
500
|
+
invoice_id?: string | null;
|
|
501
|
+
checkout_url?: string | null;
|
|
502
|
+
charge_id?: string | null;
|
|
503
|
+
provider?: string | null;
|
|
504
|
+
credits_applied?: string | null;
|
|
157
505
|
}
|
|
506
|
+
/** Old `VirtualizedOrderIn.payment_kind` ("method"/"bitpay") + a `payment_method_id`
|
|
507
|
+
* that may or may not be set collapses two customer intents ("charge this
|
|
508
|
+
* saved method" vs "pay from credit balance, no method") into one literal.
|
|
509
|
+
* The new `GenericPaymentIn.method` enum keeps them distinct — split here
|
|
510
|
+
* so callers (order.ts, pickPayment) don't need to know about the new
|
|
511
|
+
* vocabulary at all. */
|
|
512
|
+
export declare function virtualizedOrderInToGenericSpecs(body: VirtualizedOrderIn): {
|
|
513
|
+
specs: Record<string, unknown>[];
|
|
514
|
+
payment: GenericPaymentIn;
|
|
515
|
+
};
|
|
158
516
|
export {};
|