@alienplatform/manager-api 3.3.0 → 3.3.2
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/.devcontainer/devcontainer.json +45 -0
- package/FUNCTIONS.md +2 -2
- package/README.md +29 -28
- package/esm/funcs/bindingsResolveBinding.d.ts +12 -0
- package/esm/funcs/bindingsResolveBinding.d.ts.map +1 -0
- package/esm/funcs/bindingsResolveBinding.js +76 -0
- package/esm/funcs/bindingsResolveBinding.js.map +1 -0
- package/esm/funcs/commandsCreateCommand.d.ts.map +1 -1
- package/esm/funcs/commandsCreateCommand.js +1 -2
- package/esm/funcs/commandsCreateCommand.js.map +1 -1
- package/esm/funcs/commandsGetCommandPayload.d.ts.map +1 -1
- package/esm/funcs/commandsGetCommandPayload.js +1 -2
- package/esm/funcs/commandsGetCommandPayload.js.map +1 -1
- package/esm/funcs/commandsGetCommandStatus.d.ts.map +1 -1
- package/esm/funcs/commandsGetCommandStatus.js +1 -2
- package/esm/funcs/commandsGetCommandStatus.js.map +1 -1
- package/esm/funcs/commandsStoreCommandPayload.d.ts.map +1 -1
- package/esm/funcs/commandsStoreCommandPayload.js +1 -2
- package/esm/funcs/commandsStoreCommandPayload.js.map +1 -1
- package/esm/funcs/commandsSubmitResponse.d.ts.map +1 -1
- package/esm/funcs/commandsSubmitResponse.js +1 -2
- package/esm/funcs/commandsSubmitResponse.js.map +1 -1
- package/esm/funcs/commandsUploadComplete.d.ts.map +1 -1
- package/esm/funcs/commandsUploadComplete.js +1 -2
- package/esm/funcs/commandsUploadComplete.js.map +1 -1
- package/esm/funcs/credentialsMintCredentials.d.ts.map +1 -1
- package/esm/funcs/credentialsMintCredentials.js +1 -2
- package/esm/funcs/credentialsMintCredentials.js.map +1 -1
- package/esm/funcs/deploymentGroupsCreateDeploymentGroup.d.ts.map +1 -1
- package/esm/funcs/deploymentGroupsCreateDeploymentGroup.js +1 -2
- package/esm/funcs/deploymentGroupsCreateDeploymentGroup.js.map +1 -1
- package/esm/funcs/deploymentGroupsCreateDeploymentGroupToken.d.ts.map +1 -1
- package/esm/funcs/deploymentGroupsCreateDeploymentGroupToken.js +1 -2
- package/esm/funcs/deploymentGroupsCreateDeploymentGroupToken.js.map +1 -1
- package/esm/funcs/deploymentGroupsGetDeploymentGroup.d.ts.map +1 -1
- package/esm/funcs/deploymentGroupsGetDeploymentGroup.js +1 -2
- package/esm/funcs/deploymentGroupsGetDeploymentGroup.js.map +1 -1
- package/esm/funcs/deploymentGroupsListDeploymentGroups.d.ts.map +1 -1
- package/esm/funcs/deploymentGroupsListDeploymentGroups.js +1 -2
- package/esm/funcs/deploymentGroupsListDeploymentGroups.js.map +1 -1
- package/esm/funcs/deploymentsCreateDeployment.d.ts.map +1 -1
- package/esm/funcs/deploymentsCreateDeployment.js +1 -2
- package/esm/funcs/deploymentsCreateDeployment.js.map +1 -1
- package/esm/funcs/deploymentsDeleteDeployment.d.ts.map +1 -1
- package/esm/funcs/deploymentsDeleteDeployment.js +1 -2
- package/esm/funcs/deploymentsDeleteDeployment.js.map +1 -1
- package/esm/funcs/deploymentsGetDeployment.d.ts.map +1 -1
- package/esm/funcs/deploymentsGetDeployment.js +1 -2
- package/esm/funcs/deploymentsGetDeployment.js.map +1 -1
- package/esm/funcs/deploymentsGetDeploymentInfo.d.ts.map +1 -1
- package/esm/funcs/deploymentsGetDeploymentInfo.js +1 -2
- package/esm/funcs/deploymentsGetDeploymentInfo.js.map +1 -1
- package/esm/funcs/deploymentsListDeployments.d.ts.map +1 -1
- package/esm/funcs/deploymentsListDeployments.js +1 -2
- package/esm/funcs/deploymentsListDeployments.js.map +1 -1
- package/esm/funcs/deploymentsRedeploy.d.ts.map +1 -1
- package/esm/funcs/deploymentsRedeploy.js +1 -2
- package/esm/funcs/deploymentsRedeploy.js.map +1 -1
- package/esm/funcs/deploymentsRetryDeployment.d.ts.map +1 -1
- package/esm/funcs/deploymentsRetryDeployment.js +1 -2
- package/esm/funcs/deploymentsRetryDeployment.js.map +1 -1
- package/esm/funcs/healthHealth.d.ts.map +1 -1
- package/esm/funcs/healthHealth.js +1 -2
- package/esm/funcs/healthHealth.js.map +1 -1
- package/esm/funcs/leasesAcquireLeases.d.ts.map +1 -1
- package/esm/funcs/leasesAcquireLeases.js +1 -2
- package/esm/funcs/leasesAcquireLeases.js.map +1 -1
- package/esm/funcs/leasesReleaseLease.d.ts.map +1 -1
- package/esm/funcs/leasesReleaseLease.js +1 -2
- package/esm/funcs/leasesReleaseLease.js.map +1 -1
- package/esm/funcs/releasesCreateRelease.d.ts.map +1 -1
- package/esm/funcs/releasesCreateRelease.js +1 -2
- package/esm/funcs/releasesCreateRelease.js.map +1 -1
- package/esm/funcs/releasesGetLatestRelease.d.ts.map +1 -1
- package/esm/funcs/releasesGetLatestRelease.js +1 -2
- package/esm/funcs/releasesGetLatestRelease.js.map +1 -1
- package/esm/funcs/releasesGetRelease.d.ts.map +1 -1
- package/esm/funcs/releasesGetRelease.js +1 -2
- package/esm/funcs/releasesGetRelease.js.map +1 -1
- package/esm/funcs/releasesListReleases.d.ts.map +1 -1
- package/esm/funcs/releasesListReleases.js +1 -2
- package/esm/funcs/releasesListReleases.js.map +1 -1
- package/esm/funcs/stackImportStackImport.d.ts.map +1 -1
- package/esm/funcs/stackImportStackImport.js +1 -2
- package/esm/funcs/stackImportStackImport.js.map +1 -1
- package/esm/funcs/syncAcquire.d.ts.map +1 -1
- package/esm/funcs/syncAcquire.js +1 -2
- package/esm/funcs/syncAcquire.js.map +1 -1
- package/esm/funcs/syncAgentSync.d.ts.map +1 -1
- package/esm/funcs/syncAgentSync.js +1 -2
- package/esm/funcs/syncAgentSync.js.map +1 -1
- package/esm/funcs/syncInitialize.d.ts.map +1 -1
- package/esm/funcs/syncInitialize.js +1 -2
- package/esm/funcs/syncInitialize.js.map +1 -1
- package/esm/funcs/syncReconcile.d.ts.map +1 -1
- package/esm/funcs/syncReconcile.js +1 -2
- package/esm/funcs/syncReconcile.js.map +1 -1
- package/esm/funcs/syncRelease.d.ts.map +1 -1
- package/esm/funcs/syncRelease.js +1 -2
- package/esm/funcs/syncRelease.js.map +1 -1
- package/esm/funcs/{credentialsResolveCredentials.d.ts → syncRenew.d.ts} +5 -2
- package/esm/funcs/syncRenew.d.ts.map +1 -0
- package/esm/funcs/{credentialsResolveCredentials.js → syncRenew.js} +12 -9
- package/esm/funcs/syncRenew.js.map +1 -0
- package/esm/funcs/whoamiWhoami.d.ts.map +1 -1
- package/esm/funcs/whoamiWhoami.js +1 -2
- package/esm/funcs/whoamiWhoami.js.map +1 -1
- package/esm/hooks/types.d.ts +0 -1
- package/esm/hooks/types.d.ts.map +1 -1
- package/esm/lib/config.d.ts +11 -3
- package/esm/lib/config.d.ts.map +1 -1
- package/esm/lib/config.js +16 -6
- package/esm/lib/config.js.map +1 -1
- package/esm/lib/dlv.d.ts +14 -0
- package/esm/lib/dlv.d.ts.map +1 -0
- package/esm/lib/dlv.js +46 -0
- package/esm/lib/dlv.js.map +1 -0
- package/esm/lib/encodings.d.ts +0 -1
- package/esm/lib/encodings.d.ts.map +1 -1
- package/esm/lib/encodings.js +6 -27
- package/esm/lib/encodings.js.map +1 -1
- package/esm/lib/env.d.ts.map +1 -1
- package/esm/lib/env.js +3 -3
- package/esm/lib/env.js.map +1 -1
- package/esm/lib/files.d.ts +0 -13
- package/esm/lib/files.d.ts.map +1 -1
- package/esm/lib/files.js +0 -18
- package/esm/lib/files.js.map +1 -1
- package/esm/lib/http.d.ts +1 -1
- package/esm/lib/http.d.ts.map +1 -1
- package/esm/lib/http.js +1 -1
- package/esm/lib/http.js.map +1 -1
- package/esm/lib/is-plain-object.d.ts +2 -0
- package/esm/lib/is-plain-object.d.ts.map +1 -0
- package/esm/lib/is-plain-object.js +38 -0
- package/esm/lib/is-plain-object.js.map +1 -0
- package/esm/lib/matchers.d.ts.map +1 -1
- package/esm/lib/matchers.js +2 -1
- package/esm/lib/matchers.js.map +1 -1
- package/esm/lib/primitives.d.ts +0 -1
- package/esm/lib/primitives.d.ts.map +1 -1
- package/esm/lib/primitives.js +0 -17
- package/esm/lib/primitives.js.map +1 -1
- package/esm/lib/retries.js +0 -7
- package/esm/lib/retries.js.map +1 -1
- package/esm/lib/sdks.d.ts +1 -1
- package/esm/lib/sdks.d.ts.map +1 -1
- package/esm/lib/sdks.js +26 -62
- package/esm/lib/sdks.js.map +1 -1
- package/esm/lib/security.d.ts +5 -6
- package/esm/lib/security.d.ts.map +1 -1
- package/esm/lib/security.js +15 -24
- package/esm/lib/security.js.map +1 -1
- package/esm/lib/url.d.ts.map +1 -1
- package/esm/lib/url.js +2 -4
- package/esm/lib/url.js.map +1 -1
- package/esm/models/aiheartbeatdata.d.ts +79 -0
- package/esm/models/aiheartbeatdata.d.ts.map +1 -0
- package/esm/models/aiheartbeatdata.js +56 -0
- package/esm/models/aiheartbeatdata.js.map +1 -0
- package/esm/models/aiheartbeatstatus.d.ts +25 -0
- package/esm/models/aiheartbeatstatus.d.ts.map +1 -0
- package/esm/models/aiheartbeatstatus.js +20 -0
- package/esm/models/aiheartbeatstatus.js.map +1 -0
- package/esm/models/computepoolselection.d.ts +5 -0
- package/esm/models/computepoolselection.d.ts.map +1 -1
- package/esm/models/computepoolselection.js +22 -0
- package/esm/models/computepoolselection.js.map +1 -1
- package/esm/models/errors/alienerror.d.ts +173 -0
- package/esm/models/errors/alienerror.d.ts.map +1 -0
- package/esm/models/errors/alienerror.js +59 -0
- package/esm/models/errors/alienerror.js.map +1 -0
- package/esm/models/errors/index.d.ts +1 -0
- package/esm/models/errors/index.d.ts.map +1 -1
- package/esm/models/errors/index.js +1 -0
- package/esm/models/errors/index.js.map +1 -1
- package/esm/models/exposeprotocol.d.ts +16 -0
- package/esm/models/exposeprotocol.d.ts.map +1 -0
- package/esm/models/exposeprotocol.js +15 -0
- package/esm/models/exposeprotocol.js.map +1 -0
- package/esm/models/failuredomainselection.d.ts +31 -0
- package/esm/models/failuredomainselection.d.ts.map +1 -0
- package/esm/models/failuredomainselection.js +22 -0
- package/esm/models/failuredomainselection.js.map +1 -0
- package/esm/models/index.d.ts +18 -2
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +18 -2
- package/esm/models/index.js.map +1 -1
- package/esm/models/loadbalancerendpoint.d.ts +23 -0
- package/esm/models/loadbalancerendpoint.d.ts.map +1 -0
- package/esm/models/loadbalancerendpoint.js +14 -0
- package/esm/models/loadbalancerendpoint.js.map +1 -0
- package/esm/models/publicendpointoutput.d.ts +35 -0
- package/esm/models/publicendpointoutput.d.ts.map +1 -0
- package/esm/models/publicendpointoutput.js +21 -0
- package/esm/models/publicendpointoutput.js.map +1 -0
- package/esm/models/remoteawsclientconfig.d.ts +28 -0
- package/esm/models/remoteawsclientconfig.d.ts.map +1 -0
- package/esm/models/remoteawsclientconfig.js +16 -0
- package/esm/models/remoteawsclientconfig.js.map +1 -0
- package/esm/models/remoteawscredentials.d.ts +43 -0
- package/esm/models/remoteawscredentials.d.ts.map +1 -0
- package/esm/models/remoteawscredentials.js +27 -0
- package/esm/models/remoteawscredentials.js.map +1 -0
- package/esm/models/remoteazureclientconfig.d.ts +32 -0
- package/esm/models/remoteazureclientconfig.d.ts.map +1 -0
- package/esm/models/remoteazureclientconfig.js +17 -0
- package/esm/models/remoteazureclientconfig.js.map +1 -0
- package/esm/models/remoteazurecredentials.d.ts +28 -0
- package/esm/models/remoteazurecredentials.d.ts.map +1 -0
- package/esm/models/remoteazurecredentials.js +24 -0
- package/esm/models/remoteazurecredentials.js.map +1 -0
- package/esm/models/remoteblobstoragebinding.d.ts +20 -0
- package/esm/models/remoteblobstoragebinding.d.ts.map +1 -0
- package/esm/models/remoteblobstoragebinding.js +14 -0
- package/esm/models/remoteblobstoragebinding.js.map +1 -0
- package/esm/models/remotegcpclientconfig.d.ts +32 -0
- package/esm/models/remotegcpclientconfig.d.ts.map +1 -0
- package/esm/models/remotegcpclientconfig.js +17 -0
- package/esm/models/remotegcpclientconfig.js.map +1 -0
- package/esm/models/remotegcpcredentials.d.ts +31 -0
- package/esm/models/remotegcpcredentials.d.ts.map +1 -0
- package/esm/models/remotegcpcredentials.js +24 -0
- package/esm/models/remotegcpcredentials.js.map +1 -0
- package/esm/models/remotegcsstoragebinding.d.ts +16 -0
- package/esm/models/remotegcsstoragebinding.d.ts.map +1 -0
- package/esm/models/remotegcsstoragebinding.js +13 -0
- package/esm/models/remotegcsstoragebinding.js.map +1 -0
- package/esm/models/remotes3storagebinding.d.ts +16 -0
- package/esm/models/remotes3storagebinding.d.ts.map +1 -0
- package/esm/models/remotes3storagebinding.js +13 -0
- package/esm/models/remotes3storagebinding.js.map +1 -0
- package/esm/models/renewrequest.d.ts +14 -0
- package/esm/models/renewrequest.d.ts.map +1 -0
- package/esm/models/renewrequest.js +13 -0
- package/esm/models/renewrequest.js.map +1 -0
- package/esm/models/resolvebindingrequest.d.ts +23 -0
- package/esm/models/resolvebindingrequest.d.ts.map +1 -0
- package/esm/models/resolvebindingrequest.js +13 -0
- package/esm/models/resolvebindingrequest.js.map +1 -0
- package/esm/models/resolvebindingresponse.d.ts +83 -0
- package/esm/models/resolvebindingresponse.d.ts.map +1 -0
- package/esm/models/resolvebindingresponse.js +51 -0
- package/esm/models/resolvebindingresponse.js.map +1 -0
- package/esm/models/resourceentry.d.ts +4 -0
- package/esm/models/resourceentry.d.ts.map +1 -1
- package/esm/models/resourceentry.js +3 -0
- package/esm/models/resourceentry.js.map +1 -1
- package/esm/models/resourceheartbeatdata.d.ts +15 -2
- package/esm/models/resourceheartbeatdata.d.ts.map +1 -1
- package/esm/models/resourceheartbeatdata.js +10 -0
- package/esm/models/resourceheartbeatdata.js.map +1 -1
- package/esm/sdk/bindings.d.ts +6 -0
- package/esm/sdk/bindings.d.ts.map +1 -0
- package/esm/sdk/bindings.js +12 -0
- package/esm/sdk/bindings.js.map +1 -0
- package/esm/sdk/credentials.d.ts +0 -1
- package/esm/sdk/credentials.d.ts.map +1 -1
- package/esm/sdk/credentials.js +0 -4
- package/esm/sdk/credentials.js.map +1 -1
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +4 -0
- package/esm/sdk/sdk.js.map +1 -1
- package/esm/sdk/sync.d.ts +4 -0
- package/esm/sdk/sync.d.ts.map +1 -1
- package/esm/sdk/sync.js +7 -0
- package/esm/sdk/sync.js.map +1 -1
- package/esm/types/async.d.ts.map +1 -1
- package/esm/types/async.js +7 -8
- package/esm/types/async.js.map +1 -1
- package/examples/package.json +18 -0
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/src/funcs/bindingsResolveBinding.ts +163 -0
- package/src/funcs/commandsCreateCommand.ts +1 -3
- package/src/funcs/commandsGetCommandPayload.ts +2 -3
- package/src/funcs/commandsGetCommandStatus.ts +2 -3
- package/src/funcs/commandsStoreCommandPayload.ts +2 -3
- package/src/funcs/commandsSubmitResponse.ts +2 -3
- package/src/funcs/commandsUploadComplete.ts +2 -3
- package/src/funcs/credentialsMintCredentials.ts +1 -3
- package/src/funcs/deploymentGroupsCreateDeploymentGroup.ts +1 -3
- package/src/funcs/deploymentGroupsCreateDeploymentGroupToken.ts +2 -3
- package/src/funcs/deploymentGroupsGetDeploymentGroup.ts +2 -3
- package/src/funcs/deploymentGroupsListDeploymentGroups.ts +1 -3
- package/src/funcs/deploymentsCreateDeployment.ts +1 -3
- package/src/funcs/deploymentsDeleteDeployment.ts +2 -3
- package/src/funcs/deploymentsGetDeployment.ts +2 -3
- package/src/funcs/deploymentsGetDeploymentInfo.ts +2 -3
- package/src/funcs/deploymentsListDeployments.ts +1 -3
- package/src/funcs/deploymentsRedeploy.ts +2 -3
- package/src/funcs/deploymentsRetryDeployment.ts +2 -3
- package/src/funcs/healthHealth.ts +1 -3
- package/src/funcs/leasesAcquireLeases.ts +1 -3
- package/src/funcs/leasesReleaseLease.ts +2 -3
- package/src/funcs/releasesCreateRelease.ts +1 -3
- package/src/funcs/releasesGetLatestRelease.ts +1 -3
- package/src/funcs/releasesGetRelease.ts +2 -3
- package/src/funcs/releasesListReleases.ts +1 -3
- package/src/funcs/stackImportStackImport.ts +1 -3
- package/src/funcs/syncAcquire.ts +1 -3
- package/src/funcs/syncAgentSync.ts +1 -3
- package/src/funcs/syncInitialize.ts +1 -3
- package/src/funcs/syncReconcile.ts +1 -3
- package/src/funcs/syncRelease.ts +1 -3
- package/src/funcs/{credentialsResolveCredentials.ts → syncRenew.ts} +16 -14
- package/src/funcs/whoamiWhoami.ts +1 -3
- package/src/hooks/types.ts +0 -1
- package/src/lib/config.ts +23 -8
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +5 -33
- package/src/lib/env.ts +3 -7
- package/src/lib/files.ts +0 -22
- package/src/lib/http.ts +1 -3
- package/src/lib/is-plain-object.ts +43 -0
- package/src/lib/matchers.ts +3 -4
- package/src/lib/primitives.ts +0 -16
- package/src/lib/retries.ts +0 -8
- package/src/lib/sdks.ts +30 -66
- package/src/lib/security.ts +10 -26
- package/src/lib/url.ts +14 -16
- package/src/models/aiheartbeatdata.ts +184 -0
- package/src/models/aiheartbeatstatus.ts +58 -0
- package/src/models/computepoolselection.ts +31 -0
- package/src/models/errors/alienerror.ts +213 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/exposeprotocol.ts +22 -0
- package/src/models/failuredomainselection.ts +65 -0
- package/src/models/index.ts +18 -2
- package/src/models/loadbalancerendpoint.ts +44 -0
- package/src/models/publicendpointoutput.ts +67 -0
- package/src/models/remoteawsclientconfig.ts +53 -0
- package/src/models/remoteawscredentials.ts +88 -0
- package/src/models/remoteazureclientconfig.ts +58 -0
- package/src/models/remoteazurecredentials.ts +69 -0
- package/src/models/remoteblobstoragebinding.ts +41 -0
- package/src/models/remotegcpclientconfig.ts +58 -0
- package/src/models/remotegcpcredentials.ts +72 -0
- package/src/models/remotegcsstoragebinding.ts +36 -0
- package/src/models/remotes3storagebinding.ts +36 -0
- package/src/models/renewrequest.ts +29 -0
- package/src/models/resolvebindingrequest.ts +42 -0
- package/src/models/resolvebindingresponse.ts +183 -0
- package/src/models/resourceentry.ts +7 -0
- package/src/models/resourceheartbeatdata.ts +38 -2
- package/src/sdk/bindings.ts +21 -0
- package/src/sdk/credentials.ts +0 -12
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/sync.ts +15 -0
- package/src/types/async.ts +7 -8
- package/tsconfig.json +40 -0
- package/esm/funcs/credentialsResolveCredentials.d.ts.map +0 -1
- package/esm/funcs/credentialsResolveCredentials.js.map +0 -1
- package/esm/models/resolvecredentialsrequest.d.ts +0 -12
- package/esm/models/resolvecredentialsrequest.d.ts.map +0 -1
- package/esm/models/resolvecredentialsrequest.js +0 -12
- package/esm/models/resolvecredentialsrequest.js.map +0 -1
- package/esm/models/resolvecredentialsresponse.d.ts +0 -14
- package/esm/models/resolvecredentialsresponse.d.ts.map +0 -1
- package/esm/models/resolvecredentialsresponse.js +0 -14
- package/esm/models/resolvecredentialsresponse.js.map +0 -1
- package/src/models/resolvecredentialsrequest.ts +0 -30
- package/src/models/resolvecredentialsresponse.ts +0 -37
package/src/lib/security.ts
CHANGED
|
@@ -13,22 +13,17 @@ type OAuth2PasswordFlow = {
|
|
|
13
13
|
tokenURL: string;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
export
|
|
17
|
-
Incomplete
|
|
18
|
-
UnrecognisedSecurityType
|
|
19
|
-
}
|
|
20
|
-
export type SecurityErrorCode =
|
|
21
|
-
(typeof SecurityErrorCode)[keyof typeof SecurityErrorCode];
|
|
16
|
+
export enum SecurityErrorCode {
|
|
17
|
+
Incomplete = "incomplete",
|
|
18
|
+
UnrecognisedSecurityType = "unrecognized_security_type",
|
|
19
|
+
}
|
|
22
20
|
|
|
23
21
|
export class SecurityError extends Error {
|
|
24
|
-
public code: SecurityErrorCode;
|
|
25
|
-
|
|
26
22
|
constructor(
|
|
27
|
-
code: SecurityErrorCode,
|
|
23
|
+
public code: SecurityErrorCode,
|
|
28
24
|
message: string,
|
|
29
25
|
) {
|
|
30
26
|
super(message);
|
|
31
|
-
this.code = code;
|
|
32
27
|
this.name = "SecurityError";
|
|
33
28
|
}
|
|
34
29
|
|
|
@@ -203,7 +198,8 @@ export function resolveSecurity(
|
|
|
203
198
|
applyBearer(state, spec);
|
|
204
199
|
break;
|
|
205
200
|
default:
|
|
206
|
-
|
|
201
|
+
spec satisfies never;
|
|
202
|
+
throw SecurityError.unrecognizedType(type);
|
|
207
203
|
}
|
|
208
204
|
});
|
|
209
205
|
|
|
@@ -245,28 +241,16 @@ function applyBearer(
|
|
|
245
241
|
|
|
246
242
|
export function resolveGlobalSecurity(
|
|
247
243
|
security: Partial<models.Security> | null | undefined,
|
|
248
|
-
allowedFields?: number[],
|
|
249
244
|
): SecurityState | null {
|
|
250
|
-
|
|
245
|
+
return resolveSecurity(
|
|
251
246
|
[
|
|
252
247
|
{
|
|
253
248
|
fieldName: "Authorization",
|
|
254
|
-
type: "
|
|
249
|
+
type: "http:bearer",
|
|
255
250
|
value: security?.bearer ?? env().ALIEN_MANAGER_BEARER,
|
|
256
251
|
},
|
|
257
252
|
],
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
if (allowedFields) {
|
|
261
|
-
inputs = allowedFields.map((i) => {
|
|
262
|
-
if (i < 0 || i >= inputs.length) {
|
|
263
|
-
throw new RangeError(`invalid allowedFields index ${i}`);
|
|
264
|
-
}
|
|
265
|
-
return inputs[i]!;
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
return resolveSecurity(...inputs);
|
|
253
|
+
);
|
|
270
254
|
}
|
|
271
255
|
|
|
272
256
|
export async function extractSecurity<
|
package/src/lib/url.ts
CHANGED
|
@@ -13,23 +13,21 @@ export function pathToFunc(
|
|
|
13
13
|
const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g;
|
|
14
14
|
|
|
15
15
|
return function buildURLPath(params: Record<string, unknown> = {}): string {
|
|
16
|
-
return pathPattern
|
|
17
|
-
.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
16
|
+
return pathPattern.replace(paramRE, function (_, placeholder) {
|
|
17
|
+
if (!hasOwn.call(params, placeholder)) {
|
|
18
|
+
throw new Error(`Parameter '${placeholder}' is required`);
|
|
19
|
+
}
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
const value = params[placeholder];
|
|
22
|
+
if (typeof value !== "string" && typeof value !== "number") {
|
|
23
|
+
throw new Error(
|
|
24
|
+
`Parameter '${placeholder}' must be a string or number`,
|
|
25
|
+
);
|
|
26
|
+
}
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
.replace(/^\/+/, "");
|
|
28
|
+
return options?.charEncoding === "percent"
|
|
29
|
+
? encodeURIComponent(`${value}`)
|
|
30
|
+
: `${value}`;
|
|
31
|
+
});
|
|
34
32
|
};
|
|
35
33
|
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import {
|
|
7
|
+
AiHeartbeatStatus,
|
|
8
|
+
AiHeartbeatStatus$Outbound,
|
|
9
|
+
AiHeartbeatStatus$outboundSchema,
|
|
10
|
+
} from "./aiheartbeatstatus.js";
|
|
11
|
+
|
|
12
|
+
export type AiHeartbeatDataExternal = {
|
|
13
|
+
/**
|
|
14
|
+
* The BYO-key provider serving this binding (e.g. "openai"). Used on the Local
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* platform, where the app brings its own provider key instead of an ambient cloud.
|
|
18
|
+
*/
|
|
19
|
+
provider: string;
|
|
20
|
+
status: AiHeartbeatStatus;
|
|
21
|
+
backend: "external";
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type AiHeartbeatDataAzureFoundry = {
|
|
25
|
+
accountName: string;
|
|
26
|
+
endpoint?: string | null | undefined;
|
|
27
|
+
location?: string | null | undefined;
|
|
28
|
+
resourceGroup?: string | null | undefined;
|
|
29
|
+
status: AiHeartbeatStatus;
|
|
30
|
+
backend: "azureFoundry";
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type AiHeartbeatDataGcpVertex = {
|
|
34
|
+
location: string;
|
|
35
|
+
project: string;
|
|
36
|
+
status: AiHeartbeatStatus;
|
|
37
|
+
backend: "gcpVertex";
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type AiHeartbeatDataAwsBedrock = {
|
|
41
|
+
region: string;
|
|
42
|
+
status: AiHeartbeatStatus;
|
|
43
|
+
backend: "awsBedrock";
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export type AiHeartbeatData =
|
|
47
|
+
| AiHeartbeatDataAwsBedrock
|
|
48
|
+
| AiHeartbeatDataGcpVertex
|
|
49
|
+
| AiHeartbeatDataAzureFoundry
|
|
50
|
+
| AiHeartbeatDataExternal;
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export type AiHeartbeatDataExternal$Outbound = {
|
|
54
|
+
provider: string;
|
|
55
|
+
status: AiHeartbeatStatus$Outbound;
|
|
56
|
+
backend: "external";
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const AiHeartbeatDataExternal$outboundSchema: z.ZodType<
|
|
61
|
+
AiHeartbeatDataExternal$Outbound,
|
|
62
|
+
AiHeartbeatDataExternal
|
|
63
|
+
> = z.object({
|
|
64
|
+
provider: z.string(),
|
|
65
|
+
status: AiHeartbeatStatus$outboundSchema,
|
|
66
|
+
backend: z.literal("external"),
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export function aiHeartbeatDataExternalToJSON(
|
|
70
|
+
aiHeartbeatDataExternal: AiHeartbeatDataExternal,
|
|
71
|
+
): string {
|
|
72
|
+
return JSON.stringify(
|
|
73
|
+
AiHeartbeatDataExternal$outboundSchema.parse(aiHeartbeatDataExternal),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** @internal */
|
|
78
|
+
export type AiHeartbeatDataAzureFoundry$Outbound = {
|
|
79
|
+
accountName: string;
|
|
80
|
+
endpoint?: string | null | undefined;
|
|
81
|
+
location?: string | null | undefined;
|
|
82
|
+
resourceGroup?: string | null | undefined;
|
|
83
|
+
status: AiHeartbeatStatus$Outbound;
|
|
84
|
+
backend: "azureFoundry";
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const AiHeartbeatDataAzureFoundry$outboundSchema: z.ZodType<
|
|
89
|
+
AiHeartbeatDataAzureFoundry$Outbound,
|
|
90
|
+
AiHeartbeatDataAzureFoundry
|
|
91
|
+
> = z.object({
|
|
92
|
+
accountName: z.string(),
|
|
93
|
+
endpoint: z.nullable(z.string()).optional(),
|
|
94
|
+
location: z.nullable(z.string()).optional(),
|
|
95
|
+
resourceGroup: z.nullable(z.string()).optional(),
|
|
96
|
+
status: AiHeartbeatStatus$outboundSchema,
|
|
97
|
+
backend: z.literal("azureFoundry"),
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
export function aiHeartbeatDataAzureFoundryToJSON(
|
|
101
|
+
aiHeartbeatDataAzureFoundry: AiHeartbeatDataAzureFoundry,
|
|
102
|
+
): string {
|
|
103
|
+
return JSON.stringify(
|
|
104
|
+
AiHeartbeatDataAzureFoundry$outboundSchema.parse(
|
|
105
|
+
aiHeartbeatDataAzureFoundry,
|
|
106
|
+
),
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** @internal */
|
|
111
|
+
export type AiHeartbeatDataGcpVertex$Outbound = {
|
|
112
|
+
location: string;
|
|
113
|
+
project: string;
|
|
114
|
+
status: AiHeartbeatStatus$Outbound;
|
|
115
|
+
backend: "gcpVertex";
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/** @internal */
|
|
119
|
+
export const AiHeartbeatDataGcpVertex$outboundSchema: z.ZodType<
|
|
120
|
+
AiHeartbeatDataGcpVertex$Outbound,
|
|
121
|
+
AiHeartbeatDataGcpVertex
|
|
122
|
+
> = z.object({
|
|
123
|
+
location: z.string(),
|
|
124
|
+
project: z.string(),
|
|
125
|
+
status: AiHeartbeatStatus$outboundSchema,
|
|
126
|
+
backend: z.literal("gcpVertex"),
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
export function aiHeartbeatDataGcpVertexToJSON(
|
|
130
|
+
aiHeartbeatDataGcpVertex: AiHeartbeatDataGcpVertex,
|
|
131
|
+
): string {
|
|
132
|
+
return JSON.stringify(
|
|
133
|
+
AiHeartbeatDataGcpVertex$outboundSchema.parse(aiHeartbeatDataGcpVertex),
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** @internal */
|
|
138
|
+
export type AiHeartbeatDataAwsBedrock$Outbound = {
|
|
139
|
+
region: string;
|
|
140
|
+
status: AiHeartbeatStatus$Outbound;
|
|
141
|
+
backend: "awsBedrock";
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/** @internal */
|
|
145
|
+
export const AiHeartbeatDataAwsBedrock$outboundSchema: z.ZodType<
|
|
146
|
+
AiHeartbeatDataAwsBedrock$Outbound,
|
|
147
|
+
AiHeartbeatDataAwsBedrock
|
|
148
|
+
> = z.object({
|
|
149
|
+
region: z.string(),
|
|
150
|
+
status: AiHeartbeatStatus$outboundSchema,
|
|
151
|
+
backend: z.literal("awsBedrock"),
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
export function aiHeartbeatDataAwsBedrockToJSON(
|
|
155
|
+
aiHeartbeatDataAwsBedrock: AiHeartbeatDataAwsBedrock,
|
|
156
|
+
): string {
|
|
157
|
+
return JSON.stringify(
|
|
158
|
+
AiHeartbeatDataAwsBedrock$outboundSchema.parse(aiHeartbeatDataAwsBedrock),
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** @internal */
|
|
163
|
+
export type AiHeartbeatData$Outbound =
|
|
164
|
+
| AiHeartbeatDataAwsBedrock$Outbound
|
|
165
|
+
| AiHeartbeatDataGcpVertex$Outbound
|
|
166
|
+
| AiHeartbeatDataAzureFoundry$Outbound
|
|
167
|
+
| AiHeartbeatDataExternal$Outbound;
|
|
168
|
+
|
|
169
|
+
/** @internal */
|
|
170
|
+
export const AiHeartbeatData$outboundSchema: z.ZodType<
|
|
171
|
+
AiHeartbeatData$Outbound,
|
|
172
|
+
AiHeartbeatData
|
|
173
|
+
> = z.union([
|
|
174
|
+
z.lazy(() => AiHeartbeatDataAwsBedrock$outboundSchema),
|
|
175
|
+
z.lazy(() => AiHeartbeatDataGcpVertex$outboundSchema),
|
|
176
|
+
z.lazy(() => AiHeartbeatDataAzureFoundry$outboundSchema),
|
|
177
|
+
z.lazy(() => AiHeartbeatDataExternal$outboundSchema),
|
|
178
|
+
]);
|
|
179
|
+
|
|
180
|
+
export function aiHeartbeatDataToJSON(
|
|
181
|
+
aiHeartbeatData: AiHeartbeatData,
|
|
182
|
+
): string {
|
|
183
|
+
return JSON.stringify(AiHeartbeatData$outboundSchema.parse(aiHeartbeatData));
|
|
184
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import {
|
|
7
|
+
HeartbeatCollectionIssue,
|
|
8
|
+
HeartbeatCollectionIssue$Outbound,
|
|
9
|
+
HeartbeatCollectionIssue$outboundSchema,
|
|
10
|
+
} from "./heartbeatcollectionissue.js";
|
|
11
|
+
import {
|
|
12
|
+
ObservedHealth,
|
|
13
|
+
ObservedHealth$outboundSchema,
|
|
14
|
+
} from "./observedhealth.js";
|
|
15
|
+
import {
|
|
16
|
+
ProviderLifecycleState,
|
|
17
|
+
ProviderLifecycleState$outboundSchema,
|
|
18
|
+
} from "./providerlifecyclestate.js";
|
|
19
|
+
|
|
20
|
+
export type AiHeartbeatStatus = {
|
|
21
|
+
collectionIssues: Array<HeartbeatCollectionIssue>;
|
|
22
|
+
health: ObservedHealth;
|
|
23
|
+
lifecycle: ProviderLifecycleState;
|
|
24
|
+
message?: string | null | undefined;
|
|
25
|
+
partial: boolean;
|
|
26
|
+
stale: boolean;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type AiHeartbeatStatus$Outbound = {
|
|
31
|
+
collectionIssues: Array<HeartbeatCollectionIssue$Outbound>;
|
|
32
|
+
health: string;
|
|
33
|
+
lifecycle: string;
|
|
34
|
+
message?: string | null | undefined;
|
|
35
|
+
partial: boolean;
|
|
36
|
+
stale: boolean;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const AiHeartbeatStatus$outboundSchema: z.ZodType<
|
|
41
|
+
AiHeartbeatStatus$Outbound,
|
|
42
|
+
AiHeartbeatStatus
|
|
43
|
+
> = z.object({
|
|
44
|
+
collectionIssues: z.array(HeartbeatCollectionIssue$outboundSchema),
|
|
45
|
+
health: ObservedHealth$outboundSchema,
|
|
46
|
+
lifecycle: ProviderLifecycleState$outboundSchema,
|
|
47
|
+
message: z.nullable(z.string()).optional(),
|
|
48
|
+
partial: z.boolean(),
|
|
49
|
+
stale: z.boolean(),
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export function aiHeartbeatStatusToJSON(
|
|
53
|
+
aiHeartbeatStatus: AiHeartbeatStatus,
|
|
54
|
+
): string {
|
|
55
|
+
return JSON.stringify(
|
|
56
|
+
AiHeartbeatStatus$outboundSchema.parse(aiHeartbeatStatus),
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -3,14 +3,22 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../lib/schemas.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
9
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
FailureDomainSelection,
|
|
12
|
+
FailureDomainSelection$inboundSchema,
|
|
13
|
+
FailureDomainSelection$Outbound,
|
|
14
|
+
FailureDomainSelection$outboundSchema,
|
|
15
|
+
} from "./failuredomainselection.js";
|
|
9
16
|
|
|
10
17
|
/**
|
|
11
18
|
* Autoscaling machine pool.
|
|
12
19
|
*/
|
|
13
20
|
export type ComputePoolSelectionAutoscale = {
|
|
21
|
+
failureDomains?: FailureDomainSelection | null | undefined;
|
|
14
22
|
/**
|
|
15
23
|
* Provider machine type selected for this deployment.
|
|
16
24
|
*/
|
|
@@ -30,6 +38,7 @@ export type ComputePoolSelectionAutoscale = {
|
|
|
30
38
|
* Fixed number of machines.
|
|
31
39
|
*/
|
|
32
40
|
export type ComputePoolSelectionFixed = {
|
|
41
|
+
failureDomains?: FailureDomainSelection | null | undefined;
|
|
33
42
|
/**
|
|
34
43
|
* Provider machine type selected for this deployment.
|
|
35
44
|
*/
|
|
@@ -53,13 +62,19 @@ export const ComputePoolSelectionAutoscale$inboundSchema: z.ZodType<
|
|
|
53
62
|
ComputePoolSelectionAutoscale,
|
|
54
63
|
unknown
|
|
55
64
|
> = z.object({
|
|
65
|
+
failure_domains: z.nullable(FailureDomainSelection$inboundSchema).optional(),
|
|
56
66
|
machine: z.nullable(z.string()).optional(),
|
|
57
67
|
max: z.int(),
|
|
58
68
|
min: z.int(),
|
|
59
69
|
mode: z.literal("autoscale"),
|
|
70
|
+
}).transform((v) => {
|
|
71
|
+
return remap$(v, {
|
|
72
|
+
"failure_domains": "failureDomains",
|
|
73
|
+
});
|
|
60
74
|
});
|
|
61
75
|
/** @internal */
|
|
62
76
|
export type ComputePoolSelectionAutoscale$Outbound = {
|
|
77
|
+
failure_domains?: FailureDomainSelection$Outbound | null | undefined;
|
|
63
78
|
machine?: string | null | undefined;
|
|
64
79
|
max: number;
|
|
65
80
|
min: number;
|
|
@@ -71,10 +86,15 @@ export const ComputePoolSelectionAutoscale$outboundSchema: z.ZodType<
|
|
|
71
86
|
ComputePoolSelectionAutoscale$Outbound,
|
|
72
87
|
ComputePoolSelectionAutoscale
|
|
73
88
|
> = z.object({
|
|
89
|
+
failureDomains: z.nullable(FailureDomainSelection$outboundSchema).optional(),
|
|
74
90
|
machine: z.nullable(z.string()).optional(),
|
|
75
91
|
max: z.int(),
|
|
76
92
|
min: z.int(),
|
|
77
93
|
mode: z.literal("autoscale"),
|
|
94
|
+
}).transform((v) => {
|
|
95
|
+
return remap$(v, {
|
|
96
|
+
failureDomains: "failure_domains",
|
|
97
|
+
});
|
|
78
98
|
});
|
|
79
99
|
|
|
80
100
|
export function computePoolSelectionAutoscaleToJSON(
|
|
@@ -101,12 +121,18 @@ export const ComputePoolSelectionFixed$inboundSchema: z.ZodType<
|
|
|
101
121
|
ComputePoolSelectionFixed,
|
|
102
122
|
unknown
|
|
103
123
|
> = z.object({
|
|
124
|
+
failure_domains: z.nullable(FailureDomainSelection$inboundSchema).optional(),
|
|
104
125
|
machine: z.nullable(z.string()).optional(),
|
|
105
126
|
machines: z.int(),
|
|
106
127
|
mode: z.literal("fixed"),
|
|
128
|
+
}).transform((v) => {
|
|
129
|
+
return remap$(v, {
|
|
130
|
+
"failure_domains": "failureDomains",
|
|
131
|
+
});
|
|
107
132
|
});
|
|
108
133
|
/** @internal */
|
|
109
134
|
export type ComputePoolSelectionFixed$Outbound = {
|
|
135
|
+
failure_domains?: FailureDomainSelection$Outbound | null | undefined;
|
|
110
136
|
machine?: string | null | undefined;
|
|
111
137
|
machines: number;
|
|
112
138
|
mode: "fixed";
|
|
@@ -117,9 +143,14 @@ export const ComputePoolSelectionFixed$outboundSchema: z.ZodType<
|
|
|
117
143
|
ComputePoolSelectionFixed$Outbound,
|
|
118
144
|
ComputePoolSelectionFixed
|
|
119
145
|
> = z.object({
|
|
146
|
+
failureDomains: z.nullable(FailureDomainSelection$outboundSchema).optional(),
|
|
120
147
|
machine: z.nullable(z.string()).optional(),
|
|
121
148
|
machines: z.int(),
|
|
122
149
|
mode: z.literal("fixed"),
|
|
150
|
+
}).transform((v) => {
|
|
151
|
+
return remap$(v, {
|
|
152
|
+
failureDomains: "failure_domains",
|
|
153
|
+
});
|
|
123
154
|
});
|
|
124
155
|
|
|
125
156
|
export function computePoolSelectionFixedToJSON(
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { AlienManagerError } from "./alienmanagererror.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Canonical error container that provides a structured way to represent errors
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* with rich metadata including error codes, human-readable messages, context,
|
|
13
|
+
* and chaining capabilities for error propagation.
|
|
14
|
+
*
|
|
15
|
+
* This struct is designed to be both machine-readable and user-friendly,
|
|
16
|
+
* supporting serialization for API responses and detailed error reporting
|
|
17
|
+
* in distributed systems.
|
|
18
|
+
*/
|
|
19
|
+
export type AlienErrorData = {
|
|
20
|
+
/**
|
|
21
|
+
* A unique identifier for the type of error.
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
*
|
|
25
|
+
* This should be a short, machine-readable string that can be used
|
|
26
|
+
* by clients to programmatically handle different error types.
|
|
27
|
+
* Examples: "NOT_FOUND", "VALIDATION_ERROR", "TIMEOUT"
|
|
28
|
+
*/
|
|
29
|
+
code: string;
|
|
30
|
+
/**
|
|
31
|
+
* Additional diagnostic information about the error context.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
*
|
|
35
|
+
* This optional field can contain structured data providing more details
|
|
36
|
+
* about the error, such as validation errors, request parameters that
|
|
37
|
+
* caused the issue, or other relevant context information.
|
|
38
|
+
*/
|
|
39
|
+
context?: any | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Optional human-facing remediation hint.
|
|
42
|
+
*/
|
|
43
|
+
hint?: string | null | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* HTTP status code for this error.
|
|
46
|
+
*
|
|
47
|
+
* @remarks
|
|
48
|
+
*
|
|
49
|
+
* Used when converting the error to an HTTP response. If None, falls back to
|
|
50
|
+
* the error type's default status code or 500.
|
|
51
|
+
*/
|
|
52
|
+
httpStatusCode?: number | null | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Indicates if this is an internal error that should not be exposed to users.
|
|
55
|
+
*
|
|
56
|
+
* @remarks
|
|
57
|
+
*
|
|
58
|
+
* When `true`, this error contains sensitive information or implementation
|
|
59
|
+
* details that should not be shown to end-users. Such errors should be
|
|
60
|
+
* logged for debugging but replaced with generic error messages in responses.
|
|
61
|
+
*/
|
|
62
|
+
internal: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Human-readable error message.
|
|
65
|
+
*
|
|
66
|
+
* @remarks
|
|
67
|
+
*
|
|
68
|
+
* This message should be clear and actionable for developers or end-users,
|
|
69
|
+
* providing context about what went wrong and potentially how to fix it.
|
|
70
|
+
*/
|
|
71
|
+
message: string;
|
|
72
|
+
/**
|
|
73
|
+
* Indicates whether the operation that caused the error should be retried.
|
|
74
|
+
*
|
|
75
|
+
* @remarks
|
|
76
|
+
*
|
|
77
|
+
* When `true`, the error is transient and the operation might succeed
|
|
78
|
+
* if attempted again. When `false`, retrying the same operation is
|
|
79
|
+
* unlikely to succeed without changes.
|
|
80
|
+
*/
|
|
81
|
+
retryable?: boolean | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* The underlying error that caused this error, creating an error chain.
|
|
84
|
+
*
|
|
85
|
+
* @remarks
|
|
86
|
+
*
|
|
87
|
+
* This allows for proper error propagation and debugging by maintaining
|
|
88
|
+
* the full context of how an error occurred through multiple layers
|
|
89
|
+
* of an application.
|
|
90
|
+
*/
|
|
91
|
+
source?: any | undefined;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Canonical error container that provides a structured way to represent errors
|
|
96
|
+
*
|
|
97
|
+
* @remarks
|
|
98
|
+
* with rich metadata including error codes, human-readable messages, context,
|
|
99
|
+
* and chaining capabilities for error propagation.
|
|
100
|
+
*
|
|
101
|
+
* This struct is designed to be both machine-readable and user-friendly,
|
|
102
|
+
* supporting serialization for API responses and detailed error reporting
|
|
103
|
+
* in distributed systems.
|
|
104
|
+
*/
|
|
105
|
+
export class AlienError extends AlienManagerError {
|
|
106
|
+
/**
|
|
107
|
+
* A unique identifier for the type of error.
|
|
108
|
+
*
|
|
109
|
+
* @remarks
|
|
110
|
+
*
|
|
111
|
+
* This should be a short, machine-readable string that can be used
|
|
112
|
+
* by clients to programmatically handle different error types.
|
|
113
|
+
* Examples: "NOT_FOUND", "VALIDATION_ERROR", "TIMEOUT"
|
|
114
|
+
*/
|
|
115
|
+
code: string;
|
|
116
|
+
/**
|
|
117
|
+
* Additional diagnostic information about the error context.
|
|
118
|
+
*
|
|
119
|
+
* @remarks
|
|
120
|
+
*
|
|
121
|
+
* This optional field can contain structured data providing more details
|
|
122
|
+
* about the error, such as validation errors, request parameters that
|
|
123
|
+
* caused the issue, or other relevant context information.
|
|
124
|
+
*/
|
|
125
|
+
context?: any | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* Optional human-facing remediation hint.
|
|
128
|
+
*/
|
|
129
|
+
hint?: string | null | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* HTTP status code for this error.
|
|
132
|
+
*
|
|
133
|
+
* @remarks
|
|
134
|
+
*
|
|
135
|
+
* Used when converting the error to an HTTP response. If None, falls back to
|
|
136
|
+
* the error type's default status code or 500.
|
|
137
|
+
*/
|
|
138
|
+
httpStatusCode?: number | null | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* Indicates if this is an internal error that should not be exposed to users.
|
|
141
|
+
*
|
|
142
|
+
* @remarks
|
|
143
|
+
*
|
|
144
|
+
* When `true`, this error contains sensitive information or implementation
|
|
145
|
+
* details that should not be shown to end-users. Such errors should be
|
|
146
|
+
* logged for debugging but replaced with generic error messages in responses.
|
|
147
|
+
*/
|
|
148
|
+
internal: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Indicates whether the operation that caused the error should be retried.
|
|
151
|
+
*
|
|
152
|
+
* @remarks
|
|
153
|
+
*
|
|
154
|
+
* When `true`, the error is transient and the operation might succeed
|
|
155
|
+
* if attempted again. When `false`, retrying the same operation is
|
|
156
|
+
* unlikely to succeed without changes.
|
|
157
|
+
*/
|
|
158
|
+
retryable?: boolean | undefined;
|
|
159
|
+
/**
|
|
160
|
+
* The underlying error that caused this error, creating an error chain.
|
|
161
|
+
*
|
|
162
|
+
* @remarks
|
|
163
|
+
*
|
|
164
|
+
* This allows for proper error propagation and debugging by maintaining
|
|
165
|
+
* the full context of how an error occurred through multiple layers
|
|
166
|
+
* of an application.
|
|
167
|
+
*/
|
|
168
|
+
source?: any | undefined;
|
|
169
|
+
|
|
170
|
+
/** The original data that was passed to this error instance. */
|
|
171
|
+
data$: AlienErrorData;
|
|
172
|
+
|
|
173
|
+
constructor(
|
|
174
|
+
err: AlienErrorData,
|
|
175
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
176
|
+
) {
|
|
177
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
178
|
+
super(message, httpMeta);
|
|
179
|
+
this.data$ = err;
|
|
180
|
+
this.code = err.code;
|
|
181
|
+
if (err.context != null) this.context = err.context;
|
|
182
|
+
if (err.hint != null) this.hint = err.hint;
|
|
183
|
+
if (err.httpStatusCode != null) this.httpStatusCode = err.httpStatusCode;
|
|
184
|
+
this.internal = err.internal;
|
|
185
|
+
if (err.retryable != null) this.retryable = err.retryable;
|
|
186
|
+
if (err.source != null) this.source = err.source;
|
|
187
|
+
|
|
188
|
+
this.name = "AlienError";
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** @internal */
|
|
193
|
+
export const AlienError$inboundSchema: z.ZodType<AlienError, unknown> = z
|
|
194
|
+
.object({
|
|
195
|
+
code: z.string(),
|
|
196
|
+
context: z.any().optional(),
|
|
197
|
+
hint: z.nullable(z.string()).optional(),
|
|
198
|
+
httpStatusCode: z.nullable(z.int()).optional(),
|
|
199
|
+
internal: z.boolean(),
|
|
200
|
+
message: z.string(),
|
|
201
|
+
retryable: z.boolean().default(false),
|
|
202
|
+
source: z.any().optional(),
|
|
203
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
204
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
205
|
+
body$: z.string(),
|
|
206
|
+
})
|
|
207
|
+
.transform((v) => {
|
|
208
|
+
return new AlienError(v, {
|
|
209
|
+
request: v.request$,
|
|
210
|
+
response: v.response$,
|
|
211
|
+
body: v.body$,
|
|
212
|
+
});
|
|
213
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Protocol for public workload endpoints.
|
|
10
|
+
*/
|
|
11
|
+
export const ExposeProtocol = {
|
|
12
|
+
Http: "http",
|
|
13
|
+
Tcp: "tcp",
|
|
14
|
+
} as const;
|
|
15
|
+
/**
|
|
16
|
+
* Protocol for public workload endpoints.
|
|
17
|
+
*/
|
|
18
|
+
export type ExposeProtocol = ClosedEnum<typeof ExposeProtocol>;
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const ExposeProtocol$inboundSchema: z.ZodEnum<typeof ExposeProtocol> = z
|
|
22
|
+
.enum(ExposeProtocol);
|