@kortix/sdk 0.13.57 → 0.14.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/README.md +108 -15
- package/dist/browser/cache/idb-sync-cache.d.ts.map +1 -1
- package/dist/browser/cache/idb-sync-cache.js +19 -5
- package/dist/browser/cache/idb-sync-cache.js.map +1 -1
- package/dist/browser/session-sync/server-transcript-mirror.d.ts +26 -7
- package/dist/browser/session-sync/server-transcript-mirror.d.ts.map +1 -1
- package/dist/browser/session-sync/server-transcript-mirror.js +51 -44
- package/dist/browser/session-sync/server-transcript-mirror.js.map +1 -1
- package/dist/browser/session-sync/session-sync-registry.d.ts +8 -0
- package/dist/browser/session-sync/session-sync-registry.d.ts.map +1 -1
- package/dist/browser/session-sync/session-sync-registry.js +59 -2
- package/dist/browser/session-sync/session-sync-registry.js.map +1 -1
- package/dist/browser/stores/sync-store/keep-unchanged.d.ts +17 -0
- package/dist/browser/stores/sync-store/keep-unchanged.d.ts.map +1 -0
- package/dist/browser/stores/sync-store/keep-unchanged.js +47 -0
- package/dist/browser/stores/sync-store/keep-unchanged.js.map +1 -0
- package/dist/browser/stores/sync-store.d.ts +6 -0
- package/dist/browser/stores/sync-store.d.ts.map +1 -1
- package/dist/browser/stores/sync-store.js +115 -17
- package/dist/browser/stores/sync-store.js.map +1 -1
- package/dist/core/attachments/prompt-attachments.d.ts +11 -0
- package/dist/core/attachments/prompt-attachments.d.ts.map +1 -1
- package/dist/core/attachments/prompt-attachments.js +34 -0
- package/dist/core/attachments/prompt-attachments.js.map +1 -1
- package/dist/core/capture/rules.d.ts +44 -0
- package/dist/core/capture/rules.d.ts.map +1 -0
- package/dist/core/capture/rules.js +55 -0
- package/dist/core/capture/rules.js.map +1 -0
- package/dist/core/client/capture.d.ts +122 -0
- package/dist/core/client/capture.d.ts.map +1 -0
- package/dist/core/client/capture.js +62 -0
- package/dist/core/client/capture.js.map +1 -0
- package/dist/core/client/facade-commerce.d.ts +10 -1
- package/dist/core/client/facade-commerce.d.ts.map +1 -1
- package/dist/core/client/facade-commerce.js +10 -1
- package/dist/core/client/facade-commerce.js.map +1 -1
- package/dist/core/client/kortix.d.ts +87 -5
- package/dist/core/client/kortix.d.ts.map +1 -1
- package/dist/core/client/kortix.js +3 -0
- package/dist/core/client/kortix.js.map +1 -1
- package/dist/core/client/project-access-resources.d.ts +4 -2
- package/dist/core/client/project-access-resources.d.ts.map +1 -1
- package/dist/core/client/project-access-resources.js +2 -2
- package/dist/core/client/project-access-resources.js.map +1 -1
- package/dist/core/client/project-core.d.ts.map +1 -1
- package/dist/core/client/project-operations-admin.d.ts +4 -4
- package/dist/core/client/project-operations-review.d.ts +4 -3
- package/dist/core/client/project-operations-review.d.ts.map +1 -1
- package/dist/core/client/project-operations-review.js +3 -0
- package/dist/core/client/project-operations-review.js.map +1 -1
- package/dist/core/client/project-operations-workspace.d.ts +5 -4
- package/dist/core/client/project-operations-workspace.d.ts.map +1 -1
- package/dist/core/client/project-operations-workspace.js +2 -1
- package/dist/core/client/project-operations-workspace.js.map +1 -1
- package/dist/core/client/project-operations.d.ts +4 -4
- package/dist/core/client/session-handle.d.ts +9 -0
- package/dist/core/client/session-handle.d.ts.map +1 -1
- package/dist/core/client/session-lifecycle-resources.d.ts +13 -0
- package/dist/core/client/session-lifecycle-resources.d.ts.map +1 -1
- package/dist/core/client/session-lifecycle-resources.js +8 -0
- package/dist/core/client/session-lifecycle-resources.js.map +1 -1
- package/dist/core/http/api-client.d.ts +17 -0
- package/dist/core/http/api-client.d.ts.map +1 -1
- package/dist/core/http/api-client.js +17 -0
- package/dist/core/http/api-client.js.map +1 -1
- package/dist/core/http/response-error.d.ts.map +1 -1
- package/dist/core/http/response-error.js +31 -2
- package/dist/core/http/response-error.js.map +1 -1
- package/dist/core/models/composer-model.d.ts +35 -0
- package/dist/core/models/composer-model.d.ts.map +1 -1
- package/dist/core/models/composer-model.js +41 -1
- package/dist/core/models/composer-model.js.map +1 -1
- package/dist/core/rest/platform-client/capture.d.ts +507 -0
- package/dist/core/rest/platform-client/capture.d.ts.map +1 -0
- package/dist/core/rest/platform-client/capture.js +178 -0
- package/dist/core/rest/platform-client/capture.js.map +1 -0
- package/dist/core/rest/platform-client/index.d.ts +1 -0
- package/dist/core/rest/platform-client/index.d.ts.map +1 -1
- package/dist/core/rest/platform-client/index.js +1 -0
- package/dist/core/rest/platform-client/index.js.map +1 -1
- package/dist/core/rest/platform-client/lifecycle.d.ts +14 -4
- package/dist/core/rest/platform-client/lifecycle.d.ts.map +1 -1
- package/dist/core/rest/platform-client/lifecycle.js +32 -16
- package/dist/core/rest/platform-client/lifecycle.js.map +1 -1
- package/dist/core/rest/platform-client/shared.d.ts +22 -0
- package/dist/core/rest/platform-client/shared.d.ts.map +1 -1
- package/dist/core/rest/platform-client/shared.js +35 -0
- package/dist/core/rest/platform-client/shared.js.map +1 -1
- package/dist/core/rest/projects-client/account-secret-resources.d.ts +5 -1
- package/dist/core/rest/projects-client/account-secret-resources.d.ts.map +1 -1
- package/dist/core/rest/projects-client/account-secret-resources.js.map +1 -1
- package/dist/core/rest/projects-client/agent-config.d.ts +15 -8
- package/dist/core/rest/projects-client/agent-config.d.ts.map +1 -1
- package/dist/core/rest/projects-client/agent-config.js +1 -1
- package/dist/core/rest/projects-client/agent-config.js.map +1 -1
- package/dist/core/rest/projects-client/apps-fleet.d.ts +14 -3
- package/dist/core/rest/projects-client/apps-fleet.d.ts.map +1 -1
- package/dist/core/rest/projects-client/apps-fleet.js +8 -4
- package/dist/core/rest/projects-client/apps-fleet.js.map +1 -1
- package/dist/core/rest/projects-client/apps.d.ts +13 -1
- package/dist/core/rest/projects-client/apps.d.ts.map +1 -1
- package/dist/core/rest/projects-client/apps.js.map +1 -1
- package/dist/core/rest/projects-client/billing.d.ts +227 -55
- package/dist/core/rest/projects-client/billing.d.ts.map +1 -1
- package/dist/core/rest/projects-client/billing.js +80 -33
- package/dist/core/rest/projects-client/billing.js.map +1 -1
- package/dist/core/rest/projects-client/change-requests.d.ts +10 -2
- package/dist/core/rest/projects-client/change-requests.d.ts.map +1 -1
- package/dist/core/rest/projects-client/change-requests.js +8 -0
- package/dist/core/rest/projects-client/change-requests.js.map +1 -1
- package/dist/core/rest/projects-client/connector-run.d.ts +1 -1
- package/dist/core/rest/projects-client/connector-run.js +1 -1
- package/dist/core/rest/projects-client/connectors.d.ts +12 -0
- package/dist/core/rest/projects-client/connectors.d.ts.map +1 -1
- package/dist/core/rest/projects-client/connectors.js +3 -0
- package/dist/core/rest/projects-client/connectors.js.map +1 -1
- package/dist/core/rest/projects-client/gateway.d.ts +19 -0
- package/dist/core/rest/projects-client/gateway.d.ts.map +1 -1
- package/dist/core/rest/projects-client/gateway.js.map +1 -1
- package/dist/core/rest/projects-client/iam-actions.d.ts +2 -2
- package/dist/core/rest/projects-client/iam-actions.d.ts.map +1 -1
- package/dist/core/rest/projects-client/iam-actions.js +5 -3
- package/dist/core/rest/projects-client/iam-actions.js.map +1 -1
- package/dist/core/rest/projects-client/iam-enterprise.d.ts +2 -0
- package/dist/core/rest/projects-client/iam-enterprise.d.ts.map +1 -1
- package/dist/core/rest/projects-client/iam-enterprise.js +11 -9
- package/dist/core/rest/projects-client/iam-enterprise.js.map +1 -1
- package/dist/core/rest/projects-client/notifications.d.ts +3 -2
- package/dist/core/rest/projects-client/notifications.d.ts.map +1 -1
- package/dist/core/rest/projects-client/notifications.js +4 -0
- package/dist/core/rest/projects-client/notifications.js.map +1 -1
- package/dist/core/rest/projects-client/projects.d.ts +22 -13
- package/dist/core/rest/projects-client/projects.d.ts.map +1 -1
- package/dist/core/rest/projects-client/projects.js +2 -3
- package/dist/core/rest/projects-client/projects.js.map +1 -1
- package/dist/core/rest/projects-client/review-items.d.ts +7 -0
- package/dist/core/rest/projects-client/review-items.d.ts.map +1 -1
- package/dist/core/rest/projects-client/review-items.js +6 -0
- package/dist/core/rest/projects-client/review-items.js.map +1 -1
- package/dist/core/rest/projects-client/review.d.ts +52 -3
- package/dist/core/rest/projects-client/review.d.ts.map +1 -1
- package/dist/core/rest/projects-client/review.js +27 -0
- package/dist/core/rest/projects-client/review.js.map +1 -1
- package/dist/core/rest/projects-client/secrets.d.ts +17 -2
- package/dist/core/rest/projects-client/secrets.d.ts.map +1 -1
- package/dist/core/rest/projects-client/secrets.js.map +1 -1
- package/dist/core/rest/projects-client/sessions.d.ts +96 -14
- package/dist/core/rest/projects-client/sessions.d.ts.map +1 -1
- package/dist/core/rest/projects-client/sessions.js +60 -10
- package/dist/core/rest/projects-client/sessions.js.map +1 -1
- package/dist/core/runtime/runtime-types.d.ts +5 -0
- package/dist/core/runtime/runtime-types.d.ts.map +1 -1
- package/dist/core/session/open-bundle.d.ts +28 -34
- package/dist/core/session/open-bundle.d.ts.map +1 -1
- package/dist/core/session/open-bundle.js +57 -80
- package/dist/core/session/open-bundle.js.map +1 -1
- package/dist/core/session/turn-end-watch.d.ts +112 -0
- package/dist/core/session/turn-end-watch.d.ts.map +1 -0
- package/dist/core/session/turn-end-watch.js +196 -0
- package/dist/core/session/turn-end-watch.js.map +1 -0
- package/dist/core/session-log/index.d.ts +1 -0
- package/dist/core/session-log/index.d.ts.map +1 -1
- package/dist/core/session-log/index.js +2 -0
- package/dist/core/session-log/index.js.map +1 -1
- package/dist/core/session-log/tool-call.d.ts +12 -1
- package/dist/core/session-log/tool-call.d.ts.map +1 -1
- package/dist/core/session-log/tool-call.js +26 -1
- package/dist/core/session-log/tool-call.js.map +1 -1
- package/dist/core/session-log/turns/blocks.d.ts +5 -1
- package/dist/core/session-log/turns/blocks.d.ts.map +1 -1
- package/dist/core/session-log/turns/blocks.js +20 -2
- package/dist/core/session-log/turns/blocks.js.map +1 -1
- package/dist/core/session-log/turns/history.d.ts +92 -0
- package/dist/core/session-log/turns/history.d.ts.map +1 -0
- package/dist/core/session-log/turns/history.js +145 -0
- package/dist/core/session-log/turns/history.js.map +1 -0
- package/dist/core/session-log/turns/index.d.ts +8 -3
- package/dist/core/session-log/turns/index.d.ts.map +1 -1
- package/dist/core/session-log/turns/index.js +7 -2
- package/dist/core/session-log/turns/index.js.map +1 -1
- package/dist/core/session-log/turns/turn.d.ts +24 -4
- package/dist/core/session-log/turns/turn.d.ts.map +1 -1
- package/dist/core/session-log/turns/turn.js +64 -5
- package/dist/core/session-log/turns/turn.js.map +1 -1
- package/dist/core/session-log/types.d.ts +4 -4
- package/dist/core/session-log/types.js +2 -2
- package/dist/core/session-log/v1-view.d.ts +13 -9
- package/dist/core/session-log/v1-view.d.ts.map +1 -1
- package/dist/core/session-log/v1-view.js +49 -24
- package/dist/core/session-log/v1-view.js.map +1 -1
- package/dist/core/session-log/v1.d.ts +2 -0
- package/dist/core/session-log/v1.d.ts.map +1 -1
- package/dist/core/session-log/v1.js +12 -1
- package/dist/core/session-log/v1.js.map +1 -1
- package/dist/core/session-sync/saved-transcript.d.ts +57 -1
- package/dist/core/session-sync/saved-transcript.d.ts.map +1 -1
- package/dist/core/session-sync/saved-transcript.js +93 -0
- package/dist/core/session-sync/saved-transcript.js.map +1 -1
- package/dist/core/session-sync/session-sync-controller.d.ts +2 -1
- package/dist/core/session-sync/session-sync-controller.d.ts.map +1 -1
- package/dist/core/session-sync/session-sync-controller.js +9 -0
- package/dist/core/session-sync/session-sync-controller.js.map +1 -1
- package/dist/core/stream/event-stream.d.ts.map +1 -1
- package/dist/core/stream/event-stream.js +4 -1
- package/dist/core/stream/event-stream.js.map +1 -1
- package/dist/core/turns/classify.d.ts.map +1 -1
- package/dist/core/turns/classify.js +6 -3
- package/dist/core/turns/classify.js.map +1 -1
- package/dist/core/turns/edit-blocks.d.ts +8 -0
- package/dist/core/turns/edit-blocks.d.ts.map +1 -0
- package/dist/core/turns/edit-blocks.js +22 -0
- package/dist/core/turns/edit-blocks.js.map +1 -0
- package/dist/core/turns/segments/burst-summary.d.ts +10 -0
- package/dist/core/turns/segments/burst-summary.d.ts.map +1 -1
- package/dist/core/turns/segments/burst-summary.js +33 -0
- package/dist/core/turns/segments/burst-summary.js.map +1 -1
- package/dist/core/turns/segments/narration.d.ts +1 -1
- package/dist/core/turns/segments/narration.d.ts.map +1 -1
- package/dist/core/turns/segments/narration.js +9 -0
- package/dist/core/turns/segments/narration.js.map +1 -1
- package/dist/core/turns/state.d.ts +5 -4
- package/dist/core/turns/state.d.ts.map +1 -1
- package/dist/core/turns/state.js +5 -4
- package/dist/core/turns/state.js.map +1 -1
- package/dist/core/turns/tool-kind.d.ts +6 -4
- package/dist/core/turns/tool-kind.d.ts.map +1 -1
- package/dist/core/turns/tool-kind.js +13 -5
- package/dist/core/turns/tool-kind.js.map +1 -1
- package/dist/core/turns/tool-registry.d.ts.map +1 -1
- package/dist/core/turns/tool-registry.js +1 -0
- package/dist/core/turns/tool-registry.js.map +1 -1
- package/dist/core/turns/view-model.d.ts.map +1 -1
- package/dist/core/turns/view-model.js +1 -14
- package/dist/core/turns/view-model.js.map +1 -1
- package/dist/genui/catalog.d.ts +40 -0
- package/dist/genui/catalog.d.ts.map +1 -0
- package/dist/genui/catalog.js +420 -0
- package/dist/genui/catalog.js.map +1 -0
- package/dist/genui/expansion.d.ts +19 -0
- package/dist/genui/expansion.d.ts.map +1 -0
- package/dist/genui/expansion.js +344 -0
- package/dist/genui/expansion.js.map +1 -0
- package/dist/genui/fence-entry.d.ts +3 -0
- package/dist/genui/fence-entry.d.ts.map +1 -0
- package/dist/genui/fence-entry.js +4 -0
- package/dist/genui/fence-entry.js.map +1 -0
- package/dist/genui/fence.d.ts +53 -0
- package/dist/genui/fence.d.ts.map +1 -0
- package/dist/genui/fence.js +170 -0
- package/dist/genui/fence.js.map +1 -0
- package/dist/genui/index.d.ts +7 -0
- package/dist/genui/index.d.ts.map +1 -0
- package/dist/genui/index.js +7 -0
- package/dist/genui/index.js.map +1 -0
- package/dist/genui/markdown.d.ts +33 -0
- package/dist/genui/markdown.d.ts.map +1 -0
- package/dist/genui/markdown.js +133 -0
- package/dist/genui/markdown.js.map +1 -0
- package/dist/genui/parse.d.ts +12 -0
- package/dist/genui/parse.d.ts.map +1 -0
- package/dist/genui/parse.js +83 -0
- package/dist/genui/parse.js.map +1 -0
- package/dist/genui/prompt.d.ts +5 -0
- package/dist/genui/prompt.d.ts.map +1 -0
- package/dist/genui/prompt.js +209 -0
- package/dist/genui/prompt.js.map +1 -0
- package/dist/genui/react/default-components.d.ts +3 -0
- package/dist/genui/react/default-components.d.ts.map +1 -0
- package/dist/genui/react/default-components.js +81 -0
- package/dist/genui/react/default-components.js.map +1 -0
- package/dist/genui/react/genui-block.d.ts +46 -0
- package/dist/genui/react/genui-block.d.ts.map +1 -0
- package/dist/genui/react/genui-block.js +106 -0
- package/dist/genui/react/genui-block.js.map +1 -0
- package/dist/genui/react/index.d.ts +3 -0
- package/dist/genui/react/index.d.ts.map +1 -0
- package/dist/genui/react/index.js +3 -0
- package/dist/genui/react/index.js.map +1 -0
- package/dist/genui/share.d.ts +11 -0
- package/dist/genui/share.d.ts.map +1 -0
- package/dist/genui/share.js +36 -0
- package/dist/genui/share.js.map +1 -0
- package/dist/genui/types.d.ts +51 -0
- package/dist/genui/types.d.ts.map +1 -0
- package/dist/genui/types.js +3 -0
- package/dist/genui/types.js.map +1 -0
- package/dist/genui/urls.d.ts +7 -0
- package/dist/genui/urls.d.ts.map +1 -0
- package/dist/genui/urls.js +24 -0
- package/dist/genui/urls.js.map +1 -0
- package/dist/genui/validate.d.ts +25 -0
- package/dist/genui/validate.d.ts.map +1 -0
- package/dist/genui/validate.js +139 -0
- package/dist/genui/validate.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/kortix.esm.min.js +38 -36
- package/dist/kortix.global.js +38 -36
- package/dist/platform/ui.d.ts +20 -2
- package/dist/platform/ui.d.ts.map +1 -1
- package/dist/platform/ui.js +31 -4
- package/dist/platform/ui.js.map +1 -1
- package/dist/react/hold-live-start.js +1 -1
- package/dist/react/hold-live-start.js.map +1 -1
- package/dist/react/index.d.ts +4 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +5 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/opencode.d.ts +1 -1
- package/dist/react/opencode.d.ts.map +1 -1
- package/dist/react/opencode.js +1 -1
- package/dist/react/opencode.js.map +1 -1
- package/dist/react/query-contracts.d.ts +10 -0
- package/dist/react/query-contracts.d.ts.map +1 -1
- package/dist/react/query-contracts.js +10 -0
- package/dist/react/query-contracts.js.map +1 -1
- package/dist/react/query-keys.d.ts +29 -1
- package/dist/react/query-keys.d.ts.map +1 -1
- package/dist/react/query-keys.js +37 -2
- package/dist/react/query-keys.js.map +1 -1
- package/dist/react/reset-identity-state.d.ts +2 -1
- package/dist/react/reset-identity-state.d.ts.map +1 -1
- package/dist/react/reset-identity-state.js +4 -1
- package/dist/react/reset-identity-state.js.map +1 -1
- package/dist/react/session-cache-write.d.ts +2 -0
- package/dist/react/session-cache-write.d.ts.map +1 -1
- package/dist/react/session-cache-write.js +24 -1
- package/dist/react/session-cache-write.js.map +1 -1
- package/dist/react/sign-in-with-kortix.d.ts +5 -5
- package/dist/react/turn-end-handoff.d.ts +24 -0
- package/dist/react/turn-end-handoff.d.ts.map +1 -0
- package/dist/react/turn-end-handoff.js +131 -0
- package/dist/react/turn-end-handoff.js.map +1 -0
- package/dist/react/use-admin-accounts.d.ts +124 -39
- package/dist/react/use-admin-accounts.d.ts.map +1 -1
- package/dist/react/use-admin-accounts.js +96 -41
- package/dist/react/use-admin-accounts.js.map +1 -1
- package/dist/react/use-billing-plan.d.ts +38 -0
- package/dist/react/use-billing-plan.d.ts.map +1 -0
- package/dist/react/use-billing-plan.js +64 -0
- package/dist/react/use-billing-plan.js.map +1 -0
- package/dist/react/use-capture.d.ts +77 -0
- package/dist/react/use-capture.d.ts.map +1 -0
- package/dist/react/use-capture.js +210 -0
- package/dist/react/use-capture.js.map +1 -0
- package/dist/react/use-feature-flag.d.ts +3 -3
- package/dist/react/use-feature-flag.d.ts.map +1 -1
- package/dist/react/use-feature-flag.js +4 -3
- package/dist/react/use-feature-flag.js.map +1 -1
- package/dist/react/use-opencode-events/handle-interaction-event.d.ts.map +1 -1
- package/dist/react/use-opencode-events/handle-interaction-event.js +5 -3
- package/dist/react/use-opencode-events/handle-interaction-event.js.map +1 -1
- package/dist/react/use-opencode-events/handle-session-event.d.ts.map +1 -1
- package/dist/react/use-opencode-events/handle-session-event.js +19 -8
- package/dist/react/use-opencode-events/handle-session-event.js.map +1 -1
- package/dist/react/use-opencode-events/handler-context.d.ts +2 -0
- package/dist/react/use-opencode-events/handler-context.d.ts.map +1 -1
- package/dist/react/use-opencode-events/helpers.d.ts +11 -0
- package/dist/react/use-opencode-events/helpers.d.ts.map +1 -1
- package/dist/react/use-opencode-events/helpers.js +21 -1
- package/dist/react/use-opencode-events/helpers.js.map +1 -1
- package/dist/react/use-opencode-local.d.ts +12 -1
- package/dist/react/use-opencode-local.d.ts.map +1 -1
- package/dist/react/use-opencode-local.js +23 -3
- package/dist/react/use-opencode-local.js.map +1 -1
- package/dist/react/use-opencode-sessions/commands.d.ts +20 -1
- package/dist/react/use-opencode-sessions/commands.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/commands.js +29 -1
- package/dist/react/use-opencode-sessions/commands.js.map +1 -1
- package/dist/react/use-opencode-sessions/permissions.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/permissions.js +46 -1
- package/dist/react/use-opencode-sessions/permissions.js.map +1 -1
- package/dist/react/use-project-sessions.d.ts +1 -1
- package/dist/react/use-project-sessions.d.ts.map +1 -1
- package/dist/react/use-project-sessions.js +3 -2
- package/dist/react/use-project-sessions.js.map +1 -1
- package/dist/react/use-prompt-attachments.d.ts.map +1 -1
- package/dist/react/use-prompt-attachments.js +1 -0
- package/dist/react/use-prompt-attachments.js.map +1 -1
- package/dist/react/use-review-summary.d.ts +29 -0
- package/dist/react/use-review-summary.d.ts.map +1 -0
- package/dist/react/use-review-summary.js +48 -0
- package/dist/react/use-review-summary.js.map +1 -0
- package/dist/react/use-runtime-reconnect.js +2 -2
- package/dist/react/use-runtime-reconnect.js.map +1 -1
- package/dist/react/use-session-list-state.d.ts +14 -0
- package/dist/react/use-session-list-state.d.ts.map +1 -0
- package/dist/react/use-session-list-state.js +43 -0
- package/dist/react/use-session-list-state.js.map +1 -0
- package/dist/react/use-session-log.d.ts +19 -10
- package/dist/react/use-session-log.d.ts.map +1 -1
- package/dist/react/use-session-log.js +29 -24
- package/dist/react/use-session-log.js.map +1 -1
- package/dist/react/use-session-stream.d.ts.map +1 -1
- package/dist/react/use-session-stream.js +16 -1
- package/dist/react/use-session-stream.js.map +1 -1
- package/dist/react/use-session-sync.d.ts +10 -2
- package/dist/react/use-session-sync.d.ts.map +1 -1
- package/dist/react/use-session-sync.js +14 -8
- package/dist/react/use-session-sync.js.map +1 -1
- package/dist/react/use-session-transcript-history.d.ts +1 -0
- package/dist/react/use-session-transcript-history.d.ts.map +1 -1
- package/dist/react/use-session-transcript-history.js +5 -16
- package/dist/react/use-session-transcript-history.js.map +1 -1
- package/dist/react/use-session-working.d.ts +11 -0
- package/dist/react/use-session-working.d.ts.map +1 -1
- package/dist/react/use-session-working.js +16 -0
- package/dist/react/use-session-working.js.map +1 -1
- package/dist/react/use-session.d.ts +28 -1
- package/dist/react/use-session.d.ts.map +1 -1
- package/dist/react/use-session.js +76 -12
- package/dist/react/use-session.js.map +1 -1
- package/package.json +33 -6
|
@@ -3,15 +3,58 @@ import { type ServerTokenOptions } from './shared.js';
|
|
|
3
3
|
* The unambiguous billing situation for an account — the SAME state the API's
|
|
4
4
|
* billing gate admits on (apps/api/src/billing/services/billing-state.ts).
|
|
5
5
|
*
|
|
6
|
-
* Branch on this, never on `tier_key` (which stays `free` for
|
|
7
|
-
*
|
|
6
|
+
* Branch on this, never on `tier_key` (which stays `free` for an account on an
|
|
7
|
+
* admin trial) and never on `can_run` alone (`false` means BLOCKED, not "no plan").
|
|
8
8
|
*/
|
|
9
9
|
export type BillingState = 'active' | 'out_of_credits' | 'no_subscription' | 'payment_failed' | 'no_account';
|
|
10
10
|
/**
|
|
11
|
-
* The public plan ladder. Exactly three rungs
|
|
12
|
-
*
|
|
11
|
+
* The public plan ladder. Exactly three rungs. Every legacy plan key reads as
|
|
12
|
+
* `credits`: one paid plan, any whole monthly amount, one shared credit wallet.
|
|
13
13
|
*/
|
|
14
|
-
export type PlanFamily = 'free' | '
|
|
14
|
+
export type PlanFamily = 'free' | 'credits' | 'enterprise';
|
|
15
|
+
/** A dated grant of a plan. `days_left` counts whole days, rounded up; 0 on the last day. */
|
|
16
|
+
/** The Enterprise feature layer of an account (`AccountState.enterprise`). */
|
|
17
|
+
export interface AccountEnterprise {
|
|
18
|
+
state: 'off' | 'demo' | 'licensed';
|
|
19
|
+
}
|
|
20
|
+
export interface AccountTrial {
|
|
21
|
+
plan: 'credits' | 'enterprise';
|
|
22
|
+
started_at: string | null;
|
|
23
|
+
ends_at: string;
|
|
24
|
+
days_left: number;
|
|
25
|
+
}
|
|
26
|
+
/** How an Enterprise contract is paid: Stripe Checkout by card, a Stripe invoice, or outside Stripe. */
|
|
27
|
+
export type EnterpriseContractCollection = 'checkout' | 'invoice' | 'manual';
|
|
28
|
+
/** An active Enterprise contract: an annual license plus a prepaid credit pool. */
|
|
29
|
+
export interface AccountContract {
|
|
30
|
+
id: string;
|
|
31
|
+
/** Annual platform fee, USD. */
|
|
32
|
+
license_usd: number;
|
|
33
|
+
/** Annual credit commitment, USD, granted as one pool per term. */
|
|
34
|
+
/** @deprecated A license carries no credits (2026-10-15); no longer sent. */
|
|
35
|
+
credits_usd?: number;
|
|
36
|
+
term_months: number;
|
|
37
|
+
collection: EnterpriseContractCollection;
|
|
38
|
+
starts_at: string | null;
|
|
39
|
+
/** End of the current term. Null for an open-ended contract. */
|
|
40
|
+
ends_at: string | null;
|
|
41
|
+
/** True when the term renews on its own. */
|
|
42
|
+
renews: boolean;
|
|
43
|
+
}
|
|
44
|
+
/** An Enterprise contract offered and not yet accepted. */
|
|
45
|
+
export interface AccountEnterpriseOffer {
|
|
46
|
+
id: string;
|
|
47
|
+
license_usd: number;
|
|
48
|
+
/** @deprecated A license carries no credits (2026-10-15); no longer sent. */
|
|
49
|
+
credits_usd?: number;
|
|
50
|
+
term_months: number;
|
|
51
|
+
collection: EnterpriseContractCollection;
|
|
52
|
+
}
|
|
53
|
+
/** SSO/SCIM kept after an Enterprise trial or contract ended. */
|
|
54
|
+
export interface AccountAccessGrace {
|
|
55
|
+
reason: 'trial_ended' | 'contract_ended';
|
|
56
|
+
ends_at: string;
|
|
57
|
+
}
|
|
15
58
|
export interface AccountState {
|
|
16
59
|
credits: {
|
|
17
60
|
total: number;
|
|
@@ -42,40 +85,37 @@ export interface AccountState {
|
|
|
42
85
|
* The plan the account BEHAVES as, named the way the product names plans.
|
|
43
86
|
*
|
|
44
87
|
* Distinct from `subscription` on purpose. `subscription.tier_key` is the
|
|
45
|
-
* STORED plan
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* Optional: additive on the wire. The API sends it as of the plan-resolver
|
|
52
|
-
* rollout; older deployments omit it entirely.
|
|
88
|
+
* STORED plan (legacy keys read as `'credits'`). This block is the BILLING
|
|
89
|
+
* plan: what the account pays for. A Credits trial overlays it; an
|
|
90
|
+
* Enterprise trial does not, because it lends the Enterprise features only
|
|
91
|
+
* (see `trial`, and `tier.entitlements` for what the gates enforce). Read it
|
|
92
|
+
* through {@link resolvedPlan}, which also covers responses from an API too
|
|
93
|
+
* old to send it.
|
|
53
94
|
*/
|
|
54
95
|
plan?: {
|
|
55
|
-
/** Plan key —
|
|
96
|
+
/** Plan key — 'none' | 'free' | 'credits' | 'enterprise'. */
|
|
56
97
|
key: string;
|
|
57
98
|
/** Public ladder position: there are exactly three families. */
|
|
58
99
|
family: PlanFamily;
|
|
59
|
-
/** Customer-facing family name — 'Free' | '
|
|
100
|
+
/** Customer-facing family name — 'Free' | 'Credits' | 'Enterprise'. */
|
|
60
101
|
label: string;
|
|
61
|
-
/** Qualifier under the label
|
|
62
|
-
* the plan needs no qualifier. */
|
|
102
|
+
/** Qualifier under the label. Null when the plan needs none. */
|
|
63
103
|
sublabel: string | null;
|
|
64
|
-
/** Lifecycle: sellable today,
|
|
65
|
-
|
|
66
|
-
status: 'current' | 'grandfathered' | 'retired' | 'non_plan';
|
|
104
|
+
/** Lifecycle: sellable today, or the absence of a plan. */
|
|
105
|
+
status: 'current' | 'non_plan';
|
|
67
106
|
/** How the recurring charge is computed. */
|
|
68
|
-
shape: 'none' | '
|
|
107
|
+
shape: 'none' | 'credits' | 'contract';
|
|
69
108
|
/** Strictly ordered ladder position (0 = no plan). Compare, don't display. */
|
|
70
109
|
rank: number;
|
|
71
|
-
/**
|
|
72
|
-
|
|
73
|
-
* it is not. */
|
|
74
|
-
is_grandfathered: boolean;
|
|
110
|
+
/** The paid plan's monthly amount in USD. Null for free, enterprise and trial. */
|
|
111
|
+
monthly_usd: number | null;
|
|
75
112
|
};
|
|
76
113
|
subscription: {
|
|
77
114
|
tier_key: string;
|
|
78
115
|
tier_display_name: string;
|
|
116
|
+
/** The credits plan's monthly amount the account PAYS, in USD, or null
|
|
117
|
+
* when it pays none. Kept during a trial, while `plan.monthly_usd` is null. */
|
|
118
|
+
monthly_usd?: number | null;
|
|
79
119
|
status: string;
|
|
80
120
|
billing_period: 'monthly' | 'yearly' | 'yearly_commitment' | null;
|
|
81
121
|
provider: 'stripe' | 'revenuecat' | 'local';
|
|
@@ -90,11 +130,16 @@ export interface AccountState {
|
|
|
90
130
|
current_tier: {
|
|
91
131
|
name: string;
|
|
92
132
|
display_name: string;
|
|
133
|
+
/** Credits a month (1 credit = $0.01). */
|
|
93
134
|
monthly_credits?: number;
|
|
135
|
+
/** The same amount in USD. */
|
|
136
|
+
monthly_usd?: number;
|
|
94
137
|
};
|
|
95
138
|
target_tier: {
|
|
96
139
|
name: string;
|
|
97
140
|
display_name: string;
|
|
141
|
+
/** The same amount in USD. */
|
|
142
|
+
monthly_usd?: number;
|
|
98
143
|
monthly_credits?: number;
|
|
99
144
|
};
|
|
100
145
|
effective_date: string;
|
|
@@ -165,16 +210,31 @@ export interface AccountState {
|
|
|
165
210
|
};
|
|
166
211
|
/** True when a self-host operator's ENTERPRISE_LICENSE_AVAILABLE env var
|
|
167
212
|
* forces every enterprise entitlement on platform-wide — the frontend
|
|
168
|
-
* hides
|
|
169
|
-
* "Request enterprise access" upsell when this is true. */
|
|
213
|
+
* hides every Enterprise upsell when this is true. */
|
|
170
214
|
enterprise_license_available?: boolean;
|
|
171
|
-
/**
|
|
172
|
-
* Enterprise
|
|
173
|
-
* then resolves all enterprise entitlements regardless of billing tier, so
|
|
174
|
-
* a deal that is BOTH Enterprise AND per-seat can hold both at once. The
|
|
175
|
-
* frontend uses this to hide the self-serve demo toggle (a real contract
|
|
176
|
-
* supersedes the demo). */
|
|
215
|
+
/** @deprecated Read `plan.family === 'enterprise'`. True on the Enterprise
|
|
216
|
+
* plan (a contract or an Enterprise trial). */
|
|
177
217
|
enterprise_entitled?: boolean;
|
|
218
|
+
/** The active trial: a dated grant of a plan. Null when there is none.
|
|
219
|
+
* Absent on an older server. */
|
|
220
|
+
/** @deprecated Trials are removed (2026-10-15): always null. Read {@link AccountState.enterprise}. */
|
|
221
|
+
trial?: AccountTrial | null;
|
|
222
|
+
/**
|
|
223
|
+
* The Enterprise feature layer: 'off', 'demo' (self-serve, marked "Demo") or
|
|
224
|
+
* 'licensed' (a license contract). Absent on an older server.
|
|
225
|
+
*/
|
|
226
|
+
enterprise?: AccountEnterprise;
|
|
227
|
+
/** The active Enterprise contract. Null when there is none. Absent on an
|
|
228
|
+
* older server. */
|
|
229
|
+
contract?: AccountContract | null;
|
|
230
|
+
/** An Enterprise contract offered and not yet accepted. A billing manager
|
|
231
|
+
* accepts a `checkout` offer with {@link acceptEnterpriseOffer}. Null when
|
|
232
|
+
* there is none. Absent on an older server. */
|
|
233
|
+
enterprise_offer?: AccountEnterpriseOffer | null;
|
|
234
|
+
/** SSO and SCIM stay on after an Enterprise trial or contract ends, until
|
|
235
|
+
* `ends_at`, so nobody is locked out. Null outside that window. Absent on
|
|
236
|
+
* an older server. */
|
|
237
|
+
grace?: AccountAccessGrace | null;
|
|
178
238
|
auto_topup?: {
|
|
179
239
|
enabled: boolean;
|
|
180
240
|
threshold: number;
|
|
@@ -203,17 +263,8 @@ export interface AccountState {
|
|
|
203
263
|
created_at: string;
|
|
204
264
|
}>;
|
|
205
265
|
can_add_instances?: boolean;
|
|
206
|
-
can_claim_computer?: boolean;
|
|
207
266
|
can_manage_billing?: boolean;
|
|
208
|
-
|
|
209
|
-
billing_model?: 'legacy' | 'per_seat';
|
|
210
|
-
seats?: {
|
|
211
|
-
count: number;
|
|
212
|
-
price_per_seat_usd: number;
|
|
213
|
-
typical_compute_budget_per_seat_usd: number;
|
|
214
|
-
typical_llm_budget_per_seat_usd: number;
|
|
215
|
-
};
|
|
216
|
-
member_count?: number;
|
|
267
|
+
/** Usage in the current billing period. Present for every account. */
|
|
217
268
|
usage_this_period?: {
|
|
218
269
|
compute_usd: number;
|
|
219
270
|
llm_usd: number;
|
|
@@ -232,21 +283,20 @@ export declare function getDefaultAccountState(): AccountState;
|
|
|
232
283
|
export interface ResolvedPlanView {
|
|
233
284
|
/** Which rung of the public ladder — the only value worth branching on. */
|
|
234
285
|
family: PlanFamily;
|
|
235
|
-
/** Customer-facing plan name, e.g. '
|
|
286
|
+
/** Customer-facing plan name, e.g. 'Credits'. Never empty. */
|
|
236
287
|
label: string;
|
|
237
288
|
/** Qualifier to render muted after the label, e.g.
|
|
238
|
-
*
|
|
289
|
+
* Null when the plan needs none. */
|
|
239
290
|
sublabel: string | null;
|
|
240
|
-
/**
|
|
241
|
-
|
|
291
|
+
/** The paid plan's monthly amount in USD. Null for free, enterprise and trial. */
|
|
292
|
+
monthlyUsd: number | null;
|
|
242
293
|
}
|
|
243
294
|
/**
|
|
244
295
|
* The plan an account BEHAVES as, as a UI should name it.
|
|
245
296
|
*
|
|
246
297
|
* Prefer this over `state.subscription.tier_key` for anything a person reads or
|
|
247
298
|
* any "is this account on a paid plan?" branch. `tier_key` is the STORED plan,
|
|
248
|
-
* which stays `free` for an account on an admin trial and for a
|
|
249
|
-
* team whose row is stale — branch on it and the UI contradicts the server.
|
|
299
|
+
* which stays `free` for an account on an admin trial and for a row the webhook has not synced yet — branch on it and the UI contradicts the server.
|
|
250
300
|
*
|
|
251
301
|
* Degrades safely: an API too old to send `plan` still yields a family and a
|
|
252
302
|
* label, derived from `tier` / `subscription.tier_key`.
|
|
@@ -358,6 +408,10 @@ export interface BillingTierConfiguration {
|
|
|
358
408
|
export interface BillingTierConfigurationsResponse {
|
|
359
409
|
success?: boolean;
|
|
360
410
|
tiers: BillingTierConfiguration[];
|
|
411
|
+
/** Lowest purchasable monthly amount in USD. */
|
|
412
|
+
min_monthly_usd: number;
|
|
413
|
+
/** Highest purchasable monthly amount in USD. */
|
|
414
|
+
max_monthly_usd: number;
|
|
361
415
|
timestamp?: string;
|
|
362
416
|
}
|
|
363
417
|
/** Publicly visible pricing tiers (for a plans/pricing page). */
|
|
@@ -453,13 +507,21 @@ export declare function reactivateSubscription(accountId?: string): Promise<Subs
|
|
|
453
507
|
* Stripe customer portal ({@link createPortalSession}). Removed in the next major.
|
|
454
508
|
*/
|
|
455
509
|
export declare function scheduleDowngrade(_targetTierKey: string, _commitmentType?: string, _accountId?: string): Promise<SubscriptionMutationResult>;
|
|
456
|
-
/**
|
|
457
|
-
|
|
510
|
+
/**
|
|
511
|
+
* @deprecated The API retired `POST /billing/cancel-scheduled-change`. Always
|
|
512
|
+
* rejects with `ENDPOINT_RETIRED` and sends no request. A plan cut applies at
|
|
513
|
+
* the next renewal; set the amount again with {@link setBillingPlan}. Removed in
|
|
514
|
+
* the next major.
|
|
515
|
+
*/
|
|
516
|
+
export declare function cancelScheduledChange(_accountId?: string): Promise<SubscriptionMutationResult>;
|
|
458
517
|
export interface ProrationPreviewResult {
|
|
459
518
|
[key: string]: unknown;
|
|
460
519
|
}
|
|
461
|
-
/**
|
|
462
|
-
|
|
520
|
+
/**
|
|
521
|
+
* @deprecated The API retired `GET /billing/proration-preview`. Always rejects
|
|
522
|
+
* with `ENDPOINT_RETIRED` and sends no request. Removed in the next major.
|
|
523
|
+
*/
|
|
524
|
+
export declare function getProrationPreview(_newPriceId: string, _accountId?: string): Promise<ProrationPreviewResult>;
|
|
463
525
|
export interface PurchaseCreditsInput {
|
|
464
526
|
amount: number;
|
|
465
527
|
accountId?: string;
|
|
@@ -527,6 +589,106 @@ export interface AutoTopupSetupStatus {
|
|
|
527
589
|
payment_method_source?: 'customer_default' | 'subscription_default' | 'attached' | null;
|
|
528
590
|
}
|
|
529
591
|
export declare function getAutoTopupSetupStatus(accountId?: string): Promise<AutoTopupSetupStatus>;
|
|
592
|
+
export interface SetBillingPlanParams {
|
|
593
|
+
/** Whole USD per month, 20 to 10,000. 1 credit = $0.01. */
|
|
594
|
+
monthlyUsd: number;
|
|
595
|
+
successUrl: string;
|
|
596
|
+
cancelUrl: string;
|
|
597
|
+
locale?: string;
|
|
598
|
+
accountId?: string;
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* What a plan change did, or would do ({@link PlanChangePreview}).
|
|
602
|
+
* - `raised`: instant. Charged now, prorated; the credits for the rest of the
|
|
603
|
+
* period are added at once.
|
|
604
|
+
* - `scheduled`: a lower amount from the next renewal (`effective_at`). No
|
|
605
|
+
* charge, no refund; this period keeps its amount and credits.
|
|
606
|
+
* - `kept`: a scheduled lower amount was cancelled.
|
|
607
|
+
* - `none`: the amount equals the one in effect.
|
|
608
|
+
* - `checkout`: no paid subscription yet (preview only).
|
|
609
|
+
*/
|
|
610
|
+
export type PlanChange = 'raised' | 'scheduled' | 'kept' | 'none' | 'checkout';
|
|
611
|
+
/**
|
|
612
|
+
* Result of {@link setBillingPlan}.
|
|
613
|
+
* - `checkout_created`: no paid subscription yet. Redirect to `checkout_url`.
|
|
614
|
+
* - `updated` / `unchanged`: an existing subscription changed in place;
|
|
615
|
+
* `change` says how (optional: absent on an older API).
|
|
616
|
+
* - `payment_pending`: the raise needs payment confirmation with `client_secret`.
|
|
617
|
+
*/
|
|
618
|
+
export type SetBillingPlanResult = {
|
|
619
|
+
status: 'checkout_created';
|
|
620
|
+
checkout_url: string;
|
|
621
|
+
monthly_usd: number;
|
|
622
|
+
} | {
|
|
623
|
+
status: 'updated' | 'unchanged';
|
|
624
|
+
monthly_usd: number;
|
|
625
|
+
change?: PlanChange;
|
|
626
|
+
/** `scheduled`: when the lower amount takes effect (the next renewal). */
|
|
627
|
+
effective_at?: string;
|
|
628
|
+
/** `raised`: USD charged now. */
|
|
629
|
+
charged_usd?: number;
|
|
630
|
+
/** `raised`: credits added now (1 credit = $0.01). */
|
|
631
|
+
credits_added?: number;
|
|
632
|
+
} | {
|
|
633
|
+
status: 'payment_pending';
|
|
634
|
+
monthly_usd: number;
|
|
635
|
+
client_secret: string;
|
|
636
|
+
};
|
|
637
|
+
/** What {@link setBillingPlan} would do for an amount: {@link previewBillingPlan}. */
|
|
638
|
+
export interface PlanChangePreview {
|
|
639
|
+
change: PlanChange;
|
|
640
|
+
/** The amount asked for, USD a month. */
|
|
641
|
+
monthly_usd: number;
|
|
642
|
+
/** The amount in effect this period. Null without a paid subscription. */
|
|
643
|
+
current_monthly_usd: number | null;
|
|
644
|
+
/** USD due now: the prorated raise, or the first month at checkout. */
|
|
645
|
+
due_now_usd: number;
|
|
646
|
+
/** Credits added now (1 credit = $0.01). */
|
|
647
|
+
credits_now: number;
|
|
648
|
+
/** `scheduled`: when the lower amount takes effect. */
|
|
649
|
+
effective_at: string | null;
|
|
650
|
+
}
|
|
651
|
+
export interface PreviewBillingPlanParams {
|
|
652
|
+
/** Whole USD per month. */
|
|
653
|
+
monthlyUsd: number;
|
|
654
|
+
accountId?: string;
|
|
655
|
+
}
|
|
656
|
+
/** Preview a plan change without making it: `POST /billing/plan/preview`. */
|
|
657
|
+
export declare function previewBillingPlan(params: PreviewBillingPlanParams): Promise<PlanChangePreview>;
|
|
658
|
+
/** Subscribe to, or change, the credits plan: `POST /billing/plan`. Rejects with 400 outside 20..10,000. */
|
|
659
|
+
export declare function setBillingPlan(params: SetBillingPlanParams): Promise<SetBillingPlanResult>;
|
|
660
|
+
export interface AcceptEnterpriseOfferParams {
|
|
661
|
+
successUrl: string;
|
|
662
|
+
cancelUrl: string;
|
|
663
|
+
/** Defaults to the caller's active account. */
|
|
664
|
+
accountId?: string;
|
|
665
|
+
}
|
|
666
|
+
export interface AcceptEnterpriseOfferResult {
|
|
667
|
+
/** Stripe Checkout for the offered contract. Expires within 24 h: create one per click. */
|
|
668
|
+
checkout_url: string;
|
|
669
|
+
contract_id: string;
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* Accept the account's open Enterprise offer (`POST /billing/enterprise-offer/checkout`):
|
|
673
|
+
* returns a Stripe Checkout link that pays the annual license and credit
|
|
674
|
+
* commitment by card. Needs `billing.write` (owners and admins). Rejects with
|
|
675
|
+
* 404 when there is no open offer and 409 when the offer is invoiced instead.
|
|
676
|
+
*/
|
|
677
|
+
export declare function acceptEnterpriseOffer(params: AcceptEnterpriseOfferParams): Promise<AcceptEnterpriseOfferResult>;
|
|
678
|
+
export interface ContactEnterpriseSalesParams {
|
|
679
|
+
accountId?: string;
|
|
680
|
+
/** Optional free text for sales, e.g. what the team needs. */
|
|
681
|
+
note?: string;
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* "Talk to sales" from inside the app: one click, no form. The API emails
|
|
685
|
+
* Kortix sales the account, the signed-in user and its Enterprise state. Any
|
|
686
|
+
* member may ask (`billing.read`). `sent` is false when the deployment has no
|
|
687
|
+
* sales inbox configured.
|
|
688
|
+
*/
|
|
689
|
+
export declare function contactEnterpriseSales(params?: ContactEnterpriseSalesParams): Promise<{
|
|
690
|
+
sent: boolean;
|
|
691
|
+
}>;
|
|
530
692
|
export interface CreatePerSeatCheckoutInput {
|
|
531
693
|
accountId?: string;
|
|
532
694
|
successUrl: string;
|
|
@@ -539,7 +701,12 @@ export interface CreatePerSeatCheckoutResult {
|
|
|
539
701
|
subscription_id?: string;
|
|
540
702
|
seat_count: number;
|
|
541
703
|
}
|
|
542
|
-
|
|
704
|
+
/**
|
|
705
|
+
* @deprecated The API retired `POST /billing/create-per-seat-checkout`. Always
|
|
706
|
+
* rejects with `ENDPOINT_RETIRED` and sends no request. Use
|
|
707
|
+
* {@link setBillingPlan}. Removed in the next major.
|
|
708
|
+
*/
|
|
709
|
+
export declare function createPerSeatCheckout(_input: CreatePerSeatCheckoutInput): Promise<CreatePerSeatCheckoutResult>;
|
|
543
710
|
export interface ClaimPerSeatResult {
|
|
544
711
|
ok: boolean;
|
|
545
712
|
status: string;
|
|
@@ -548,7 +715,12 @@ export interface ClaimPerSeatResult {
|
|
|
548
715
|
cancelled_subscriptions: number;
|
|
549
716
|
reason?: string | null;
|
|
550
717
|
}
|
|
551
|
-
|
|
718
|
+
/**
|
|
719
|
+
* @deprecated The API retired `POST /billing/claim-per-seat`. Always rejects
|
|
720
|
+
* with `ENDPOINT_RETIRED` and sends no request. Legacy plans now read as
|
|
721
|
+
* `credits`; use {@link setBillingPlan}. Removed in the next major.
|
|
722
|
+
*/
|
|
723
|
+
export declare function claimPerSeatBilling(_accountId?: string): Promise<ClaimPerSeatResult>;
|
|
552
724
|
export declare function syncSubscription(accountId?: string): Promise<SubscriptionMutationResult>;
|
|
553
725
|
export interface UsageTotals {
|
|
554
726
|
total_input_tokens: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../../../src/core/rest/projects-client/billing.ts"],"names":[],"mappings":"AASA,OAAO,EAA0B,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAK3E;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GACpB,QAAQ,GACR,gBAAgB,GAChB,iBAAiB,GACjB,gBAAgB,GACh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MAAM,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,KAAK,CAAC;IACvC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,mFAAmF;AACnF,wBAAsB,cAAc,CAAC,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,WAAW,CAAC,CAc1F"}
|
|
1
|
+
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../../../src/core/rest/projects-client/billing.ts"],"names":[],"mappings":"AASA,OAAO,EAA0B,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAO3E;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GACpB,QAAQ,GACR,gBAAgB,GAChB,iBAAiB,GACjB,gBAAgB,GAChB,YAAY,CAAC;AAEjB;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,YAAY,CAAC;AAE3D,6FAA6F;AAC7F,8EAA8E;AAC9E,MAAM,WAAW,iBAAiB;IA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C3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,KAAK,CAAC;IACvC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,mFAAmF;AACnF,wBAAsB,cAAc,CAAC,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,WAAW,CAAC,CAc1F"}
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
// app-access redirect on login) PLUS the checkout/subscription/credits
|
|
4
4
|
// mutation surface (Stripe-backed). Wraps a deliberately curated subset of
|
|
5
5
|
// apps/api/src/billing/routes — the ones a "Kortix as a Backend" host needs to
|
|
6
|
-
// drive billing itself; Stripe-webhook-only routes and
|
|
6
|
+
// drive billing itself; Stripe-webhook-only routes and retired per-seat
|
|
7
7
|
// internals stay unwired.
|
|
8
8
|
import { backendApi } from '../../http/api-client.js';
|
|
9
9
|
import { serverTokenGet, unwrap } from './shared.js';
|
|
10
10
|
import { retiredEndpointError } from '../../http/api/errors.js';
|
|
11
|
-
const CHECKOUT_INSTEAD = 'Use
|
|
11
|
+
const CHECKOUT_INSTEAD = 'Use setBillingPlan().';
|
|
12
|
+
const PLAN_CHANGE_INSTEAD = 'Change the plan with setBillingPlan(); manage the card in the Stripe customer portal (createPortalSession()).';
|
|
12
13
|
export function getDefaultAccountState() {
|
|
13
14
|
return {
|
|
14
15
|
credits: {
|
|
@@ -22,6 +23,7 @@ export function getDefaultAccountState() {
|
|
|
22
23
|
subscription: {
|
|
23
24
|
tier_key: 'none',
|
|
24
25
|
tier_display_name: 'No Plan',
|
|
26
|
+
monthly_usd: null,
|
|
25
27
|
status: 'no_subscription',
|
|
26
28
|
billing_period: null,
|
|
27
29
|
provider: 'stripe',
|
|
@@ -73,8 +75,7 @@ export function getDefaultAccountState() {
|
|
|
73
75
|
/**
|
|
74
76
|
* Fallback family for an API that predates the `plan` block. `free` and `none`
|
|
75
77
|
* are the only two keys in the free family and `enterprise` is the only key in
|
|
76
|
-
* the enterprise family, so everything else is a
|
|
77
|
-
* grandfathered.
|
|
78
|
+
* the enterprise family, so everything else is a credits-family plan, legacy keys included.
|
|
78
79
|
*/
|
|
79
80
|
function planFamilyForTierKey(tierKey) {
|
|
80
81
|
const key = tierKey.trim().toLowerCase();
|
|
@@ -82,15 +83,14 @@ function planFamilyForTierKey(tierKey) {
|
|
|
82
83
|
return 'free';
|
|
83
84
|
if (key === 'enterprise')
|
|
84
85
|
return 'enterprise';
|
|
85
|
-
return '
|
|
86
|
+
return 'credits';
|
|
86
87
|
}
|
|
87
88
|
/**
|
|
88
89
|
* The plan an account BEHAVES as, as a UI should name it.
|
|
89
90
|
*
|
|
90
91
|
* Prefer this over `state.subscription.tier_key` for anything a person reads or
|
|
91
92
|
* any "is this account on a paid plan?" branch. `tier_key` is the STORED plan,
|
|
92
|
-
* which stays `free` for an account on an admin trial and for a
|
|
93
|
-
* team whose row is stale — branch on it and the UI contradicts the server.
|
|
93
|
+
* which stays `free` for an account on an admin trial and for a row the webhook has not synced yet — branch on it and the UI contradicts the server.
|
|
94
94
|
*
|
|
95
95
|
* Degrades safely: an API too old to send `plan` still yields a family and a
|
|
96
96
|
* label, derived from `tier` / `subscription.tier_key`.
|
|
@@ -102,7 +102,7 @@ export function resolvedPlan(state) {
|
|
|
102
102
|
family: plan.family,
|
|
103
103
|
label: plan.label,
|
|
104
104
|
sublabel: plan.sublabel ?? null,
|
|
105
|
-
|
|
105
|
+
monthlyUsd: plan.monthly_usd ?? null,
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
// No state at all reads as the default state — 'No Plan', the same name the
|
|
@@ -114,10 +114,9 @@ export function resolvedPlan(state) {
|
|
|
114
114
|
family: planFamilyForTierKey(tierKey),
|
|
115
115
|
label,
|
|
116
116
|
// The old shape carries no qualifier and no lifecycle, so there is nothing
|
|
117
|
-
// honest to put here
|
|
118
|
-
// print a billing claim the response never made.
|
|
117
|
+
// honest to put here, and no amount.
|
|
119
118
|
sublabel: null,
|
|
120
|
-
|
|
119
|
+
monthlyUsd: null,
|
|
121
120
|
};
|
|
122
121
|
}
|
|
123
122
|
/**
|
|
@@ -277,18 +276,21 @@ export async function reactivateSubscription(accountId) {
|
|
|
277
276
|
export async function scheduleDowngrade(_targetTierKey, _commitmentType, _accountId) {
|
|
278
277
|
throw retiredEndpointError('scheduleDowngrade', 'Change the plan in the Stripe customer portal (createPortalSession()).');
|
|
279
278
|
}
|
|
280
|
-
/**
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
279
|
+
/**
|
|
280
|
+
* @deprecated The API retired `POST /billing/cancel-scheduled-change`. Always
|
|
281
|
+
* rejects with `ENDPOINT_RETIRED` and sends no request. A plan cut applies at
|
|
282
|
+
* the next renewal; set the amount again with {@link setBillingPlan}. Removed in
|
|
283
|
+
* the next major.
|
|
284
|
+
*/
|
|
285
|
+
export async function cancelScheduledChange(_accountId) {
|
|
286
|
+
throw retiredEndpointError('cancelScheduledChange', PLAN_CHANGE_INSTEAD);
|
|
285
287
|
}
|
|
286
|
-
/**
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
288
|
+
/**
|
|
289
|
+
* @deprecated The API retired `GET /billing/proration-preview`. Always rejects
|
|
290
|
+
* with `ENDPOINT_RETIRED` and sends no request. Removed in the next major.
|
|
291
|
+
*/
|
|
292
|
+
export async function getProrationPreview(_newPriceId, _accountId) {
|
|
293
|
+
throw retiredEndpointError('getProrationPreview', PLAN_CHANGE_INSTEAD);
|
|
292
294
|
}
|
|
293
295
|
/** Create a Stripe checkout session to purchase a one-off credit top-up. */
|
|
294
296
|
export async function purchaseCredits(input) {
|
|
@@ -338,18 +340,63 @@ export async function getAutoTopupSetupStatus(accountId) {
|
|
|
338
340
|
showErrors: false,
|
|
339
341
|
}), 'Failed to load auto-topup setup status');
|
|
340
342
|
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
343
|
+
/** Preview a plan change without making it: `POST /billing/plan/preview`. */
|
|
344
|
+
export async function previewBillingPlan(params) {
|
|
345
|
+
return unwrap(await backendApi.post('/billing/plan/preview', {
|
|
346
|
+
monthly_usd: params.monthlyUsd,
|
|
347
|
+
account_id: params.accountId,
|
|
348
|
+
}), 'Failed to preview the plan change');
|
|
349
|
+
}
|
|
350
|
+
/** Subscribe to, or change, the credits plan: `POST /billing/plan`. Rejects with 400 outside 20..10,000. */
|
|
351
|
+
export async function setBillingPlan(params) {
|
|
352
|
+
return unwrap(await backendApi.post('/billing/plan', {
|
|
353
|
+
monthly_usd: params.monthlyUsd,
|
|
354
|
+
success_url: params.successUrl,
|
|
355
|
+
cancel_url: params.cancelUrl,
|
|
356
|
+
locale: params.locale,
|
|
357
|
+
account_id: params.accountId,
|
|
358
|
+
}), 'Failed to set billing plan');
|
|
348
359
|
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
360
|
+
/**
|
|
361
|
+
* Accept the account's open Enterprise offer (`POST /billing/enterprise-offer/checkout`):
|
|
362
|
+
* returns a Stripe Checkout link that pays the annual license and credit
|
|
363
|
+
* commitment by card. Needs `billing.write` (owners and admins). Rejects with
|
|
364
|
+
* 404 when there is no open offer and 409 when the offer is invoiced instead.
|
|
365
|
+
*/
|
|
366
|
+
export async function acceptEnterpriseOffer(params) {
|
|
367
|
+
return unwrap(await backendApi.post('/billing/enterprise-offer/checkout', {
|
|
368
|
+
success_url: params.successUrl,
|
|
369
|
+
cancel_url: params.cancelUrl,
|
|
370
|
+
account_id: params.accountId,
|
|
371
|
+
}), 'Failed to start the Enterprise checkout');
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* "Talk to sales" from inside the app: one click, no form. The API emails
|
|
375
|
+
* Kortix sales the account, the signed-in user and its Enterprise state. Any
|
|
376
|
+
* member may ask (`billing.read`). `sent` is false when the deployment has no
|
|
377
|
+
* sales inbox configured.
|
|
378
|
+
*/
|
|
379
|
+
export async function contactEnterpriseSales(params = {}) {
|
|
380
|
+
return unwrap(await backendApi.post('/billing/enterprise/contact', {
|
|
381
|
+
account_id: params.accountId,
|
|
382
|
+
...(params.note ? { note: params.note } : {}),
|
|
383
|
+
}), 'Failed to reach Kortix sales');
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* @deprecated The API retired `POST /billing/create-per-seat-checkout`. Always
|
|
387
|
+
* rejects with `ENDPOINT_RETIRED` and sends no request. Use
|
|
388
|
+
* {@link setBillingPlan}. Removed in the next major.
|
|
389
|
+
*/
|
|
390
|
+
export async function createPerSeatCheckout(_input) {
|
|
391
|
+
throw retiredEndpointError('createPerSeatCheckout', CHECKOUT_INSTEAD);
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* @deprecated The API retired `POST /billing/claim-per-seat`. Always rejects
|
|
395
|
+
* with `ENDPOINT_RETIRED` and sends no request. Legacy plans now read as
|
|
396
|
+
* `credits`; use {@link setBillingPlan}. Removed in the next major.
|
|
397
|
+
*/
|
|
398
|
+
export async function claimPerSeatBilling(_accountId) {
|
|
399
|
+
throw retiredEndpointError('claimPerSeatBilling', CHECKOUT_INSTEAD);
|
|
353
400
|
}
|
|
354
401
|
export async function syncSubscription(accountId) {
|
|
355
402
|
return unwrap(await backendApi.post('/billing/sync-subscription', {
|