@alienplatform/platform-api 1.14.0 → 1.14.3-dev.e74fae6cd01b61e77a285276f264b5480977f41a
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/FUNCTIONS.md +1 -1
- package/README.md +26 -12
- package/esm/funcs/commandsComplete.d.ts +16 -0
- package/esm/funcs/commandsComplete.d.ts.map +1 -0
- package/esm/funcs/commandsComplete.js +92 -0
- package/esm/funcs/commandsComplete.js.map +1 -0
- package/esm/funcs/commandsCreate.js +2 -2
- package/esm/funcs/commandsCreate.js.map +1 -1
- package/esm/funcs/commandsDispatch.d.ts +16 -0
- package/esm/funcs/commandsDispatch.d.ts.map +1 -0
- package/esm/funcs/commandsDispatch.js +92 -0
- package/esm/funcs/commandsDispatch.js.map +1 -0
- package/esm/funcs/commandsIncrementAttempt.d.ts +16 -0
- package/esm/funcs/commandsIncrementAttempt.d.ts.map +1 -0
- package/esm/funcs/commandsIncrementAttempt.js +89 -0
- package/esm/funcs/commandsIncrementAttempt.js.map +1 -0
- package/esm/funcs/commandsResolveTarget.d.ts +16 -0
- package/esm/funcs/commandsResolveTarget.d.ts.map +1 -0
- package/esm/funcs/commandsResolveTarget.js +85 -0
- package/esm/funcs/commandsResolveTarget.js.map +1 -0
- package/esm/funcs/deploymentsGetInputs.d.ts +16 -0
- package/esm/funcs/deploymentsGetInputs.d.ts.map +1 -0
- package/esm/funcs/deploymentsGetInputs.js +89 -0
- package/esm/funcs/deploymentsGetInputs.js.map +1 -0
- package/esm/funcs/deploymentsPinRelease.d.ts +1 -1
- package/esm/funcs/deploymentsPinRelease.js +1 -1
- package/esm/funcs/deploymentsUpdateEnvironmentVariables.js +2 -2
- package/esm/funcs/deploymentsUpdateEnvironmentVariables.js.map +1 -1
- package/esm/funcs/deploymentsUpdateInputs.d.ts +16 -0
- package/esm/funcs/deploymentsUpdateInputs.d.ts.map +1 -0
- package/esm/funcs/deploymentsUpdateInputs.js +92 -0
- package/esm/funcs/deploymentsUpdateInputs.js.map +1 -0
- package/esm/funcs/syncContext.d.ts +16 -0
- package/esm/funcs/syncContext.d.ts.map +1 -0
- package/esm/funcs/syncContext.js +86 -0
- package/esm/funcs/syncContext.js.map +1 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/lib/config.js.map +1 -1
- package/esm/models/command.d.ts +37 -3
- package/esm/models/command.d.ts.map +1 -1
- package/esm/models/command.js +21 -1
- package/esm/models/command.js.map +1 -1
- package/esm/models/commandlistitemresponse.d.ts +37 -3
- package/esm/models/commandlistitemresponse.d.ts.map +1 -1
- package/esm/models/commandlistitemresponse.js +20 -1
- package/esm/models/commandlistitemresponse.js.map +1 -1
- package/esm/models/completecommandrequest.d.ts +49 -0
- package/esm/models/completecommandrequest.d.ts.map +1 -0
- package/esm/models/completecommandrequest.js +25 -0
- package/esm/models/completecommandrequest.js.map +1 -0
- package/esm/models/completecommandresponse.d.ts +13 -0
- package/esm/models/completecommandresponse.d.ts.map +1 -0
- package/esm/models/completecommandresponse.js +13 -0
- package/esm/models/completecommandresponse.js.map +1 -0
- package/esm/models/createcommandrequest.d.ts +5 -0
- package/esm/models/createcommandrequest.d.ts.map +1 -1
- package/esm/models/createcommandrequest.js +1 -0
- package/esm/models/createcommandrequest.js.map +1 -1
- package/esm/models/createcommandresponse.d.ts +51 -0
- package/esm/models/createcommandresponse.d.ts.map +1 -1
- package/esm/models/createcommandresponse.js +29 -0
- package/esm/models/createcommandresponse.js.map +1 -1
- package/esm/models/deployment.d.ts +10 -8
- package/esm/models/deployment.d.ts.map +1 -1
- package/esm/models/deployment.js +1 -0
- package/esm/models/deployment.js.map +1 -1
- package/esm/models/deploymentdetailresponse.d.ts +10 -8
- package/esm/models/deploymentdetailresponse.d.ts.map +1 -1
- package/esm/models/deploymentdetailresponse.js +1 -0
- package/esm/models/deploymentdetailresponse.js.map +1 -1
- package/esm/models/deploymentinfo.d.ts +7 -3
- package/esm/models/deploymentinfo.d.ts.map +1 -1
- package/esm/models/deploymentinfo.js +1 -0
- package/esm/models/deploymentinfo.js.map +1 -1
- package/esm/models/deploymentinputsresponse.d.ts +267 -0
- package/esm/models/deploymentinputsresponse.d.ts.map +1 -0
- package/esm/models/deploymentinputsresponse.js +190 -0
- package/esm/models/deploymentinputsresponse.js.map +1 -0
- package/esm/models/dispatchcommandrequest.d.ts +15 -0
- package/esm/models/dispatchcommandrequest.d.ts.map +1 -0
- package/esm/models/dispatchcommandrequest.js +12 -0
- package/esm/models/dispatchcommandrequest.js.map +1 -0
- package/esm/models/dispatchcommandresponse.d.ts +13 -0
- package/esm/models/dispatchcommandresponse.d.ts.map +1 -0
- package/esm/models/dispatchcommandresponse.js +13 -0
- package/esm/models/dispatchcommandresponse.js.map +1 -0
- package/esm/models/event.d.ts +77 -4
- package/esm/models/event.d.ts.map +1 -1
- package/esm/models/event.js +52 -0
- package/esm/models/event.js.map +1 -1
- package/esm/models/incrementcommandattemptresponse.d.ts +13 -0
- package/esm/models/incrementcommandattemptresponse.d.ts.map +1 -0
- package/esm/models/incrementcommandattemptresponse.js +13 -0
- package/esm/models/incrementcommandattemptresponse.js.map +1 -0
- package/esm/models/index.d.ts +12 -0
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +12 -0
- package/esm/models/index.js.map +1 -1
- package/esm/models/machinesinventoryitem.d.ts +3 -0
- package/esm/models/machinesinventoryitem.d.ts.map +1 -1
- package/esm/models/machinesinventoryitem.js +3 -0
- package/esm/models/machinesinventoryitem.js.map +1 -1
- package/esm/models/machineslocaloverrideobservation.d.ts +24 -0
- package/esm/models/machineslocaloverrideobservation.d.ts.map +1 -0
- package/esm/models/machineslocaloverrideobservation.js +27 -0
- package/esm/models/machineslocaloverrideobservation.js.map +1 -0
- package/esm/models/operations/completecommand.d.ts +23 -0
- package/esm/models/operations/completecommand.d.ts.map +1 -0
- package/esm/models/operations/completecommand.js +21 -0
- package/esm/models/operations/completecommand.js.map +1 -0
- package/esm/models/operations/createproject.d.ts +69 -0
- package/esm/models/operations/createproject.d.ts.map +1 -1
- package/esm/models/operations/createproject.js +36 -0
- package/esm/models/operations/createproject.js.map +1 -1
- package/esm/models/operations/createprojectfromtemplate.d.ts +69 -0
- package/esm/models/operations/createprojectfromtemplate.d.ts.map +1 -1
- package/esm/models/operations/createprojectfromtemplate.js +34 -0
- package/esm/models/operations/createprojectfromtemplate.js.map +1 -1
- package/esm/models/operations/dispatchcommand.d.ts +23 -0
- package/esm/models/operations/dispatchcommand.d.ts.map +1 -0
- package/esm/models/operations/dispatchcommand.js +21 -0
- package/esm/models/operations/dispatchcommand.js.map +1 -0
- package/esm/models/operations/getdeploymentinputs.d.ts +20 -0
- package/esm/models/operations/getdeploymentinputs.d.ts.map +1 -0
- package/esm/models/operations/getdeploymentinputs.js +13 -0
- package/esm/models/operations/getdeploymentinputs.js.map +1 -0
- package/esm/models/operations/getresourcedeploymentdetail.d.ts +1 -0
- package/esm/models/operations/getresourcedeploymentdetail.d.ts.map +1 -1
- package/esm/models/operations/getresourcedeploymentdetail.js +1 -0
- package/esm/models/operations/getresourcedeploymentdetail.js.map +1 -1
- package/esm/models/operations/incrementcommandattempt.d.ts +20 -0
- package/esm/models/operations/incrementcommandattempt.d.ts.map +1 -0
- package/esm/models/operations/incrementcommandattempt.js +13 -0
- package/esm/models/operations/incrementcommandattempt.js.map +1 -0
- package/esm/models/operations/index.d.ts +7 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +7 -0
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/resolvecommandtarget.d.ts +25 -0
- package/esm/models/operations/resolvecommandtarget.d.ts.map +1 -0
- package/esm/models/operations/resolvecommandtarget.js +14 -0
- package/esm/models/operations/resolvecommandtarget.js.map +1 -0
- package/esm/models/operations/synccontext.d.ts +18 -0
- package/esm/models/operations/synccontext.d.ts.map +1 -0
- package/esm/models/operations/synccontext.js +19 -0
- package/esm/models/operations/synccontext.js.map +1 -0
- package/esm/models/operations/updatedeploymentinputs.d.ts +23 -0
- package/esm/models/operations/updatedeploymentinputs.d.ts.map +1 -0
- package/esm/models/operations/updatedeploymentinputs.js +21 -0
- package/esm/models/operations/updatedeploymentinputs.js.map +1 -0
- package/esm/models/package.d.ts +66 -3
- package/esm/models/package.d.ts.map +1 -1
- package/esm/models/package.js +30 -0
- package/esm/models/package.js.map +1 -1
- package/esm/models/persistimporteddeploymentrequest.d.ts +10 -4
- package/esm/models/persistimporteddeploymentrequest.d.ts.map +1 -1
- package/esm/models/persistimporteddeploymentrequest.js +1 -0
- package/esm/models/persistimporteddeploymentrequest.js.map +1 -1
- package/esm/models/prepareddeploymentstack.d.ts +1 -4
- package/esm/models/prepareddeploymentstack.d.ts.map +1 -1
- package/esm/models/prepareddeploymentstack.js.map +1 -1
- package/esm/models/project.d.ts +34 -0
- package/esm/models/project.d.ts.map +1 -1
- package/esm/models/project.js +17 -0
- package/esm/models/project.js.map +1 -1
- package/esm/models/projectlistitemresponse.d.ts +34 -0
- package/esm/models/projectlistitemresponse.d.ts.map +1 -1
- package/esm/models/projectlistitemresponse.js +18 -0
- package/esm/models/projectlistitemresponse.js.map +1 -1
- package/esm/models/resolvedcommandtarget.d.ts +82 -0
- package/esm/models/resolvedcommandtarget.d.ts.map +1 -0
- package/esm/models/resolvedcommandtarget.js +48 -0
- package/esm/models/resolvedcommandtarget.js.map +1 -0
- package/esm/models/stackinputvaluerequest.d.ts +5 -0
- package/esm/models/stackinputvaluerequest.d.ts.map +1 -1
- package/esm/models/stackinputvaluerequest.js +6 -0
- package/esm/models/stackinputvaluerequest.js.map +1 -1
- package/esm/models/syncacquireresponse.d.ts +13 -10479
- package/esm/models/syncacquireresponse.d.ts.map +1 -1
- package/esm/models/syncacquireresponse.js +3 -7114
- package/esm/models/syncacquireresponse.js.map +1 -1
- package/esm/models/syncacquireresponsedeployment.d.ts +10467 -0
- package/esm/models/syncacquireresponsedeployment.d.ts.map +1 -0
- package/esm/models/syncacquireresponsedeployment.js +7455 -0
- package/esm/models/syncacquireresponsedeployment.js.map +1 -0
- package/esm/models/synccontextrequest.d.ts +17 -0
- package/esm/models/synccontextrequest.d.ts.map +1 -0
- package/esm/models/synccontextrequest.js +13 -0
- package/esm/models/synccontextrequest.js.map +1 -0
- package/esm/models/synclistresponse.d.ts +10 -8
- package/esm/models/synclistresponse.d.ts.map +1 -1
- package/esm/models/synclistresponse.js +1 -0
- package/esm/models/synclistresponse.js.map +1 -1
- package/esm/models/syncreconcilerequest.d.ts +13 -16
- package/esm/models/syncreconcilerequest.d.ts.map +1 -1
- package/esm/models/syncreconcilerequest.js +1 -0
- package/esm/models/syncreconcilerequest.js.map +1 -1
- package/esm/models/syncreconcileresponse.d.ts +17 -24
- package/esm/models/syncreconcileresponse.d.ts.map +1 -1
- package/esm/models/syncreconcileresponse.js +1 -0
- package/esm/models/syncreconcileresponse.js.map +1 -1
- package/esm/models/updatedeploymentinputsrequest.d.ts +19 -0
- package/esm/models/updatedeploymentinputsrequest.d.ts.map +1 -0
- package/esm/models/updatedeploymentinputsrequest.js +15 -0
- package/esm/models/updatedeploymentinputsrequest.js.map +1 -0
- package/esm/models/updatedeploymentinputsresponse.d.ts +268 -0
- package/esm/models/updatedeploymentinputsresponse.d.ts.map +1 -0
- package/esm/models/updatedeploymentinputsresponse.js +191 -0
- package/esm/models/updatedeploymentinputsresponse.js.map +1 -0
- package/esm/models/updateproject.d.ts +35 -0
- package/esm/models/updateproject.d.ts.map +1 -1
- package/esm/models/updateproject.js +17 -0
- package/esm/models/updateproject.js.map +1 -1
- package/esm/sdk/apikeys.d.ts +4 -4
- package/esm/sdk/apikeys.d.ts.map +1 -1
- package/esm/sdk/apikeys.js +6 -6
- package/esm/sdk/commands.d.ts +18 -2
- package/esm/sdk/commands.d.ts.map +1 -1
- package/esm/sdk/commands.js +31 -3
- package/esm/sdk/commands.js.map +1 -1
- package/esm/sdk/debugsessions.d.ts +4 -4
- package/esm/sdk/debugsessions.d.ts.map +1 -1
- package/esm/sdk/debugsessions.js +6 -6
- package/esm/sdk/debugsessions.js.map +1 -1
- package/esm/sdk/deploymentgroups.d.ts +8 -8
- package/esm/sdk/deploymentgroups.d.ts.map +1 -1
- package/esm/sdk/deploymentgroups.js +12 -12
- package/esm/sdk/deploymentgroups.js.map +1 -1
- package/esm/sdk/deployments.d.ts +9 -1
- package/esm/sdk/deployments.d.ts.map +1 -1
- package/esm/sdk/deployments.js +15 -1
- package/esm/sdk/deployments.js.map +1 -1
- package/esm/sdk/machines.d.ts +1 -1
- package/esm/sdk/machines.d.ts.map +1 -1
- package/esm/sdk/machines.js +3 -3
- package/esm/sdk/machines.js.map +1 -1
- package/esm/sdk/managers.d.ts +4 -4
- package/esm/sdk/managers.d.ts.map +1 -1
- package/esm/sdk/managers.js +6 -6
- package/esm/sdk/managers.js.map +1 -1
- package/esm/sdk/projects.d.ts +4 -4
- package/esm/sdk/projects.d.ts.map +1 -1
- package/esm/sdk/projects.js +6 -6
- 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/sdk/workspaces.d.ts +8 -8
- package/esm/sdk/workspaces.d.ts.map +1 -1
- package/esm/sdk/workspaces.js +12 -12
- package/jsr.json +1 -1
- package/package.json +2 -4
- package/src/funcs/commandsComplete.ts +182 -0
- package/src/funcs/commandsCreate.ts +3 -3
- package/src/funcs/commandsDispatch.ts +182 -0
- package/src/funcs/commandsIncrementAttempt.ts +180 -0
- package/src/funcs/commandsResolveTarget.ts +175 -0
- package/src/funcs/deploymentsGetInputs.ts +180 -0
- package/src/funcs/deploymentsPinRelease.ts +1 -1
- package/src/funcs/deploymentsUpdateEnvironmentVariables.ts +2 -2
- package/src/funcs/deploymentsUpdateInputs.ts +183 -0
- package/src/funcs/syncContext.ts +176 -0
- package/src/lib/config.ts +2 -2
- package/src/models/command.ts +57 -3
- package/src/models/commandlistitemresponse.ts +61 -3
- package/src/models/completecommandrequest.ts +72 -0
- package/src/models/completecommandresponse.ts +33 -0
- package/src/models/createcommandrequest.ts +6 -0
- package/src/models/createcommandresponse.ts +82 -0
- package/src/models/deployment.ts +11 -8
- package/src/models/deploymentdetailresponse.ts +11 -8
- package/src/models/deploymentinfo.ts +8 -3
- package/src/models/deploymentinputsresponse.ts +575 -0
- package/src/models/dispatchcommandrequest.ts +33 -0
- package/src/models/dispatchcommandresponse.ts +33 -0
- package/src/models/event.ts +143 -4
- package/src/models/incrementcommandattemptresponse.ts +33 -0
- package/src/models/index.ts +12 -0
- package/src/models/machinesinventoryitem.ts +8 -0
- package/src/models/machineslocaloverrideobservation.ts +58 -0
- package/src/models/operations/completecommand.ts +49 -0
- package/src/models/operations/createproject.ts +85 -0
- package/src/models/operations/createprojectfromtemplate.ts +93 -0
- package/src/models/operations/dispatchcommand.ts +49 -0
- package/src/models/operations/getdeploymentinputs.ts +39 -0
- package/src/models/operations/getresourcedeploymentdetail.ts +2 -0
- package/src/models/operations/incrementcommandattempt.ts +41 -0
- package/src/models/operations/index.ts +7 -0
- package/src/models/operations/resolvecommandtarget.ts +47 -0
- package/src/models/operations/synccontext.ts +42 -0
- package/src/models/operations/updatedeploymentinputs.ts +55 -0
- package/src/models/package.ts +83 -3
- package/src/models/persistimporteddeploymentrequest.ts +11 -4
- package/src/models/prepareddeploymentstack.ts +1 -4
- package/src/models/project.ts +39 -0
- package/src/models/projectlistitemresponse.ts +42 -0
- package/src/models/resolvedcommandtarget.ts +132 -0
- package/src/models/stackinputvaluerequest.ts +17 -0
- package/src/models/syncacquireresponse.ts +18 -26459
- package/src/models/syncacquireresponsedeployment.ts +28585 -0
- package/src/models/synccontextrequest.ts +36 -0
- package/src/models/synclistresponse.ts +11 -8
- package/src/models/syncreconcilerequest.ts +14 -16
- package/src/models/syncreconcileresponse.ts +18 -24
- package/src/models/updatedeploymentinputsrequest.ts +41 -0
- package/src/models/updatedeploymentinputsresponse.ts +608 -0
- package/src/models/updateproject.ts +42 -0
- package/src/sdk/apikeys.ts +10 -10
- package/src/sdk/commands.ts +65 -5
- package/src/sdk/debugsessions.ts +8 -8
- package/src/sdk/deploymentgroups.ts +20 -20
- package/src/sdk/deployments.ts +31 -1
- package/src/sdk/machines.ts +8 -8
- package/src/sdk/managers.ts +10 -10
- package/src/sdk/projects.ts +10 -10
- package/src/sdk/sync.ts +15 -0
- package/src/sdk/workspaces.ts +20 -20
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { AlienCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import { AlienError } from "../models/errors/alienerror.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as models from "../models/index.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Update runtime stack inputs, rebuild their environment-variable mappings, and request a deployment update when runtime configuration changes.
|
|
31
|
+
*/
|
|
32
|
+
export function deploymentsUpdateInputs(
|
|
33
|
+
client: AlienCore,
|
|
34
|
+
request: operations.UpdateDeploymentInputsRequest,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): APIPromise<
|
|
37
|
+
Result<
|
|
38
|
+
models.UpdateDeploymentInputsResponse,
|
|
39
|
+
| errors.APIError
|
|
40
|
+
| AlienError
|
|
41
|
+
| ResponseValidationError
|
|
42
|
+
| ConnectionError
|
|
43
|
+
| RequestAbortedError
|
|
44
|
+
| RequestTimeoutError
|
|
45
|
+
| InvalidRequestError
|
|
46
|
+
| UnexpectedClientError
|
|
47
|
+
| SDKValidationError
|
|
48
|
+
>
|
|
49
|
+
> {
|
|
50
|
+
return new APIPromise($do(
|
|
51
|
+
client,
|
|
52
|
+
request,
|
|
53
|
+
options,
|
|
54
|
+
));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function $do(
|
|
58
|
+
client: AlienCore,
|
|
59
|
+
request: operations.UpdateDeploymentInputsRequest,
|
|
60
|
+
options?: RequestOptions,
|
|
61
|
+
): Promise<
|
|
62
|
+
[
|
|
63
|
+
Result<
|
|
64
|
+
models.UpdateDeploymentInputsResponse,
|
|
65
|
+
| errors.APIError
|
|
66
|
+
| AlienError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
69
|
+
| RequestAbortedError
|
|
70
|
+
| RequestTimeoutError
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
>,
|
|
75
|
+
APICall,
|
|
76
|
+
]
|
|
77
|
+
> {
|
|
78
|
+
const parsed = safeParse(
|
|
79
|
+
request,
|
|
80
|
+
(value) =>
|
|
81
|
+
operations.UpdateDeploymentInputsRequest$outboundSchema.parse(value),
|
|
82
|
+
"Input validation failed",
|
|
83
|
+
);
|
|
84
|
+
if (!parsed.ok) {
|
|
85
|
+
return [parsed, { status: "invalid" }];
|
|
86
|
+
}
|
|
87
|
+
const payload = parsed.value;
|
|
88
|
+
const body = encodeJSON("body", payload.UpdateDeploymentInputsRequest, {
|
|
89
|
+
explode: true,
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const pathParams = {
|
|
93
|
+
id: encodeSimple("id", payload.id, {
|
|
94
|
+
explode: false,
|
|
95
|
+
charEncoding: "percent",
|
|
96
|
+
}),
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const path = pathToFunc("/v1/deployments/{id}/inputs")(pathParams);
|
|
100
|
+
|
|
101
|
+
const query = encodeFormQuery({
|
|
102
|
+
"workspace": payload.workspace,
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
const headers = new Headers(compactMap({
|
|
106
|
+
"Content-Type": "application/json",
|
|
107
|
+
Accept: "application/json",
|
|
108
|
+
}));
|
|
109
|
+
|
|
110
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
111
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
112
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
113
|
+
|
|
114
|
+
const context = {
|
|
115
|
+
options: client._options,
|
|
116
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
117
|
+
operationID: "updateDeploymentInputs",
|
|
118
|
+
oAuth2Scopes: null,
|
|
119
|
+
|
|
120
|
+
resolvedSecurity: requestSecurity,
|
|
121
|
+
|
|
122
|
+
securitySource: client._options.apiKey,
|
|
123
|
+
retryConfig: options?.retries
|
|
124
|
+
|| client._options.retryConfig
|
|
125
|
+
|| { strategy: "none" },
|
|
126
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const requestRes = client._createRequest(context, {
|
|
130
|
+
security: requestSecurity,
|
|
131
|
+
method: "PATCH",
|
|
132
|
+
baseURL: options?.serverURL,
|
|
133
|
+
path: path,
|
|
134
|
+
headers: headers,
|
|
135
|
+
query: query,
|
|
136
|
+
body: body,
|
|
137
|
+
userAgent: client._options.userAgent,
|
|
138
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
139
|
+
}, options);
|
|
140
|
+
if (!requestRes.ok) {
|
|
141
|
+
return [requestRes, { status: "invalid" }];
|
|
142
|
+
}
|
|
143
|
+
const req = requestRes.value;
|
|
144
|
+
|
|
145
|
+
const doResult = await client._do(req, {
|
|
146
|
+
context,
|
|
147
|
+
errorCodes: ["400", "403", "404", "4XX", "500", "5XX"],
|
|
148
|
+
retryConfig: context.retryConfig,
|
|
149
|
+
retryCodes: context.retryCodes,
|
|
150
|
+
});
|
|
151
|
+
if (!doResult.ok) {
|
|
152
|
+
return [doResult, { status: "request-error", request: req }];
|
|
153
|
+
}
|
|
154
|
+
const response = doResult.value;
|
|
155
|
+
|
|
156
|
+
const responseFields = {
|
|
157
|
+
HttpMeta: { Response: response, Request: req },
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const [result] = await M.match<
|
|
161
|
+
models.UpdateDeploymentInputsResponse,
|
|
162
|
+
| errors.APIError
|
|
163
|
+
| AlienError
|
|
164
|
+
| ResponseValidationError
|
|
165
|
+
| ConnectionError
|
|
166
|
+
| RequestAbortedError
|
|
167
|
+
| RequestTimeoutError
|
|
168
|
+
| InvalidRequestError
|
|
169
|
+
| UnexpectedClientError
|
|
170
|
+
| SDKValidationError
|
|
171
|
+
>(
|
|
172
|
+
M.json(200, models.UpdateDeploymentInputsResponse$inboundSchema),
|
|
173
|
+
M.jsonErr([400, 403, 404], errors.APIError$inboundSchema),
|
|
174
|
+
M.jsonErr(500, errors.APIError$inboundSchema),
|
|
175
|
+
M.fail("4XX"),
|
|
176
|
+
M.fail("5XX"),
|
|
177
|
+
)(response, req, { extraFields: responseFields });
|
|
178
|
+
if (!result.ok) {
|
|
179
|
+
return [result, { status: "complete", request: req, response }];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return [result, { status: "complete", request: req, response }];
|
|
183
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { AlienCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeJSON } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import { AlienError } from "../models/errors/alienerror.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as models from "../models/index.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Get computed deployment state and configuration for a manager-side operation without acquiring the deployment reconciliation lock.
|
|
31
|
+
*/
|
|
32
|
+
export function syncContext(
|
|
33
|
+
client: AlienCore,
|
|
34
|
+
request?: operations.SyncContextRequest | undefined,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): APIPromise<
|
|
37
|
+
Result<
|
|
38
|
+
models.SyncAcquireResponseDeployment,
|
|
39
|
+
| errors.APIError
|
|
40
|
+
| AlienError
|
|
41
|
+
| ResponseValidationError
|
|
42
|
+
| ConnectionError
|
|
43
|
+
| RequestAbortedError
|
|
44
|
+
| RequestTimeoutError
|
|
45
|
+
| InvalidRequestError
|
|
46
|
+
| UnexpectedClientError
|
|
47
|
+
| SDKValidationError
|
|
48
|
+
>
|
|
49
|
+
> {
|
|
50
|
+
return new APIPromise($do(
|
|
51
|
+
client,
|
|
52
|
+
request,
|
|
53
|
+
options,
|
|
54
|
+
));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function $do(
|
|
58
|
+
client: AlienCore,
|
|
59
|
+
request?: operations.SyncContextRequest | undefined,
|
|
60
|
+
options?: RequestOptions,
|
|
61
|
+
): Promise<
|
|
62
|
+
[
|
|
63
|
+
Result<
|
|
64
|
+
models.SyncAcquireResponseDeployment,
|
|
65
|
+
| errors.APIError
|
|
66
|
+
| AlienError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
69
|
+
| RequestAbortedError
|
|
70
|
+
| RequestTimeoutError
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
>,
|
|
75
|
+
APICall,
|
|
76
|
+
]
|
|
77
|
+
> {
|
|
78
|
+
const parsed = safeParse(
|
|
79
|
+
request,
|
|
80
|
+
(value) =>
|
|
81
|
+
operations.SyncContextRequest$outboundSchema.optional().parse(value),
|
|
82
|
+
"Input validation failed",
|
|
83
|
+
);
|
|
84
|
+
if (!parsed.ok) {
|
|
85
|
+
return [parsed, { status: "invalid" }];
|
|
86
|
+
}
|
|
87
|
+
const payload = parsed.value;
|
|
88
|
+
const body = encodeJSON("body", payload?.SyncContextRequest, {
|
|
89
|
+
explode: true,
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const path = pathToFunc("/v1/sync/context")();
|
|
93
|
+
|
|
94
|
+
const query = encodeFormQuery({
|
|
95
|
+
"workspace": payload?.workspace,
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
const headers = new Headers(compactMap({
|
|
99
|
+
"Content-Type": "application/json",
|
|
100
|
+
Accept: "application/json",
|
|
101
|
+
}));
|
|
102
|
+
|
|
103
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
104
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
105
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
106
|
+
|
|
107
|
+
const context = {
|
|
108
|
+
options: client._options,
|
|
109
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
110
|
+
operationID: "syncContext",
|
|
111
|
+
oAuth2Scopes: null,
|
|
112
|
+
|
|
113
|
+
resolvedSecurity: requestSecurity,
|
|
114
|
+
|
|
115
|
+
securitySource: client._options.apiKey,
|
|
116
|
+
retryConfig: options?.retries
|
|
117
|
+
|| client._options.retryConfig
|
|
118
|
+
|| { strategy: "none" },
|
|
119
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
const requestRes = client._createRequest(context, {
|
|
123
|
+
security: requestSecurity,
|
|
124
|
+
method: "POST",
|
|
125
|
+
baseURL: options?.serverURL,
|
|
126
|
+
path: path,
|
|
127
|
+
headers: headers,
|
|
128
|
+
query: query,
|
|
129
|
+
body: body,
|
|
130
|
+
userAgent: client._options.userAgent,
|
|
131
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
132
|
+
}, options);
|
|
133
|
+
if (!requestRes.ok) {
|
|
134
|
+
return [requestRes, { status: "invalid" }];
|
|
135
|
+
}
|
|
136
|
+
const req = requestRes.value;
|
|
137
|
+
|
|
138
|
+
const doResult = await client._do(req, {
|
|
139
|
+
context,
|
|
140
|
+
errorCodes: ["404", "4XX", "500", "5XX"],
|
|
141
|
+
retryConfig: context.retryConfig,
|
|
142
|
+
retryCodes: context.retryCodes,
|
|
143
|
+
});
|
|
144
|
+
if (!doResult.ok) {
|
|
145
|
+
return [doResult, { status: "request-error", request: req }];
|
|
146
|
+
}
|
|
147
|
+
const response = doResult.value;
|
|
148
|
+
|
|
149
|
+
const responseFields = {
|
|
150
|
+
HttpMeta: { Response: response, Request: req },
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
const [result] = await M.match<
|
|
154
|
+
models.SyncAcquireResponseDeployment,
|
|
155
|
+
| errors.APIError
|
|
156
|
+
| AlienError
|
|
157
|
+
| ResponseValidationError
|
|
158
|
+
| ConnectionError
|
|
159
|
+
| RequestAbortedError
|
|
160
|
+
| RequestTimeoutError
|
|
161
|
+
| InvalidRequestError
|
|
162
|
+
| UnexpectedClientError
|
|
163
|
+
| SDKValidationError
|
|
164
|
+
>(
|
|
165
|
+
M.json(200, models.SyncAcquireResponseDeployment$inboundSchema),
|
|
166
|
+
M.jsonErr(404, errors.APIError$inboundSchema),
|
|
167
|
+
M.jsonErr(500, errors.APIError$inboundSchema),
|
|
168
|
+
M.fail("4XX"),
|
|
169
|
+
M.fail("5XX"),
|
|
170
|
+
)(response, req, { extraFields: responseFields });
|
|
171
|
+
if (!result.ok) {
|
|
172
|
+
return [result, { status: "complete", request: req, response }];
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return [result, { status: "complete", request: req, response }];
|
|
176
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "1.0.0",
|
|
64
|
-
sdkVersion: "1.
|
|
64
|
+
sdkVersion: "1.14.3",
|
|
65
65
|
genVersion: "2.788.15",
|
|
66
66
|
userAgent:
|
|
67
|
-
"speakeasy-sdk/typescript 1.
|
|
67
|
+
"speakeasy-sdk/typescript 1.14.3 2.788.15 1.0.0 @alienplatform/platform-api",
|
|
68
68
|
} as const;
|
package/src/models/command.ts
CHANGED
|
@@ -25,17 +25,44 @@ export const CommandState = {
|
|
|
25
25
|
export type CommandState = ClosedEnum<typeof CommandState>;
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Delivery mode for this command (push/pull), derived from the target at creation time
|
|
29
29
|
*/
|
|
30
30
|
export const CommandDeploymentModel = {
|
|
31
31
|
Push: "push",
|
|
32
32
|
Pull: "pull",
|
|
33
33
|
} as const;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Delivery mode for this command (push/pull), derived from the target at creation time
|
|
36
36
|
*/
|
|
37
37
|
export type CommandDeploymentModel = ClosedEnum<typeof CommandDeploymentModel>;
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* The kind of command-capable resource a command targets.
|
|
41
|
+
*/
|
|
42
|
+
export const CommandResourceType = {
|
|
43
|
+
Worker: "worker",
|
|
44
|
+
Container: "container",
|
|
45
|
+
Daemon: "daemon",
|
|
46
|
+
} as const;
|
|
47
|
+
/**
|
|
48
|
+
* The kind of command-capable resource a command targets.
|
|
49
|
+
*/
|
|
50
|
+
export type CommandResourceType = ClosedEnum<typeof CommandResourceType>;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Resource the command is addressed to; null on commands created before target routing
|
|
54
|
+
*/
|
|
55
|
+
export type CommandTarget = {
|
|
56
|
+
/**
|
|
57
|
+
* The resource ID within the deployment's stack (e.g. a Worker/Container/Daemon id).
|
|
58
|
+
*/
|
|
59
|
+
resourceId: string;
|
|
60
|
+
/**
|
|
61
|
+
* The kind of command-capable resource a command targets.
|
|
62
|
+
*/
|
|
63
|
+
resourceType: CommandResourceType;
|
|
64
|
+
};
|
|
65
|
+
|
|
39
66
|
export type Command = {
|
|
40
67
|
/**
|
|
41
68
|
* Unique identifier for the command.
|
|
@@ -62,9 +89,13 @@ export type Command = {
|
|
|
62
89
|
*/
|
|
63
90
|
state: CommandState;
|
|
64
91
|
/**
|
|
65
|
-
*
|
|
92
|
+
* Delivery mode for this command (push/pull), derived from the target at creation time
|
|
66
93
|
*/
|
|
67
94
|
deploymentModel: CommandDeploymentModel;
|
|
95
|
+
/**
|
|
96
|
+
* Resource the command is addressed to; null on commands created before target routing
|
|
97
|
+
*/
|
|
98
|
+
target: CommandTarget | null;
|
|
68
99
|
/**
|
|
69
100
|
* Current attempt number
|
|
70
101
|
*/
|
|
@@ -112,6 +143,28 @@ export const CommandDeploymentModel$inboundSchema: z.ZodEnum<
|
|
|
112
143
|
typeof CommandDeploymentModel
|
|
113
144
|
> = z.enum(CommandDeploymentModel);
|
|
114
145
|
|
|
146
|
+
/** @internal */
|
|
147
|
+
export const CommandResourceType$inboundSchema: z.ZodEnum<
|
|
148
|
+
typeof CommandResourceType
|
|
149
|
+
> = z.enum(CommandResourceType);
|
|
150
|
+
|
|
151
|
+
/** @internal */
|
|
152
|
+
export const CommandTarget$inboundSchema: z.ZodType<CommandTarget, unknown> = z
|
|
153
|
+
.object({
|
|
154
|
+
resourceId: z.string(),
|
|
155
|
+
resourceType: CommandResourceType$inboundSchema,
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
export function commandTargetFromJSON(
|
|
159
|
+
jsonString: string,
|
|
160
|
+
): SafeParseResult<CommandTarget, SDKValidationError> {
|
|
161
|
+
return safeParse(
|
|
162
|
+
jsonString,
|
|
163
|
+
(x) => CommandTarget$inboundSchema.parse(JSON.parse(x)),
|
|
164
|
+
`Failed to parse 'CommandTarget' from JSON`,
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
115
168
|
/** @internal */
|
|
116
169
|
export const Command$inboundSchema: z.ZodType<Command, unknown> = z.object({
|
|
117
170
|
id: z.string(),
|
|
@@ -121,6 +174,7 @@ export const Command$inboundSchema: z.ZodType<Command, unknown> = z.object({
|
|
|
121
174
|
name: z.string(),
|
|
122
175
|
state: CommandState$inboundSchema,
|
|
123
176
|
deploymentModel: CommandDeploymentModel$inboundSchema,
|
|
177
|
+
target: z.nullable(z.lazy(() => CommandTarget$inboundSchema)),
|
|
124
178
|
attempt: z.nullable(z.number()),
|
|
125
179
|
deadline: z.nullable(
|
|
126
180
|
z.iso.datetime({ offset: true }).transform(v => new Date(v)),
|
|
@@ -35,19 +35,48 @@ export type CommandListItemResponseState = ClosedEnum<
|
|
|
35
35
|
>;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Delivery mode for this command (push/pull), derived from the target at creation time
|
|
39
39
|
*/
|
|
40
40
|
export const CommandListItemResponseDeploymentModel = {
|
|
41
41
|
Push: "push",
|
|
42
42
|
Pull: "pull",
|
|
43
43
|
} as const;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Delivery mode for this command (push/pull), derived from the target at creation time
|
|
46
46
|
*/
|
|
47
47
|
export type CommandListItemResponseDeploymentModel = ClosedEnum<
|
|
48
48
|
typeof CommandListItemResponseDeploymentModel
|
|
49
49
|
>;
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
* The kind of command-capable resource a command targets.
|
|
53
|
+
*/
|
|
54
|
+
export const CommandListItemResponseResourceType = {
|
|
55
|
+
Worker: "worker",
|
|
56
|
+
Container: "container",
|
|
57
|
+
Daemon: "daemon",
|
|
58
|
+
} as const;
|
|
59
|
+
/**
|
|
60
|
+
* The kind of command-capable resource a command targets.
|
|
61
|
+
*/
|
|
62
|
+
export type CommandListItemResponseResourceType = ClosedEnum<
|
|
63
|
+
typeof CommandListItemResponseResourceType
|
|
64
|
+
>;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Resource the command is addressed to; null on commands created before target routing
|
|
68
|
+
*/
|
|
69
|
+
export type CommandListItemResponseTarget = {
|
|
70
|
+
/**
|
|
71
|
+
* The resource ID within the deployment's stack (e.g. a Worker/Container/Daemon id).
|
|
72
|
+
*/
|
|
73
|
+
resourceId: string;
|
|
74
|
+
/**
|
|
75
|
+
* The kind of command-capable resource a command targets.
|
|
76
|
+
*/
|
|
77
|
+
resourceType: CommandListItemResponseResourceType;
|
|
78
|
+
};
|
|
79
|
+
|
|
51
80
|
export type CommandListItemResponse = {
|
|
52
81
|
/**
|
|
53
82
|
* Unique identifier for the command.
|
|
@@ -74,9 +103,13 @@ export type CommandListItemResponse = {
|
|
|
74
103
|
*/
|
|
75
104
|
state: CommandListItemResponseState;
|
|
76
105
|
/**
|
|
77
|
-
*
|
|
106
|
+
* Delivery mode for this command (push/pull), derived from the target at creation time
|
|
78
107
|
*/
|
|
79
108
|
deploymentModel: CommandListItemResponseDeploymentModel;
|
|
109
|
+
/**
|
|
110
|
+
* Resource the command is addressed to; null on commands created before target routing
|
|
111
|
+
*/
|
|
112
|
+
target: CommandListItemResponseTarget | null;
|
|
80
113
|
/**
|
|
81
114
|
* Current attempt number
|
|
82
115
|
*/
|
|
@@ -127,6 +160,30 @@ export const CommandListItemResponseDeploymentModel$inboundSchema: z.ZodEnum<
|
|
|
127
160
|
typeof CommandListItemResponseDeploymentModel
|
|
128
161
|
> = z.enum(CommandListItemResponseDeploymentModel);
|
|
129
162
|
|
|
163
|
+
/** @internal */
|
|
164
|
+
export const CommandListItemResponseResourceType$inboundSchema: z.ZodEnum<
|
|
165
|
+
typeof CommandListItemResponseResourceType
|
|
166
|
+
> = z.enum(CommandListItemResponseResourceType);
|
|
167
|
+
|
|
168
|
+
/** @internal */
|
|
169
|
+
export const CommandListItemResponseTarget$inboundSchema: z.ZodType<
|
|
170
|
+
CommandListItemResponseTarget,
|
|
171
|
+
unknown
|
|
172
|
+
> = z.object({
|
|
173
|
+
resourceId: z.string(),
|
|
174
|
+
resourceType: CommandListItemResponseResourceType$inboundSchema,
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
export function commandListItemResponseTargetFromJSON(
|
|
178
|
+
jsonString: string,
|
|
179
|
+
): SafeParseResult<CommandListItemResponseTarget, SDKValidationError> {
|
|
180
|
+
return safeParse(
|
|
181
|
+
jsonString,
|
|
182
|
+
(x) => CommandListItemResponseTarget$inboundSchema.parse(JSON.parse(x)),
|
|
183
|
+
`Failed to parse 'CommandListItemResponseTarget' from JSON`,
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
130
187
|
/** @internal */
|
|
131
188
|
export const CommandListItemResponse$inboundSchema: z.ZodType<
|
|
132
189
|
CommandListItemResponse,
|
|
@@ -139,6 +196,7 @@ export const CommandListItemResponse$inboundSchema: z.ZodType<
|
|
|
139
196
|
name: z.string(),
|
|
140
197
|
state: CommandListItemResponseState$inboundSchema,
|
|
141
198
|
deploymentModel: CommandListItemResponseDeploymentModel$inboundSchema,
|
|
199
|
+
target: z.nullable(z.lazy(() => CommandListItemResponseTarget$inboundSchema)),
|
|
142
200
|
attempt: z.nullable(z.number()),
|
|
143
201
|
deadline: z.nullable(
|
|
144
202
|
z.iso.datetime({ offset: true }).transform(v => new Date(v)),
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
* Terminal state to transition to
|
|
10
|
+
*/
|
|
11
|
+
export const CompleteCommandRequestState = {
|
|
12
|
+
Succeeded: "SUCCEEDED",
|
|
13
|
+
Failed: "FAILED",
|
|
14
|
+
Expired: "EXPIRED",
|
|
15
|
+
} as const;
|
|
16
|
+
/**
|
|
17
|
+
* Terminal state to transition to
|
|
18
|
+
*/
|
|
19
|
+
export type CompleteCommandRequestState = ClosedEnum<
|
|
20
|
+
typeof CompleteCommandRequestState
|
|
21
|
+
>;
|
|
22
|
+
|
|
23
|
+
export type CompleteCommandRequest = {
|
|
24
|
+
/**
|
|
25
|
+
* Terminal state to transition to
|
|
26
|
+
*/
|
|
27
|
+
state: CompleteCommandRequestState;
|
|
28
|
+
/**
|
|
29
|
+
* When the command completed
|
|
30
|
+
*/
|
|
31
|
+
completedAt: Date;
|
|
32
|
+
/**
|
|
33
|
+
* Size of response in bytes
|
|
34
|
+
*/
|
|
35
|
+
responseSizeBytes?: number | null | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Error details if failed
|
|
38
|
+
*/
|
|
39
|
+
error?: { [k: string]: any | null } | null | undefined;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const CompleteCommandRequestState$outboundSchema: z.ZodEnum<
|
|
44
|
+
typeof CompleteCommandRequestState
|
|
45
|
+
> = z.enum(CompleteCommandRequestState);
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export type CompleteCommandRequest$Outbound = {
|
|
49
|
+
state: string;
|
|
50
|
+
completedAt: string;
|
|
51
|
+
responseSizeBytes?: number | null | undefined;
|
|
52
|
+
error?: { [k: string]: any | null } | null | undefined;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const CompleteCommandRequest$outboundSchema: z.ZodType<
|
|
57
|
+
CompleteCommandRequest$Outbound,
|
|
58
|
+
CompleteCommandRequest
|
|
59
|
+
> = z.object({
|
|
60
|
+
state: CompleteCommandRequestState$outboundSchema,
|
|
61
|
+
completedAt: z.date().transform(v => v.toISOString()),
|
|
62
|
+
responseSizeBytes: z.nullable(z.number()).optional(),
|
|
63
|
+
error: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
export function completeCommandRequestToJSON(
|
|
67
|
+
completeCommandRequest: CompleteCommandRequest,
|
|
68
|
+
): string {
|
|
69
|
+
return JSON.stringify(
|
|
70
|
+
CompleteCommandRequest$outboundSchema.parse(completeCommandRequest),
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type CompleteCommandResponse = {
|
|
11
|
+
/**
|
|
12
|
+
* Whether the command transitioned; false if it was already terminal
|
|
13
|
+
*/
|
|
14
|
+
updated: boolean;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const CompleteCommandResponse$inboundSchema: z.ZodType<
|
|
19
|
+
CompleteCommandResponse,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.object({
|
|
22
|
+
updated: z.boolean(),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export function completeCommandResponseFromJSON(
|
|
26
|
+
jsonString: string,
|
|
27
|
+
): SafeParseResult<CompleteCommandResponse, SDKValidationError> {
|
|
28
|
+
return safeParse(
|
|
29
|
+
jsonString,
|
|
30
|
+
(x) => CompleteCommandResponse$inboundSchema.parse(JSON.parse(x)),
|
|
31
|
+
`Failed to parse 'CompleteCommandResponse' from JSON`,
|
|
32
|
+
);
|
|
33
|
+
}
|